Ver código fonte

义乌妇保新增规则

“wangdsYun 7 meses atrás
pai
commit
1dcb45afb6

+ 32 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/behospitalized/BEH0725.java

@@ -0,0 +1,32 @@
+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 org.apache.commons.lang3.StringUtils;
+import org.springframework.stereotype.Component;
+
+import java.util.Map;
+
+/**
+ * @Description: 入院记录喂养史未填写
+ * @author: dsYun
+ * @time: 2024/10/12 17:28
+ */
+@Component
+public class BEH0725 extends QCCatalogue {
+
+    @Override
+    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        status.set("0");
+        if(inputInfo.getBeHospitalizedDoc() == null){
+            return;
+        }
+        Map<String, String> structureMap = inputInfo.getBeHospitalizedDoc().getStructureMap();
+        if (StringUtils.isEmpty(structureMap.get("喂养史"))) {
+            status.set("-1");
+            return;
+        }
+    }
+
+}

+ 37 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/behospitalized/BEH0726.java

@@ -0,0 +1,37 @@
+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.model.entity.Address;
+import com.lantone.qc.pub.util.ListUtil;
+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;
+import java.util.regex.Pattern;
+
+/**
+ * @Description: 入院记录出生史未填写
+ * @author: dsYun
+ * @time: 2024/10/12 17:28
+ */
+@Component
+public class BEH0726 extends QCCatalogue {
+
+    @Override
+    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        status.set("0");
+        if(inputInfo.getBeHospitalizedDoc() == null){
+            return;
+        }
+        Map<String, String> structureMap = inputInfo.getBeHospitalizedDoc().getStructureMap();
+        if (StringUtils.isEmpty(structureMap.get("出生史"))) {
+            status.set("-1");
+            return;
+        }
+    }
+
+}

+ 52 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/behospitalized/BEH0727.java

@@ -0,0 +1,52 @@
+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.model.entity.Address;
+import com.lantone.qc.pub.util.ListUtil;
+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;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * @Description: 出生史中的分娩方式与现病史中的分娩方式不一致
+ * @author: dsYun
+ * @time: 2024/10/12 14:02
+ */
+@Component
+public class BEH0727 extends QCCatalogue {
+
+    @Override
+    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        status.set("0");
+        if(inputInfo.getBeHospitalizedDoc() == null){
+            return;
+        }
+        Map<String, String> structureMap = inputInfo.getBeHospitalizedDoc().getStructureMap();
+        String birthHistory = structureMap.get("出生史");
+        String presentText = structureMap.get("现病史");
+        if (StringUtil.isBlank(birthHistory) || StringUtil.isBlank(presentText)) {
+            return;
+        }
+
+        String regex = "分娩方式:([^,。]+)";
+        Pattern pattern = Pattern.compile(regex);
+        Matcher matcher = pattern.matcher(birthHistory);
+
+        if (matcher.find()) {
+            String modeOfDelivery = matcher.group(1); // 获取匹配到的数字
+            if(StringUtil.isBlank(modeOfDelivery)){
+                return;
+            }
+            if(!presentText.contains(modeOfDelivery)){
+                status.set("-1");
+            }
+        }
+    }
+}

+ 47 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/behospitalized/BEH0728.java

@@ -0,0 +1,47 @@
+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.model.entity.Address;
+import com.lantone.qc.pub.util.ListUtil;
+import com.lantone.qc.pub.util.StringUtil;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * @Description: 产科检查中髂前上棘间径范围23-26cm
+ * @author: dsYun
+ * @time: 2024/10/12 14:02
+ */
+@Component
+public class BEH0728 extends QCCatalogue {
+
+    @Override
+    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        status.set("0");
+        if (inputInfo.getBeHospitalizedDoc() == null) {
+            return;
+        }
+        Map<String, String> structureMap = inputInfo.getBeHospitalizedDoc().getStructureMap();
+        String obstetricExamination = structureMap.get("专科检查");
+        if (StringUtil.isBlank(obstetricExamination)) {
+            return;
+        }
+        String regex = "髂前上棘间径(\\d+)cm";
+        Pattern pattern = Pattern.compile(regex);
+        Matcher matcher = pattern.matcher(obstetricExamination);
+
+        if (matcher.find()) {
+            String numberStr = matcher.group(1); // 获取匹配到的数字
+            int number = Integer.parseInt(numberStr);
+            if (number < 23 || number > 26) {
+                status.set("-1");
+            }
+        }
+    }
+}

+ 44 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/behospitalized/BEH0729.java

@@ -0,0 +1,44 @@
+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;
+
+/**
+ * @Description: 产科检查中坐骨结节间径范围8-9cm
+ * @author: dsYun
+ * @time: 2024/10/12 14:02
+ */
+@Component
+public class BEH0729 extends QCCatalogue {
+
+    @Override
+    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        status.set("0");
+        if (inputInfo.getBeHospitalizedDoc() == null) {
+            return;
+        }
+        Map<String, String> structureMap = inputInfo.getBeHospitalizedDoc().getStructureMap();
+        String obstetricExamination = structureMap.get("专科检查");
+        if (StringUtil.isBlank(obstetricExamination)) {
+            return;
+        }
+        String regex = "坐骨结节间径(\\d+)cm";
+        Pattern pattern = Pattern.compile(regex);
+        Matcher matcher = pattern.matcher(obstetricExamination);
+
+        if (matcher.find()) {
+            String numberStr = matcher.group(1); // 获取匹配到的数字
+            int number = Integer.parseInt(numberStr);
+            if (number < 8 || number > 9) {
+                status.set("-1");
+            }
+        }
+    }
+}

+ 44 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/behospitalized/BEH0730.java

@@ -0,0 +1,44 @@
+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;
+
+/**
+ * @Description: 产科检查中髂嵴间径范围25-28cm
+ * @author: dsYun
+ * @time: 2024/10/12 14:02
+ */
+@Component
+public class BEH0730 extends QCCatalogue {
+
+    @Override
+    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        status.set("0");
+        if (inputInfo.getBeHospitalizedDoc() == null) {
+            return;
+        }
+        Map<String, String> structureMap = inputInfo.getBeHospitalizedDoc().getStructureMap();
+        String obstetricExamination = structureMap.get("专科检查");
+        if (StringUtil.isBlank(obstetricExamination)) {
+            return;
+        }
+        String regex = "髂嵴间径(\\d+)cm";
+        Pattern pattern = Pattern.compile(regex);
+        Matcher matcher = pattern.matcher(obstetricExamination);
+
+        if (matcher.find()) {
+            String numberStr = matcher.group(1); // 获取匹配到的数字
+            int number = Integer.parseInt(numberStr);
+            if (number < 25 || number > 28) {
+                status.set("-1");
+            }
+        }
+    }
+}

+ 44 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/behospitalized/BEH0731.java

@@ -0,0 +1,44 @@
+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;
+
+/**
+ * @Description: 产科检查中骶耻外径范围18-20cm
+ * @author: dsYun
+ * @time: 2024/10/12 14:02
+ */
+@Component
+public class BEH0731 extends QCCatalogue {
+
+    @Override
+    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        status.set("0");
+        if (inputInfo.getBeHospitalizedDoc() == null) {
+            return;
+        }
+        Map<String, String> structureMap = inputInfo.getBeHospitalizedDoc().getStructureMap();
+        String obstetricExamination = structureMap.get("专科检查");
+        if (StringUtil.isBlank(obstetricExamination)) {
+            return;
+        }
+        String regex = "骶耻外径(\\d+)cm";
+        Pattern pattern = Pattern.compile(regex);
+        Matcher matcher = pattern.matcher(obstetricExamination);
+
+        if (matcher.find()) {
+            String numberStr = matcher.group(1); // 获取匹配到的数字
+            int number = Integer.parseInt(numberStr);
+            if (number < 18 || number > 20) {
+                status.set("-1");
+            }
+        }
+    }
+}

+ 51 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/firstpagerecord/FIRP03240.java

@@ -0,0 +1,51 @@
+package com.lantone.qc.kernel.catalogue.firstpagerecord;
+
+import com.lantone.qc.kernel.catalogue.QCCatalogue;
+import com.lantone.qc.kernel.util.CatalogueUtil;
+import com.lantone.qc.pub.model.InputInfo;
+import com.lantone.qc.pub.model.OutputInfo;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.stereotype.Component;
+
+import java.util.Map;
+
+/**
+ *  @ClassName : FIRP03241
+ * @Description: 出院31天内再住院计划填写错误
+ * @author: hecc
+ * @data: 2022/9/2 13:37
+ */
+@Component
+public class FIRP03240 extends QCCatalogue {
+    @Override
+    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        status.set("0");
+        if (inputInfo.getFirstPageRecordDoc() == null || inputInfo.getFirstPageRecordDoc().getStructureMap() == null) {
+            return;
+        }
+        if (inputInfo.getFirstPageRecordDoc() != null && inputInfo.getFirstPageRecordDoc().getStructureMap() != null) {
+            Map<String, String> firstpageStructureMap = inputInfo.getFirstPageRecordDoc().getStructureMap();
+            //获取病案首页结构化数据三十一天内再住院计划
+            String secondBeHospital = firstpageStructureMap.get("三十一天内再住院计划");
+            //获取病案首页结构化数据在住院目的
+            String purpose = firstpageStructureMap.get("再住院目的");
+            if (CatalogueUtil.isEmpty(secondBeHospital)) {
+                return;
+            }
+            if (StringUtils.isNotEmpty(secondBeHospital)) {
+                //【三十一天内再住院计划】填写非【有/无/1/2】则报出
+                if (!(secondBeHospital.contains("有") || secondBeHospital.contains("无") || secondBeHospital.contains("1") || secondBeHospital.contains("2"))) {
+                    status.set("-1");
+                    return;
+                }
+                //【在住院目的】填写非【-/-】或空,【三十一天内再住院】为【无/1】则报出
+                if (!(purpose.contains("-") || purpose.contains("-") || purpose.contains(" ") || purpose.contains(" ") || purpose.contains(null))) {
+                    if (secondBeHospital.contains("无") || secondBeHospital.contains("1")) {
+                        status.set("-1");
+                        return;
+                    }
+                }
+            }
+        }
+    }
+}

+ 6 - 5
kernel/src/main/java/com/lantone/qc/kernel/catalogue/firstpagerecord/FIRP03241.java

@@ -6,11 +6,12 @@ import com.lantone.qc.pub.model.InputInfo;
 import com.lantone.qc.pub.model.OutputInfo;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.stereotype.Component;
+
 import java.util.Map;
 
 /**
- *  @ClassName : FIRP03241
- * @Description: 出院31天再住院计划填写错误
+ * @ClassName : FIRP03241
+ * @Description: 出院31天再住院计划,目的未填写
  * @author: hecc
  * @data: 2022/9/2 13:37
  */
@@ -37,9 +38,9 @@ public class FIRP03241 extends QCCatalogue {
                     status.set("-1");
                     return;
                 }
-                //【在住院目的】填写【-/-】或空,【三十一天内再住院】为【无/1】则报出
-                if (!(purpose.contains("-") || purpose.contains("-") || purpose.contains(" ") || purpose.contains(" ") || purpose.contains(null))) {
-                    if (secondBeHospital.contains("无") || secondBeHospital.contains("1")) {
+                //【三十一天内再住院】为【有/2】,【在住院目的】填写【-/-】或空则报出
+                if (secondBeHospital.contains("有") || secondBeHospital.contains("2")) {
+                    if ((purpose.contains("-") || purpose.contains("-") || purpose.contains(" ") || purpose.contains(" ") || purpose.contains(null))) {
                         status.set("-1");
                         return;
                     }

+ 1 - 1
kernel/src/main/resources/bootstrap.yml

@@ -12,7 +12,7 @@ spring:
       charset: UTF-8
       enabled: true
   profiles:
-    active: debug
+    active: local
 
 qc:
   hospital_id: 1,2,3,4,5,6,7,8,10,13,15,20,34,36