Browse Source

Merge branch 'dev-shaoyf' into dev

zhoutg 5 years ago
parent
commit
af212b517a

+ 8 - 1
kernel/src/main/java/com/lantone/qc/kernel/catalogue/medicalwriting/MEDI02995.java

@@ -52,7 +52,14 @@ public class MEDI02995 extends QCCatalogue {
         if (ListUtil.isNotEmpty(criticallyIllNoticeDocs)) {
             for (CriticallyIllNoticeDoc bean : criticallyIllNoticeDocs) {
                 Map<String, String> structureMap = bean.getStructureMap();
-                if (structureMap.containsKey("rec_title") && structureMap.get("rec_title").contains("病危")) {
+                String mapKey = ""; // 数据示例:"rec_title=病危通知"
+                for (Map.Entry<String, String> entity : structureMap.entrySet()) {
+                    if (entity.getKey().indexOf("rec_title=") > -1 ){
+                        mapKey = entity.getKey();
+                        break;
+                    }
+                }
+                if (StringUtil.isNotBlank(mapKey) && mapKey.contains("病危")) {
                     status.set("0");
                     return ;
                 }

+ 8 - 1
kernel/src/main/java/com/lantone/qc/kernel/catalogue/medicalwriting/MEDI02999.java

@@ -52,7 +52,14 @@ public class MEDI02999 extends QCCatalogue {
         if (ListUtil.isNotEmpty(criticallyIllNoticeDocs)) {
             for (CriticallyIllNoticeDoc bean : criticallyIllNoticeDocs) {
                 Map<String, String> structureMap = bean.getStructureMap();
-                if (structureMap.containsKey("rec_title") && structureMap.get("rec_title").contains("病重")) {
+                String mapKey = ""; // 数据示例:"rec_title=病重通知"
+                for (Map.Entry<String, String> entity : structureMap.entrySet()) {
+                    if (entity.getKey().indexOf("rec_title=") > -1){
+                        mapKey = entity.getKey();
+                        break;
+                    }
+                }
+                if (StringUtil.isNotBlank(mapKey) && mapKey.contains("病重")) {
                     status.set("0");
                     return ;
                 }

+ 26 - 11
kernel/src/main/java/com/lantone/qc/kernel/catalogue/threelevelward/THR03010.java

@@ -27,31 +27,46 @@ public class THR03010 extends QCCatalogue {
             return;
         }
         Map<String, String> structureMap = inputInfo.getMedicalRecordInfoDoc().getStructureMap();
-        String behospitalDate = structureMap.get("behospitalDate")==null?null:structureMap.get("behospitalDate");
-        String leaveHospitalDate = structureMap.get("leaveHospitalDate")==null?null:structureMap.get("leaveHospitalDate");
-        if(behospitalDate!=null && leaveHospitalDate!=null){
+        String behospitalDate = structureMap.get("behospitalDate") == null ? null : structureMap.get("behospitalDate");
+        String leaveHospitalDate = structureMap.get("leaveHospitalDate") == null ? null : structureMap.get("leaveHospitalDate");
+        if (behospitalDate != null && leaveHospitalDate != null) {
             Date beDate = StringUtil.parseDateTime(behospitalDate);
             Date leaveDate = StringUtil.parseDateTime(leaveHospitalDate);
-            long l = (leaveDate.getTime() - beDate.getTime())/(24*60*60*1000);
-            if(l>3){
+            long l = (leaveDate.getTime() - beDate.getTime()) / (24 * 60 * 60 * 1000);
+            if (l > 3) {
                 List<String> stringDate = new ArrayList<>();
 
                 SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
-                for (int i=1;i<4;i++) {
+                for (int i = 1; i < 4; i++) {
                     Date firstTimeOfDay = DateUtil.getFirstTimeOfDay(DateUtil.addDay(beDate, i));
                     stringDate.add(formatter.format(firstTimeOfDay));
                 }
                 List<String> stringList = new ArrayList<>();
                 List<ThreeLevelWardDoc> threeLevelWardDocs = inputInfo.getThreeLevelWardDocs().get(0).getAllDoctorWradDocs();
-                for(ThreeLevelWardDoc t :threeLevelWardDocs){
+                for (ThreeLevelWardDoc t : threeLevelWardDocs) {
                     Date threeLevelDate = StringUtil.parseDateTime(t.getStructureMap().get("查房日期"));
                     stringList.add(formatter.format(threeLevelDate));
                 }
-                if(stringList.size() > 2){//查房日期取出没有3天时间, 直接报错
-                    if(!stringDate.containsAll(stringList)){
+                if (stringList.size() > 2) {//查房日期取出没有3天时间, 直接报错
+                    //去重
+                    List<String> listTemp = new ArrayList<String>();
+                    for (int i = 0; i < stringList.size(); i++) {
+                        if (!listTemp.contains(stringList.get(i))) {
+                            listTemp.add(stringList.get(i));
+                        }
+                    }
+                    int i = 0;
+                    for (String str : stringDate) {
+                        for (String s : listTemp) {
+                            if (str.equals(s)) {
+                                i++;
+                            }
+                        }
+                    }
+                    if (i < 3) {
                         status.set("-1");
-                    };
-                }else {
+                    }
+                } else {
                     status.set("-1");
                 }