Pārlūkot izejas kodu

既往史未描述既往健康状况、现病史中症状主诉未填写

chengyao 3 gadi atpakaļ
vecāks
revīzija
a290eb1122

+ 1 - 1
kernel/src/main/java/com/lantone/qc/kernel/catalogue/behospitalized/BEH0560.java

@@ -56,7 +56,7 @@ public class BEH0560 extends QCCatalogue {
                 }
             }
         }
-        if (chiefSymp.size() == 0 && presentSymp.size() > 0) {
+        if (chiefSymp.size() == 0 && StringUtil.isBlank(beHospitalizedDoc.getStructureMap().get("主诉")) && presentSymp.size() > 0) {
                 status.set("-1");
                 return;
         }

+ 55 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/behospitalized/BEH0454.java

@@ -0,0 +1,55 @@
+package com.lantone.qc.kernel.catalogue.hospital.changshaxy.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.entity.Diag;
+import com.lantone.qc.pub.model.label.PastLabel;
+import com.lantone.qc.pub.util.StringUtil;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * @ClassName : BEH0454
+ * @Description :  既往史未描述既往健康状况
+ * @Author : 楼辉荣
+ * @Date: 2020-03-06 17:28
+ */
+@Component
+public class BEH0454 extends QCCatalogue {
+    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        if (inputInfo.getBeHospitalizedDoc() == null) {
+            status.set("0");
+            return;
+        }
+        Map<String, String> structureMap = inputInfo.getBeHospitalizedDoc().getStructureMap();
+        if (StringUtils.isNotEmpty(structureMap.get("既往健康状况"))) {
+            status.set("0");
+            return;
+        }
+        PastLabel pastLabel = inputInfo.getBeHospitalizedDoc().getPastLabel();
+        /* 如果既往史为空或者既往史文本为空,则不报错 */
+        if (pastLabel == null || StringUtil.isBlank(pastLabel.getText())) {
+            status.set("0");
+            return;
+        }
+        if (StringUtils.isNotEmpty(pastLabel.getHeathCondition()) || pastLabel.getText().contains("既往")
+                || pastLabel.getText().contains("详见原病历") || pastLabel.getText().contains("健康状况")
+                || pastLabel.getText().contains("见旧病历") || pastLabel.getText().contains("平素健康")) {
+            status.set("0");
+            return;
+        }
+        //既往有任一阳性疾病名称,则认为有健康状况
+        List<Diag> diags = pastLabel.getDiags();
+        for (Diag diag : diags) {
+            if (diag.getNegative() == null) {
+                status.set("0");
+                return;
+            }
+        }
+    }
+}