Pārlūkot izejas kodu

现病史缺少发病以来一般情况描述规则添加

daiyi 3 gadi atpakaļ
vecāks
revīzija
19dc48d865

+ 58 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/ningbozhongyi/behospitalized/BEH0022.java

@@ -0,0 +1,58 @@
+package com.lantone.qc.kernel.catalogue.hospital.ningbozhongyi.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.entity.General;
+import com.lantone.qc.pub.model.entity.GeneralDesc;
+import com.lantone.qc.pub.model.label.PresentLabel;
+import com.lantone.qc.pub.util.StringUtil;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @ClassName : BEH0022
+ * @Description :  现病史缺少发病以来一般情况描述
+ * @Author : 楼辉荣
+ * @Date: 2020-03-06 17:28
+ */
+@Component
+public class BEH0022 extends QCCatalogue {
+    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        if (inputInfo.getBeHospitalizedDoc() == null) {
+            status.set("0");
+            return;
+        }
+        PresentLabel presentLabel = inputInfo.getBeHospitalizedDoc().getPresentLabel();
+        if (presentLabel == null || StringUtil.isBlank(presentLabel.getText())) {
+            status.set("0");
+            return;
+        }
+        String presentText = presentLabel.getText();
+        if (presentText.contains("发病以来")) {
+            status.set("0");
+            return;
+        }
+        List<GeneralDesc> generals = presentLabel.getGenerals();
+        if (generals != null && generals.size() > 0) {
+            status.set("0");
+            return;
+        }
+        List<General> gens = inputInfo.getBeHospitalizedDoc().getPresentLabel().getGens();
+        if (gens != null && gens.size() > 0) {
+            status.set("0");
+            return;
+        }
+        //增加强判断,现病史有无"病来..."
+        BeHospitalizedDoc beHospitalizedDoc = inputInfo.getBeHospitalizedDoc();
+        Map<String, String> beHospitalizedDocStructureMap = beHospitalizedDoc.getStructureMap();
+        if (beHospitalizedDocStructureMap.get("现病史") != null && (beHospitalizedDocStructureMap.get("现病史").contains("病来")
+                || beHospitalizedDocStructureMap.get("现病史").contains("孕来"))) {
+            status.set("0");
+            return;
+        }
+    }
+}