ソースを参照

Merge remote-tracking branch 'origin/hb/beilun' into hb/beilun

daiyi 3 年 前
コミット
86782a7fb0

+ 5 - 5
kernel/src/main/java/com/lantone/qc/kernel/catalogue/behospitalized/BEH02966.java

@@ -35,11 +35,11 @@ public class BEH02966 extends QCCatalogue {
         if (gender.contains("男")) {
             /* 男性不合理词 */
             noMatchWords = Lists.newArrayList("阴道", "宫颈", "子宫", "宫底", "胎位", "胎数", "胎心",
-                    "宫缩", "宫口", "输卵管", "卵巢", "输卵管", "阴唇", "阴蒂", "阴道前庭", "前庭大腺", "处女膜");
+                    "宫缩", "宫口", "输卵管", "卵巢", "输卵管", "阴唇", "阴蒂", "阴道前庭", "前庭大腺", "处女膜", "女");
         } else if (gender.contains("女")) {
             /* 女性不合理词 */
             noMatchWords = Lists.newArrayList("睾丸", "阴茎", "精索", "包皮", "输精管",
-                    "射精管", "尿道海绵体", "冠状沟", "精阜", "精囊腺", "阴囊");
+                    "射精管", "尿道海绵体", "冠状沟", "精阜", "精囊腺", "阴囊", "男");
         }
         if (noMatchWords == null || noMatchWords.size() == 0) {
             return;
@@ -48,11 +48,11 @@ public class BEH02966 extends QCCatalogue {
         List<String> keys = Lists.newArrayList("主诉", "现病史", "既往史", "体格检查", "一般情况"
                 , "初步诊断", "专科体格检查", "神经系统检查", "实验室检查", "影像学检查");
         String text = CatalogueUtil.structureMapJoin(beHospitalStructureMap, keys);
-        String rex="(?<!((母孕期|母亲|妈妈|分娩期|分娩|出生时|母亲怀孕|怀孕时|孕期)[^。,;。、,;]{0,15}))(阴道|宫颈|子宫|宫底|胎位|胎数|胎心|宫缩|宫口|卵巢|输卵管|阴唇|阴蒂|阴道前庭|前庭大腺|处女膜)";
+        String rex = "(?<!((母孕期|母亲|妈妈|分娩期|分娩|出生时|母亲怀孕|怀孕时|孕期)[^。,;。、,;]{0,15}))(阴道|宫颈|子宫|宫底|胎位|胎数|胎心|宫缩|宫口|卵巢|输卵管|阴唇|阴蒂|阴道前庭|前庭大腺|处女膜)";
         for (String noMatchWord : noMatchWords) {
             if (text.contains(noMatchWord)) {
-                if(gender.contains("男")){
-                    if(!text.matches(rex)){
+                if (gender.contains("男")) {
+                    if (!text.matches(rex)) {
                         status.set("0");
                         return;
                     }

+ 50 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/firstpagerecord/FIRP03229.java

@@ -0,0 +1,50 @@
+package com.lantone.qc.kernel.catalogue.firstpagerecord;
+
+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.util.StringUtil;
+import org.springframework.stereotype.Component;
+
+import java.util.Map;
+
+/**
+ * @ClassName : FIRP03229
+ * @Description : 身份证号与性别不符合
+ * @Author : wsy
+ * @Date: 2022-04-12 16:13
+ */
+@Component
+public class FIRP03229 extends QCCatalogue {
+    /**
+     * 1.获取病案首页的患者性别和身份证号,若任一不存在则通过
+     * 2.根据18位数的身份证号码的第十七位(倒数第二位)判断性别,如果为奇数则为男性,偶数则为女性
+     * 3.校验首页填写的性别是否和身份证性别一致
+     */
+
+    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        status.set("0");
+        if (inputInfo.getFirstPageRecordDoc() == null) {
+            return;
+        }
+        if (inputInfo.getFirstPageRecordDoc().getStructureMap() != null) {
+            Map<String, String> firstPageStructureMap = inputInfo.getFirstPageRecordDoc().getStructureMap();
+            String idNumber = firstPageStructureMap.get(Content.idNumber);//身份证号
+            String gender = firstPageStructureMap.get(Content.gender);//性别
+            if (StringUtil.isBlank(idNumber) || StringUtil.isBlank(gender)) {
+                return;
+            }
+            if (idNumber.length() > 17) {
+                int num = Integer.parseInt(idNumber.substring(16, 17));
+                //奇数表示男性,偶数表示女性;
+                if (gender.contains("男") && num % 2 == 0) {
+                    status.set("-1");
+                }
+                if (gender.contains("女") && num % 2 == 1) {
+                    status.set("-1");
+                }
+            }
+        }
+    }
+}

+ 2 - 2
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/behospitalized/BEH02966.java

@@ -51,11 +51,11 @@ public class BEH02966 extends QCCatalogue {
         if (gender.contains("男")) {
             /* 男性不合理词 */
             noMatchWords = Lists.newArrayList("阴道", "宫颈", "子宫", "宫底", "胎位", "胎数", "胎心",
-                    "宫缩", "宫口", "输卵管", "卵巢", "输卵管", "阴唇", "阴蒂", "阴道前庭", "前庭大腺", "处女膜");
+                    "宫缩", "宫口", "输卵管", "卵巢", "输卵管", "阴唇", "阴蒂", "阴道前庭", "前庭大腺", "处女膜", "女");
         } else if (gender.contains("女")) {
             /* 女性不合理词 */
             noMatchWords = Lists.newArrayList("睾丸", "阴茎", "精索", "包皮", "附睾", "输精管",
-                    "射精管", "尿道海绵体", "冠状沟", "精阜", "精囊腺", "阴囊");
+                    "射精管", "尿道海绵体", "冠状沟", "精阜", "精囊腺", "阴囊", "男");
         }
         if (noMatchWords == null || noMatchWords.size() == 0) {
             return;

+ 4 - 4
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/ninghaifuyou/behospitalized/BEH02966.java

@@ -27,9 +27,9 @@ public class BEH02966 extends QCCatalogue {
         }
 
         //宁还妇幼新生儿不判断此规则
-        if(inputInfo.getFirstPageRecordDoc() != null){
+        if (inputInfo.getFirstPageRecordDoc() != null) {
             Map<String, String> firstPageRecordStructureMap = inputInfo.getFirstPageRecordDoc().getStructureMap();
-            if(StringUtil.isNotBlank(firstPageRecordStructureMap.get("新生儿出生天数"))){
+            if (StringUtil.isNotBlank(firstPageRecordStructureMap.get("新生儿出生天数"))) {
                 return;
             }
         }
@@ -43,11 +43,11 @@ public class BEH02966 extends QCCatalogue {
         if (gender.contains("男")) {
             /* 男性不合理词 */
             noMatchWords = Lists.newArrayList("阴道", "宫颈", "子宫", "宫底", "胎位", "胎数", "胎心",
-                    "宫缩", "宫口", "输卵管", "卵巢", "输卵管", "阴唇", "阴蒂", "阴道前庭", "前庭大腺", "处女膜");
+                    "宫缩", "宫口", "输卵管", "卵巢", "输卵管", "阴唇", "阴蒂", "阴道前庭", "前庭大腺", "处女膜", "女");
         } else if (gender.contains("女")) {
             /* 女性不合理词 */
             noMatchWords = Lists.newArrayList("睾丸", "阴茎", "精索", "包皮", "附睾", "输精管",
-                    "射精管", "尿道海绵体", "冠状沟", "精阜", "精囊腺");
+                    "射精管", "尿道海绵体", "冠状沟", "精阜", "精囊腺", "男");
         }
         if (noMatchWords == null || noMatchWords.size() == 0) {
             return;

+ 2 - 2
kernel/src/main/java/com/lantone/qc/kernel/catalogue/leavehospital/LEA02968.java

@@ -36,11 +36,11 @@ public class LEA02968 extends QCCatalogue {
         if (gender.contains("男")) {
             /* 男性不合理词 */
             noMatchWords = Lists.newArrayList("阴道", "宫颈", "子宫", "宫底", "胎位", "胎数", "胎心",
-                    "宫缩", "宫口", "输卵管", "卵巢", "输卵管", "阴唇", "阴蒂", "阴道前庭", "前庭大腺", "处女膜");
+                    "宫缩", "宫口", "输卵管", "卵巢", "输卵管", "阴唇", "阴蒂", "阴道前庭", "前庭大腺", "处女膜", "女");
         } else if (gender.contains("女")) {
             /* 女性不合理词 */
             noMatchWords = Lists.newArrayList("睾丸", "阴茎", "精索", "包皮", "附睾", "输精管",
-                    "射精管", "尿道海绵体", "冠状沟", "精阜", "精囊腺");
+                    "射精管", "尿道海绵体", "冠状沟", "精阜", "精囊腺", "男");
         }
 
         if (noMatchWords == null || noMatchWords.size() == 0) {

+ 4 - 4
kernel/src/main/java/com/lantone/qc/kernel/catalogue/threelevelward/THR02967.java

@@ -15,7 +15,7 @@ import java.util.Map;
 
 /**
  * @ClassName : THR02967
- * @Description :  查房记录中查体与性别不匹配
+ * @Description :  患者病历描述与性别不符
  * @Author : 胡敬
  * @Date: 2020-06-13 16:13
  */
@@ -36,11 +36,11 @@ public class THR02967 extends QCCatalogue {
         if (gender.contains("男")) {
             /* 男性不合理词 */
             noMatchWords = Lists.newArrayList("阴道", "宫颈", "子宫", "宫底", "胎位", "胎数", "胎心",
-                    "宫缩", "宫口", "输卵管", "卵巢", "输卵管", "阴唇", "阴蒂", "阴道前庭", "前庭大腺", "处女膜");
+                    "宫缩", "宫口", "输卵管", "卵巢", "输卵管", "阴唇", "阴蒂", "阴道前庭", "前庭大腺", "处女膜", "女");
         } else if (gender.contains("女")) {
             /* 女性不合理词 */
             noMatchWords = Lists.newArrayList("睾丸", "阴茎", "精索", "包皮", "附睾", "输精管",
-                    "射精管", "尿道海绵体", "冠状沟", "精阜", "精囊腺");
+                    "射精管", "尿道海绵体", "冠状沟", "精阜", "精囊腺", "男");
         }
 
         if (noMatchWords == null || noMatchWords.size() == 0) {
@@ -51,7 +51,7 @@ public class THR02967 extends QCCatalogue {
             Map<String, String> structureMap = threeLevelWardDoc.getStructureMap();
             String text = CatalogueUtil.structureMapJoin(structureMap, keys);
             for (String noMatchWord : noMatchWords) {
-                if (noMatchWord.contains("附睾") && text.contains("附睾")&&"7".equals(Content.hospital_Id)) {
+                if (noMatchWord.contains("附睾") && text.contains("附睾") && "7".equals(Content.hospital_Id)) {
                     int index = text.indexOf("附睾");
                     String substring = text.substring(Math.max(0, index - 5), Math.min(index + 7, text.length()));
                     if (text.contains("附睾蛋白") || substring.contains("蛋白")) {