Browse Source

入院记录中脉搏与心率不一致

rengb 5 năm trước cách đây
mục cha
commit
62298cc213

+ 48 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/behospitalized/BEH03049.java

@@ -0,0 +1,48 @@
+package com.lantone.qc.kernel.catalogue.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.util.StringUtil;
+import org.springframework.stereotype.Component;
+
+import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * @ClassName : BEH03049
+ * @Description : 入院记录中脉搏与心率不一致
+ * @Author : 楼辉荣
+ * @Date: 2020-03-06 17:28
+ */
+@Component
+public class BEH03049 extends QCCatalogue {
+
+    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        status.set("0");
+        if (inputInfo.getBeHospitalizedDoc() == null || inputInfo.getBeHospitalizedDoc().getStructureMap() == null) {
+            return;
+        }
+        Map<String, String> structureMap = inputInfo.getBeHospitalizedDoc().getStructureMap();
+        String souval = structureMap.get("脉搏");
+        String tarval = null;
+        String vitalLabelSpecial = structureMap.get("专科体格检查");
+        String initialDiag = structureMap.get("初步诊断");
+        if (StringUtil.isNotBlank(vitalLabelSpecial)) {
+            Pattern pattern = Pattern.compile("(心率)[^体温|脉搏|呼吸|血压|疼痛]+");
+            Matcher matcher = pattern.matcher(vitalLabelSpecial);
+            if (matcher.find()) {
+                pattern = Pattern.compile("[0-9]+[./]*[0-9]*");
+                matcher = pattern.matcher(matcher.group());
+                if (matcher.find()) {
+                    tarval = matcher.group();
+                }
+            }
+        }
+        if (StringUtil.isNotBlank(souval) && StringUtil.isNotBlank(tarval) && initialDiag.indexOf("心房颤动") == -1 && !souval.equals(tarval)) {
+            status.set("-1");
+        }
+    }
+
+}