Ver código fonte

厦门:现病史,婚育史相关规则修改

wangsy 4 anos atrás
pai
commit
04ed0c592f

+ 40 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/beilun/behospitalized/BEH03092.java

@@ -0,0 +1,40 @@
+package com.lantone.qc.kernel.catalogue.beilun.behospitalized;
+
+import com.lantone.qc.kernel.catalogue.QCCatalogue;
+import com.lantone.qc.pub.model.InputInfo;
+import com.lantone.qc.pub.model.OutputInfo;
+import com.lantone.qc.pub.model.doc.BeHospitalizedDoc;
+import com.lantone.qc.pub.model.label.PresentLabel;
+import com.lantone.qc.pub.util.StringUtil;
+import org.springframework.stereotype.Component;
+
+import java.util.Map;
+
+
+/**
+ * @ClassName : BEH03092
+ * @Description : 现病史未填写
+ * @Author : wsy
+ * @Date: 2021-01-14 17:28
+ */
+@Component
+public class BEH03092 extends QCCatalogue {
+
+    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        status.set("0");
+        BeHospitalizedDoc beHospitalizedDoc = inputInfo.getBeHospitalizedDoc();
+        if (beHospitalizedDoc == null) {
+            return;
+        }
+        PresentLabel presentLabel = beHospitalizedDoc.getPresentLabel();
+        if (presentLabel == null || StringUtil.isBlank(presentLabel.getText())) {
+            status.set("-1");
+            return;
+        }
+        Map<String, String> beHospitalStructureMap = beHospitalizedDoc.getStructureMap();
+        if (StringUtil.isBlank(beHospitalStructureMap.get("现病史"))) {
+            status.set("-1");
+            return;
+        }
+    }
+}

+ 13 - 5
kernel/src/main/java/com/lantone/qc/kernel/catalogue/xiamen/behospitalized/BEH0015.java

@@ -7,6 +7,8 @@ import com.lantone.qc.pub.model.InputInfo;
 import com.lantone.qc.pub.model.OutputInfo;
 import com.lantone.qc.pub.model.entity.BodyPart;
 import com.lantone.qc.pub.model.entity.Clinical;
+import com.lantone.qc.pub.model.label.PresentLabel;
+import com.lantone.qc.pub.util.StringUtil;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
@@ -23,18 +25,24 @@ import java.util.List;
 public class BEH0015 extends QCCatalogue {
     @Autowired
     private SpecialStorageUtil specialStorageUtil;
+
     public void start(InputInfo inputInfo, OutputInfo outputInfo) {
         status.set("0");
-        if(inputInfo.getBeHospitalizedDoc() == null){
+        if (inputInfo.getBeHospitalizedDoc() == null) {
+            return;
+        }
+        PresentLabel presentLabel = inputInfo.getBeHospitalizedDoc().getPresentLabel();
+        if (presentLabel == null || StringUtil.isBlank(presentLabel.getText())) {
+            status.set("0");
             return;
         }
         List<String> clinicalList = (List<String>) specialStorageUtil.getJsonStringValue(KernelConstants.CONCEPT_CLINIC_BODYPART_PROPERTIES_LIST);
-        List<Clinical> clinicals = inputInfo.getBeHospitalizedDoc().getPresentLabel().getClinicals();
-        if(clinicals.size()>0){
+        List<Clinical> clinicals = presentLabel.getClinicals();
+        if (clinicals.size() > 0) {
             Clinical clinical = clinicals.get(0);
-            if(clinicalList.contains(clinical.getName())){
+            if (clinicalList.contains(clinical.getName())) {
                 BodyPart bodyPart = clinical.getBodyPart();
-                if(bodyPart == null){
+                if (bodyPart == null) {
                     status.set("-1");
                     info.set(clinical.getName());
                 }

+ 11 - 6
kernel/src/main/java/com/lantone/qc/kernel/catalogue/xiamen/behospitalized/BEH0016.java

@@ -5,6 +5,8 @@ import com.lantone.qc.pub.model.InputInfo;
 import com.lantone.qc.pub.model.OutputInfo;
 import com.lantone.qc.pub.model.entity.Clinical;
 import com.lantone.qc.pub.model.entity.Property;
+import com.lantone.qc.pub.model.label.PresentLabel;
+import com.lantone.qc.pub.util.StringUtil;
 import org.springframework.stereotype.Component;
 
 import java.util.List;
@@ -20,19 +22,22 @@ import java.util.List;
 public class BEH0016 extends QCCatalogue {
 
     public void start(InputInfo inputInfo, OutputInfo outputInfo) {
-        if(inputInfo.getBeHospitalizedDoc() == null){
-            status.set("0");
+        status.set("0");
+        if (inputInfo.getBeHospitalizedDoc() == null) {
+            return;
+        }
+        PresentLabel presentLabel = inputInfo.getBeHospitalizedDoc().getPresentLabel();
+        if (presentLabel == null || StringUtil.isBlank(presentLabel.getText())) {
             return;
         }
         List<Clinical> clinicals = inputInfo.getBeHospitalizedDoc().getPresentLabel().getClinicals();
-        if(clinicals.size()>0){
+        if (clinicals.size() > 0) {
             Clinical clinical = clinicals.get(0);
             Property property = clinical.getProperty();
-            if(property == null){
+            if (property == null) {
                 info.set(clinical.getName());
                 status.set("-1");
             }
         }
-
-        }
     }
+}

+ 2 - 1
kernel/src/main/java/com/lantone/qc/kernel/catalogue/xiamen/behospitalized/BEH0017.java

@@ -32,7 +32,8 @@ public class BEH0017 extends QCCatalogue {
             return;
         }
         String presentText = presentLabel.getText();
-        if (StringUtil.isNotBlank(presentText) && presentText.contains("复查")) {
+        if (StringUtil.isBlank(presentText) ||
+                (StringUtil.isNotBlank(presentText) && presentText.contains("复查"))) {
             status.set("0");
             return;
         }

+ 37 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/xiamen/behospitalized/BEH03091.java

@@ -0,0 +1,37 @@
+package com.lantone.qc.kernel.catalogue.xiamen.behospitalized;
+
+import com.lantone.qc.kernel.catalogue.QCCatalogue;
+import com.lantone.qc.pub.model.InputInfo;
+import com.lantone.qc.pub.model.OutputInfo;
+import com.lantone.qc.pub.model.label.MaritalLabel;
+import com.lantone.qc.pub.util.StringUtil;
+import org.springframework.stereotype.Component;
+
+import java.util.Map;
+
+/**
+ * @ClassName : BEH03091
+ * @Description :  婚育史未填写
+ * @Author : wsy
+ * @Date: 2020-06-13 15:51
+ */
+@Component
+public class BEH03091 extends QCCatalogue {
+    @Override
+    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        status.set("0");
+        if (inputInfo.getBeHospitalizedDoc() == null) {
+            return;
+        }
+        MaritalLabel maritalLabel = inputInfo.getBeHospitalizedDoc().getMaritalLabel();
+        if (maritalLabel == null || StringUtil.isBlank(maritalLabel.getText())) {
+            status.set("-1");
+            return;
+        }
+        Map<String, String> beHospitalStructureMap = inputInfo.getBeHospitalizedDoc().getStructureMap();
+        if (StringUtil.isBlank(beHospitalStructureMap.get("婚育史"))) {
+            status.set("-1");
+            return;
+        }
+    }
+}

+ 3 - 1
kernel/src/main/java/com/lantone/qc/kernel/catalogue/xiamen/behospitalized/BEH0441.java

@@ -42,6 +42,9 @@ public class BEH0441 extends QCCatalogue {
                     return;
                 }
             }
+        } else {
+            status.set("0");
+            return;
         }
         List<GeneralDesc> generals = presentLabel.getGenerals();
         List<General> gens = presentLabel.getGens();
@@ -72,6 +75,5 @@ public class BEH0441 extends QCCatalogue {
                 }
             }
         }
-
     }
 }

+ 3 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/xiamen/behospitalized/BEH0442.java

@@ -42,6 +42,9 @@ public class BEH0442 extends QCCatalogue {
                     return;
                 }
             }
+        } else {
+            status.set("0");
+            return;
         }
 
         List<GeneralDesc> generals = presentLabel.getGenerals();

+ 4 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/xiamen/behospitalized/BEH0443.java

@@ -29,6 +29,10 @@ public class BEH0443 extends QCCatalogue {
             return;
         }
         PresentLabel presentLabel = beHospitalizedDoc.getPresentLabel();
+        if (presentLabel == null || StringUtil.isBlank(presentLabel.getText())) {
+            status.set("0");
+            return;
+        }
         if (presentLabel != null) {
             String presentLabelText = presentLabel.getText();
             if (StringUtil.isNotBlank(presentLabelText) && (presentLabelText.contains("体重") || presentLabelText.contains("体型"))) {

+ 7 - 3
kernel/src/main/java/com/lantone/qc/kernel/catalogue/xiamen/behospitalized/BEH0444.java

@@ -30,8 +30,12 @@ public class BEH0444 extends QCCatalogue {
             return;
         }
         PresentLabel presentLabel = beHospitalizedDoc.getPresentLabel();
+        if (presentLabel == null || StringUtil.isBlank(presentLabel.getText())) {
+            status.set("0");
+            return;
+        }
         if (presentLabel != null) {
-            List<String> words = Lists.newArrayList("神志", "神清", "神不清", "意识清", "意识不清", "昏迷","精神","意识");
+            List<String> words = Lists.newArrayList("神志", "神清", "神不清", "意识清", "意识不清", "昏迷", "精神", "意识");
             String presentLabelText = presentLabel.getText();
             if (StringUtil.isNotBlank(presentLabelText)) {
                 for (String word : words) {
@@ -50,7 +54,7 @@ public class BEH0444 extends QCCatalogue {
             if (ListUtil.isNotEmpty(generals)) {
                 for (GeneralDesc general : generals) {
                     for (String word : words) {
-                        if (general.getName().contains(word)){
+                        if (general.getName().contains(word)) {
                             status.set("0");
                             return;
                         }
@@ -61,7 +65,7 @@ public class BEH0444 extends QCCatalogue {
             if (ListUtil.isNotEmpty(gens)) {
                 for (General general : gens) {
                     for (String word : words) {
-                        if (general.getName().contains(word)){
+                        if (general.getName().contains(word)) {
                             status.set("0");
                             return;
                         }

+ 3 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/xiamen/behospitalized/BEH0445.java

@@ -43,6 +43,9 @@ public class BEH0445 extends QCCatalogue {
                     return;
                 }
             }
+        } else {
+            status.set("0");
+            return;
         }
         List<GeneralDesc> generals = presentLabel.getGenerals();
         List<General> gens = presentLabel.getGens();

+ 4 - 1
kernel/src/main/java/com/lantone/qc/kernel/catalogue/xiamen/behospitalized/BEH0446.java

@@ -6,6 +6,7 @@ import com.lantone.qc.pub.model.OutputInfo;
 import com.lantone.qc.pub.model.entity.Clinical;
 import com.lantone.qc.pub.model.entity.Degree;
 import com.lantone.qc.pub.model.entity.Modification;
+import com.lantone.qc.pub.util.StringUtil;
 import org.springframework.stereotype.Component;
 
 import java.util.List;
@@ -24,7 +25,9 @@ public class BEH0446 extends QCCatalogue {
             status.set("0");
             return;
         }
-        if (inputInfo.getBeHospitalizedDoc().getPresentLabel() == null) {
+        if (inputInfo.getBeHospitalizedDoc().getPresentLabel() == null ||
+                StringUtil.isBlank(inputInfo.getBeHospitalizedDoc().getPresentLabel().getText())) {
+            status.set("0");
             return;
         }
         List<Clinical> clinicals = inputInfo.getBeHospitalizedDoc().getPresentLabel().getClinicals();