Prechádzať zdrojové kódy

Merge branch 'dev-template' into dev

rengb 5 rokov pred
rodič
commit
0632f05679
19 zmenil súbory, kde vykonal 120 pridanie a 80 odobranie
  1. 1 1
      kernel/src/main/java/com/lantone/qc/kernel/catalogue/behospitalized/BEH0043.java
  2. 2 2
      kernel/src/main/java/com/lantone/qc/kernel/structure/ai/FirstCourseRecordAI.java
  3. 12 3
      kernel/src/main/java/com/lantone/qc/kernel/util/CacheUtil.java
  4. 1 1
      kernel/src/main/resources/cache/3/module_mapping.json
  5. 2 1
      trans/src/main/java/com/lantone/qc/trans/comsis/OrdinaryAssistant.java
  6. 21 21
      trans/src/main/java/com/lantone/qc/trans/taizhou/TaiZhouBeHospitalizedDocTrans.java
  7. 3 5
      trans/src/main/java/com/lantone/qc/trans/taizhou/TaiZhouConsultationDocTrans.java
  8. 2 1
      trans/src/main/java/com/lantone/qc/trans/taizhou/TaiZhouDeathCaseDiscussDocTrans.java
  9. 3 1
      trans/src/main/java/com/lantone/qc/trans/taizhou/TaiZhouDeathRecordDocTrans.java
  10. 2 1
      trans/src/main/java/com/lantone/qc/trans/taizhou/TaiZhouDifficultCaseDiscussDocTrans.java
  11. 1 1
      trans/src/main/java/com/lantone/qc/trans/taizhou/TaiZhouDutyShiftSystemDocTrans.java
  12. 35 31
      trans/src/main/java/com/lantone/qc/trans/taizhou/TaiZhouFirstCourseRecordDocTrans.java
  13. 2 1
      trans/src/main/java/com/lantone/qc/trans/taizhou/TaiZhouLeaveHospitalDocTrans.java
  14. 8 2
      trans/src/main/java/com/lantone/qc/trans/taizhou/TaiZhouOperationDocTrans.java
  15. 2 1
      trans/src/main/java/com/lantone/qc/trans/taizhou/TaiZhouPathologyShipDocTrans.java
  16. 4 1
      trans/src/main/java/com/lantone/qc/trans/taizhou/TaiZhouRescueDocTrans.java
  17. 6 2
      trans/src/main/java/com/lantone/qc/trans/taizhou/TaiZhouStagesSummaryDocTrans.java
  18. 11 3
      trans/src/main/java/com/lantone/qc/trans/taizhou/TaizhouDocTrans.java
  19. 2 1
      trans/src/main/java/com/lantone/qc/trans/taizhou/util/TzXmlUtil.java

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

@@ -29,7 +29,7 @@ public class BEH0043 extends QCCatalogue {
         }
         //台州结构化
         Map<String, String> structureMap = inputInfo.getBeHospitalizedDoc().getStructureMap();
-        if(StringUtils.isNotEmpty(structureMap.get("居住地"))){
+        if(StringUtils.isNotEmpty(structureMap.get("联系地址"))){
             status.set("0");
             return;
         }

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

@@ -95,8 +95,8 @@ public class FirstCourseRecordAI extends ModelAI {
             if (midData.containsKey("鉴别诊断")) {
                 putDifferentialDiagCrfData(midData.getJSONObject("鉴别诊断"), inputInfo);//处理鉴别诊断
             }
-            if (midData.containsKey("诊疗计划")) {
-                putTreatPlanCrfData(midData.getJSONObject("诊疗计划"), inputInfo);//处理诊疗计划
+            if (midData.containsKey("诊疗计划-crf")) {
+                putTreatPlanCrfData(midData.getJSONObject("诊疗计划-crf"), inputInfo);//处理诊疗计划
             }
 
             double likeRate = loadSimilarAI(similarContent, similarityServiceClient);

+ 12 - 3
kernel/src/main/java/com/lantone/qc/kernel/util/CacheUtil.java

@@ -9,6 +9,7 @@ import com.lantone.qc.nlp.participle.cfg.DefaultConfig;
 import com.lantone.qc.pub.util.FastJsonUtils;
 import com.lantone.qc.pub.util.FileUtil;
 import com.lantone.qc.trans.comsis.ModuleMappingUtil;
+import org.apache.commons.io.FileUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -19,7 +20,9 @@ import org.springframework.boot.ApplicationRunner;
 import org.springframework.stereotype.Component;
 import org.springframework.util.ResourceUtils;
 
+import java.io.File;
 import java.io.FileNotFoundException;
+import java.io.InputStream;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Comparator;
@@ -63,8 +66,14 @@ public class CacheUtil implements ApplicationRunner {
     private void loadModuleMappingInfo() {
         List<String> xmlDataTypeHospitalIds = Lists.newArrayList("1", "3");
         try {
-            String path = ResourceUtils.getURL("classpath:").getPath() + "cache/" + hospitalId + "/module_mapping.json";
-            String mappingMsg = FileUtil.fileRead(path);
+            InputStream stream = getClass().getClassLoader().getResourceAsStream("cache/" + hospitalId + "/module_mapping.json");
+            File targetFile = new File("module_mapping.json");
+            FileUtils.copyInputStreamToFile(stream, targetFile);
+            String mappingMsg = FileUtils.readFileToString(targetFile);
+//            logger.error("模板数据:"+mappingMsg);
+
+//            String path = ResourceUtils.getURL("classpath:").getPath() + "cache/" + hospitalId + "/module_mapping.json";
+//            String mappingMsg = FileUtil.fileRead(path);
             if (xmlDataTypeHospitalIds.contains(hospitalId)) {
                 Map<String, Long> mapKeysModuleInfoIdMap = (Map) FastJsonUtils.getJsonToMap(mappingMsg);
                 Map<Set<String>, String> xmlDataTypeModuleInfo = Maps.newHashMap();
@@ -84,7 +93,7 @@ public class CacheUtil implements ApplicationRunner {
 //                });
                 ModuleMappingUtil.xmlDataTypeModuleInfo = xmlDataTypeModuleInfo;
             }
-        } catch (FileNotFoundException e) {
+        } catch (Exception e) {
             e.printStackTrace();
         }
     }

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 1 - 1
kernel/src/main/resources/cache/3/module_mapping.json


+ 2 - 1
trans/src/main/java/com/lantone/qc/trans/comsis/OrdinaryAssistant.java

@@ -34,7 +34,8 @@ public class OrdinaryAssistant {
             } else {
                 targetKey = arry[1];
             }
-            if (!retMap.containsKey(targetKey) || StringUtil.isNotBlank(sourceMap_.get(sourceKey))) {
+            if (StringUtil.isNotBlank(sourceMap_.get(sourceKey))
+                    &&(!retMap.containsKey(targetKey)||StringUtil.isBlank(retMap.get(targetKey)))) {
                 retMap.put(targetKey, sourceMap_.get(sourceKey));
             }
             removeKey.add(sourceKey);

+ 21 - 21
trans/src/main/java/com/lantone/qc/trans/taizhou/TaiZhouBeHospitalizedDocTrans.java

@@ -30,7 +30,6 @@ import java.util.Map;
 public class TaiZhouBeHospitalizedDocTrans extends ModelDocTrans {
 
     /**
-     *
      * @param medrecVo
      * @return
      */
@@ -38,7 +37,7 @@ public class TaiZhouBeHospitalizedDocTrans extends ModelDocTrans {
     public BeHospitalizedDoc extract(MedrecVo medrecVo) {
         String content = ((List<String>) medrecVo.getContent().get("content")).get(0);
 
-        Map<String, String> sourceMap = TzXmlUtil.getXmlToMapForTZWithReplace(content); // xml原始数据给华卓
+        Map<String, String> sourceMap = TzXmlUtil.getXmlToMapForTZ(content); // xml原始数据给华卓
         Map<String, String> structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, keyContrasts);
         //如果有入院时间,优先使用
         if (StringUtils.isEmpty(structureMap.get("入院时间")) && StringUtils.isNotEmpty(structureMap.get("入病房时间"))) {
@@ -46,7 +45,7 @@ public class TaiZhouBeHospitalizedDocTrans extends ModelDocTrans {
         }
 
         BeHospitalizedDoc beHospitalizedDoc = beHospitalizedDocGen(structureMap); // 不走共用
-        beHospitalizedDoc.setPageData((Map)sourceMap);
+        beHospitalizedDoc.setPageData((Map) structureMap);
         return beHospitalizedDoc;
     }
 
@@ -57,9 +56,10 @@ public class TaiZhouBeHospitalizedDocTrans extends ModelDocTrans {
             "民族=民族",
             "职业=职业",
             "出生地址=出生地",
-            "出生、生长史=居住地",
-//            "婚姻状况=婚姻",
+            "出生、生长史=出生生长史",
+            //            "婚姻状况=婚姻",
             "地址=联系地址",
+            "工作场所=工作单位",
             "信息来源=病史陈述者",
             "生日=出生日期",
             "病人出生日期=出生日期",
@@ -75,15 +75,15 @@ public class TaiZhouBeHospitalizedDocTrans extends ModelDocTrans {
             "婚姻家庭关系和睦=夫妻关系",
             "体格检查=体格检查",
             "专科检查=专科体格检查",
-            "影像学检查=辅助检查",
             "初步诊断=初步诊断",
             "修正诊断=修正诊断",
             "医生=医师签名",
             "补充诊断=补充诊断",
             "户口地址=联系地址",
             "家属提供的信息可信吗=病史可靠性",
-            "关系=病史陈述者"
-            );
+            "入院诊断(中医疾病)=中医诊断",
+            "体温(口)=体温"
+    );
 
 
     /**
@@ -99,80 +99,80 @@ public class TaiZhouBeHospitalizedDocTrans extends ModelDocTrans {
         ChiefLabel chiefLabel = new ChiefLabel();
         chiefLabel.setText(structureMap.get("主诉"));
         beHospitalizedDoc.setChiefLabel(chiefLabel);
-//        structureMap.remove("主诉");
+        //        structureMap.remove("主诉");
 
         // 走模型
         PresentLabel presentLabel = new PresentLabel();
         presentLabel.setText(structureMap.get("现病史"));
         beHospitalizedDoc.setPresentLabel(presentLabel);
-//        structureMap.remove("现病史");
+        //        structureMap.remove("现病史");
 
         PastLabel pastLabel = new PastLabel();
         pastLabel.setCrfLabel(false);
         pastLabel.setText(structureMap.get("既往史"));
         beHospitalizedDoc.setPastLabel(pastLabel);
-//        structureMap.remove("既往史");
+        //        structureMap.remove("既往史");
 
         PersonalLabel personalLabel = new PersonalLabel();
         personalLabel.setCrfLabel(false);
         personalLabel.setText(structureMap.get("个人史"));
         beHospitalizedDoc.setPersonalLabel(personalLabel);
-//        structureMap.remove("个人史");
+        //        structureMap.remove("个人史");
 
         MaritalLabel maritalLabel = new MaritalLabel();
         maritalLabel.setCrfLabel(false);
         maritalLabel.setText("婚育史: " + structureMap.get("婚育史"));
         beHospitalizedDoc.setMaritalLabel(maritalLabel);
-//        structureMap.remove("婚育史");
+        //        structureMap.remove("婚育史");
 
         MenstrualLabel menstrualLabel = new MenstrualLabel();
         menstrualLabel.setCrfLabel(false);
         menstrualLabel.setText("月经史:" + structureMap.get("月经史"));
         beHospitalizedDoc.setMenstrualLabel(menstrualLabel);
-//        structureMap.remove("月经史");
+        //        structureMap.remove("月经史");
 
         FamilyLabel familyLabel = new FamilyLabel();
         familyLabel.setCrfLabel(false);
         familyLabel.setText(structureMap.get("家族史"));
         beHospitalizedDoc.setFamilyLabel(familyLabel);
-//        structureMap.remove("家族史");
+        //        structureMap.remove("家族史");
 
         VitalLabel vitalLabel = new VitalLabel();
         vitalLabel.setCrfLabel(false);
         vitalLabel.setText(structureMap.get("体格检查"));
         beHospitalizedDoc.setVitalLabel(vitalLabel);
-//        structureMap.remove("体格检查");
+        //        structureMap.remove("体格检查");
 
         VitalLabelSpecial vitalLabelSpecial = new VitalLabelSpecial();
         vitalLabelSpecial.setCrfLabel(false);
         vitalLabelSpecial.setText(structureMap.get("专科体格检查"));
         beHospitalizedDoc.setVitalLabelSpecial(vitalLabelSpecial);
-//        structureMap.remove("专科体格检查");
+        //        structureMap.remove("专科体格检查");
 
         // 走模型
         PacsLabel pacsLabel = new PacsLabel();
         pacsLabel.setCrfLabel(false);
         pacsLabel.setText(structureMap.get("辅助检查"));
         beHospitalizedDoc.setPacsLabel(pacsLabel);
-//        structureMap.remove("辅助检查");
+        //        structureMap.remove("辅助检查");
 
         // 走模型
         DiagLabel initialDiagLabel = new DiagLabel();
         initialDiagLabel.setText(structureMap.get("初步诊断"));
         beHospitalizedDoc.setInitialDiagLabel(initialDiagLabel);
-//        structureMap.remove("初步诊断");
+        //        structureMap.remove("初步诊断");
 
         // 走模型
         DiagLabel revisedDiagLabel = new DiagLabel();
         revisedDiagLabel.setText(structureMap.get("修正诊断"));
         beHospitalizedDoc.setRevisedDiagLabel(revisedDiagLabel);
-//        structureMap.remove("修正诊断");
+        //        structureMap.remove("修正诊断");
 
         // 走模型
         DiagLabel suppleDiagLabel = new DiagLabel();
         suppleDiagLabel.setText(structureMap.get("补充诊断"));
         beHospitalizedDoc.setSuppleDiagLabel(suppleDiagLabel);
-//        structureMap.remove("补充诊断");
+        //        structureMap.remove("补充诊断");
 
         beHospitalizedDoc.setStructureMap(structureMap);
 

+ 3 - 5
trans/src/main/java/com/lantone/qc/trans/taizhou/TaiZhouConsultationDocTrans.java

@@ -138,6 +138,7 @@ public class TaiZhouConsultationDocTrans extends ModelDocTrans {
             "会诊诊断=当前诊断",
             "事件日期1(会诊申请日期)=会诊申请日期",
             "医生=医师签名",
+            "本人姓名=姓名",
             "病史描述=病史回顾描述",
             "病历日期=会诊日期及时间",
             "记录及建议=会诊意见"
@@ -178,15 +179,12 @@ public class TaiZhouConsultationDocTrans extends ModelDocTrans {
 
     // 会诊申请单映射字段
     private List<String> consultationApplication_keyContrasts = Lists.newArrayList(
-            "事件日期=会诊时间",
+            "事件日期=申请日期",
             "会诊类别=会诊分类",
-            "简要病情=简要病情及诊疗",
             "会诊理由和目的=申请理由目的",
             "本人姓名=姓名",
             "病历号=病案号",
-            "会诊科室=受邀科室",
-            "申请医生=签名",
-            "临床科室=会诊地点"
+            "临床科室=申请科室"
     );
 
 }

+ 2 - 1
trans/src/main/java/com/lantone/qc/trans/taizhou/TaiZhouDeathCaseDiscussDocTrans.java

@@ -35,7 +35,8 @@ public class TaiZhouDeathCaseDiscussDocTrans extends ModelDocTrans {
             "死亡日期=死亡时间",
             "讨论意见=讨论内容",
             "现病史- 发病情况=入院情况",
-            "医生=记录医师"
+            "医生=记录医师",
+            "本人姓名=姓名"
     );
 
 }

+ 3 - 1
trans/src/main/java/com/lantone/qc/trans/taizhou/TaiZhouDeathRecordDocTrans.java

@@ -34,7 +34,9 @@ public class TaiZhouDeathRecordDocTrans extends ModelDocTrans {
             "当前诊断=死亡诊断",
             "死亡日期=死亡时间",
             "初步诊断=入院诊断",
-            "诊治经过=诊疗经过"
+            "诊治经过=诊疗经过",
+            "本人姓名=姓名",
+            "现病史- 发病情况=发病情况"
     );
 
 }

+ 2 - 1
trans/src/main/java/com/lantone/qc/trans/taizhou/TaiZhouDifficultCaseDiscussDocTrans.java

@@ -42,7 +42,8 @@ public class TaiZhouDifficultCaseDiscussDocTrans extends ModelDocTrans {
             "医生=记录者",
             "讨论小结=结 论",
             "讨论意见=讨论内容",
-            "事件日期=讨论时间"
+            "事件日期=讨论时间",
+            "本人姓名=姓名"
     );
 
 }

+ 1 - 1
trans/src/main/java/com/lantone/qc/trans/taizhou/TaiZhouDutyShiftSystemDocTrans.java

@@ -28,7 +28,7 @@ public class TaiZhouDutyShiftSystemDocTrans extends ModelDocTrans {
     }
 
     private DutyShiftSystemDoc getDutyShiftSystemDoc(String content) {
-        Map<String, String> sourceMap = TzXmlUtil.getXmlToMapForTZWithReplace(content); // xml原始数据给华卓
+        Map<String, String> sourceMap = TzXmlUtil.getXmlToMapForTZ(content);
         Map<String, String> structureMap = OrdinaryAssistant.mapKeyContrast(TzXmlUtil.getXmlToMapForTZ(content), keyContrasts);
 
         DutyShiftSystemDoc dutyShiftSystemDoc = new DutyShiftSystemDoc();

+ 35 - 31
trans/src/main/java/com/lantone/qc/trans/taizhou/TaiZhouFirstCourseRecordDocTrans.java

@@ -24,40 +24,40 @@ public class TaiZhouFirstCourseRecordDocTrans extends ModelDocTrans {
     public FirstCourseRecordDoc extract(MedrecVo medrecVo) {
         String content = ((List<String>) medrecVo.getContent().get("content")).get(0);
 
-        Map<String, String> sourceMap = TzXmlUtil.getXmlToMapForTZWithReplace(content); // xml原始数据给华卓
+        Map<String, String> sourceMap = TzXmlUtil.getXmlToMapForTZ(content);
         Map<String, String> structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, keyContrasts);
         // 病例特点=主诉+现病史-发病情况+专科检查+实验室检查+影像学检查+辅助检查结果+呼吸+脉搏+体温+血压
-        structureMap.put("病例特点", MapUtil.getSelectString(structureMap, Arrays.asList(
-                "主诉",
-                "现病史-发病情况",
-                "专科检查",
-                "实验室检查",
-                "影像学检查",
-                "辅助检查结果",
-                "呼吸",
-                "脉搏",
-                "体温",
-                "血压"
-                ))
-        );
+        //        structureMap.put("病例特点", MapUtil.getSelectString(structureMap, Arrays.asList(
+        //                "主诉",
+        //                "现病史-发病情况",
+        //                "专科检查",
+        //                "实验室检查",
+        //                "影像学检查",
+        //                "辅助检查结果",
+        //                "呼吸",
+        //                "脉搏",
+        //                "体温",
+        //                "血压"
+        //                ))
+        //        );
         // 诊断依据=性别+年龄+主诉+现病史-发病情况+专科检查+实验室检查+影像学检查+辅助检查结果+呼吸+脉搏+体温+血压
-        structureMap.put("诊断依据", MapUtil.getSelectString(structureMap, Arrays.asList(
-                "性别",
-                "年龄",
-                "主诉",
-                "现病史-发病情况",
-                "专科检查",
-                "实验室检查",
-                "影像学检查",
-                "辅助检查结果",
-                "呼吸",
-                "脉搏",
-                "体温",
-                "血压"
-                ))
-        );
+        //        structureMap.put("诊断依据", MapUtil.getSelectString(structureMap, Arrays.asList(
+        //                "性别",
+        //                "年龄",
+        //                "主诉",
+        //                "现病史-发病情况",
+        //                "专科检查",
+        //                "实验室检查",
+        //                "影像学检查",
+        //                "辅助检查结果",
+        //                "呼吸",
+        //                "脉搏",
+        //                "体温",
+        //                "血压"
+        //                ))
+        //        );
         // 诊疗计划=检查计划+治疗计划和措施
-        structureMap.put("诊疗计划", MapUtil.getSelectString(structureMap, Arrays.asList(
+        structureMap.put("诊疗计划-crf", MapUtil.getSelectString(structureMap, Arrays.asList(
                 "检查计划",
                 "治疗计划和措施"
                 ))
@@ -70,8 +70,12 @@ public class TaiZhouFirstCourseRecordDocTrans extends ModelDocTrans {
     }
 
     private List<String> keyContrasts = Lists.newArrayList(
+                        "本人姓名=姓名",
+            "现病史- 发病情况=发病经过",
             "医生=记录医师",
-            "病历日期=记录时间"
+            "治疗计划和措施=治疗计划",
+            "体温(耳)=体温耳",
+            "体温(口)=体温口"
     );
 
 }

+ 2 - 1
trans/src/main/java/com/lantone/qc/trans/taizhou/TaiZhouLeaveHospitalDocTrans.java

@@ -39,7 +39,8 @@ public class TaiZhouLeaveHospitalDocTrans extends ModelDocTrans {
             "复诊时间=随访计划",
             "出院指导=健康教育",
             "医生=医师签名",
-            "病历日期=签名时间"
+            "病历日期=签名时间",
+            "体温(耳)=体温耳"
     );
 
 }

+ 8 - 2
trans/src/main/java/com/lantone/qc/trans/taizhou/TaiZhouOperationDocTrans.java

@@ -101,7 +101,11 @@ public class TaiZhouOperationDocTrans extends ModelDocTrans {
         return operationDiscussionDoc;
     }
 
-    private List<String> operationDiscussion_keyContrasts = Lists.newArrayList();
+    private List<String> operationDiscussion_keyContrasts = Lists.newArrayList(
+            "本人姓名=姓名",
+            "开始时间=手术开始时间",
+            "结束时间=手术结束时间"
+    );
 
 
     /**********************************************手术记录*************************************************************/
@@ -138,7 +142,8 @@ public class TaiZhouOperationDocTrans extends ModelDocTrans {
     // 手术记录
     private List<String> operationRecord_keyContrasts = Lists.newArrayList(
             "结束时间=手术结束时间",
-            "开始时间=手术开始时间"
+            "开始时间=手术开始时间",
+            "本人姓名=姓名"
     );
 
 
@@ -181,6 +186,7 @@ public class TaiZhouOperationDocTrans extends ModelDocTrans {
             "辅助检查结果=辅助检查",
             "术中、术后防范措施=可能意外和防范措施",
             "现病史- 发病情况=发病经过",
+            "本人姓名=姓名",
             "拟施手术名称和方式=拟行术式"
     );
 

+ 2 - 1
trans/src/main/java/com/lantone/qc/trans/taizhou/TaiZhouPathologyShipDocTrans.java

@@ -37,6 +37,7 @@ public class TaiZhouPathologyShipDocTrans extends ModelDocTrans {
         return pathologyShipDoc;
     }
 
-    private List<String> keyContrasts = Lists.newArrayList("检验标本=送检标本名称");
+    private List<String> keyContrasts = Lists.newArrayList("检验标本=送检标本名称",
+            "本人姓名=姓名");
 
 }

+ 4 - 1
trans/src/main/java/com/lantone/qc/trans/taizhou/TaiZhouRescueDocTrans.java

@@ -38,6 +38,9 @@ public class TaiZhouRescueDocTrans extends ModelDocTrans {
         return rescueDoc;
     }
 
-    private List<String> keyContrasts = Lists.newArrayList();
+    private List<String> keyContrasts = Lists.newArrayList(
+            "事件日期=抢救开始时间",
+            "本人姓名=姓名"
+    );
 
 }

+ 6 - 2
trans/src/main/java/com/lantone/qc/trans/taizhou/TaiZhouStagesSummaryDocTrans.java

@@ -34,10 +34,14 @@ public class TaiZhouStagesSummaryDocTrans extends ModelDocTrans {
         StagesSummaryDoc stagesSummaryDoc = new StagesSummaryDoc();
         stagesSummaryDoc.setStructureMap(structureMap);
         stagesSummaryDoc.setPageData((Map) structureMap);
-        
+
         return stagesSummaryDoc;
     }
 
-    private List<String> keyContrasts = Lists.newArrayList();
+    private List<String> keyContrasts = Lists.newArrayList(
+            "本人姓名=姓名",
+            "现病史- 发病情况=发病情况",
+            "体温(耳)=体温耳"
+    );
 
 }

+ 11 - 3
trans/src/main/java/com/lantone/qc/trans/taizhou/TaizhouDocTrans.java

@@ -269,7 +269,7 @@ public class TaizhouDocTrans extends DocTrans {
                 inputInfo.getPageData().put("术前讨论、术前小结", pdPageDataList);
             }
 
-            List<Map<String, Object>> oicPageDataList = inputInfo.getOperationDocs()
+            /*List<Map<String, Object>> oicPageDataList = inputInfo.getOperationDocs()
                     .stream()
                     .filter(operationDoc -> operationDoc != null && operationDoc.getOperationInformedConsentDoc() != null)
                     .map(operationDoc -> operationDoc.getOperationInformedConsentDoc().getPageData())
@@ -277,7 +277,7 @@ public class TaizhouDocTrans extends DocTrans {
                     .collect(Collectors.toList());
             if (ListUtil.isNotEmpty(oicPageDataList)) {
                 inputInfo.getPageData().put("手术知情同意书", oicPageDataList);
-            }
+            }*/
 
             List<Map<String, Object>> oscPageDataList = inputInfo.getOperationDocs()
                     .stream()
@@ -309,7 +309,15 @@ public class TaizhouDocTrans extends DocTrans {
         }
         long time1 = date1 == null ? 0 : date1.getTime();
         long time2 = date2 == null ? 0 : date2.getTime();
-        return (int) (time1 - time2);
+
+        if (time1 == time2) {
+            return 0;
+        }
+        if (time1 > time2) {
+            return -1;
+        } else {
+            return 1;
+        }
     }
 
 }

+ 2 - 1
trans/src/main/java/com/lantone/qc/trans/taizhou/util/TzXmlUtil.java

@@ -47,7 +47,8 @@ public class TzXmlUtil {
 //                ename = StringUtil.removeBlank(ename);
                 setnomark = emrTermElement.attributeValue("setnomark");
                 setnomark = setnomark == null ? "" : setnomark;
-                text = emrTermElement.getStringValue().trim();
+                setnomark = setnomark.trim().replaceAll("&nbsp;","");
+                text = emrTermElement.getStringValue().trim().replaceAll("&nbsp;","");
                 if (StringUtil.isBlank(retMap.get(ename))) {
                     if (StringUtil.isBlank(text)) {
                         retMap.put(ename, setnomark);