ソースを参照

三级查房添加非空判断

hujing 5 年 前
コミット
216ebdd6b8

+ 5 - 2
kernel/src/main/java/com/lantone/qc/kernel/catalogue/threelevelward/THR0125.java

@@ -22,8 +22,11 @@ import java.util.Map;
 @Component
 public class THR0125 extends QCCatalogue {
     public void start(InputInfo inputInfo, OutputInfo outputInfo) {
-        if (inputInfo.getLeaveHospitalDoc() != null && inputInfo.getLeaveHospitalDoc().getStructureMap() != null
-                && inputInfo.getThreeLevelWardDocs().size() > 0) {
+        if (inputInfo.getThreeLevelWardDocs().size() == 0) {
+            status.set("0");
+            return;
+        }
+        if (inputInfo.getLeaveHospitalDoc() != null && inputInfo.getLeaveHospitalDoc().getStructureMap() != null) {
             Map<String, String> leaveHospitalStructureMap = inputInfo.getLeaveHospitalDoc().getStructureMap();
             String admisTime = leaveHospitalStructureMap.get(Content.admisTime);
             String dischargeTime = leaveHospitalStructureMap.get(Content.dischargeTime);

+ 19 - 19
kernel/src/main/java/com/lantone/qc/kernel/catalogue/threelevelward/THR0130.java

@@ -1,10 +1,8 @@
 package com.lantone.qc.kernel.catalogue.threelevelward;
 
 import com.lantone.qc.kernel.catalogue.QCCatalogue;
-import com.lantone.qc.pub.Content;
 import com.lantone.qc.pub.model.InputInfo;
 import com.lantone.qc.pub.model.OutputInfo;
-import com.lantone.qc.pub.model.doc.ThreeLevelWardDoc;
 import com.lantone.qc.pub.model.doc.ward.AttendingDoctorWardDoc;
 import com.lantone.qc.pub.model.label.ThreeLevelWardLabel;
 import com.lantone.qc.pub.util.StringUtil;
@@ -22,24 +20,26 @@ import java.util.Map;
 @Component
 public class THR0130 extends QCCatalogue {
     public void start(InputInfo inputInfo, OutputInfo outputInfo) {
-        if (inputInfo.getThreeLevelWardDocs().size() > 0) {
-            List<AttendingDoctorWardDoc> attendDocs = inputInfo.getThreeLevelWardDocs().get(0).getAttendingDoctorWardDocs();
-            if (attendDocs.size() > 0) {
-                AttendingDoctorWardDoc firstAttendDoc = attendDocs.get(0);
-                //先取结构化数据判断
-                Map<String, String> firstAttendStructureMap = firstAttendDoc.getStructureMap();
-                if (StringUtil.isNotBlank(firstAttendStructureMap.get("体检"))) {
-                    status.set("0");
-                    return;
-                }
-                ThreeLevelWardLabel firstAttendLabel = firstAttendDoc.getThreeLevelWardLabel();
-                if (firstAttendLabel == null) {
-                    return;
-                }
+        if (inputInfo.getThreeLevelWardDocs().size() == 0) {
+            status.set("0");
+            return;
+        }
+        List<AttendingDoctorWardDoc> attendDocs = inputInfo.getThreeLevelWardDocs().get(0).getAttendingDoctorWardDocs();
+        if (attendDocs.size() > 0) {
+            AttendingDoctorWardDoc firstAttendDoc = attendDocs.get(0);
+            //先取结构化数据判断
+            Map<String, String> firstAttendStructureMap = firstAttendDoc.getStructureMap();
+            if (StringUtil.isNotBlank(firstAttendStructureMap.get("体检"))) {
+                status.set("0");
+                return;
+            }
+            ThreeLevelWardLabel firstAttendLabel = firstAttendDoc.getThreeLevelWardLabel();
+            if (firstAttendLabel == null) {
+                return;
+            }
 
-                if (firstAttendLabel.getClinicals().size() != 0 || firstAttendLabel.getSigns().size() != 0) {
-                    status.set("0");
-                }
+            if (firstAttendLabel.getClinicals().size() != 0 || firstAttendLabel.getSigns().size() != 0) {
+                status.set("0");
             }
         }
     }

+ 22 - 20
kernel/src/main/java/com/lantone/qc/kernel/catalogue/threelevelward/THR0131.java

@@ -20,29 +20,31 @@ import java.util.Map;
 @Component
 public class THR0131 extends QCCatalogue {
     public void start(InputInfo inputInfo, OutputInfo outputInfo) {
-        if (inputInfo.getThreeLevelWardDocs().size() > 0) {
-            List<AttendingDoctorWardDoc> attendDocs = inputInfo.getThreeLevelWardDocs().get(0).getAttendingDoctorWardDocs();
-            if (attendDocs.size() > 0) {
-                AttendingDoctorWardDoc firstAttendDoc = attendDocs.get(0);
-                //先取结构化数据判断
-                Map<String, String> firstAttendStructureMap = firstAttendDoc.getStructureMap();
-                String conditionRecord = firstAttendStructureMap.get("病情记录");
-                if (StringUtil.isNotBlank(conditionRecord)) {
-                    if (conditionRecord.contains("鉴别")
-                            || conditionRecord.contains("诊断明确")
-                            || conditionRecord.contains("无需鉴别")) {
-                        status.set("0");
-                        return;
-                    }
-                }
-                ThreeLevelWardLabel firstAttendLabel = firstAttendDoc.getThreeLevelWardLabel();
-                if (firstAttendLabel == null) {
+        if (inputInfo.getThreeLevelWardDocs().size() == 0) {
+            status.set("0");
+            return;
+        }
+        List<AttendingDoctorWardDoc> attendDocs = inputInfo.getThreeLevelWardDocs().get(0).getAttendingDoctorWardDocs();
+        if (attendDocs.size() > 0) {
+            AttendingDoctorWardDoc firstAttendDoc = attendDocs.get(0);
+            //先取结构化数据判断
+            Map<String, String> firstAttendStructureMap = firstAttendDoc.getStructureMap();
+            String conditionRecord = firstAttendStructureMap.get("病情记录");
+            if (StringUtil.isNotBlank(conditionRecord)) {
+                if (conditionRecord.contains("鉴别")
+                        || conditionRecord.contains("诊断明确")
+                        || conditionRecord.contains("无需鉴别")) {
+                    status.set("0");
                     return;
                 }
+            }
+            ThreeLevelWardLabel firstAttendLabel = firstAttendDoc.getThreeLevelWardLabel();
+            if (firstAttendLabel == null) {
+                return;
+            }
 
-                if (firstAttendLabel.getDiffDiag().size() != 0 || StringUtil.isNotBlank(firstAttendLabel.getDiffDiagText())) {
-                    status.set("0");
-                }
+            if (firstAttendLabel.getDiffDiag().size() != 0 || StringUtil.isNotBlank(firstAttendLabel.getDiffDiagText())) {
+                status.set("0");
             }
         }
     }

+ 22 - 20
kernel/src/main/java/com/lantone/qc/kernel/catalogue/threelevelward/THR0132.java

@@ -21,27 +21,29 @@ import java.util.Map;
 @Component
 public class THR0132 extends QCCatalogue {
     public void start(InputInfo inputInfo, OutputInfo outputInfo) {
-        if (inputInfo.getThreeLevelWardDocs().size() > 0) {
-            List<AttendingDoctorWardDoc> attendDocs = inputInfo.getThreeLevelWardDocs().get(0).getAttendingDoctorWardDocs();
-            if (attendDocs.size() > 0) {
-                AttendingDoctorWardDoc firstAttendDoc = attendDocs.get(0);
-                //先取结构化数据判断
-                Map<String, String> firstAttendStructureMap = firstAttendDoc.getStructureMap();
-                if (StringUtil.isNotBlank(firstAttendStructureMap.get("病情记录"))) {
-                    status.set("0");
-                    return;
-                }
-                ThreeLevelWardLabel firstAttendLabel = firstAttendDoc.getThreeLevelWardLabel();
-                if (firstAttendLabel == null) {
-                    return;
-                }
+        if (inputInfo.getThreeLevelWardDocs().size() == 0) {
+            status.set("0");
+            return;
+        }
+        List<AttendingDoctorWardDoc> attendDocs = inputInfo.getThreeLevelWardDocs().get(0).getAttendingDoctorWardDocs();
+        if (attendDocs.size() > 0) {
+            AttendingDoctorWardDoc firstAttendDoc = attendDocs.get(0);
+            //先取结构化数据判断
+            Map<String, String> firstAttendStructureMap = firstAttendDoc.getStructureMap();
+            if (StringUtil.isNotBlank(firstAttendStructureMap.get("病情记录"))) {
+                status.set("0");
+                return;
+            }
+            ThreeLevelWardLabel firstAttendLabel = firstAttendDoc.getThreeLevelWardLabel();
+            if (firstAttendLabel == null) {
+                return;
+            }
 
-                if (firstAttendLabel.getDiags().size() > 0
-                        || StringUtil.isNotBlank(firstAttendLabel.getDiagBasisText())
-                        || (firstAttendLabel.getDiffDiag().size() > 0 || StringUtils.isNotEmpty(firstAttendLabel.getDiffDiagText()))
-                        || firstAttendLabel.getTreatmentPlans().size() > 0) {
-                    status.set("0");
-                }
+            if (firstAttendLabel.getDiags().size() > 0
+                    || StringUtil.isNotBlank(firstAttendLabel.getDiagBasisText())
+                    || (firstAttendLabel.getDiffDiag().size() > 0 || StringUtils.isNotEmpty(firstAttendLabel.getDiffDiagText()))
+                    || firstAttendLabel.getTreatmentPlans().size() > 0) {
+                status.set("0");
             }
         }
     }

+ 19 - 17
kernel/src/main/java/com/lantone/qc/kernel/catalogue/threelevelward/THR0133.java

@@ -20,24 +20,26 @@ import java.util.Map;
 @Component
 public class THR0133 extends QCCatalogue {
     public void start(InputInfo inputInfo, OutputInfo outputInfo) {
-        if (inputInfo.getThreeLevelWardDocs().size() > 0) {
-            List<AttendingDoctorWardDoc> attendDocs = inputInfo.getThreeLevelWardDocs().get(0).getAttendingDoctorWardDocs();
-            if (attendDocs.size() > 0) {
-                AttendingDoctorWardDoc firstAttendDoc = attendDocs.get(0);
-                //先取结构化数据判断
-                Map<String, String> firstAttendStructureMap = firstAttendDoc.getStructureMap();
-                if (StringUtil.isNotBlank(firstAttendStructureMap.get("治疗计划和措施"))) {
-                    status.set("0");
-                    return;
-                }
-                ThreeLevelWardLabel firstAttendLabel = firstAttendDoc.getThreeLevelWardLabel();
-                if (firstAttendLabel == null) {
-                    return;
-                }
+        if (inputInfo.getThreeLevelWardDocs().size() == 0) {
+            status.set("0");
+            return;
+        }
+        List<AttendingDoctorWardDoc> attendDocs = inputInfo.getThreeLevelWardDocs().get(0).getAttendingDoctorWardDocs();
+        if (attendDocs.size() > 0) {
+            AttendingDoctorWardDoc firstAttendDoc = attendDocs.get(0);
+            //先取结构化数据判断
+            Map<String, String> firstAttendStructureMap = firstAttendDoc.getStructureMap();
+            if (StringUtil.isNotBlank(firstAttendStructureMap.get("治疗计划和措施"))) {
+                status.set("0");
+                return;
+            }
+            ThreeLevelWardLabel firstAttendLabel = firstAttendDoc.getThreeLevelWardLabel();
+            if (firstAttendLabel == null) {
+                return;
+            }
 
-                if (firstAttendLabel.getTreatmentPlans().size() != 0) {
-                    status.set("0");
-                }
+            if (firstAttendLabel.getTreatmentPlans().size() != 0) {
+                status.set("0");
             }
         }
     }

+ 13 - 11
kernel/src/main/java/com/lantone/qc/kernel/catalogue/threelevelward/THR0134.java

@@ -18,18 +18,20 @@ import java.util.List;
 @Component
 public class THR0134 extends QCCatalogue {
     public void start(InputInfo inputInfo, OutputInfo outputInfo) {
-        if (inputInfo.getThreeLevelWardDocs().size() > 0) {
-            List<AttendingDoctorWardDoc> attendDocs = inputInfo.getThreeLevelWardDocs().get(0).getAttendingDoctorWardDocs();
-            if (attendDocs.size() > 0) {
-                AttendingDoctorWardDoc firstAttendDoc = attendDocs.get(0);
-                ThreeLevelWardLabel firstAttendLabel = firstAttendDoc.getThreeLevelWardLabel();
-                if (firstAttendLabel == null) {
-                    return;
-                }
+        if (inputInfo.getThreeLevelWardDocs().size() == 0) {
+            status.set("0");
+            return;
+        }
+        List<AttendingDoctorWardDoc> attendDocs = inputInfo.getThreeLevelWardDocs().get(0).getAttendingDoctorWardDocs();
+        if (attendDocs.size() > 0) {
+            AttendingDoctorWardDoc firstAttendDoc = attendDocs.get(0);
+            ThreeLevelWardLabel firstAttendLabel = firstAttendDoc.getThreeLevelWardLabel();
+            if (firstAttendLabel == null) {
+                return;
+            }
 
-                if (firstAttendLabel.getDiags().size() != 0) {
-                    status.set("0");
-                }
+            if (firstAttendLabel.getDiags().size() != 0) {
+                status.set("0");
             }
         }
     }

+ 19 - 20
kernel/src/main/java/com/lantone/qc/kernel/catalogue/threelevelward/THR0135.java

@@ -1,11 +1,8 @@
 package com.lantone.qc.kernel.catalogue.threelevelward;
 
 import com.lantone.qc.kernel.catalogue.QCCatalogue;
-import com.lantone.qc.pub.Content;
 import com.lantone.qc.pub.model.InputInfo;
 import com.lantone.qc.pub.model.OutputInfo;
-import com.lantone.qc.pub.model.doc.ThreeLevelWardDoc;
-import com.lantone.qc.pub.model.doc.ward.AttendingDoctorWardDoc;
 import com.lantone.qc.pub.model.doc.ward.DirectorDoctorWardDoc;
 import com.lantone.qc.pub.model.label.ThreeLevelWardLabel;
 import com.lantone.qc.pub.util.StringUtil;
@@ -23,24 +20,26 @@ import java.util.Map;
 @Component
 public class THR0135 extends QCCatalogue {
     public void start(InputInfo inputInfo, OutputInfo outputInfo) {
-        if (inputInfo.getThreeLevelWardDocs().size() > 0) {
-            List<DirectorDoctorWardDoc> directorDocs = inputInfo.getThreeLevelWardDocs().get(0).getDirectorDoctorWardDocs();
-            if (directorDocs.size() > 0) {
-                DirectorDoctorWardDoc firstDirectDoc = directorDocs.get(0);
-                //先取结构化数据判断
-                Map<String, String> firstDirectStructureMap = firstDirectDoc.getStructureMap();
-                if (StringUtil.isNotBlank(firstDirectStructureMap.get("体检"))) {
-                    status.set("0");
-                    return;
-                }
-                ThreeLevelWardLabel firstDirectLabel = firstDirectDoc.getThreeLevelWardLabel();
-                if (firstDirectLabel == null) {
-                    return;
-                }
+        if (inputInfo.getThreeLevelWardDocs().size() == 0) {
+            status.set("0");
+            return;
+        }
+        List<DirectorDoctorWardDoc> directorDocs = inputInfo.getThreeLevelWardDocs().get(0).getDirectorDoctorWardDocs();
+        if (directorDocs.size() > 0) {
+            DirectorDoctorWardDoc firstDirectDoc = directorDocs.get(0);
+            //先取结构化数据判断
+            Map<String, String> firstDirectStructureMap = firstDirectDoc.getStructureMap();
+            if (StringUtil.isNotBlank(firstDirectStructureMap.get("体检"))) {
+                status.set("0");
+                return;
+            }
+            ThreeLevelWardLabel firstDirectLabel = firstDirectDoc.getThreeLevelWardLabel();
+            if (firstDirectLabel == null) {
+                return;
+            }
 
-                if (firstDirectLabel.getClinicals().size() != 0 || firstDirectLabel.getSigns().size() != 0) {
-                    status.set("0");
-                }
+            if (firstDirectLabel.getClinicals().size() != 0 || firstDirectLabel.getSigns().size() != 0) {
+                status.set("0");
             }
         }
     }

+ 22 - 28
kernel/src/main/java/com/lantone/qc/kernel/catalogue/threelevelward/THR0136.java

@@ -1,20 +1,13 @@
 package com.lantone.qc.kernel.catalogue.threelevelward;
 
 import com.lantone.qc.kernel.catalogue.QCCatalogue;
-import com.lantone.qc.kernel.util.CatalogueUtil;
-import com.lantone.qc.pub.Content;
 import com.lantone.qc.pub.model.InputInfo;
 import com.lantone.qc.pub.model.OutputInfo;
-import com.lantone.qc.pub.model.doc.ThreeLevelWardDoc;
-import com.lantone.qc.pub.model.doc.ward.AttendingDoctorWardDoc;
 import com.lantone.qc.pub.model.doc.ward.DirectorDoctorWardDoc;
 import com.lantone.qc.pub.model.label.ThreeLevelWardLabel;
 import com.lantone.qc.pub.util.StringUtil;
 import org.springframework.stereotype.Component;
 
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
@@ -27,30 +20,31 @@ import java.util.Map;
 @Component
 public class THR0136 extends QCCatalogue {
     public void start(InputInfo inputInfo, OutputInfo outputInfo) {
-        status.set("0");
-        if (inputInfo.getThreeLevelWardDocs().size() > 0) {
-            List<DirectorDoctorWardDoc> directorDocs = inputInfo.getThreeLevelWardDocs().get(0).getDirectorDoctorWardDocs();
-            if (directorDocs.size() > 0) {
-                DirectorDoctorWardDoc firstDirectDoc = directorDocs.get(0);
-                //先取结构化数据判断
-                Map<String, String> firstDirectStructureMap = firstDirectDoc.getStructureMap();
-                String conditionRecord = firstDirectStructureMap.get("病情记录");
-                if (StringUtil.isNotBlank(conditionRecord)) {
-                    if (conditionRecord.contains("鉴别")
-                            || conditionRecord.contains("诊断明确")
-                            || conditionRecord.contains("无需鉴别")) {
-                        status.set("0");
-                        return;
-                    }
-                }
-                ThreeLevelWardLabel firstDirectLabel = firstDirectDoc.getThreeLevelWardLabel();
-                if (firstDirectLabel == null) {
+        if (inputInfo.getThreeLevelWardDocs().size() == 0) {
+            status.set("0");
+            return;
+        }
+        List<DirectorDoctorWardDoc> directorDocs = inputInfo.getThreeLevelWardDocs().get(0).getDirectorDoctorWardDocs();
+        if (directorDocs.size() > 0) {
+            DirectorDoctorWardDoc firstDirectDoc = directorDocs.get(0);
+            //先取结构化数据判断
+            Map<String, String> firstDirectStructureMap = firstDirectDoc.getStructureMap();
+            String conditionRecord = firstDirectStructureMap.get("病情记录");
+            if (StringUtil.isNotBlank(conditionRecord)) {
+                if (conditionRecord.contains("鉴别")
+                        || conditionRecord.contains("诊断明确")
+                        || conditionRecord.contains("无需鉴别")) {
+                    status.set("0");
                     return;
                 }
+            }
+            ThreeLevelWardLabel firstDirectLabel = firstDirectDoc.getThreeLevelWardLabel();
+            if (firstDirectLabel == null) {
+                return;
+            }
 
-                if (firstDirectLabel.getDiffDiag().size() != 0 || StringUtil.isNotBlank(firstDirectLabel.getDiffDiagText())) {
-                    status.set("0");
-                }
+            if (firstDirectLabel.getDiffDiag().size() != 0 || StringUtil.isNotBlank(firstDirectLabel.getDiffDiagText())) {
+                status.set("0");
             }
         }
     }

+ 22 - 20
kernel/src/main/java/com/lantone/qc/kernel/catalogue/threelevelward/THR0137.java

@@ -21,27 +21,29 @@ import java.util.Map;
 @Component
 public class THR0137 extends QCCatalogue {
     public void start(InputInfo inputInfo, OutputInfo outputInfo) {
-        if (inputInfo.getThreeLevelWardDocs().size() > 0) {
-            List<DirectorDoctorWardDoc> directorDocs = inputInfo.getThreeLevelWardDocs().get(0).getDirectorDoctorWardDocs();
-            if (directorDocs.size() > 0) {
-                DirectorDoctorWardDoc firstDirectDoc = directorDocs.get(0);
-                //先取结构化数据判断
-                Map<String, String> firstDirectStructureMap = firstDirectDoc.getStructureMap();
-                if (StringUtil.isNotBlank(firstDirectStructureMap.get("病情记录"))) {
-                    status.set("0");
-                    return;
-                }
-                ThreeLevelWardLabel firstDirectLabel = firstDirectDoc.getThreeLevelWardLabel();
-                if (firstDirectLabel == null) {
-                    return;
-                }
+        if (inputInfo.getThreeLevelWardDocs().size() == 0) {
+            status.set("0");
+            return;
+        }
+        List<DirectorDoctorWardDoc> directorDocs = inputInfo.getThreeLevelWardDocs().get(0).getDirectorDoctorWardDocs();
+        if (directorDocs.size() > 0) {
+            DirectorDoctorWardDoc firstDirectDoc = directorDocs.get(0);
+            //先取结构化数据判断
+            Map<String, String> firstDirectStructureMap = firstDirectDoc.getStructureMap();
+            if (StringUtil.isNotBlank(firstDirectStructureMap.get("病情记录"))) {
+                status.set("0");
+                return;
+            }
+            ThreeLevelWardLabel firstDirectLabel = firstDirectDoc.getThreeLevelWardLabel();
+            if (firstDirectLabel == null) {
+                return;
+            }
 
-                if (firstDirectLabel.getDiags().size() > 0
-                        || StringUtil.isNotBlank(firstDirectLabel.getDiagBasisText())
-                        || (firstDirectLabel.getDiffDiag().size() > 0 || StringUtils.isNotEmpty(firstDirectLabel.getDiffDiagText()))
-                        || firstDirectLabel.getTreatmentPlans().size() > 0) {
-                    status.set("0");
-                }
+            if (firstDirectLabel.getDiags().size() > 0
+                    || StringUtil.isNotBlank(firstDirectLabel.getDiagBasisText())
+                    || (firstDirectLabel.getDiffDiag().size() > 0 || StringUtils.isNotEmpty(firstDirectLabel.getDiffDiagText()))
+                    || firstDirectLabel.getTreatmentPlans().size() > 0) {
+                status.set("0");
             }
         }
     }

+ 19 - 20
kernel/src/main/java/com/lantone/qc/kernel/catalogue/threelevelward/THR0138.java

@@ -1,11 +1,8 @@
 package com.lantone.qc.kernel.catalogue.threelevelward;
 
 import com.lantone.qc.kernel.catalogue.QCCatalogue;
-import com.lantone.qc.pub.Content;
 import com.lantone.qc.pub.model.InputInfo;
 import com.lantone.qc.pub.model.OutputInfo;
-import com.lantone.qc.pub.model.doc.ThreeLevelWardDoc;
-import com.lantone.qc.pub.model.doc.ward.AttendingDoctorWardDoc;
 import com.lantone.qc.pub.model.doc.ward.DirectorDoctorWardDoc;
 import com.lantone.qc.pub.model.label.ThreeLevelWardLabel;
 import com.lantone.qc.pub.util.StringUtil;
@@ -23,24 +20,26 @@ import java.util.Map;
 @Component
 public class THR0138 extends QCCatalogue {
     public void start(InputInfo inputInfo, OutputInfo outputInfo) {
-        if (inputInfo.getThreeLevelWardDocs().size() > 0) {
-            List<DirectorDoctorWardDoc> directorDocs = inputInfo.getThreeLevelWardDocs().get(0).getDirectorDoctorWardDocs();
-            if (directorDocs.size() > 0) {
-                DirectorDoctorWardDoc firstDirectDoc = directorDocs.get(0);
-                //先取结构化数据判断
-                Map<String, String> firstDirectStructureMap = firstDirectDoc.getStructureMap();
-                if (StringUtil.isNotBlank(firstDirectStructureMap.get("治疗计划和措施"))) {
-                    status.set("0");
-                    return;
-                }
-                ThreeLevelWardLabel firstDirectLabel = firstDirectDoc.getThreeLevelWardLabel();
-                if (firstDirectLabel == null) {
-                    return;
-                }
+        if (inputInfo.getThreeLevelWardDocs().size() == 0) {
+            status.set("0");
+            return;
+        }
+        List<DirectorDoctorWardDoc> directorDocs = inputInfo.getThreeLevelWardDocs().get(0).getDirectorDoctorWardDocs();
+        if (directorDocs.size() > 0) {
+            DirectorDoctorWardDoc firstDirectDoc = directorDocs.get(0);
+            //先取结构化数据判断
+            Map<String, String> firstDirectStructureMap = firstDirectDoc.getStructureMap();
+            if (StringUtil.isNotBlank(firstDirectStructureMap.get("治疗计划和措施"))) {
+                status.set("0");
+                return;
+            }
+            ThreeLevelWardLabel firstDirectLabel = firstDirectDoc.getThreeLevelWardLabel();
+            if (firstDirectLabel == null) {
+                return;
+            }
 
-                if (firstDirectLabel.getTreatmentPlans().size() != 0) {
-                    status.set("0");
-                }
+            if (firstDirectLabel.getTreatmentPlans().size() != 0) {
+                status.set("0");
             }
         }
     }

+ 13 - 15
kernel/src/main/java/com/lantone/qc/kernel/catalogue/threelevelward/THR0139.java

@@ -1,14 +1,10 @@
 package com.lantone.qc.kernel.catalogue.threelevelward;
 
 import com.lantone.qc.kernel.catalogue.QCCatalogue;
-import com.lantone.qc.pub.Content;
 import com.lantone.qc.pub.model.InputInfo;
 import com.lantone.qc.pub.model.OutputInfo;
-import com.lantone.qc.pub.model.doc.ThreeLevelWardDoc;
-import com.lantone.qc.pub.model.doc.ward.AttendingDoctorWardDoc;
 import com.lantone.qc.pub.model.doc.ward.DirectorDoctorWardDoc;
 import com.lantone.qc.pub.model.label.ThreeLevelWardLabel;
-import com.lantone.qc.pub.util.StringUtil;
 import org.springframework.stereotype.Component;
 
 import java.util.List;
@@ -22,18 +18,20 @@ import java.util.List;
 @Component
 public class THR0139 extends QCCatalogue {
     public void start(InputInfo inputInfo, OutputInfo outputInfo) {
-        if (inputInfo.getThreeLevelWardDocs().size() > 0) {
-            List<DirectorDoctorWardDoc> directorDocs = inputInfo.getThreeLevelWardDocs().get(0).getDirectorDoctorWardDocs();
-            if (directorDocs.size() > 0) {
-                DirectorDoctorWardDoc firstDirectDoc = directorDocs.get(0);
-                ThreeLevelWardLabel firstDirectLabel = firstDirectDoc.getThreeLevelWardLabel();
-                if (firstDirectLabel == null) {
-                    return;
-                }
+        if (inputInfo.getThreeLevelWardDocs().size() == 0) {
+            status.set("0");
+            return;
+        }
+        List<DirectorDoctorWardDoc> directorDocs = inputInfo.getThreeLevelWardDocs().get(0).getDirectorDoctorWardDocs();
+        if (directorDocs.size() > 0) {
+            DirectorDoctorWardDoc firstDirectDoc = directorDocs.get(0);
+            ThreeLevelWardLabel firstDirectLabel = firstDirectDoc.getThreeLevelWardLabel();
+            if (firstDirectLabel == null) {
+                return;
+            }
 
-                if (firstDirectLabel.getDiags().size() != 0) {
-                    status.set("0");
-                }
+            if (firstDirectLabel.getDiags().size() != 0) {
+                status.set("0");
             }
         }
     }

+ 18 - 16
kernel/src/main/java/com/lantone/qc/kernel/catalogue/threelevelward/THR0144.java

@@ -21,22 +21,24 @@ import java.util.Map;
 @Component
 public class THR0144 extends QCCatalogue {
     public void start(InputInfo inputInfo, OutputInfo outputInfo) {
-        if (inputInfo.getThreeLevelWardDocs().size() > 0) {
-            List<ThreeLevelWardDoc> allDoctorWradDocs = inputInfo.getThreeLevelWardDocs().get(0).getAllDoctorWradDocs();
-            if (allDoctorWradDocs.size() > 0) {
-                ThreeLevelWardDoc lastWardDoc = allDoctorWradDocs.get(allDoctorWradDocs.size() - 1);
-                Map<String, String> structureMap = lastWardDoc.getStructureMap();
-                String conditionRecord = structureMap.get("病情记录");
-                String treatmentPlan = structureMap.get("治疗计划和措施");
-                String title = structureMap.get("查房标题");
-                if (StringUtil.isBlank(conditionRecord) && StringUtil.isBlank(treatmentPlan)){
-                    return;
-                }
-                if ((conditionRecord.contains("出院") || treatmentPlan.contains("出院"))
-                        && StringUtil.isNotBlank(title)
-                        && (CatalogueUtil.subTitle(title).contains(Content.attend) || CatalogueUtil.subTitle(title).contains(Content.director))) {
-                    status.set("0");
-                }
+        if (inputInfo.getThreeLevelWardDocs().size() == 0) {
+            status.set("0");
+            return;
+        }
+        List<ThreeLevelWardDoc> allDoctorWradDocs = inputInfo.getThreeLevelWardDocs().get(0).getAllDoctorWradDocs();
+        if (allDoctorWradDocs.size() > 0) {
+            ThreeLevelWardDoc lastWardDoc = allDoctorWradDocs.get(allDoctorWradDocs.size() - 1);
+            Map<String, String> structureMap = lastWardDoc.getStructureMap();
+            String conditionRecord = structureMap.get("病情记录");
+            String treatmentPlan = structureMap.get("治疗计划和措施");
+            String title = structureMap.get("查房标题");
+            if (StringUtil.isBlank(conditionRecord) && StringUtil.isBlank(treatmentPlan)) {
+                return;
+            }
+            if ((conditionRecord.contains("出院") || treatmentPlan.contains("出院"))
+                    && StringUtil.isNotBlank(title)
+                    && (CatalogueUtil.subTitle(title).contains(Content.attend) || CatalogueUtil.subTitle(title).contains(Content.director))) {
+                status.set("0");
             }
         }
     }

+ 11 - 13
kernel/src/main/java/com/lantone/qc/kernel/catalogue/threelevelward/THR0431.java

@@ -20,21 +20,19 @@ import java.util.List;
 public class THR0431 extends QCCatalogue {
     public void start(InputInfo inputInfo, OutputInfo outputInfo) {
         status.set("0");
-        if (ListUtil.isEmpty(inputInfo.getSeriouslyIllNoticeDocs())) {
+        if (inputInfo.getThreeLevelWardDocs().size() == 0 || ListUtil.isEmpty(inputInfo.getSeriouslyIllNoticeDocs())) {
             return;
         }
-        if (inputInfo.getThreeLevelWardDocs().size() > 0) {
-            List<ThreeLevelWardDoc> allDoctorWradDocs = inputInfo.getThreeLevelWardDocs().get(0).getAllDoctorWradDocs();
-            for (ThreeLevelWardDoc threeLevelWardDoc : allDoctorWradDocs) {
-                List<ThreeLevelWardLabel> threeLevelWardLabels = threeLevelWardDoc.getThreeLevelWardLabel();
-                for (ThreeLevelWardLabel threeLevelWardLabel : threeLevelWardLabels) {
-                    if (threeLevelWardLabel.getSerious() != 1) {
-                        continue;
-                    }
-                    if (threeLevelWardLabel.getTreatmentPlans().size() == 0) {
-                        status.set("-1");
-                        return;
-                    }
+        List<ThreeLevelWardDoc> allDoctorWradDocs = inputInfo.getThreeLevelWardDocs().get(0).getAllDoctorWradDocs();
+        for (ThreeLevelWardDoc threeLevelWardDoc : allDoctorWradDocs) {
+            List<ThreeLevelWardLabel> threeLevelWardLabels = threeLevelWardDoc.getThreeLevelWardLabel();
+            for (ThreeLevelWardLabel threeLevelWardLabel : threeLevelWardLabels) {
+                if (threeLevelWardLabel.getSerious() != 1) {
+                    continue;
+                }
+                if (threeLevelWardLabel.getTreatmentPlans().size() == 0) {
+                    status.set("-1");
+                    return;
                 }
             }
         }

+ 11 - 13
kernel/src/main/java/com/lantone/qc/kernel/catalogue/threelevelward/THR0432.java

@@ -20,21 +20,19 @@ import java.util.List;
 public class THR0432 extends QCCatalogue {
     public void start(InputInfo inputInfo, OutputInfo outputInfo) {
         status.set("0");
-        if (ListUtil.isEmpty(inputInfo.getDifficultCaseDiscussDocs())) {
+        if (inputInfo.getThreeLevelWardDocs().size() == 0 || ListUtil.isEmpty(inputInfo.getDifficultCaseDiscussDocs())) {
             return;
         }
-        if (inputInfo.getThreeLevelWardDocs().size() > 0) {
-            List<ThreeLevelWardDoc> allDoctorWradDocs = inputInfo.getThreeLevelWardDocs().get(0).getAllDoctorWradDocs();
-            for (ThreeLevelWardDoc threeLevelWardDoc : allDoctorWradDocs) {
-                List<ThreeLevelWardLabel> threeLevelWardLabels = threeLevelWardDoc.getThreeLevelWardLabel();
-                for (ThreeLevelWardLabel threeLevelWardLabel : threeLevelWardLabels) {
-                    if (threeLevelWardLabel.getSerious() != 2) {
-                        continue;
-                    }
-                    if (threeLevelWardLabel.getTreatmentPlans().size() == 0) {
-                        status.set("-1");
-                        return;
-                    }
+        List<ThreeLevelWardDoc> allDoctorWradDocs = inputInfo.getThreeLevelWardDocs().get(0).getAllDoctorWradDocs();
+        for (ThreeLevelWardDoc threeLevelWardDoc : allDoctorWradDocs) {
+            List<ThreeLevelWardLabel> threeLevelWardLabels = threeLevelWardDoc.getThreeLevelWardLabel();
+            for (ThreeLevelWardLabel threeLevelWardLabel : threeLevelWardLabels) {
+                if (threeLevelWardLabel.getSerious() != 2) {
+                    continue;
+                }
+                if (threeLevelWardLabel.getTreatmentPlans().size() == 0) {
+                    status.set("-1");
+                    return;
                 }
             }
         }

+ 11 - 13
kernel/src/main/java/com/lantone/qc/kernel/catalogue/threelevelward/THR0433.java

@@ -20,21 +20,19 @@ import java.util.List;
 public class THR0433 extends QCCatalogue {
     public void start(InputInfo inputInfo, OutputInfo outputInfo) {
         status.set("0");
-        if (ListUtil.isEmpty(inputInfo.getRescueDocs())) {
+        if (inputInfo.getThreeLevelWardDocs().size() == 0 || ListUtil.isEmpty(inputInfo.getRescueDocs())) {
             return;
         }
-        if (inputInfo.getThreeLevelWardDocs().size() > 0) {
-            List<ThreeLevelWardDoc> allDoctorWradDocs = inputInfo.getThreeLevelWardDocs().get(0).getAllDoctorWradDocs();
-            for (ThreeLevelWardDoc threeLevelWardDoc : allDoctorWradDocs) {
-                List<ThreeLevelWardLabel> threeLevelWardLabels = threeLevelWardDoc.getThreeLevelWardLabel();
-                for (ThreeLevelWardLabel threeLevelWardLabel : threeLevelWardLabels) {
-                    if (threeLevelWardLabel.getSerious() != 3) {
-                        continue;
-                    }
-                    if (threeLevelWardLabel.getTreatmentPlans().size() == 0) {
-                        status.set("-1");
-                        return;
-                    }
+        List<ThreeLevelWardDoc> allDoctorWradDocs = inputInfo.getThreeLevelWardDocs().get(0).getAllDoctorWradDocs();
+        for (ThreeLevelWardDoc threeLevelWardDoc : allDoctorWradDocs) {
+            List<ThreeLevelWardLabel> threeLevelWardLabels = threeLevelWardDoc.getThreeLevelWardLabel();
+            for (ThreeLevelWardLabel threeLevelWardLabel : threeLevelWardLabels) {
+                if (threeLevelWardLabel.getSerious() != 3) {
+                    continue;
+                }
+                if (threeLevelWardLabel.getTreatmentPlans().size() == 0) {
+                    status.set("-1");
+                    return;
                 }
             }
         }