Преглед на файлове

手术患者无术前主刀医师查房记录

zhaops преди 2 години
родител
ревизия
ead1fe645d
променени са 1 файла, в които са добавени 9 реда и са изтрити 7 реда
  1. 9 7
      kernel/src/main/java/com/lantone/qc/kernel/catalogue/threelevelward/THR03090.java

+ 9 - 7
kernel/src/main/java/com/lantone/qc/kernel/catalogue/threelevelward/THR03090.java

@@ -64,11 +64,13 @@ public class THR03090 extends QCCatalogue {
 
         Date beDate = null;
         Date beDate_hp = null;
-        if (StringUtil.isNotBlank(medicalRecordInfoDoc.getStructureMap().get("behospitalDate"))) {
+        if (medicalRecordInfoDoc != null
+                && StringUtil.isNotBlank(medicalRecordInfoDoc.getStructureMap().get("behospitalDate"))) {
             beDate = DateUtil.getFirstTimeOfDay(StringUtil.parseDateTime(medicalRecordInfoDoc.getStructureMap().get("behospitalDate")));
         }
 
-        if (StringUtil.isNotBlank(firstPageRecordDoc.getStructureMap().get("入院时间"))) {
+        if (firstPageRecordDoc != null
+                && StringUtil.isNotBlank(firstPageRecordDoc.getStructureMap().get("入院时间"))) {
             beDate_hp = DateUtil.getFirstTimeOfDay(StringUtil.parseDateTime(firstPageRecordDoc.getStructureMap().get("入院时间")));
         }
 
@@ -77,8 +79,8 @@ public class THR03090 extends QCCatalogue {
         Date finalBeDate = beDate;
         List<OperationRecordDoc> filterOperationRecordDocs = operationRecordDocs.stream().filter(i -> i.getStructureMap() != null
                         && filterDate(i.getStructureMap()) != null
-                        && (DateUtil.getFirstTimeOfDay(filterDate(i.getStructureMap())).getTime() != finalBeDate.getTime()
-                        || DateUtil.getFirstTimeOfDay(filterDate(i.getStructureMap())).getTime() != finalBeDate_hp.getTime()))
+                        && ((finalBeDate != null && DateUtil.getFirstTimeOfDay(filterDate(i.getStructureMap())).getTime() != finalBeDate.getTime())
+                        || (finalBeDate_hp != null && DateUtil.getFirstTimeOfDay(filterDate(i.getStructureMap())).getTime() != finalBeDate_hp.getTime())))
                 .collect(Collectors.toList());
         if (ListUtil.isEmpty(filterOperationRecordDocs)) {
             return;
@@ -173,8 +175,8 @@ public class THR03090 extends QCCatalogue {
                 .collect(Collectors.toList());
         if (ListUtil.isEmpty(filterOperationRecordDocs)) {
             List<ThreeLevelWardDoc> threeLevelWardDocList = threeLevelWardDocs.stream().filter(i -> i.getStructureMap() != null
-                            && (StringUtil.isNotBlank(i.getStructureMap().get("查房标题")) && RegexUtil.getRegexRes(i.getStructureMap().get("查房标题"), "术前|主刀")
-                            || StringUtil.isNotBlank(i.getStructureMap().get("文书标题")) && RegexUtil.getRegexRes(i.getStructureMap().get("文书标题"), "术前|主刀")))
+                            && ((StringUtil.isNotBlank(i.getStructureMap().get("查房标题")) && RegexUtil.getRegexRes(i.getStructureMap().get("查房标题"), "术前|主刀"))
+                            || (StringUtil.isNotBlank(i.getStructureMap().get("文书标题")) && RegexUtil.getRegexRes(i.getStructureMap().get("文书标题"), "术前|主刀"))))
                     .collect(Collectors.toList());
             if (ListUtil.isNotEmpty(threeLevelWardDocList)) {
                 return;
@@ -219,4 +221,4 @@ public class THR03090 extends QCCatalogue {
             return null;
         }
     }
-}
+}