Pārlūkot izejas kodu

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

fangqw 4 gadi atpakaļ
vecāks
revīzija
9ac5bc3f5b

+ 4 - 3
kernel/src/main/java/com/lantone/qc/kernel/catalogue/yiwu/behospitalized/BEH0400.java

@@ -25,10 +25,11 @@ public class BEH0400 extends QCCatalogue {
             status.set("0");
             return;
         }
-        List<String>  Str =  Arrays.asList("咳嗽气喘史","胸闷心悸史","腹痛腹泻史","多饮多尿史","浮肿少尿史","尿频尿痛史","抽搐史","出血史","过敏史","药物过敏史","传染病史","外伤手术史","输血史","重大疾病史和治疗史");
+        List<String> Str = Arrays.asList("咳嗽气喘史", "胸闷心悸史", "腹痛腹泻史", "多饮多尿史", "浮肿少尿史", "尿频尿痛史", "抽搐史", "出血史", "过敏史", "药物过敏史", "传染病史", "外伤手术史", "输血史", "重大疾病史和治疗史",
+                "既往体健");
         Map<String, String> structureMap = inputInfo.getBeHospitalizedDoc().getStructureMap();
-        for(String s : Str){
-            if(structureMap!=null &&structureMap.containsKey(s)){
+        for (String s : Str) {
+            if (structureMap != null && structureMap.containsKey(s)) {
                 status.set("0");
                 return;
             }

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

@@ -29,10 +29,15 @@ public class BEH0493 extends QCCatalogue {
         String pacs = structureMap.get("辅助检查");
         String laboratory = structureMap.get("实验室检查");
         String image = structureMap.get("影像学检查");
+        String in = structureMap.get("入院情况");
         if (StringUtil.isNotBlank(pacs) || StringUtil.isNotBlank(laboratory) || StringUtil.isNotBlank(image)) {
             status.set("0");
             return;
         }
+        if (StringUtil.isNotBlank(in) && in.contains("辅助检查")) {
+            status.set("0");
+            return;
+        }
         PacsLabel pacsLabel = inputInfo.getBeHospitalizedDoc().getPacsLabel();
         if (pacsLabel != null && StringUtil.isNotBlank(pacsLabel.getText())) {
             status.set("0");

+ 3 - 2
kernel/src/main/java/com/lantone/qc/kernel/structure/ai/FirstCourseRecordAI.java

@@ -105,11 +105,12 @@ public class FirstCourseRecordAI extends ModelAI {
              */
 
             //病历特点与现病史比较相似度
-            if (inputInfo.getBeHospitalizedDoc() != null && StringUtil.isNotBlank(inputInfo.getBeHospitalizedDoc().getPresentLabel().getText())) {
+            if (inputInfo.getBeHospitalizedDoc() != null) {
                 //先从结构化数据找病例特点
                 if (StringUtil.isNotBlank(structureMap.get("现病史")) && inputInfo.getBeHospitalizedDoc().getPresentLabel() != null) {
                     putContent(similarContent, structureMap.get("现病史"), inputInfo.getBeHospitalizedDoc().getPresentLabel().getText());
-                } else if (firstCourseRecordDoc.getCaseCharacteristicLabel() != null && StringUtil.isNotBlank(firstCourseRecordDoc.getCaseCharacteristicLabel().getText())) {
+                } else if (firstCourseRecordDoc.getCaseCharacteristicLabel() != null && StringUtil.isNotBlank(firstCourseRecordDoc.getCaseCharacteristicLabel().getText())
+                        && inputInfo.getBeHospitalizedDoc().getPresentLabel() != null) {
                     //再从doc找病例特点
                     putContent(similarContent, firstCourseRecordDoc.getCaseCharacteristicLabel().getText(), inputInfo.getBeHospitalizedDoc().getPresentLabel().getText());
                 }

+ 1 - 0
public/src/main/java/com/lantone/qc/pub/Content.java

@@ -271,6 +271,7 @@ public class Content {
             "yyyy年M月d日H时m分",
             "yyyy-MM-ddHH:mm:ss",
             "yyyy-MM-ddHH:mm",
+            "yyyy-MM-ddHH:mm",
             "yyyy-MM-ddHH:m",
             "yyyy-MM-ddH:mm",
             "yyyy-MM-ddH:m",

+ 28 - 40
trans/src/main/java/com/lantone/qc/trans/yiwu/YiWuBeHospitalizedDocTrans.java

@@ -5,7 +5,17 @@ import com.lantone.qc.dbanaly.facade.yiwu.YiWuXmlUtil;
 import com.lantone.qc.dbanaly.util.ModuleMappingUtil;
 import com.lantone.qc.dbanaly.util.SpecialStorageUtil;
 import com.lantone.qc.pub.model.doc.BeHospitalizedDoc;
-import com.lantone.qc.pub.model.label.*;
+import com.lantone.qc.pub.model.label.ChiefLabel;
+import com.lantone.qc.pub.model.label.DiagLabel;
+import com.lantone.qc.pub.model.label.FamilyLabel;
+import com.lantone.qc.pub.model.label.MaritalLabel;
+import com.lantone.qc.pub.model.label.MenstrualLabel;
+import com.lantone.qc.pub.model.label.PacsLabel;
+import com.lantone.qc.pub.model.label.PastLabel;
+import com.lantone.qc.pub.model.label.PersonalLabel;
+import com.lantone.qc.pub.model.label.PresentLabel;
+import com.lantone.qc.pub.model.label.VitalLabel;
+import com.lantone.qc.pub.model.label.VitalLabelSpecial;
 import com.lantone.qc.pub.model.vo.BehospitalInfoVO;
 import com.lantone.qc.pub.model.vo.MedrecVo;
 import com.lantone.qc.pub.util.FastJsonUtils;
@@ -50,7 +60,7 @@ public class YiWuBeHospitalizedDocTrans extends ModelDocTrans {
                 dailyTrans(sourceMap, text, behDeptId);
             } else {
                 List<String> titles = Lists.newArrayList("婚    姻", "婚姻状况", "住      址", "供 史 者", "性      别", "婚  姻", "民  族", "民    族", "个人史", "妇科检查", "产科检查",
-                        "实验室", "初步诊断", "修正诊断", "补充诊断", "初步诊断医师", "修正诊断医师", "补充诊断医师", "初步诊断日期", "修正诊断日期", "补充诊断日期", "诊断和诊断修正","婚 育 史","家 族 史","体格检查(一)","现 病 史","既 往 史","系统回顾");
+                        "实验室", "初步诊断", "修正诊断", "补充诊断", "初步诊断医师", "修正诊断医师", "补充诊断医师", "初步诊断日期", "修正诊断日期", "补充诊断日期", "诊断和诊断修正", "婚 育 史", "家 族 史", "体格检查(一)", "现 病 史", "既 往 史", "系统回顾");
                 List<String> modifyKey = Lists.newArrayList("初步诊断", "修正诊断", "补充诊断");
                 List<String> sortTitles = CommonAnalysisUtil.sortTitlesNoColon(modifyKey, text);
                 for (String key : sortTitles) {
@@ -73,11 +83,6 @@ public class YiWuBeHospitalizedDocTrans extends ModelDocTrans {
                 sourceMap.put("mode_id=" + contentMap.get("modeId").toString(), "");
                 sourceMap.put("rec_title=" + contentMap.get("recTitle").toString(), "");
 
-                //新生儿科姓名+姓名问题解决
-                if (sourceMap.containsKey("姓名")) {
-                    String value = sourceMap.get("姓名").split(" ")[0];
-                    sourceMap.put("姓名", value);
-                }
                 //产科孕产次
                 if (sourceMap.containsKey("入院记录")) {
                     String value = sourceMap.get("入院记录").split(" ")[0];
@@ -108,16 +113,10 @@ public class YiWuBeHospitalizedDocTrans extends ModelDocTrans {
             structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, keyContrasts, modeId);
             OrdinaryAssistant.removeBlank(structureMap);
         }
-        //日间病历拼接入院情况
-        if (structureMap.containsKey("现病史") && structureMap.containsKey("既往史")) {
-            structureMap.put("入院情况", structureMap.get("现病史") + structureMap.get("既往史"));
-        } else if (structureMap.containsKey("现病史")) {
-            structureMap.put("入院情况", structureMap.get("现病史"));
-        } else if (structureMap.containsKey("既往史")) {
-            structureMap.put("入院情况", structureMap.get("既往史"));
-        }
-        if (structureMap.containsKey("辅助检查") && structureMap.containsKey("特殊检查")) {
-            structureMap.put("辅助检查", structureMap.get("辅助检查") + "\n" + structureMap.get("特殊检查"));
+        //姓名+姓名问题解决
+        if (structureMap.containsKey("姓名")) {
+            String value = structureMap.get("姓名").split(" ")[0];
+            structureMap.put("姓名", value);
         }
         //如果有入院时间,优先使用
         addKeyMapping(structureMap, "入院时间", "入病房时间");
@@ -178,7 +177,7 @@ public class YiWuBeHospitalizedDocTrans extends ModelDocTrans {
             "联系地址=户口地址",
             "患者工作单位名称=户口地址",
             "出生日期时间=出生日期",
-//            "医生签名=初步诊断医师签名",
+            //            "医生签名=初步诊断医师签名",
             "签字日期=初步诊断日期",
             "供史者=病史陈述者",
             "无痛人流主诉=主诉",
@@ -194,7 +193,7 @@ public class YiWuBeHospitalizedDocTrans extends ModelDocTrans {
             "有/无=产前检查",
             "末次月经日期=末次月经",
             "入院诊断1=入院诊断",
-//            "记录医师=初步诊断医师签名",
+            //            "记录医师=初步诊断医师签名",
             "修正诊断签名日期=修正诊断日期",
             "修正诊断一医师签名=修正诊断医师签名",
             "患者姓名=姓名",
@@ -237,25 +236,24 @@ public class YiWuBeHospitalizedDocTrans extends ModelDocTrans {
         if (StringUtil.isBlank(structureMap.get("主诉"))) {
             beHospitalizedDoc.setChiefLabel(null);
         }
-        //        structureMap.remove("主诉");
 
         // 走模型
         PresentLabel presentLabel = new PresentLabel();
-        presentLabel.setText(structureMap.get("现病史"));
-        beHospitalizedDoc.setPresentLabel(presentLabel);
-        if (StringUtil.isBlank(structureMap.get("现病史"))) {
-            beHospitalizedDoc.setPresentLabel(null);
+        if (StringUtil.isNotBlank(structureMap.get("现病史"))) {
+            presentLabel.setText(structureMap.get("现病史"));
+        } else if (StringUtil.isNotBlank(structureMap.get("入院情况"))) {
+            presentLabel.setText(structureMap.get("入院情况"));
         }
-        //        structureMap.remove("现病史");
+        beHospitalizedDoc.setPresentLabel(presentLabel);
 
         PastLabel pastLabel = new PastLabel();
         pastLabel.setCrfLabel(false);
-        pastLabel.setText(structureMap.get("既往史"));
-        beHospitalizedDoc.setPastLabel(pastLabel);
-        if (StringUtil.isBlank(structureMap.get("既往史"))) {
-            beHospitalizedDoc.setPastLabel(null);
+        if (StringUtil.isNotBlank(structureMap.get("既往史"))) {
+            presentLabel.setText(structureMap.get("既往史"));
+        } else if (StringUtil.isNotBlank(structureMap.get("入院情况"))) {
+            presentLabel.setText(structureMap.get("入院情况"));
         }
-        //        structureMap.remove("既往史");
+        beHospitalizedDoc.setPastLabel(pastLabel);
 
         PersonalLabel personalLabel = new PersonalLabel();
         //        personalLabel.setCrfLabel(false);
@@ -264,7 +262,6 @@ public class YiWuBeHospitalizedDocTrans extends ModelDocTrans {
         if (StringUtil.isBlank(structureMap.get("个人史"))) {
             beHospitalizedDoc.setPersonalLabel(null);
         }
-        //        structureMap.remove("个人史");
 
         MaritalLabel maritalLabel = new MaritalLabel();
         //        maritalLabel.setCrfLabel(false);
@@ -273,7 +270,6 @@ public class YiWuBeHospitalizedDocTrans extends ModelDocTrans {
         if (StringUtil.isBlank(structureMap.get("婚育史"))) {
             beHospitalizedDoc.setMaritalLabel(null);
         }
-        //        structureMap.remove("婚育史");
 
         MenstrualLabel menstrualLabel = new MenstrualLabel();
         //        menstrualLabel.setCrfLabel(false);
@@ -282,7 +278,6 @@ public class YiWuBeHospitalizedDocTrans extends ModelDocTrans {
         if (StringUtil.isBlank(structureMap.get("月经史"))) {
             beHospitalizedDoc.setMenstrualLabel(null);
         }
-        //        structureMap.remove("月经史");
 
         FamilyLabel familyLabel = new FamilyLabel();
         //        familyLabel.setCrfLabel(false);
@@ -291,7 +286,6 @@ public class YiWuBeHospitalizedDocTrans extends ModelDocTrans {
         if (StringUtil.isBlank(structureMap.get("家族史"))) {
             beHospitalizedDoc.setFamilyLabel(null);
         }
-        //        structureMap.remove("家族史");
 
         VitalLabel vitalLabel = new VitalLabel();
         //        vitalLabel.setCrfLabel(false);
@@ -300,7 +294,6 @@ public class YiWuBeHospitalizedDocTrans extends ModelDocTrans {
         if (StringUtil.isBlank(structureMap.get("体格检查"))) {
             beHospitalizedDoc.setVitalLabel(null);
         }
-        //        structureMap.remove("体格检查");
 
         VitalLabelSpecial vitalLabelSpecial = new VitalLabelSpecial();
         //        vitalLabelSpecial.setCrfLabel(false);
@@ -309,7 +302,6 @@ public class YiWuBeHospitalizedDocTrans extends ModelDocTrans {
         if (StringUtil.isBlank(structureMap.get("专科体格检查"))) {
             beHospitalizedDoc.setVitalLabelSpecial(null);
         }
-        //        structureMap.remove("专科体格检查");
 
         // 走模型
         PacsLabel pacsLabel = new PacsLabel();
@@ -319,7 +311,6 @@ public class YiWuBeHospitalizedDocTrans extends ModelDocTrans {
         if (StringUtil.isBlank(structureMap.get("辅助检查"))) {
             beHospitalizedDoc.setPacsLabel(null);
         }
-        //        structureMap.remove("辅助检查");
 
         // 走模型
         DiagLabel initialDiagLabel = new DiagLabel();
@@ -328,7 +319,6 @@ public class YiWuBeHospitalizedDocTrans extends ModelDocTrans {
         if (StringUtil.isBlank(structureMap.get("初步诊断"))) {
             beHospitalizedDoc.setInitialDiagLabel(null);
         }
-        //        structureMap.remove("初步诊断");
 
         // 走模型
         DiagLabel revisedDiagLabel = new DiagLabel();
@@ -337,7 +327,6 @@ public class YiWuBeHospitalizedDocTrans extends ModelDocTrans {
         if (StringUtil.isBlank(structureMap.get("修正诊断"))) {
             beHospitalizedDoc.setRevisedDiagLabel(null);
         }
-        //        structureMap.remove("修正诊断");
 
         // 走模型
         DiagLabel suppleDiagLabel = new DiagLabel();
@@ -346,7 +335,6 @@ public class YiWuBeHospitalizedDocTrans extends ModelDocTrans {
         if (StringUtil.isBlank(structureMap.get("补充诊断"))) {
             beHospitalizedDoc.setSuppleDiagLabel(null);
         }
-        //        structureMap.remove("补充诊断");
 
         beHospitalizedDoc.setStructureMap(structureMap);
 

+ 3 - 3
trans/src/main/java/com/lantone/qc/trans/yiwu/YiWuOperationDocTrans.java

@@ -50,14 +50,14 @@ public class YiWuOperationDocTrans extends ModelDocTrans {
         Map<String, OperationRecordDoc> operationRecordDocMap = getOperationRecordDocMap((List) contentMap.get("手术记录"));
         Map<String, PreoperativeDiscussionDoc> preoperativeDiscussionDocMap = getPreoperativeDiscussionDocMap((List) contentMap.get("术前讨论、术前小结"));
         Map<String, OperationInformedConsentDoc> operationInformedConsentDocMap = getOperationInformedConsentDocMap((List) contentMap.get("手术知情同意书"));
-        Map<String, OperationSafetyChecklistDoc> operationSafetyChecklistDocMap = getOperationSafetyChecklistDocMap((List) contentMap.get("手术安全核查表"));
+        //Map<String, OperationSafetyChecklistDoc> operationSafetyChecklistDocMap = getOperationSafetyChecklistDocMap((List) contentMap.get("手术安全核查表"));
 
         Set<String> operationNameSet = Sets.newHashSet();
         operationNameSet.addAll(operationDiscussionDocMap.keySet());
         operationNameSet.addAll(operationRecordDocMap.keySet());
         operationNameSet.addAll(preoperativeDiscussionDocMap.keySet());
         operationNameSet.addAll(operationInformedConsentDocMap.keySet());
-        operationNameSet.addAll(operationSafetyChecklistDocMap.keySet());
+        //operationNameSet.addAll(operationSafetyChecklistDocMap.keySet());
 
         operationNameSet.forEach(operationName -> {
             OperationDoc operationDoc = new OperationDoc();
@@ -66,7 +66,7 @@ public class YiWuOperationDocTrans extends ModelDocTrans {
             operationDoc.setOperationRecordDoc(operationRecordDocMap.get(operationName));
             operationDoc.setPreoperativeDiscussionDoc(preoperativeDiscussionDocMap.get(operationName));
             operationDoc.setOperationInformedConsentDoc(operationInformedConsentDocMap.get(operationName));
-            operationDoc.setOperationSafetyChecklistDoc(operationSafetyChecklistDocMap.get(operationName));
+            //operationDoc.setOperationSafetyChecklistDoc(operationSafetyChecklistDocMap.get(operationName));
             retList.add(operationDoc);
         });
         return retList;