Browse Source

添加病案首页大模块空值判断

hujing 5 years ago
parent
commit
2443342936

+ 11 - 9
kernel/src/main/java/com/lantone/qc/kernel/catalogue/firstcourserecord/FIRC0092.java

@@ -17,15 +17,17 @@ import org.springframework.stereotype.Component;
 public class FIRC0092 extends QCCatalogue {
     public void start(InputInfo inputInfo, OutputInfo outputInfo) {
         FirstCourseRecordDoc firstCourseRecordDoc = inputInfo.getFirstCourseRecordDoc();
-        if (firstCourseRecordDoc != null) {
-            TreatPlanLabel treatPlanLabel = firstCourseRecordDoc.getTreatPlanLabel();
-            if (treatPlanLabel == null){
-                return;
-            }
-            if (treatPlanLabel.getNursingLevel() != null &&
-                    (treatPlanLabel.getMedicine() != null || treatPlanLabel.getTreat().size() > 0)) {
-                status.set("0");
-            }
+        if (firstCourseRecordDoc == null) {
+            status.set("0");
+            return;
+        }
+        TreatPlanLabel treatPlanLabel = firstCourseRecordDoc.getTreatPlanLabel();
+        if (treatPlanLabel == null) {
+            return;
+        }
+        if (treatPlanLabel.getNursingLevel() != null &&
+                (treatPlanLabel.getMedicine() != null || treatPlanLabel.getTreat().size() > 0)) {
+            status.set("0");
         }
     }
 }

+ 22 - 21
kernel/src/main/java/com/lantone/qc/kernel/catalogue/firstcourserecord/FIRC0095.java

@@ -1,7 +1,6 @@
 package com.lantone.qc.kernel.catalogue.firstcourserecord;
 
 import com.lantone.qc.kernel.catalogue.QCCatalogue;
-import com.lantone.qc.kernel.util.KernelConstants;
 import com.lantone.qc.kernel.util.RedisUtil;
 import com.lantone.qc.pub.model.InputInfo;
 import com.lantone.qc.pub.model.OutputInfo;
@@ -15,7 +14,6 @@ import org.springframework.stereotype.Component;
 
 import java.util.ArrayList;
 import java.util.List;
-import java.util.Map;
 
 /**
  * @ClassName : FIRC0095
@@ -28,30 +26,33 @@ import java.util.Map;
 public class FIRC0095 extends QCCatalogue {
     @Autowired
     private RedisUtil redisUtil;
+
     public void start(InputInfo inputInfo, OutputInfo outputInfo) {
 
         FirstCourseRecordDoc firstCourseRecordDoc = inputInfo.getFirstCourseRecordDoc();
         BeHospitalizedDoc beHospitalizedDoc = inputInfo.getBeHospitalizedDoc();
-        if(firstCourseRecordDoc != null && beHospitalizedDoc != null){
-            DiagLabel initialDiagLabel = firstCourseRecordDoc.getInitialDiagLabel();
-            DiagLabel initialDiagLabel1 = beHospitalizedDoc.getInitialDiagLabel();
-            if(initialDiagLabel != null && initialDiagLabel1 != null){
-                List<Diag> diags = initialDiagLabel.getDiags();
-                List<Diag> diags1 = initialDiagLabel1.getDiags();
-                List<String> firstDiags = new ArrayList<>();
-                List<String> bhDiags = new ArrayList<>();
-                if(diags != null && diags.size()>0){
-                    for (Diag firdiag:diags) {
-                        firstDiags.add(firdiag.getHospitalDiagName());
-                    }
-                    for (Diag bhDig:diags1) {
-                        bhDiags.add(bhDig.getHospitalDiagName());
-                    }
-                    if(ListUtil.equals(firstDiags,bhDiags)){
-                        status.set("0");
-                    }
+        if (firstCourseRecordDoc == null && beHospitalizedDoc == null) {
+            status.set("0");
+            return;
+        }
+        DiagLabel initialDiagLabel = firstCourseRecordDoc.getInitialDiagLabel();
+        DiagLabel initialDiagLabel1 = beHospitalizedDoc.getInitialDiagLabel();
+        if (initialDiagLabel != null && initialDiagLabel1 != null) {
+            List<Diag> diags = initialDiagLabel.getDiags();
+            List<Diag> diags1 = initialDiagLabel1.getDiags();
+            List<String> firstDiags = new ArrayList<>();
+            List<String> bhDiags = new ArrayList<>();
+            if (diags != null && diags.size() > 0) {
+                for (Diag firdiag : diags) {
+                    firstDiags.add(firdiag.getHospitalDiagName());
+                }
+                for (Diag bhDig : diags1) {
+                    bhDiags.add(bhDig.getHospitalDiagName());
+                }
+                if (ListUtil.equals(firstDiags, bhDiags)) {
+                    status.set("0");
                 }
-            }
             }
         }
     }
+}