Browse Source

Merge remote-tracking branch 'origin/dev-1.2' into dev

hujing 5 years atrás
parent
commit
ab89c1a451

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

@@ -20,6 +20,11 @@ public class BEH0052 extends QCCatalogue {
             status.set("0");
             return;
         }
+        if(inputInfo.getBeHospitalizedDoc().getStructureMap().get("婚姻") != null
+                && inputInfo.getBeHospitalizedDoc().getStructureMap().get("婚姻").contains("未婚")){
+            status.set("0");
+            return;
+        }
         if (inputInfo.getBeHospitalizedDoc().getMaritalLabel() == null
                 || StringUtil.isNotBlank(inputInfo.getBeHospitalizedDoc().getMaritalLabel().getText())) {
             status.set("0");

+ 16 - 6
kernel/src/main/java/com/lantone/qc/kernel/catalogue/behospitalized/BEH0058.java

@@ -25,17 +25,27 @@ public class BEH0058 extends QCCatalogue {
 
     @Override
     public void start(InputInfo inputInfo, OutputInfo outputInfo) {
-        if(inputInfo.getBeHospitalizedDoc() == null){
+        if (inputInfo.getBeHospitalizedDoc() == null) {
             status.set("0");
             return;
         }
         BeHospitalizedDoc beHospitalizedDoc = inputInfo.getBeHospitalizedDoc();
         //硬规则 匹配未育
         MaritalLabel maritalLabel = beHospitalizedDoc.getMaritalLabel();
-        if (maritalLabel != null){
+        if (maritalLabel != null) {
             String maritalLabelText = maritalLabel.getText();
-            if (StringUtil.isBlank(maritalLabelText)
-                    || maritalLabelText.contains("未育") || maritalLabelText.contains("未婚")){
+            if (StringUtil.isBlank(maritalLabelText)) {
+                status.set("0");
+                return;
+            } else {
+                String regex = ".*\\d?子\\d?女.*";
+                boolean flag = maritalLabelText.matches(regex);
+                if (flag) {
+                    status.set("0");
+                    return;
+                }
+            }
+            if (maritalLabelText.contains("未育") || maritalLabelText.contains("未婚")) {
                 status.set("0");
                 return;
             }
@@ -52,8 +62,8 @@ public class BEH0058 extends QCCatalogue {
             familyList.addAll(familiesMl);
         }
         Pattern p = Pattern.compile("[儿子女]");
-        if (StringUtil.isNotBlank(familyMembersHealth)){
-            if (p.matcher(familyMembersHealth).find()){
+        if (StringUtil.isNotBlank(familyMembersHealth)) {
+            if (p.matcher(familyMembersHealth).find()) {
                 status.set("0");
                 return;
             }

+ 2 - 1
kernel/src/main/java/com/lantone/qc/kernel/catalogue/behospitalized/BEH0376.java

@@ -45,7 +45,8 @@ public class BEH0376 extends QCCatalogue {
         }
         //硬规则 匹配未育
         String maritalLabelText = maritalLabel.getText();
-        if (maritalLabelText.contains("未育") || maritalLabelText.contains("未婚")) {
+        if ( StringUtil.isNotBlank(maritalLabelText) &&
+                (maritalLabelText.contains("未育") || maritalLabelText.contains("未婚") ||  maritalLabelText.contains("0子0女"))) {
             status.set("0");
             return;
         }

+ 18 - 1
trans/src/main/java/com/lantone/qc/trans/changx/ChangxFirstPageRecordDocTrans.java

@@ -1,12 +1,17 @@
 package com.lantone.qc.trans.changx;
 
 import com.google.common.collect.Maps;
+import com.google.gson.JsonArray;
+import com.google.gson.JsonObject;
 import com.lantone.qc.pub.Content;
 import com.lantone.qc.pub.model.doc.FirstPageRecordDoc;
 import com.lantone.qc.pub.model.vo.MedrecVo;
 import com.lantone.qc.pub.util.FastJsonUtils;
 import com.lantone.qc.trans.ModelDocTrans;
 
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
 import java.util.Map;
 
 /**
@@ -30,8 +35,20 @@ public class ChangxFirstPageRecordDocTrans extends ModelDocTrans {
         structureExtMap.put(Content.dischargeDiag, FastJsonUtils.getJsonToBean(content.get(Content.dischargeDiag), Object.class));
 //        structureExtMap.put(Content.pathologyDiagnose, FastJsonUtils.getJsonToBean(content.get(Content.pathologyDiagnose), Object.class));
         firstPageRecordDoc.setStructureExtMap(structureExtMap);
+        //病案首页出院诊断页面信息只保留主要诊断和其他诊断
+        List<Map<String,String>> list = (List<Map<String, String>>) FastJsonUtils.getJsonToBean(content.get(Content.dischargeDiag), Object.class);
+        Iterator<Map<String,String>> iterator = list.iterator();
+        Map<String,String> map = new HashMap<>();
+        while (iterator.hasNext()) {
+            map = new HashMap<>();
+            map = iterator.next();
+            if(!((map.get("诊断类别") != null && map.get("诊断类别").equals("主要诊断"))
+                    || (map.get("诊断类别") != null && map.get("诊断类别").equals("其他诊断")))){
+                iterator.remove();
+            }
+        }
+        medrecVo.getContent().put("出院诊断",list.toString());
         firstPageRecordDoc.setPageData(medrecVo.getContent());
-
         return firstPageRecordDoc;
     }