浏览代码

抢救条目(病案首页)更新

kongwz 5 年之前
父节点
当前提交
08468c5889

+ 15 - 3
kernel/src/main/java/com/lantone/qc/kernel/catalogue/behospitalized/BEH0015.java

@@ -1,12 +1,16 @@
 package com.lantone.qc.kernel.catalogue.behospitalized;
 
 import com.lantone.qc.kernel.catalogue.QCCatalogue;
+import com.lantone.qc.kernel.util.KernelConstants;
+import com.lantone.qc.kernel.util.RedisUtil;
 import com.lantone.qc.pub.model.InputInfo;
 import com.lantone.qc.pub.model.OutputInfo;
 import com.lantone.qc.pub.model.entity.BodyPart;
 import com.lantone.qc.pub.model.entity.Cause;
 import com.lantone.qc.pub.model.entity.Clinical;
+import com.lantone.qc.pub.model.entity.Lis;
 import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
 import java.util.ArrayList;
@@ -21,14 +25,22 @@ import java.util.List;
  */
 @Component
 public class BEH0015 extends QCCatalogue {
+    @Autowired
+    private RedisUtil redisUtil;
     public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        status.set("0");
+        List<String> clinicalList = (List<String>) redisUtil.getJsonStringValue(KernelConstants.CONCEPT_CLINIC_BODYPART_PROPERTIES_LIST);
         List<Clinical> clinicals = inputInfo.getBeHospitalizedDoc().getPresentLabel().getClinicals();
         if(clinicals.size()>0){
             Clinical clinical = clinicals.get(0);
-            BodyPart bodyPart = clinical.getBodyPart();
-            if(bodyPart == null){
-                info.set(clinical.getName());
+            if(clinicalList.contains(clinical.getName())){
+                BodyPart bodyPart = clinical.getBodyPart();
+                if(bodyPart == null){
+                    status.set("-1");
+                    info.set(clinical.getName());
+                }
             }
+
         }
     }
 }

+ 5 - 12
kernel/src/main/java/com/lantone/qc/kernel/catalogue/firstpagerecord/FIRP0247.java

@@ -5,6 +5,7 @@ import com.lantone.qc.kernel.util.CatalogueUtil;
 import com.lantone.qc.pub.Content;
 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;
@@ -20,21 +21,13 @@ import java.util.regex.Pattern;
 @Component
 public class FIRP0247 extends QCCatalogue {
     public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        status.set("0");
         if (inputInfo.getFirstPageRecordDoc() != null && inputInfo.getFirstPageRecordDoc().getStructureMap() != null) {
             Map<String, String> firstpageStructureMap = inputInfo.getFirstPageRecordDoc().getStructureMap();
-            String name = firstpageStructureMap.get(Content.rescue_condition);
-            if (!CatalogueUtil.isEmpty(name)){
-                Pattern compile = Pattern.compile("(?<=抢救).*(?=次)");
-                Matcher matcher = compile.matcher(name);
-                while (matcher.find()){
-                    try{
-                        status.set("0");
-                    }catch (Exception e){
-                        e.printStackTrace();
-                    }
+            if(firstpageStructureMap != null){
+                if(StringUtils.isEmpty(firstpageStructureMap.get("病人抢救次数"))){
+                    status.set("-1");
                 }
-
-
             }
         }
     }

+ 5 - 12
kernel/src/main/java/com/lantone/qc/kernel/catalogue/firstpagerecord/FIRP0249.java

@@ -5,6 +5,7 @@ import com.lantone.qc.kernel.util.CatalogueUtil;
 import com.lantone.qc.pub.Content;
 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;
@@ -20,21 +21,13 @@ import java.util.regex.Pattern;
 @Component
 public class FIRP0249 extends QCCatalogue {
     public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        status.set("0");
         if (inputInfo.getFirstPageRecordDoc() != null && inputInfo.getFirstPageRecordDoc().getStructureMap() != null) {
             Map<String, String> firstpageStructureMap = inputInfo.getFirstPageRecordDoc().getStructureMap();
-            String name = firstpageStructureMap.get(Content.rescue_condition);
-            if (!CatalogueUtil.isEmpty(name)){
-                Pattern compile = Pattern.compile("(?<=成功).*(?=次)");
-                Matcher matcher = compile.matcher(name);
-                while (matcher.find()){
-                    try{
-                        status.set("0");
-                    }catch (Exception e){
-                        e.printStackTrace();
-                    }
+            if(firstpageStructureMap != null){
+                if(StringUtils.isEmpty(firstpageStructureMap.get("病人抢救成功次数"))){
+                    status.set("-1");
                 }
-
-
             }
         }
     }