ソースを参照

北仑增加模板标题和文书标题不一致情况的处理

wangsy 4 年 前
コミット
5450ad2519

+ 2 - 1
kernel/src/main/java/com/lantone/qc/kernel/catalogue/beilun/operationdiscussion/OPE0369.java

@@ -82,13 +82,14 @@ public class OPE0369 extends QCCatalogue {
             for (ThreeLevelWardDoc threeLevelWard : allDoctorWradDocs) {
                 Map<String, String> structureMap = threeLevelWard.getStructureMap();
                 String makeTitle = structureMap.get("查房标题");
+                String writTitle = structureMap.get("文书标题");
                 String recordDateStr = structureMap.get("查房日期");
                 if (operDateList.size() > 0) {
                     for (Date date : operDateList) {
                         if (StringUtil.isNotBlank(recordDateStr) && date != null
                                 && StringUtil.parseDateTime(recordDateStr).before(date)) {
                             if (CatalogueUtil.compareTime(StringUtil.parseDateTime(recordDateStr), date, Long.valueOf(24 * 60))
-                                    && makeTitle.contains("主刀")) {
+                                    && (makeTitle.contains("主刀") || (StringUtil.isNotBlank(writTitle) && writTitle.contains("主刀")))) {
                                 operateCount++;
                             }
                         }

+ 4 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/beilun/threelevelward/THR02900.java

@@ -82,6 +82,7 @@ public class THR02900 extends QCCatalogue {
                     Map<String, String> wardStructureMap = wardDoc.getStructureMap();
                     String recordDateStr = wardStructureMap.get("查房日期");
                     String recordTitle = wardStructureMap.get("查房标题");
+                    String writTitle = wardStructureMap.get("文书标题");
                     String pathography = wardStructureMap.get("病情记录");
                     Date recordDate = CatalogueUtil.parseStringDate(recordDateStr);
                     if (StringUtil.isBlank(recordTitle) || StringUtil.isBlank(pathography) || recordDate == null) {
@@ -90,6 +91,9 @@ public class THR02900 extends QCCatalogue {
                     if (opeEndDate.before(recordDate) && !CatalogueUtil.compareTime(opeEndDate, recordDate, 24 * 60L)) {
                         allTitle += recordTitle;
                         allPathography += pathography;
+                        if (StringUtil.isNotBlank(writTitle)) {
+                            allTitle += writTitle;
+                        }
                     }
                 }
             }

+ 36 - 0
trans/src/main/java/com/lantone/qc/trans/beilun/BeiLunThreeLevelWardDocTrans.java

@@ -135,6 +135,7 @@ public class BeiLunThreeLevelWardDocTrans extends ModelDocTrans {
     private DirectorDoctorWardDoc findDirectorDoctorWardDoc(Map<String, String> structureMap) {
         String title = structureMap.get("查房标题");
         String content = structureMap.get("病情记录");
+        String writTitle = structureMap.get("文书标题");
         String recordDateStr = structureMap.get("查房日期");
         Date recordDate = StringUtil.parseDateTime(recordDateStr);
         //标题有代字
@@ -154,6 +155,22 @@ public class BeiLunThreeLevelWardDocTrans extends ModelDocTrans {
                 directorDoctorWardDoc.setPageData((Map) structureMap);
             }
         }
+
+        if (StringUtil.isNotBlank(writTitle)) {
+            if (writTitle.contains("主刀")) {
+                String doctorTitle = getDoctorTitle(operationDocs, recordDate, "主刀医师");
+                writTitle = writTitle.replace("主刀", doctorTitle);
+            } else if (writTitle.contains("一助")) {
+                String doctorTitle = getDoctorTitle(operationDocs, recordDate, "一助");
+                writTitle = writTitle.replace("一助", doctorTitle);
+            }
+            if ((StringUtils.isNotEmpty(subTitle(writTitle)) && subTitle(writTitle).contains("主任")) || findDirector(content)
+                    || writTitle.contains("三级医师查房")) {
+                directorDoctorWardDoc = new DirectorDoctorWardDoc();
+                directorDoctorWardDoc.setStructureMap(structureMap);
+                directorDoctorWardDoc.setPageData((Map) structureMap);
+            }
+        }
         return directorDoctorWardDoc;
     }
 
@@ -164,6 +181,7 @@ public class BeiLunThreeLevelWardDocTrans extends ModelDocTrans {
      */
     private AttendingDoctorWardDoc findAttendingDoctorWardDoc(Map<String, String> structureMap) {
         String title = structureMap.get("查房标题");
+        String writTitle = structureMap.get("文书标题");
         String content = structureMap.get("病情记录");
         String recordDateStr = structureMap.get("查房日期");
         Date recordDate = StringUtil.parseDateTime(recordDateStr);
@@ -184,9 +202,27 @@ public class BeiLunThreeLevelWardDocTrans extends ModelDocTrans {
                 attendingDoctorWardDoc.setPageData((Map) structureMap);
             }
         }
+
+        //文书标题和模板标题不一致
+        if (StringUtil.isNotBlank(writTitle)) {
+            if (writTitle.contains("主刀")) {
+                String doctorTitle = getDoctorTitle(operationDocs, recordDate, "主刀医师");
+                writTitle = writTitle.replace("主刀", doctorTitle);
+            } else if (writTitle.contains("一助")) {
+                String doctorTitle = getDoctorTitle(operationDocs, recordDate, "一助");
+                writTitle = writTitle.replace("一助", doctorTitle);
+            }
+            if ((StringUtils.isNotEmpty(subTitle(writTitle)) && subTitle(writTitle).contains("主治"))
+                    || findAttend(content) || writTitle.contains("三级医师查房")) {
+                attendingDoctorWardDoc = new AttendingDoctorWardDoc();
+                attendingDoctorWardDoc.setStructureMap(structureMap);
+                attendingDoctorWardDoc.setPageData((Map) structureMap);
+            }
+        }
         return attendingDoctorWardDoc;
     }
 
+
     /**
      * 共同照护讨论记录中找主任查房
      *

+ 1 - 0
trans/src/main/java/com/lantone/qc/trans/comsis/CommonAnalysisUtil.java

@@ -355,6 +355,7 @@ public class CommonAnalysisUtil {
                 titleContent.remove(0);
             } else {
                 structureMap.put("病历标题", recTitle);
+                structureMap.put("文书标题", title);
                 if (titleContent.size() > 2) {
                     titleContent.remove(0);
                     titleContent.remove(0);