Browse Source

杭州市妇幼保健院更改:现病史缺少发病以来食欲描述

sq 3 years atrás
parent
commit
6e906e7f6e

+ 81 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/hangzhoufubao/behospitalized/BEH0441.java

@@ -0,0 +1,81 @@
+package com.lantone.qc.kernel.catalogue.hospital.hangzhoufubao.behospitalized;
+
+import com.google.common.collect.Lists;
+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.entity.General;
+import com.lantone.qc.pub.model.entity.GeneralDesc;
+import com.lantone.qc.pub.model.label.PresentLabel;
+import com.lantone.qc.pub.util.ListUtil;
+import com.lantone.qc.pub.util.StringUtil;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+
+
+/**
+ * @ClassName : BEH0441
+ * @Description :  现病史缺少发病以来食欲描述
+ * @Author : 沈乾
+ * @Date: 2022-06-01 14:49
+ */
+@Component
+public class BEH0441 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) {
+            status.set("0");
+            return;
+        }
+        List<String> words = Lists.newArrayList("胃纳", "食纳", "食欲", "未纳", "纳眠", "饮食", "睡眠"
+                , "禁食", "未食", "鼻饲", "饮", "未进食", "开奶", "吃奶", "胃管","少吃","少哭","少动","混合喂养");
+        String presentText = presentLabel.getText();
+        if (StringUtil.isNotBlank(presentText)) {
+            for (String word : words) {
+                if (presentText.contains(word)) {
+                    status.set("0");
+                    return;
+                }
+            }
+        } else if("7".equals(Content.hospital_Id)) {
+            status.set("0");
+            return;
+        }
+        List<GeneralDesc> generals = presentLabel.getGenerals();
+        List<General> gens = presentLabel.getGens();
+
+        if (ListUtil.isEmpty(generals) && ListUtil.isEmpty(gens)) {
+            status.set("0");
+            return;
+        }
+
+        if (ListUtil.isNotEmpty(generals)) {
+            for (GeneralDesc general : generals) {
+                for (String word : words) {
+                    if (general.getName().contains(word)) {
+                        status.set("0");
+                        return;
+                    }
+                }
+            }
+        }
+
+        if (ListUtil.isNotEmpty(gens)) {
+            for (General general : gens) {
+                for (String word : words) {
+                    if (general.getName().contains(word)) {
+                        status.set("0");
+                        return;
+                    }
+                }
+            }
+        }
+
+    }
+}