Browse Source

新增杭州妇保院规则 LEA0156 出院记录内容缺出院注意事项

hecc 3 years ago
parent
commit
dd1db4ac30

+ 42 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/hangzhoufubao/leavehospital/LEA0156.java

@@ -0,0 +1,42 @@
+package com.lantone.qc.kernel.catalogue.hospital.hangzhoufubao.leavehospital;
+
+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.DeathRecordDoc;
+import com.lantone.qc.pub.model.doc.LeaveHospitalDoc;
+import com.lantone.qc.pub.util.StringUtil;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.stereotype.Component;
+
+import java.util.Map;
+
+/**
+ * @Description: 出院记录内容缺出院注意事项
+ * @author: 贺聪聪
+ * @time: 2022/6/2 11:07
+ */
+@Component
+public class LEA0156 extends QCCatalogue {
+
+    @Override
+    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        status.set("0");
+        LeaveHospitalDoc leaveHospitalDoc = inputInfo.getLeaveHospitalDoc();
+        if (leaveHospitalDoc == null) {
+            return;
+        }
+        DeathRecordDoc deathRecordDoc = inputInfo.getDeathRecordDoc();
+        if (deathRecordDoc == null || deathRecordDoc.getText() == null) {
+            Map<String, String> structureMap = leaveHospitalDoc.getStructureMap();
+            if (structureMap != null) {
+                if(StringUtil.isNotBlank(structureMap.get("出院注意事项"))){
+                    return;
+                }
+                if (StringUtils.isBlank(structureMap.get("可能需要的紧急医疗")) && StringUtils.isBlank(structureMap.get("健康教育")) && StringUtils.isBlank(structureMap.get("健康宣教")) && StringUtils.isBlank(structureMap.get("出院指导"))) {
+                    status.set("-1");
+                }
+            }
+        }
+    }
+}