Ver código fonte

规则更新

zhaops 3 anos atrás
pai
commit
a2831482d0

+ 15 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/firstcourserecord/FIRC03230.java

@@ -5,6 +5,7 @@ import com.lantone.qc.kernel.util.RegexUtil;
 import com.lantone.qc.pub.model.InputInfo;
 import com.lantone.qc.pub.model.OutputInfo;
 import com.lantone.qc.pub.model.doc.FirstCourseRecordDoc;
+import com.lantone.qc.pub.model.doc.FirstPageRecordDoc;
 import com.lantone.qc.pub.util.StringUtil;
 import org.springframework.stereotype.Component;
 
@@ -26,6 +27,7 @@ public class FIRC03230 extends QCCatalogue {
 
     public void start(InputInfo inputInfo, OutputInfo outputInfo) {
         FirstCourseRecordDoc firstCourseRecordDoc = inputInfo.getFirstCourseRecordDoc();
+        FirstPageRecordDoc firstPageRecordDoc = inputInfo.getFirstPageRecordDoc();
         if (firstCourseRecordDoc == null) {
             status.set("0");
             return;
@@ -35,6 +37,19 @@ public class FIRC03230 extends QCCatalogue {
         String diagnoseText = firstCourseRecordDoc.getStructureMap() != null
                 ? firstCourseRecordDoc.getStructureMap().get("诊断依据")
                 : "";
+        String diagText2 = firstCourseRecordDoc.getStructureMap() != null
+                ? firstCourseRecordDoc.getStructureMap().get("初步诊断")
+                : "";
+        String firstPageDiagText = firstPageRecordDoc.getStructureMap() != null
+                ? firstPageRecordDoc.getStructureMap().get("门急诊诊断")
+                : "";
+
+        //先判断是否下了中医诊断,没有则通过 或 判断病案首页门急诊诊断是否下诊断,"-"为空,没有则通过
+        if ((StringUtil.isBlank(diagText2) || !diagText2.contains("中医诊断"))
+                && (StringUtil.isBlank(firstPageDiagText) || !RegexUtil.getRegexRes(firstPageDiagText, "[\\u4E00-\\u9FA5]+"))) {
+            status.set("0");
+            return;
+        }
 
         if (StringUtil.isBlank(text) && StringUtil.isBlank(diagnoseText)) {
             status.set("0");

+ 8 - 2
kernel/src/main/java/com/lantone/qc/kernel/catalogue/firstcourserecord/FIRC03231.java

@@ -6,6 +6,7 @@ import com.lantone.qc.kernel.util.RegexUtil;
 import com.lantone.qc.pub.model.InputInfo;
 import com.lantone.qc.pub.model.OutputInfo;
 import com.lantone.qc.pub.model.doc.FirstCourseRecordDoc;
+import com.lantone.qc.pub.model.doc.FirstPageRecordDoc;
 import com.lantone.qc.pub.util.StringUtil;
 import org.springframework.stereotype.Component;
 
@@ -26,6 +27,7 @@ public class FIRC03231 extends QCCatalogue {
 
     public void start(InputInfo inputInfo, OutputInfo outputInfo) {
         FirstCourseRecordDoc firstCourseRecordDoc = inputInfo.getFirstCourseRecordDoc();
+        FirstPageRecordDoc firstPageRecordDoc = inputInfo.getFirstPageRecordDoc();
         if (firstCourseRecordDoc == null) {
             status.set("0");
             return;
@@ -38,9 +40,13 @@ public class FIRC03231 extends QCCatalogue {
         String diagText2 = firstCourseRecordDoc.getStructureMap() != null
                 ? firstCourseRecordDoc.getStructureMap().get("初步诊断")
                 : "";
+        String firstPageDiagText = firstPageRecordDoc.getStructureMap() != null
+                ? firstPageRecordDoc.getStructureMap().get("门急诊诊断")
+                : "";
 
-        //先判断是否下了中医诊断,没有则通过
-        if (StringUtil.isBlank(diagText2) || !diagText2.contains("中医诊断")) {
+        //先判断是否下了中医诊断,没有则通过 或 判断病案首页门急诊诊断是否下诊断,"-"为空,没有则通过
+        if ((StringUtil.isBlank(diagText2) || !diagText2.contains("中医诊断"))
+                && (StringUtil.isBlank(firstPageDiagText) || !RegexUtil.getRegexRes(firstPageDiagText, "[\\u4E00-\\u9FA5]+"))) {
             status.set("0");
             return;
         }

+ 15 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/firstcourserecord/FIRC03232.java

@@ -6,6 +6,7 @@ import com.lantone.qc.kernel.util.RegexUtil;
 import com.lantone.qc.pub.model.InputInfo;
 import com.lantone.qc.pub.model.OutputInfo;
 import com.lantone.qc.pub.model.doc.FirstCourseRecordDoc;
+import com.lantone.qc.pub.model.doc.FirstPageRecordDoc;
 import com.lantone.qc.pub.model.label.CaseCharacteristicLabel;
 import com.lantone.qc.pub.model.label.DiagnosisLabel;
 import com.lantone.qc.pub.util.StringUtil;
@@ -30,6 +31,7 @@ public class FIRC03232 extends QCCatalogue {
 
     public void start(InputInfo inputInfo, OutputInfo outputInfo) {
         FirstCourseRecordDoc firstCourseRecordDoc = inputInfo.getFirstCourseRecordDoc();
+        FirstPageRecordDoc firstPageRecordDoc = inputInfo.getFirstPageRecordDoc();
         if (firstCourseRecordDoc == null) {
             status.set("0");
             return;
@@ -42,6 +44,19 @@ public class FIRC03232 extends QCCatalogue {
         String caseCharacteristicText = firstCourseRecordDoc.getStructureMap() != null
                 ? firstCourseRecordDoc.getStructureMap().get("病例特点")
                 : "";
+        String diagText2 = firstCourseRecordDoc.getStructureMap() != null
+                ? firstCourseRecordDoc.getStructureMap().get("初步诊断")
+                : "";
+        String firstPageDiagText = firstPageRecordDoc.getStructureMap() != null
+                ? firstPageRecordDoc.getStructureMap().get("门急诊诊断")
+                : "";
+
+        //先判断是否下了中医诊断,没有则通过 或 判断病案首页门急诊诊断是否下诊断,"-"为空,没有则通过
+        if ((StringUtil.isBlank(diagText2) || !diagText2.contains("中医诊断"))
+                && (StringUtil.isBlank(firstPageDiagText) || !RegexUtil.getRegexRes(firstPageDiagText, "[\\u4E00-\\u9FA5]+"))) {
+            status.set("0");
+            return;
+        }
 
         //病历特点
         CaseCharacteristicLabel caseCharacteristicLabel = firstCourseRecordDoc.getCaseCharacteristicLabel();

+ 1 - 1
kernel/src/main/java/com/lantone/qc/kernel/catalogue/firstpagerecord/FIRP0209.java

@@ -20,7 +20,7 @@ import java.util.Map;
 @Component
 public class FIRP0209 extends QCCatalogue {
 
-    private List<String> containList = Arrays.asList("退(离)休人员","农民", "家务", "自由职业者", "个体经营者", "无业人员", "儿童");
+    private List<String> containList = Arrays.asList("退(离)休人员","农民", "家务", "自由职业者", "个体经营者", "无业人员", "儿童","学生");
 
     public void start(InputInfo inputInfo, OutputInfo outputInfo) {
         status.set("0");

+ 22 - 20
kernel/src/main/java/com/lantone/qc/kernel/catalogue/threelevelward/THR03112.java

@@ -42,7 +42,7 @@ public class THR03112 extends QCCatalogue {
                             String daItemName = doctorAdviceDocStructureMap.get(Content.medicalOrderName);
                             String nameSs = doctorAdviceDocStructureMap.get("医嘱处方类型");
                             if (StringUtil.isNotEmpty(daItemName) && StringUtil.isNotEmpty(nameSs)) {
-                                if (dateStr(daItemName) && (nameSs.equals("检查")||nameSs.equals("RAD")|| nameSs.equals("放射医嘱"))) {
+                                if (dateStr(daItemName) && (nameSs.equals("检查") || nameSs.equals("RAD") || nameSs.equals("放射医嘱"))) {
                                     flag = true;
                                     status.set("-1");
                                 }
@@ -52,7 +52,7 @@ public class THR03112 extends QCCatalogue {
                 }
             }
         }
-        if(flag) {
+        if (flag) {
             List<PacsDoc> pacsDocs = inputInfo.getPacsDocs();
             if (ListUtil.isNotEmpty(pacsDocs)) {
                 for (PacsDoc pacsDoc : pacsDocs) {
@@ -62,7 +62,8 @@ public class THR03112 extends QCCatalogue {
                     String str2 = structureMap.get("报告名称");
                     String str3 = structureMap.get("观察记录");
                     String str4 = structureMap.get("检查结果诊断");
-                    if (dateStrBg(str) || dateStrBg(str1) || dateStrBg(str2) || dateStrBg(str3) || dateStrBg(str4)) {
+                    String str5 = structureMap.get("检查类型名称");
+                    if (dateStrBg(str) || dateStrBg(str1) || dateStrBg(str2) || dateStrBg(str3) || dateStrBg(str4) || dateStrBg(str5)) {
                         status.set("0");
                         return;
                     }
@@ -71,30 +72,31 @@ public class THR03112 extends QCCatalogue {
         }
     }
 
-    private boolean dateStr(String str){
-        if(StringUtil.isEmpty(str)){
+    private boolean dateStr(String str) {
+        if (StringUtil.isEmpty(str)) {
             return false;
         }
-        if (str.contains("MR") || str.contains("磁共振")||str.contains("核磁")) {
+        if (str.contains("MR") || str.contains("磁共振") || str.contains("核磁")) {
             List<String> notMRList = Content.notMRList;
             for (String list : notMRList) {
-                if(!str.contains(list)){
+                if (!str.contains(list)) {
                     return true;
                 }
             }
         }
         return false;
     }
-    private boolean dateStrBg(String str){
-        if(StringUtil.isEmpty(str)){
+
+    private boolean dateStrBg(String str) {
+        if (StringUtil.isEmpty(str)) {
             return false;
         }
-        boolean MrCf=false;
-        boolean jsj=false;
+        boolean MrCf = false;
+        boolean jsj = false;
         ArrayList<String> cfStrings = new ArrayList<>();
-        String rex2="[\\s\\S]{0,5}(?=MR)[\\s\\S]{1,10}";
+        String rex2 = "[\\s\\S]{0,5}(?=MR)[\\s\\S]{1,10}";
         //需要判断同时存在MR和MRS等情况的发生
-        if(str.contains("MR")) {
+        if (str.contains("MR")) {
             Matcher matcher = Pattern.compile(rex2).matcher(str);
             while (matcher.find()) {
                 String group = matcher.group();
@@ -105,24 +107,24 @@ public class THR03112 extends QCCatalogue {
                 for (String notCT : notMRList) {
                     for (int i = 0; i < cfStrings.size(); i++) {
                         String cfStr = cfStrings.get(i);
-                        if(cfStr.contains(notCT)){
+                        if (cfStr.contains(notCT)) {
                             cfStrings.remove(i);
                             continue;
                         }
                     }
                 }
-                if(cfStrings.size()>0){
-                    MrCf=true;
+                if (cfStrings.size() > 0) {
+                    MrCf = true;
                 }
             }
 
         }
-        if ( str.contains("磁共振")||str.contains("核磁")) {
-            jsj= true;
+        if (str.contains("磁共振") || str.contains("核磁")) {
+            jsj = true;
         }
-        if(jsj||MrCf){
+        if (jsj || MrCf) {
             return true;
         }
         return false;
     }
-}
+}