소스 검색

出院记录内容缺主诉手术患者无术前讨论记录规则更新

kongwz 5 년 전
부모
커밋
c47939b4c4
1개의 변경된 파일14개의 추가작업 그리고 3개의 파일을 삭제
  1. 14 3
      kernel/src/main/java/com/lantone/qc/kernel/catalogue/leavehospital/LEA0149.java

+ 14 - 3
kernel/src/main/java/com/lantone/qc/kernel/catalogue/leavehospital/LEA0149.java

@@ -1,6 +1,7 @@
 package com.lantone.qc.kernel.catalogue.leavehospital;
 
 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 com.lantone.qc.pub.model.doc.BeHospitalizedDoc;
@@ -17,6 +18,8 @@ import org.springframework.stereotype.Component;
 
 import java.util.List;
 import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
 
 /**
  * @Description: 出院记录内容缺主诉
@@ -39,10 +42,18 @@ public class LEA0149 extends QCCatalogue {
                 if (lhStructureMap != null && chiefLabel != null) {
                     String bhChief = chiefLabel.getText().replaceAll("[\\p{Punct}\\pP]", "");
                     String bhThings = lhStructureMap.get("入院情况");
-                    bhThings = bhThings.replaceAll("[\\p{Punct}\\pP]", "");
-                    if (bhThings.indexOf(bhChief) < 0) {
-                        status.set("-1");
+                    Pattern compile = Pattern.compile("(?<=2.).*(?=3.体格检查)");
+                    Matcher matcher = compile.matcher(bhThings);
+                    while (matcher.find()){
+                        String number = matcher.group(0);
+                        if(CatalogueUtil.isEmpty(number)){
+                            status.set("-1");
+                        }
                     }
+//                    bhThings = bhThings.replaceAll("[\\p{Punct}\\pP]", "");
+//                    if (bhThings.indexOf(bhChief) < 0) {
+//                        status.set("-1");
+//                    }
                 }
             }
         }