Browse Source

字段标准化修改-北仑入邵逸夫

rengb 4 years ago
parent
commit
612328f226
84 changed files with 83326 additions and 326 deletions
  1. 2 1
      dbanaly/pom.xml
  2. 12 0
      dbanaly/src/main/java/com/lantone/qc/dbanaly/facade/comsis/ModuleHelper.java
  3. 5 1
      dbanaly/src/main/java/com/lantone/qc/dbanaly/lt/mapper/ModuleInfoMapper.java
  4. 5 0
      dbanaly/src/main/java/com/lantone/qc/dbanaly/util/SpecialStorageUtil.java
  5. 11 0
      dbanaly/src/main/resources/mapper/lt/ModuleInfoMapper.xml
  6. 573 0
      kernel/src/main/java/com/lantone/qc/kernel/analysis/EZAnalysis.java
  7. 43 0
      kernel/src/main/java/com/lantone/qc/kernel/web/controller/EzController.java
  8. 133 0
      kernel/src/main/resources/cache/4/concept_clinic_bodypart_properties.dict
  9. 38387 0
      kernel/src/main/resources/cache/4/concept_diag_properties.dict
  10. 38387 0
      kernel/src/main/resources/cache/4/hospital_diag_info.dict
  11. 813 0
      kernel/src/main/resources/cache/4/hospital_doctor_info.dict
  12. 6 0
      public/pom.xml
  13. 21 0
      public/src/main/java/com/lantone/qc/pub/model/vo/EzAnalysisVO.java
  14. 24 0
      public/src/main/java/com/lantone/qc/pub/res/EzAnalysisDTO.java
  15. 61 0
      trans/src/main/java/com/lantone/qc/trans/beilun/BeiLunBeHospitalizedDocTrans.java
  16. 56 0
      trans/src/main/java/com/lantone/qc/trans/beilun/BeiLunClinicBloodEffectDocTrans.java
  17. 58 0
      trans/src/main/java/com/lantone/qc/trans/beilun/BeiLunClinicalBloodDocTrans.java
  18. 245 0
      trans/src/main/java/com/lantone/qc/trans/beilun/BeiLunConsultationDocTrans.java
  19. 36 0
      trans/src/main/java/com/lantone/qc/trans/beilun/BeiLunCrisisInfoDocTrans.java
  20. 57 0
      trans/src/main/java/com/lantone/qc/trans/beilun/BeiLunCrisisValueReportDocTrans.java
  21. 61 0
      trans/src/main/java/com/lantone/qc/trans/beilun/BeiLunCriticallyIllNoticeDocTrans.java
  22. 53 0
      trans/src/main/java/com/lantone/qc/trans/beilun/BeiLunDeathCaseDiscussDocTrans.java
  23. 51 0
      trans/src/main/java/com/lantone/qc/trans/beilun/BeiLunDeathRecordDocTrans.java
  24. 57 0
      trans/src/main/java/com/lantone/qc/trans/beilun/BeiLunDifficultCaseDiscussDocTrans.java
  25. 36 0
      trans/src/main/java/com/lantone/qc/trans/beilun/BeiLunDoctorAdviceDocTrans.java
  26. 57 0
      trans/src/main/java/com/lantone/qc/trans/beilun/BeiLunDutyShiftSystemDocTrans.java
  27. 68 0
      trans/src/main/java/com/lantone/qc/trans/beilun/BeiLunFirstCourseRecordDocTrans.java
  28. 65 0
      trans/src/main/java/com/lantone/qc/trans/beilun/BeiLunFirstPageRecordDocTrans.java
  29. 75 0
      trans/src/main/java/com/lantone/qc/trans/beilun/BeiLunLeaveHospitalDocTrans.java
  30. 36 0
      trans/src/main/java/com/lantone/qc/trans/beilun/BeiLunLisDocTrans.java
  31. 26 0
      trans/src/main/java/com/lantone/qc/trans/beilun/BeiLunMedicalRecordInfoDocTrans.java
  32. 211 0
      trans/src/main/java/com/lantone/qc/trans/beilun/BeiLunOperationDocTrans.java
  33. 40 0
      trans/src/main/java/com/lantone/qc/trans/beilun/BeiLunOutDepDocTrans.java
  34. 58 0
      trans/src/main/java/com/lantone/qc/trans/beilun/BeiLunRescueDocTrans.java
  35. 58 0
      trans/src/main/java/com/lantone/qc/trans/beilun/BeiLunStagesSummaryDocTrans.java
  36. 296 0
      trans/src/main/java/com/lantone/qc/trans/beilun/BeiLunThreeLevelWardDocTrans.java
  37. 259 0
      trans/src/main/java/com/lantone/qc/trans/beilun/BeiLunTransferRecordDocTrans.java
  38. 260 0
      trans/src/main/java/com/lantone/qc/trans/beilun/BeilunDocTrans.java
  39. 158 0
      trans/src/main/java/com/lantone/qc/trans/beilun/util/BeiLunBeHospitalizedHtmlAnalysis.java
  40. 61 0
      trans/src/main/java/com/lantone/qc/trans/beilun/util/BeiLunClinicBloodEffectHtmlAnalysis.java
  41. 59 0
      trans/src/main/java/com/lantone/qc/trans/beilun/util/BeiLunClinicalBloodHtmlAnalysis.java
  42. 100 0
      trans/src/main/java/com/lantone/qc/trans/beilun/util/BeiLunConsultationHtmlAnalysis.java
  43. 46 0
      trans/src/main/java/com/lantone/qc/trans/beilun/util/BeiLunCrisisValueReportHtmlAnalysis.java
  44. 40 0
      trans/src/main/java/com/lantone/qc/trans/beilun/util/BeiLunCriticallyIllNoticeHtmlAnalysis.java
  45. 43 0
      trans/src/main/java/com/lantone/qc/trans/beilun/util/BeiLunDeathCaseDiscussHtmlAnalysis.java
  46. 40 0
      trans/src/main/java/com/lantone/qc/trans/beilun/util/BeiLunDeathRecordHtmlAnalysis.java
  47. 61 0
      trans/src/main/java/com/lantone/qc/trans/beilun/util/BeiLunDifficultCaseDiscussHtmlAnalysis.java
  48. 46 0
      trans/src/main/java/com/lantone/qc/trans/beilun/util/BeiLunDutyShiftSystemHtmlAnalysis.java
  49. 57 0
      trans/src/main/java/com/lantone/qc/trans/beilun/util/BeiLunFirstCourseRecordHtmlAnalysis.java
  50. 14 0
      trans/src/main/java/com/lantone/qc/trans/beilun/util/BeiLunHtmlAnalysis.java
  51. 189 0
      trans/src/main/java/com/lantone/qc/trans/beilun/util/BeiLunHtmlAnalysisUtil.java
  52. 41 0
      trans/src/main/java/com/lantone/qc/trans/beilun/util/BeiLunLeaveHospitalHtmlAnalysis.java
  53. 46 0
      trans/src/main/java/com/lantone/qc/trans/beilun/util/BeiLunOperationHtmlAnalysis.java
  54. 57 0
      trans/src/main/java/com/lantone/qc/trans/beilun/util/BeiLunOperationRecordHtmlAnalysis.java
  55. 56 0
      trans/src/main/java/com/lantone/qc/trans/beilun/util/BeiLunPreoperativeHtmlAnalysis.java
  56. 46 0
      trans/src/main/java/com/lantone/qc/trans/beilun/util/BeiLunRescueHtmlAnalysis.java
  57. 46 0
      trans/src/main/java/com/lantone/qc/trans/beilun/util/BeiLunStagesSummaryHtmlAnalysis.java
  58. 74 0
      trans/src/main/java/com/lantone/qc/trans/beilun/util/BeiLunThreeLevelWardHtmlAnalysis.java
  59. 46 0
      trans/src/main/java/com/lantone/qc/trans/beilun/util/BeiLunTransferIntoHtmlAnalysis.java
  60. 46 0
      trans/src/main/java/com/lantone/qc/trans/beilun/util/BeiLunTransferOutHtmlAnalysis.java
  61. 354 0
      trans/src/main/java/com/lantone/qc/trans/beilun/util/CommonAnalysisUtil.java
  62. 337 0
      trans/src/main/java/com/lantone/qc/trans/beilun/util/ez/EzXmlAnalysis.java
  63. 3 1
      trans/src/main/java/com/lantone/qc/trans/changx/ChangxAnesthesiaRelatedDocTrans.java
  64. 30 23
      trans/src/main/java/com/lantone/qc/trans/changx/ChangxBeHospitalizedDocTrans.java
  65. 19 11
      trans/src/main/java/com/lantone/qc/trans/changx/ChangxClinicBloodEffectDocTrans.java
  66. 18 10
      trans/src/main/java/com/lantone/qc/trans/changx/ChangxClinicalBloodDocTrans.java
  67. 49 29
      trans/src/main/java/com/lantone/qc/trans/changx/ChangxConsultationDocTrans.java
  68. 18 11
      trans/src/main/java/com/lantone/qc/trans/changx/ChangxCrisisValueReportDocTrans.java
  69. 17 10
      trans/src/main/java/com/lantone/qc/trans/changx/ChangxCriticallyIllNoticeDocTrans.java
  70. 17 10
      trans/src/main/java/com/lantone/qc/trans/changx/ChangxDailyCourseRecordDocTrans.java
  71. 17 10
      trans/src/main/java/com/lantone/qc/trans/changx/ChangxDeathCaseDiscussDocTrans.java
  72. 17 11
      trans/src/main/java/com/lantone/qc/trans/changx/ChangxDeathRecordDocTrans.java
  73. 22 15
      trans/src/main/java/com/lantone/qc/trans/changx/ChangxDifficultCaseDiscussDocTrans.java
  74. 8 20
      trans/src/main/java/com/lantone/qc/trans/changx/ChangxDocTrans.java
  75. 18 10
      trans/src/main/java/com/lantone/qc/trans/changx/ChangxFirstCourseRecordDocTrans.java
  76. 12 5
      trans/src/main/java/com/lantone/qc/trans/changx/ChangxLeaveHospitalDocTrans.java
  77. 36 0
      trans/src/main/java/com/lantone/qc/trans/changx/ChangxLisDocTrans.java
  78. 105 75
      trans/src/main/java/com/lantone/qc/trans/changx/ChangxOperationDocTrans.java
  79. 40 0
      trans/src/main/java/com/lantone/qc/trans/changx/ChangxOutDepDocTrans.java
  80. 10 5
      trans/src/main/java/com/lantone/qc/trans/changx/ChangxPathologyShipDocTrans.java
  81. 17 10
      trans/src/main/java/com/lantone/qc/trans/changx/ChangxRescueDocTrans.java
  82. 17 10
      trans/src/main/java/com/lantone/qc/trans/changx/ChangxStagesSummaryDocTrans.java
  83. 41 29
      trans/src/main/java/com/lantone/qc/trans/changx/ChangxThreeLevelWardDocTrans.java
  84. 30 19
      trans/src/main/java/com/lantone/qc/trans/changx/ChangxTransferRecordDocTrans.java

+ 2 - 1
dbanaly/pom.xml

@@ -127,7 +127,8 @@
             <resource>
                 <directory>src/main/resources</directory>
                 <includes>
-                    <include>*.yml</include>
+                    <include>**/*.yml</include>
+                    <include>**/*.xml</include>
                 </includes>
             </resource>
         </resources>

+ 12 - 0
dbanaly/src/main/java/com/lantone/qc/dbanaly/facade/comsis/ModuleHelper.java

@@ -53,16 +53,20 @@ public class ModuleHelper {
     public boolean loadModuleInfo() {
         try {
             List<String> xmlDataTypeHospitalIds = Lists.newArrayList("1", "2", "3");
+            List<String> htmlDataTypeHospitalIds = Lists.newArrayList("4");
             for (String hospitalId : hospitalIds.split(",")) {
                 loadStandardModule(hospitalId);
                 if (xmlDataTypeHospitalIds.contains(hospitalId)) {
                     loadModuleInfoByHospitalId(hospitalId);
+                } else if (htmlDataTypeHospitalIds.contains(hospitalId)) {
+                    loadHtmlModuleInfoByHospitalId(hospitalId);
                 }
             }
             return true;
         } catch (Exception e) {
             log.error(e.getMessage(), e);
             ModuleMappingUtil.xmlDataTypeModuleInfo.clear();
+            ModuleMappingUtil.htmlDataTypeModuleInfo.clear();
             return false;
         }
     }
@@ -113,6 +117,14 @@ public class ModuleHelper {
         ModuleMappingUtil.xmlDataTypeModuleInfo.put(hospitalId, result);
     }
 
+    private void loadHtmlModuleInfoByHospitalId(String hospitalId) {
+        List<String> list = moduleInfoService.getBaseMapper().getAnameModidMap(Long.parseLong(hospitalId));
+        list.forEach(i -> {
+            String[] arry = i.split("=");
+            ModuleMappingUtil.htmlDataTypeModuleInfo.put(arry[0], arry[1]);
+        });
+    }
+
     private void loadStandardModule(String hospitalId) {
         QueryWrapper<ModuleInfo> moduleInfoQe = new QueryWrapper<>();
         moduleInfoQe.eq("is_deleted", "N");

+ 5 - 1
dbanaly/src/main/java/com/lantone/qc/dbanaly/lt/mapper/ModuleInfoMapper.java

@@ -1,7 +1,9 @@
 package com.lantone.qc.dbanaly.lt.mapper;
 
-import com.lantone.qc.dbanaly.lt.entity.ModuleInfo;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.lantone.qc.dbanaly.lt.entity.ModuleInfo;
+
+import java.util.List;
 
 /**
  * <p>
@@ -13,4 +15,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  */
 public interface ModuleInfoMapper extends BaseMapper<ModuleInfo> {
 
+    List<String> getAnameModidMap(Long hospitalId);
+
 }

+ 5 - 0
dbanaly/src/main/java/com/lantone/qc/dbanaly/util/SpecialStorageUtil.java

@@ -1,6 +1,7 @@
 package com.lantone.qc.dbanaly.util;
 
 import com.google.common.collect.Maps;
+import com.lantone.qc.pub.model.vo.BehospitalInfoVO;
 import com.lantone.qc.pub.util.StringUtil;
 import org.springframework.stereotype.Component;
 
@@ -15,6 +16,7 @@ import java.util.Map;
 public final class SpecialStorageUtil {
     private final Map<String, Map<String, Object>> hospitalCache = Maps.newHashMap();
     private final ThreadLocal<String> hospitalIdThreadLocal = new ThreadLocal<>();
+    private final ThreadLocal<BehospitalInfoVO> behospitalInfoThreadLocal = new ThreadLocal<>();
 
     public <T> T getJsonStringValue(String key) {
         return getValByHospitalId(hospitalIdThreadLocal.get(), key);
@@ -54,4 +56,7 @@ public final class SpecialStorageUtil {
         return hospitalCache;
     }
 
+    public ThreadLocal<BehospitalInfoVO> getBehospitalInfoThreadLocal() {
+        return behospitalInfoThreadLocal;
+    }
 }

+ 11 - 0
dbanaly/src/main/resources/mapper/lt/ModuleInfoMapper.xml

@@ -2,4 +2,15 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.lantone.qc.dbanaly.lt.mapper.ModuleInfoMapper">
 
+    <select id="getAnameModidMap" parameterType="long" resultType="string">
+        SELECT
+        concat(IFNULL(c.map_type,''),'=',a.id)
+        from qc_module_info a join med_module_mapping b on a.id=b.module_id
+        join med_record_analyze c on b.record_id=c.id
+        where a.hospital_id=#{hospitalId} and a.is_deleted='N'
+        and b.hospital_id=#{hospitalId} and b.is_deleted='N'
+        and c.hospital_id=#{hospitalId} and c.is_deleted='N'
+        and c.map_type!='-1' and a.default_module=0
+    </select>
+
 </mapper>

+ 573 - 0
kernel/src/main/java/com/lantone/qc/kernel/analysis/EZAnalysis.java

@@ -0,0 +1,573 @@
+package com.lantone.qc.kernel.analysis;
+
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import com.lantone.qc.dbanaly.util.SpecialStorageUtil;
+import com.lantone.qc.kernel.client.CRFServiceClient;
+import com.lantone.qc.kernel.client.SimilarityServiceClient;
+import com.lantone.qc.kernel.structure.ai.BeHospitalizedAI;
+import com.lantone.qc.pub.model.InputInfo;
+import com.lantone.qc.pub.model.doc.BeHospitalizedDoc;
+import com.lantone.qc.pub.model.doc.MedicalRecordInfoDoc;
+import com.lantone.qc.pub.model.entity.*;
+import com.lantone.qc.pub.model.label.PastLabel;
+import com.lantone.qc.pub.model.label.PresentLabel;
+import com.lantone.qc.pub.model.vo.EzAnalysisVO;
+import com.lantone.qc.pub.res.EzAnalysisDTO;
+import com.lantone.qc.pub.util.ListUtil;
+import com.lantone.qc.pub.util.StringUtil;
+import com.lantone.qc.trans.beilun.util.ez.EzXmlAnalysis;
+import com.lantone.qc.trans.comsis.OrdinaryAssistant;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @ClassName : QCAnalysis
+ * @Description : 质控业务处理总入口
+ * @Author : 楼辉荣
+ * @Date: 2020-03-04 11:48
+ */
+@Slf4j
+@Component
+public class EZAnalysis {
+    @Autowired
+    CRFServiceClient crfServiceClient;
+    @Autowired
+    private SpecialStorageUtil specialStorageUtil;
+    @Autowired
+    SimilarityServiceClient similarityServiceClient;
+
+    public static String bom(String result) {
+        if (null != result && !"".equals(result)) {
+            if (result.indexOf("<") != -1 && result.lastIndexOf(">") != -1 && result.lastIndexOf(">") > result.indexOf("<")) {
+                result = result.substring(result.indexOf("<"), result.lastIndexOf(">") + 1);
+            }
+        }
+        return result;
+    }
+
+    public Map<String, Object> anlysis(EzAnalysisVO ezAnalysisVO) throws Exception {
+        Map<String, Object> output = Maps.newHashMap();
+        List<EzAnalysisDTO> details = Lists.newArrayList();
+        //        ezAnalysisVO.setXml(bom(FileUtil.fileRead("C:\\Users\\Administrator\\Desktop\\恩泽\\eztest.txt")));
+        Map<String, String> sourceMap = EzXmlAnalysis.analysisEk(ezAnalysisVO.getDeptName(), ezAnalysisVO.getXml());
+        InputInfo inputInfo = ai(sourceMap);
+        structHandle(inputInfo, sourceMap);
+        Map<String, String> structMap = OrdinaryAssistant.mapKeyContrast(sourceMap, keyContrasts);
+        structMap.put("接诊医师签名", structMap.get("初步诊断签名"));
+        Map<String, String> keyMaps = getKmaps();
+        kys.forEach(ky -> {
+            EzAnalysisDTO ezAnalysisDTO = new EzAnalysisDTO();
+            ezAnalysisDTO.setCode(keyMaps.get(ky));
+            ezAnalysisDTO.setModelName(ky);
+            ezAnalysisDTO.setModelValue(modelValueHandle(structMap.get(ky)));
+            details.add(ezAnalysisDTO);
+        });
+        output.put("data", details);
+        Map<String, String> structureMap = Maps.newHashMap();
+        getStructureMap(structMap, structureMap, details, Lists.newArrayList("主诉", "现病史", "既往史", "个人史", "婚育史"));
+        output.put("structureMap", structureMap);
+        return output;
+    }
+
+    private void getStructureMap(Map<String, String> structMap, Map<String, String> structureMap, List<EzAnalysisDTO> details, List<String> keys) {
+        keys.forEach(i -> structureMap.put(i, structMap.get(i)));
+        StringBuffer sbf = new StringBuffer();
+        String physicalExam = "";
+        for (EzAnalysisDTO i : details) {
+            if (i.getModelName().contains("体格检查")) {
+                if (i.getModelName().contains("(")) {
+                    sbf.append(i.getModelName().split("--")[1].split("(")[0]);
+                } else {
+                    sbf.append(i.getModelName().split("--")[1]);
+                }
+                sbf.append(":").append(i.getModelValue());
+                if (i.getModelValue().length() == 0 || i.getModelValue().charAt(i.getModelValue().length() - 1) != '。') {
+                    sbf.append(",");
+                }
+            }
+        }
+        if (sbf.toString().length() > 0 && sbf.toString().charAt(sbf.toString().length() - 1) == ',') {
+            physicalExam = sbf.toString().substring(0, sbf.toString().length() - 1);
+        } else {
+            physicalExam = sbf.toString();
+        }
+        structureMap.put("体格检查", physicalExam);
+    }
+
+    private String modelValueHandle(String modelValue) {
+        if (modelValue == null) {
+            return "";
+        }
+        if (modelValue.endsWith(",") || modelValue.endsWith(",") || modelValue.endsWith("、")
+                || modelValue.endsWith("(") || modelValue.endsWith("(") || modelValue.endsWith(")")
+                || modelValue.endsWith(")") || modelValue.endsWith("/")) {
+            modelValue = modelValue.substring(0, modelValue.length() - 1);
+        }
+        return modelValue;
+    }
+
+    private void structHandle(InputInfo inputInfo, Map<String, String> structMap) {
+        diagsHandle(inputInfo, structMap);
+        diagInfectiouseHandle(inputInfo, structMap);
+        vaccinateHandle(inputInfo, structMap);
+        operationHandle(inputInfo, structMap);
+        bloodTransfusionHandle(inputInfo, structMap);
+        allergyDescHandle(inputInfo, structMap);
+        generalDescHandle(inputInfo, structMap);
+    }
+
+    private void diagsHandle(InputInfo inputInfo, Map<String, String> map) {
+        StringBuffer sbf = new StringBuffer();
+        PastLabel pastLabel = inputInfo.getBeHospitalizedDoc().getPastLabel();
+        List<Diag> diags = pastLabel.getDiags();
+        List<Wound> wounds = pastLabel.getWounds();
+        if (ListUtil.isNotEmpty(diags)) {
+            diags.stream()
+                    .filter(i -> i != null && StringUtil.isNotBlank(i.getHospitalDiagName()) && (i.getNegative() == null || StringUtil.isBlank(i.getNegative().getName())))
+                    .forEach(i -> {
+                        sbf.append(i.getHospitalDiagName()).append(",");
+                    });
+            diags.stream()
+                    .filter(i -> i != null && StringUtil.isNotBlank(i.getHospitalDiagName()) && i.getNegative() != null && StringUtil.isNotBlank(i.getNegative().getName()))
+                    .forEach(i -> {
+                        sbf.append(i.getNegative().getName()).append(i.getHospitalDiagName()).append(",");
+                    });
+        }
+        if (ListUtil.isNotEmpty(wounds)) {
+            wounds.stream()
+                    .filter(i -> i != null && StringUtil.isNotBlank(i.getName()) && (i.getNegative() == null || StringUtil.isBlank(i.getNegative().getName())))
+                    .forEach(i -> {
+                        sbf.append(i.getName()).append(",");
+                    });
+            wounds.stream()
+                    .filter(i -> i != null && StringUtil.isNotBlank(i.getName()) && i.getNegative() != null && StringUtil.isNotBlank(i.getNegative().getName()))
+                    .forEach(i -> {
+                        sbf.append(i.getNegative().getName()).append(i.getName()).append(",");
+                    });
+        }
+        map.put("疾病史(含外伤)", sbf.toString());
+    }
+
+    private void diagInfectiouseHandle(InputInfo inputInfo, Map<String, String> map) {
+        StringBuffer sbf = new StringBuffer();
+        PastLabel pastLabel = inputInfo.getBeHospitalizedDoc().getPastLabel();
+        List<DiagInfectious> diagInfectiouses = pastLabel.getDiagInfectiouses();
+        if (ListUtil.isNotEmpty(diagInfectiouses)) {
+            diagInfectiouses.stream()
+                    .filter(i -> i != null && StringUtil.isNotBlank(i.getName()) && (i.getNegative() == null || StringUtil.isBlank(i.getNegative().getName())))
+                    .forEach(i -> {
+                        sbf.append(i.getName()).append(",");
+                    });
+            diagInfectiouses.stream()
+                    .filter(i -> i != null && StringUtil.isNotBlank(i.getName()) && i.getNegative() != null && StringUtil.isNotBlank(i.getNegative().getName()))
+                    .forEach(i -> {
+                        sbf.append(i.getNegative().getName()).append(i.getName()).append(",");
+                    });
+        }
+        map.put("患者传染性标志", sbf.toString());
+        map.put("传染病史", sbf.toString());
+    }
+
+    private void vaccinateHandle(InputInfo inputInfo, Map<String, String> map) {
+        String yfjzx = map.get("预防接种史");
+        if (StringUtil.isBlank(yfjzx)) {
+            yfjzx = "";
+        } else if (!(yfjzx.endsWith(",") || yfjzx.endsWith(",") || yfjzx.endsWith(".") || yfjzx.endsWith("。") || yfjzx.endsWith("、"))) {
+            yfjzx += "。";
+        }
+        StringBuffer sbf = new StringBuffer();
+        PastLabel pastLabel = inputInfo.getBeHospitalizedDoc().getPastLabel();
+        List<Vaccinate> vaccinates = pastLabel.getVaccinates();
+        if (ListUtil.isNotEmpty(vaccinates)) {
+            vaccinates.stream()
+                    .filter(i -> i != null && StringUtil.isNotBlank(i.getName()) && (i.getNegative() == null || StringUtil.isBlank(i.getNegative().getName())))
+                    .forEach(i -> {
+                        sbf.append(i.getName()).append(",");
+                    });
+            vaccinates.stream()
+                    .filter(i -> i != null && StringUtil.isNotBlank(i.getName()) && i.getNegative() != null && StringUtil.isNotBlank(i.getNegative().getName()))
+                    .forEach(i -> {
+                        sbf.append(i.getNegative().getName()).append(i.getName()).append(",");
+                    });
+        }
+        if (sbf.length() > 0) {
+            map.put("预防接种史", yfjzx + sbf.toString());
+        }
+    }
+
+    private void operationHandle(InputInfo inputInfo, Map<String, String> map) {
+        StringBuffer sbf = new StringBuffer();
+        PastLabel pastLabel = inputInfo.getBeHospitalizedDoc().getPastLabel();
+        List<Operation> operations = pastLabel.getOperations();
+        if (ListUtil.isNotEmpty(operations)) {
+            operations.stream()
+                    .filter(i -> i != null && StringUtil.isNotBlank(i.getName()) && (i.getNegative() == null || StringUtil.isBlank(i.getNegative().getName())))
+                    .forEach(i -> {
+                        sbf.append(i.getName()).append(",");
+                    });
+            operations.stream()
+                    .filter(i -> i != null && StringUtil.isNotBlank(i.getName()) && i.getNegative() != null && StringUtil.isNotBlank(i.getNegative().getName()))
+                    .forEach(i -> {
+                        sbf.append(i.getNegative().getName()).append(i.getName()).append(",");
+                    });
+        }
+        map.put("手术史", sbf.toString());
+    }
+
+    private void bloodTransfusionHandle(InputInfo inputInfo, Map<String, String> map) {
+        StringBuffer sbf = new StringBuffer();
+        PastLabel pastLabel = inputInfo.getBeHospitalizedDoc().getPastLabel();
+        List<BloodTransfusion> bloodTransfusions = pastLabel.getBloodTransfusions();
+        if (ListUtil.isNotEmpty(bloodTransfusions)) {
+            bloodTransfusions.stream()
+                    .filter(i -> i != null && StringUtil.isNotBlank(i.getName()) && (i.getNegative() == null || StringUtil.isBlank(i.getNegative().getName())))
+                    .forEach(i -> {
+                        sbf.append(i.getName()).append(",");
+                    });
+            bloodTransfusions.stream()
+                    .filter(i -> i != null && StringUtil.isNotBlank(i.getName()) && i.getNegative() != null && StringUtil.isNotBlank(i.getNegative().getName()))
+                    .forEach(i -> {
+                        sbf.append(i.getNegative().getName()).append(i.getName()).append(",");
+                    });
+        }
+        map.put("输血史", sbf.toString());
+    }
+
+    private void allergyDescHandle(InputInfo inputInfo, Map<String, String> map) {
+        StringBuffer sbf = new StringBuffer();
+        PastLabel pastLabel = inputInfo.getBeHospitalizedDoc().getPastLabel();
+        List<Allergy> allergies = pastLabel.getAllergies();
+        if (ListUtil.isNotEmpty(allergies)) {
+            allergies.stream()
+                    .filter(i -> i != null && StringUtil.isNotBlank(i.getName()) && (i.getNegative() == null || StringUtil.isBlank(i.getNegative().getName())))
+                    .forEach(i -> {
+                        if (i.getAllergyFood() != null && StringUtil.isNotBlank(i.getAllergyFood().getName())) {
+                            sbf.append(i.getAllergyFood().getName()).append(i.getName()).append(",");
+                        }
+                    });
+            allergies.stream()
+                    .filter(i -> i != null && StringUtil.isNotBlank(i.getName()) && i.getNegative() != null && StringUtil.isNotBlank(i.getNegative().getName()))
+                    .forEach(i -> {
+                        if (i.getAllergyFood() != null && StringUtil.isNotBlank(i.getAllergyFood().getName())) {
+                            sbf.append(i.getNegative().getName()).append(i.getAllergyFood().getName()).append(i.getName()).append(",");
+                        }
+                    });
+            allergies.stream()
+                    .filter(i -> i != null && StringUtil.isNotBlank(i.getName()) && (i.getNegative() == null || StringUtil.isBlank(i.getNegative().getName())))
+                    .forEach(i -> {
+                        if (i.getAllergyMedicine() != null && StringUtil.isNotBlank(i.getAllergyMedicine().getName())) {
+                            sbf.append(i.getAllergyMedicine().getName()).append(i.getName()).append(",");
+                        }
+                    });
+            allergies.stream()
+                    .filter(i -> i != null && StringUtil.isNotBlank(i.getName()) && i.getNegative() != null && StringUtil.isNotBlank(i.getNegative().getName()))
+                    .forEach(i -> {
+                        if (i.getAllergyMedicine() != null && StringUtil.isNotBlank(i.getAllergyMedicine().getName())) {
+                            sbf.append(i.getNegative().getName()).append(i.getAllergyMedicine().getName()).append(i.getName()).append(",");
+                        }
+                    });
+        }
+        map.put("过敏史", sbf.toString());
+    }
+
+    private void generalDescHandle(InputInfo inputInfo, Map<String, String> map) {
+        StringBuffer sbf = new StringBuffer();
+        PresentLabel presentLabel = inputInfo.getBeHospitalizedDoc().getPresentLabel();
+        List<String> list = Lists.newArrayList();
+        List<String> neList = Lists.newArrayList();
+        List<General> gens = presentLabel.getGens();
+        List<GeneralDesc> generals = presentLabel.getGenerals();
+        if (ListUtil.isNotEmpty(generals)) {
+            String preStr = map.get("现病史");
+            int index = -1;
+            for (GeneralDesc general : generals) {
+                index++;
+                if (general == null || StringUtil.isBlank(general.getName())) {
+                    continue;
+                }
+                String genstr = "";
+                if (index < gens.size()) {
+                    genstr = gens.get(index).getName();
+                }
+                if (general.getNegative() != null && StringUtil.isNotBlank(general.getNegative().getName())) {
+                    neList.add(general.getNegative().getName() + general.getName() + genstr);
+                } else {
+                    list.add(general.getName() + genstr);
+                }
+            }
+            list.forEach(i -> {
+                sbf.append(i).append(",");
+            });
+            neList.forEach(i -> {
+                sbf.append(i).append(",");
+            });
+            preStr.replaceAll(sbf.toString(), "");
+        }
+        map.put("一般健康状况标志", sbf.toString());
+    }
+
+    private InputInfo ai(Map<String, String> sourceMap) {
+        InputInfo inputInfo = new InputInfo();
+        inputInfo.setUseCrfCache(false);
+        MedicalRecordInfoDoc medicalRecordInfoDoc = new MedicalRecordInfoDoc();
+        medicalRecordInfoDoc.getStructureMap().put("behospitalCode", System.currentTimeMillis() + "");
+        inputInfo.setMedicalRecordInfoDoc(medicalRecordInfoDoc);
+        BeHospitalizedDoc beHospitalizedDoc = new BeHospitalizedDoc();
+        PresentLabel presentLabel = new PresentLabel();
+        presentLabel.setText(sourceMap.get("现病史"));
+        beHospitalizedDoc.setPresentLabel(presentLabel);
+        PastLabel pastLabel = new PastLabel();
+        pastLabel.setText(sourceMap.get("既往史"));
+        beHospitalizedDoc.setPastLabel(pastLabel);
+        inputInfo.setBeHospitalizedDoc(beHospitalizedDoc);
+        BeHospitalizedAI beHospitalizedAI = new BeHospitalizedAI();
+        beHospitalizedAI.medrec(inputInfo, crfServiceClient);
+        return inputInfo;
+    }
+
+    private List<String> keyContrasts = Lists.newArrayList(
+            "体温=体格检查--体温(℃)",
+            "脉搏=体格检查--脉率(次/min)",
+            "呼吸=体格检查--呼吸频率(次/min)",
+            "收缩压=体格检查--收缩压(mmHg)",
+            "舒张压=体格检查--舒张压(mmHg)",
+            "身高=体格检查--身高(cm)",
+            "体重=体格检查--体重(kg)",
+            "一般情况=体格检查--一般状况检查结果",
+            "皮肤黏膜=体格检查--皮肤和黏膜检查结果",
+            "浅表淋巴结=体格检查--全身浅表淋巴结检查结果",
+            "头部及其器官=体格检查--头部及其器官检查结果",
+            "颈部=体格检查--颈部检查结果",
+            "胸部=体格检查--胸部检查结果",
+            "腹部=体格检查--腹部检查结果",
+            "肛门及直肠=体格检查--肛门指诊检查结果描述",
+            "外生殖器=体格检查--外生殖器检查结果",
+            "脊柱=体格检查--脊柱检查结果",
+            "四肢=体格检查--四肢检查结果",
+            "神经系统=体格检查--神经系统检查结果",
+            "专科检查=专科情况",
+            "辅助检查=辅助检查结果",
+            "初步诊断=初步诊断-西医诊断名称",
+            "初步诊断签名日期=初步诊断日期",
+            "修正诊断=修正诊断-西医诊断名称",
+            "修正诊断签名日期=修正诊断日期",
+            "补充诊断=补充诊断名称",
+            "补充诊断签名日期=补充诊断日期",
+            "姓名=患者姓名",
+            "性别=性别代码",
+            "年龄岁=年龄(岁)",
+            "年龄月=年龄(月)",
+            "民族=民族",
+            "婚姻状况=婚姻状况代码",
+            "职业=职业类别代码",
+            "新入院时间=入院日期时间",
+            "病史陈述者=病史陈述者姓名",
+            "主诉=主诉",
+            "现病史=现病史",
+            "预防接种史=预防接种史",
+            "手术史=手术史",
+            "输血史=输血史",
+            "过敏史=过敏史",
+            "个人史=个人史",
+            "婚育史=婚育史",
+            "月经史=月经史",
+            "家族史=家族史"
+    );
+
+    private List<String> kmaps = Lists.newArrayList(
+            "DE01.00.014.00=住院号",
+            "DE08.10.054.00=病区名称",
+            "DE08.10.026.00=科室名称",
+            "DE01.00.019.00=病房号",
+            "DE01.00.026.00=病床号",
+            "DE02.01.039.00=患者姓名",
+            "DE02.01.040.00=性别代码",
+            "DE02.01.026.00=年龄(岁)",
+            "DE02.01.032.00=年龄(月)",
+            "DE02.01.025.00=民族",
+            "DE02.01.018.00=婚姻状况代码",
+            "DE02.01.009.01=地址-省(自治区、直辖市)",
+            "DE02.01.009.02=地址-市(地区、州)",
+            "DE02.01.009.03=地址-县(区)",
+            "DE02.01.009.04=地址-乡(镇、街道办事处)",
+            "DE02.01.009.05=地址-村(街、路、弄等)",
+            "DE02.01.009.06=地址-门牌号码",
+            "DE02.01.052.00=职业类别代码",
+            "DE06.00.092.00=入院日期时间",
+            "DE02.01.039.00=病史陈述者姓名",
+            "DE02.10.024.00=陈述者与患者的关系代码",
+            "DE05.10.143.00=陈述内容可靠标志",
+            "DE04.01.119.00=主诉",
+            "DE02.10.071.00=现病史",
+            "DE05.10.031.00=一般健康状况标志",
+            "DE02.10.026.00=疾病史(含外伤)",
+            "DE05.10.119.00=患者传染性标志",
+            "DE02.10.008.00=传染病史",
+            "DE02.10.101.00=预防接种史",
+            "DE02.10.061.00=手术史",
+            "DE02.10.100.00=输血史",
+            "DE02.10.022.00=过敏史",
+            "DE02.10.097.00=个人史",
+            "DE02.10.098.00=婚育史",
+            "DE02.10.102.00=月经史",
+            "DE02.10.103.00=家族史",
+            "DE04.10.186.00=体格检查--体温(℃)",
+            "DE04.10.118.00=体格检查--脉率(次/min)",
+            "DE04.10.081.00=体格检查--呼吸频率(次/min)",
+            "DE04.10.174.00=体格检查--收缩压(mmHg)",
+            "DE04.10.176.00=体格检查--舒张压(mmHg)",
+            "DE04.10.167.00=体格检查--身高(cm)",
+            "DE04.10.188.00=体格检查--体重(kg)",
+            "DE04.10.219.00=体格检查--一般状况检查结果",
+            "DE04.10.126.00=体格检查--皮肤和黏膜检查结果",
+            "DE04.10.114.00=体格检查--全身浅表淋巴结检查结果",
+            "DE04.10.261.00=体格检查--头部及其器官检查结果",
+            "DE04.10.255.00=体格检查--颈部检查结果",
+            "DE04.10.263.00=体格检查--胸部检查结果",
+            "DE04.10.046.00=体格检查--腹部检查结果",
+            "DE04.10.065.00=体格检查--肛门指诊检查结果描述",
+            "DE04.10.195.00=体格检查--外生殖器检查结果",
+            "DE04.10.093.00=体格检查--脊柱检查结果",
+            "DE04.10.179.00=体格检查--四肢检查结果",
+            "DE05.10.149.00=体格检查--神经系统检查结果",
+            "DE08.10.061.00=专科情况",
+            "DE04.30.009.00=辅助检查结果",
+            "DE02.10.028.00=中医“四诊”观察结果",
+            "DE06.00.300.00=治则治法",
+            "DE05.01.025.00=初步诊断-西医诊断名称",
+            "DE05.01.024.00=初步诊断-西医诊断编码",
+            "DE05.10.172.00=初步诊断-中医病名名称",
+            "DE05.10.130.00=初步诊断-中医病名代码",
+            "DE05.10.172.00=初步诊断-中医证候名称",
+            "DE05.10.130.00=初步诊断-中医证候代码",
+            "DE05.01.058.00=初步诊断日期",
+            "DE05.01.025.00=修正诊断-西医诊断名称",
+            "DE05.01.024.00=修正诊断-西医诊断编码",
+            "DE05.10.172.00=修正诊断-中医病名名称",
+            "DE05.10.130.00=修正诊断-中医病名代码",
+            "DE05.10.172.00=修正诊断-中医证候名称",
+            "DE05.10.130.00=修正诊断-中医证候代码",
+            "DE05.01.058.00=修正诊断日期",
+            "DE05.01.025.00=确定诊断-西医诊断名称",
+            "DE05.01.024.00=确定诊断-西医诊断编码",
+            "DE05.10.172.00=确定诊断-中医病名名称",
+            "DE05.10.130.00=确定诊断-中医病名代码",
+            "DE05.10.172.00=确定诊断-中医证候名称",
+            "DE05.10.130.00=确定诊断-中医证候代码",
+            "DE05.01.058.00=确定诊断日期",
+            "DE05.01.025.00=补充诊断名称",
+            "DE05.01.024.00=补充诊断编码",
+            "DE05.01.058.00=补充诊断日期",
+            "DE05.01.080.00=入院诊断顺位",
+            "DE02.01.039.00=接诊医师签名",
+            "DE02.01.039.00=住院医师签名",
+            "DE02.01.039.00=主治医师签名",
+            "DE02.01.039.00=主任医师签名"
+    );
+
+    private List<String> kys = Lists.newArrayList(
+            "住院号",
+            "病区名称",
+            "科室名称",
+            "病房号",
+            "病床号",
+            "患者姓名",
+            "性别代码",
+            "年龄(岁)",
+            "年龄(月)",
+            "民族",
+            "婚姻状况代码",
+            "地址-省(自治区、直辖市)",
+            "地址-市(地区、州)",
+            "地址-县(区)",
+            "地址-乡(镇、街道办事处)",
+            "地址-村(街、路、弄等)",
+            "地址-门牌号码",
+            "职业类别代码",
+            "入院日期时间",
+            "病史陈述者姓名",
+            "陈述者与患者的关系代码",
+            "陈述内容可靠标志",
+            "主诉",
+            "现病史",
+            "一般健康状况标志",
+            "疾病史(含外伤)",
+            "患者传染性标志",
+            "传染病史",
+            "预防接种史",
+            "手术史",
+            "输血史",
+            "过敏史",
+            "个人史",
+            "婚育史",
+            "月经史",
+            "家族史",
+            "体格检查--体温(℃)",
+            "体格检查--脉率(次/min)",
+            "体格检查--呼吸频率(次/min)",
+            "体格检查--收缩压(mmHg)",
+            "体格检查--舒张压(mmHg)",
+            "体格检查--身高(cm)",
+            "体格检查--体重(kg)",
+            "体格检查--一般状况检查结果",
+            "体格检查--皮肤和黏膜检查结果",
+            "体格检查--全身浅表淋巴结检查结果",
+            "体格检查--头部及其器官检查结果",
+            "体格检查--颈部检查结果",
+            "体格检查--胸部检查结果",
+            "体格检查--腹部检查结果",
+            "体格检查--肛门指诊检查结果描述",
+            "体格检查--外生殖器检查结果",
+            "体格检查--脊柱检查结果",
+            "体格检查--四肢检查结果",
+            "体格检查--神经系统检查结果",
+            "专科情况",
+            "辅助检查结果",
+            "中医“四诊”观察结果",
+            "治则治法",
+            "初步诊断-西医诊断名称",
+            "初步诊断-西医诊断编码",
+            "初步诊断-中医病名名称",
+            "初步诊断-中医病名代码",
+            "初步诊断-中医证候名称",
+            "初步诊断-中医证候代码",
+            "初步诊断日期",
+            "修正诊断-西医诊断名称",
+            "修正诊断-西医诊断编码",
+            "修正诊断-中医病名名称",
+            "修正诊断-中医病名代码",
+            "修正诊断-中医证候名称",
+            "修正诊断-中医证候代码",
+            "修正诊断日期",
+            "确定诊断-西医诊断名称",
+            "确定诊断-西医诊断编码",
+            "确定诊断-中医病名名称",
+            "确定诊断-中医病名代码",
+            "确定诊断-中医证候名称",
+            "确定诊断-中医证候代码",
+            "确定诊断日期",
+            "补充诊断名称",
+            "补充诊断编码",
+            "补充诊断日期",
+            "入院诊断顺位",
+            "接诊医师签名",
+            "住院医师签名",
+            "主治医师签名",
+            "主任医师签名"
+    );
+
+    private Map<String, String> getKmaps() {
+        Map<String, String> map = Maps.newLinkedHashMap();
+        kmaps.forEach(kmap -> {
+            String[] arry = kmap.split("=");
+            map.put(arry[1], arry[0]);
+        });
+        return map;
+    }
+
+}

+ 43 - 0
kernel/src/main/java/com/lantone/qc/kernel/web/controller/EzController.java

@@ -0,0 +1,43 @@
+package com.lantone.qc.kernel.web.controller;
+
+import com.lantone.qc.kernel.analysis.EZAnalysis;
+import com.lantone.qc.pub.model.vo.EzAnalysisVO;
+import com.lantone.qc.pub.res.EzAnalysisDTO;
+import com.lantone.qc.pub.res.Response;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.CrossOrigin;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * @ClassName : QCController
+ * @Description : 质控总入口
+ * @Author : 楼辉荣
+ * @Date: 2020-03-03 19:57
+ */
+@Slf4j
+@Api(value = "恩泽服务接口")
+@RestController
+@CrossOrigin(origins = "*", maxAge = 3600)
+@RequestMapping(value = "ez")
+public class EzController {
+
+    @Autowired
+    private EZAnalysis ezAnalysis;
+
+    @ApiOperation(value = "恩泽解析接口")
+    @PostMapping("jx")
+    public Response<List<EzAnalysisDTO>> ezAnalysis(@RequestBody EzAnalysisVO ezAnalysisVO) throws Exception {
+        Response response = new Response();
+        response.setData(ezAnalysis.anlysis(ezAnalysisVO));
+        return response;
+    }
+
+}

+ 133 - 0
kernel/src/main/resources/cache/4/concept_clinic_bodypart_properties.dict

@@ -0,0 +1,133 @@
+LAphuzvX0+1zUunA7M09Hw==
+wGKkm1Axrl8=
+KkqtLy22gBtRq6Y4vkNXyQ==
+sPonp8kD0PlDfsMr80o2tQ==
+Dp+xJKT1n8g=
+ZCI0+I1MKLGoU+yPtmhbJw==
+DOXrtCrKcXSFIWuMj59JFg==
+01OrraAAmcE=
+MfpZ5926ns4HjnX6dZF4Ew==
+eJVLnFBt3h4=
+MCVPu99GbLxp84i3DCFu/g==
+2Hhy8O0hODI=
+5r1+UeeRdz0fVJH7s8MZNQ==
+Q2fNzojA4fA=
+vW3dTpk0tFiQiw2jWjwfPA==
+MNTZtG8f9LQ=
+og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8MZNQ==
+qDsVL3hjCgxefGaE90oS7A==
+CCwoTxnngSQfVJH7s8MZNQ==
+imwDTINwXfjYlg1d8mP6iA==
+eXtihU+dgoH+XFxDriiYrA==
+qIWekMxNvsIfVJH7s8MZNQ==
+KZUjBH3QG1G82j8JYvRviu4snVNHMRDd
+qJUZMtAw/WiAhcQlN1BQqQ==
+lwGHWf1Es9kfVJH7s8MZNQ==
+H5rQ7wE9KYA=
+Ia0GAZyPZmQfVJH7s8MZNQ==
+QUV0SLvhn8MkVYph1YGRZQ==
+KSzY6T6+c7txOA0SFqxXjw==
+rmxr1ubN35NRq6Y4vkNXyQ==
+9ON7f+cfbFKQDSBz6+VqxQ==
+RRmtNZvkAQNdGy/Xru8l0w==
+tEpz4Ws2I3E=
+8d20YPKZX9MHjnX6dZF4Ew==
+KUKo8hZ4qfUfVJH7s8MZNQ==
+V8p/97BlQ1uBggh8N37P8g==
+6ByZH6ejZBQHjnX6dZF4Ew==
+GwjNkWrksZShsfR9iW7TiQ==

File diff suppressed because it is too large
+ 38387 - 0
kernel/src/main/resources/cache/4/concept_diag_properties.dict


File diff suppressed because it is too large
+ 38387 - 0
kernel/src/main/resources/cache/4/hospital_diag_info.dict


+ 813 - 0
kernel/src/main/resources/cache/4/hospital_doctor_info.dict

@@ -0,0 +1,813 @@
+6hT1OVoaNlagM5YH+yDTtfXoNDUrhiv7
+Fh1JlwgrF2zu4Pxoj58PNbgGJlVSiNEL
+AOOWeC5zUWxL86ojSlzKJqa1qpic2S+n
+z4cG6L1+zR1o/zq5s0YgzPXoNDUrhiv7
+xc4yRK3jS2GtC0YcG9FdC/XoNDUrhiv7
+T+JAG2TD01rODl/ivj20vdwlBhK2CH9tW6M7h6GPKpQ=
+qYZmLFYjnUdo8Gf+NV8z8fXoNDUrhiv7
+xqNCqDB4gjfPCalK+86QLLgGJlVSiNEL
+gyAiWVLPeo8n2WDvor0mDPXoNDUrhiv7
+WnC/fPTenKKj6vNuWukNGvXoNDUrhiv7
+EJu5L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48WAX6LVNdgPGHx0E7OBc/Q=
+AVtLW31C8xoqWaeElU15ypdkzcPpM0pSUpDYf7GcLwU=
+5y4fghiFmJtbMSFJXe5a9ZdkzcPpM0pSUpDYf7GcLwU=
+/Kar5pijjzPIcvDI/izKd5dkzcPpM0pSUpDYf7GcLwU=
+L1RYL9NnSN3TyeBNGIJLr9eTR/XZs3VK9wsK+2rSHPk=
+p0RCoowijcQqWaeElU15ypdkzcPpM0pSUpDYf7GcLwU=
+6QcN6oSnAdLnrf2oo3Lk0NeTR/XZs3VK9wsK+2rSHPk=
+1NYTbMR28hY45OA+okEbzdeTR/XZs3VK9wsK+2rSHPk=
+bo5SpPvwj9u+g/+zqFG10MWAX6LVNdgPGHx0E7OBc/Q=

+ 6 - 0
public/pom.xml

@@ -34,6 +34,12 @@
             <artifactId>dom4j</artifactId>
             <version>1.6.1</version>
         </dependency>
+        <!-- jsoup HTML parser library @ https://jsoup.org/ -->
+        <dependency>
+            <groupId>org.jsoup</groupId>
+            <artifactId>jsoup</artifactId>
+            <version>1.12.1</version>
+        </dependency>
         <dependency>
             <groupId>jaxen</groupId>
             <artifactId>jaxen</artifactId>

+ 21 - 0
public/src/main/java/com/lantone/qc/pub/model/vo/EzAnalysisVO.java

@@ -0,0 +1,21 @@
+package com.lantone.qc.pub.model.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @author: rengb
+ * @time: 2020/9/24 9:47
+ */
+@Getter
+@Setter
+public class EzAnalysisVO {
+
+    private String deptName;
+
+    private String modelName;
+
+    private String xml;
+
+}

+ 24 - 0
public/src/main/java/com/lantone/qc/pub/res/EzAnalysisDTO.java

@@ -0,0 +1,24 @@
+package com.lantone.qc.pub.res;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @Description:
+ * @author: rengb
+ * @time: 2020/9/24 9:49
+ */
+@Getter
+@Setter
+public class EzAnalysisDTO {
+
+    private String code;
+
+    private String modelName;
+
+    private String modelValue;
+
+}

+ 61 - 0
trans/src/main/java/com/lantone/qc/trans/beilun/BeiLunBeHospitalizedDocTrans.java

@@ -0,0 +1,61 @@
+package com.lantone.qc.trans.beilun;
+
+import com.google.common.collect.Lists;
+import com.lantone.qc.pub.model.doc.BeHospitalizedDoc;
+import com.lantone.qc.pub.model.vo.MedrecVo;
+import com.lantone.qc.pub.util.FastJsonUtils;
+import com.lantone.qc.trans.ModelDocTrans;
+import com.lantone.qc.trans.beilun.util.BeiLunBeHospitalizedHtmlAnalysis;
+import com.lantone.qc.trans.beilun.util.BeiLunHtmlAnalysis;
+import com.lantone.qc.trans.comsis.ModelDocGenerate;
+import com.lantone.qc.trans.comsis.OrdinaryAssistant;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Description: 入院记录文档生成
+ * @author: rengb
+ * @time: 2020/3/5 15:47
+ */
+public class BeiLunBeHospitalizedDocTrans extends ModelDocTrans {
+
+    @Override
+    public BeHospitalizedDoc extract(MedrecVo medrecVo) {
+        Map<String, Object> contentMap = ((List<Map>) medrecVo.getContent().get("content")).get(0);
+        String content = contentMap.get("xmlText").toString();
+        Map<String, String> structureMap = null;
+        if (contentMap.get("isParsed") != null && "1".equals(contentMap.get("isParsed").toString())) {
+            structureMap = (Map) FastJsonUtils.getJsonToMap(content);
+        } else {
+            String recTitle = contentMap.get("recTitle").toString();
+            String recTypeId = contentMap.get("recTypeId").toString();
+            BeiLunHtmlAnalysis beiLunHtmlAnalysis = new BeiLunBeHospitalizedHtmlAnalysis();
+            Map<String, String> sourceMap = beiLunHtmlAnalysis.analysis(content, recTitle, recTypeId);
+            structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, keyContrasts);
+            structureMap.put("记录编号", contentMap.get("recId").toString());
+            structureMap.put("病历号", contentMap.get("behospitalCode").toString());
+            //初步诊断特殊处理
+            if (structureMap.containsKey("初步诊断")) {
+                String initDiag = structureMap.get("初步诊断");
+                if (initDiag.contains("<img")) {
+                    initDiag = initDiag.split("<img")[0];
+                    structureMap.put("初步诊断", initDiag);
+                }
+            }
+        }
+
+        BeHospitalizedDoc beHospitalizedDoc = ModelDocGenerate.beHospitalizedDocGen(structureMap);
+        beHospitalizedDoc.setPageData((Map) structureMap);
+        return beHospitalizedDoc;
+    }
+
+    private List<String> keyContrasts = Lists.newArrayList(
+            "联系人(关系)=联系人",
+            "入院时间=入院日期",
+            "医生签名=记录医生",
+            "医生签名时间=记录时间",
+            "疼痛评估=疼痛"
+    );
+
+}

+ 56 - 0
trans/src/main/java/com/lantone/qc/trans/beilun/BeiLunClinicBloodEffectDocTrans.java

@@ -0,0 +1,56 @@
+package com.lantone.qc.trans.beilun;
+
+import com.google.common.collect.Lists;
+import com.lantone.qc.pub.model.doc.ClinicBloodEffectDoc;
+import com.lantone.qc.pub.model.vo.MedrecVo;
+import com.lantone.qc.pub.util.FastJsonUtils;
+import com.lantone.qc.trans.ModelDocTrans;
+import com.lantone.qc.trans.beilun.util.BeiLunClinicBloodEffectHtmlAnalysis;
+import com.lantone.qc.trans.beilun.util.BeiLunHtmlAnalysis;
+import com.lantone.qc.trans.comsis.ModelDocGenerate;
+import com.lantone.qc.trans.comsis.OrdinaryAssistant;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author 王宇
+ * @create 2020-04-30 12:39
+ * @desc 输血后效果评价
+ **/
+public class BeiLunClinicBloodEffectDocTrans extends ModelDocTrans {
+    @Override
+    public List<ClinicBloodEffectDoc> extract(MedrecVo medrecVo) {
+        List<ClinicBloodEffectDoc> retList = Lists.newArrayList();
+        List<Map<String, Object>> contentMaps = (List) medrecVo.getContent().get("content");
+        contentMaps.forEach(contentMap -> {
+            retList.add(getClinicalBloodDoc(contentMap));
+        });
+        return retList;
+    }
+
+    private ClinicBloodEffectDoc getClinicalBloodDoc(Map<String, Object> contentMap) {
+        String content = contentMap.get("xmlText").toString();
+        Map<String, String> structureMap = null;
+        if (contentMap.get("isParsed") != null && "1".equals(contentMap.get("isParsed").toString())) {
+            structureMap = (Map) FastJsonUtils.getJsonToMap(content);
+        } else {
+            String recTitle = contentMap.get("recTitle").toString();
+            String recTypeId = contentMap.get("recTypeId").toString();
+            BeiLunHtmlAnalysis beiLunHtmlAnalysis = new BeiLunClinicBloodEffectHtmlAnalysis();
+            Map<String, String> sourceMap = beiLunHtmlAnalysis.analysis(content, recTitle, recTypeId);
+            structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, keyContrasts);
+            structureMap.put("记录编号", contentMap.get("recId").toString());
+            structureMap.put("病历号", contentMap.get("behospitalCode").toString());
+        }
+
+        ClinicBloodEffectDoc clinicBloodEffectDoc = ModelDocGenerate.clinicBloodEffectDoc(structureMap);
+        clinicBloodEffectDoc.setPageData((Map) structureMap);
+        return clinicBloodEffectDoc;
+    }
+
+    private List<String> keyContrasts = Lists.newArrayList(
+
+    );
+
+}

+ 58 - 0
trans/src/main/java/com/lantone/qc/trans/beilun/BeiLunClinicalBloodDocTrans.java

@@ -0,0 +1,58 @@
+package com.lantone.qc.trans.beilun;
+
+import com.google.common.collect.Lists;
+import com.lantone.qc.pub.model.doc.ClinicalBloodDoc;
+import com.lantone.qc.pub.model.vo.MedrecVo;
+import com.lantone.qc.pub.util.FastJsonUtils;
+import com.lantone.qc.trans.ModelDocTrans;
+import com.lantone.qc.trans.beilun.util.BeiLunClinicalBloodHtmlAnalysis;
+import com.lantone.qc.trans.beilun.util.BeiLunHtmlAnalysis;
+import com.lantone.qc.trans.comsis.ModelDocGenerate;
+import com.lantone.qc.trans.comsis.OrdinaryAssistant;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Description: 输血/血制品病程记录文档生成
+ * @author: rengb
+ * @time: 2020/3/17 13:21
+ */
+public class BeiLunClinicalBloodDocTrans extends ModelDocTrans {
+
+    @Override
+    public List<ClinicalBloodDoc> extract(MedrecVo medrecVo) {
+        List<ClinicalBloodDoc> retList = Lists.newArrayList();
+        List<Map<String, Object>> contentMaps = (List) medrecVo.getContent().get("content");
+        contentMaps.forEach(contentMap -> {
+            retList.add(getClinicalBloodDoc(contentMap));
+        });
+        return retList;
+    }
+
+    private ClinicalBloodDoc getClinicalBloodDoc(Map<String, Object> contentMap) {
+        String content = contentMap.get("xmlText").toString();
+        Map<String, String> structureMap = null;
+        if (contentMap.get("isParsed") != null && "1".equals(contentMap.get("isParsed").toString())) {
+            structureMap = (Map) FastJsonUtils.getJsonToMap(content);
+        } else {
+            String recTitle = contentMap.get("recTitle").toString();
+            String recTypeId = contentMap.get("recTypeId").toString();
+            BeiLunHtmlAnalysis beiLunHtmlAnalysis = new BeiLunClinicalBloodHtmlAnalysis();
+            Map<String, String> sourceMap = beiLunHtmlAnalysis.analysis(content, recTitle, recTypeId);
+            structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, keyContrasts);
+            structureMap.put("记录编号", contentMap.get("recId").toString());
+            structureMap.put("病历号", contentMap.get("behospitalCode").toString());
+        }
+
+        ClinicalBloodDoc clinicalBloodDoc = ModelDocGenerate.clinicalBloodDocGen(structureMap);
+        clinicalBloodDoc.setPageData((Map) structureMap);
+        return clinicalBloodDoc;
+    }
+
+    private List<String> keyContrasts = Lists.newArrayList(
+            "输注成分=输注种类、血型、数量",
+            "输血过程=输注过程"
+    );
+
+}

+ 245 - 0
trans/src/main/java/com/lantone/qc/trans/beilun/BeiLunConsultationDocTrans.java

@@ -0,0 +1,245 @@
+package com.lantone.qc.trans.beilun;
+
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import com.google.common.collect.Sets;
+import com.lantone.qc.dbanaly.facade.changx.CxXmlUtil;
+import com.lantone.qc.pub.model.doc.consultation.ConsultationApplicationDoc;
+import com.lantone.qc.pub.model.doc.consultation.ConsultationDoc;
+import com.lantone.qc.pub.model.doc.consultation.ConsultationRecordDoc;
+import com.lantone.qc.pub.model.doc.consultation.ConsultationResultsDoc;
+import com.lantone.qc.pub.model.vo.MedrecVo;
+import com.lantone.qc.pub.util.FastJsonUtils;
+import com.lantone.qc.pub.util.ListUtil;
+import com.lantone.qc.pub.util.MapUtil;
+import com.lantone.qc.pub.util.StringUtil;
+import com.lantone.qc.trans.ModelDocTrans;
+import com.lantone.qc.trans.beilun.util.BeiLunConsultationHtmlAnalysis;
+import com.lantone.qc.trans.beilun.util.BeiLunHtmlAnalysis;
+import com.lantone.qc.trans.comsis.ModelDocGenerate;
+import com.lantone.qc.trans.comsis.OrdinaryAssistant;
+import com.lantone.qc.trans.comsis.Preproc;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * @Description: 会诊文档生成
+ * @author: rengb
+ * @time: 2020/3/17 13:22
+ */
+public class BeiLunConsultationDocTrans extends ModelDocTrans {
+
+    @Override
+    public List<ConsultationDoc> extract(MedrecVo medrecVo) {
+        List<ConsultationDoc> retList = Lists.newArrayList();
+
+        Map<String, List<String>> contentMap = (Map) medrecVo.getContent().get("content");
+        if (contentMap == null) {
+            return retList;
+        }
+
+        Map<String, ConsultationRecordDoc> consultationRecordDocMap = getConsultationRecordDocMap((List) contentMap.get("会诊记录"));
+        Map<String, ConsultationResultsDoc> consultationResultsDocMap = getConsultationResultsDocMap((List) contentMap.get("会诊结果单"));
+        Map<String, ConsultationApplicationDoc> consultationApplicationDocMap = getConsultationApplicationDocMap((List) contentMap.get("会诊申请单"));
+
+        Set<String> consultationNameSet = Sets.newHashSet();
+        consultationNameSet.addAll(consultationRecordDocMap.keySet());
+        consultationNameSet.addAll(consultationResultsDocMap.keySet());
+        consultationNameSet.addAll(consultationApplicationDocMap.keySet());
+
+        consultationNameSet.forEach(consultationName -> {
+            ConsultationDoc consultationDoc = new ConsultationDoc();
+            consultationDoc.setConsultationName(consultationName);
+            consultationDoc.setConsultationRecordDoc(consultationRecordDocMap.get(consultationName));
+            consultationDoc.setConsultationResultsDoc(consultationResultsDocMap.get(consultationName));
+            consultationDoc.setConsultationApplicationDoc(consultationApplicationDocMap.get(consultationName));
+            retList.add(consultationDoc);
+        });
+
+        return retList;
+    }
+
+
+    /**************************************************会诊记录*********************************************************/
+    private Map<String, ConsultationRecordDoc> getConsultationRecordDocMap(List<Map<String, Object>> contentMaps) {
+        Map<String, ConsultationRecordDoc> retMap = Maps.newHashMap();
+        if (ListUtil.isEmpty(contentMaps)) {
+            return retMap;
+        }
+        int index = 1;
+        String consultationName = null;
+        for (Map<String, Object> contentMap : contentMaps) {
+            if (contentMap.get("xmlText") == null || StringUtil.isBlank(contentMap.get("xmlText").toString())) {
+                continue;
+            }
+            consultationName = index + "";
+            ConsultationRecordDoc consultationRecordDoc = getConsultationRecordDoc(contentMap);
+            consultationRecordDoc.setConsultationName(consultationName);
+            retMap.put(consultationName, consultationRecordDoc);
+            index++;
+        }
+        return retMap;
+    }
+
+    private ConsultationRecordDoc getConsultationRecordDoc(Map<String, Object> contentMap) {
+        String content = contentMap.get("xmlText").toString();
+        Map<String, String> xmlNodeValueMap = CxXmlUtil.firstLevelNodeValue(content);
+        xmlNodeValueMap.put("mode_id=" + contentMap.get("modeId").toString(), "");
+        xmlNodeValueMap.put("rec_title=" + contentMap.get("recTitle").toString(), "");
+        Map<String, String> structureMap = OrdinaryAssistant.mapKeyContrast(xmlNodeValueMap, consultationRecord_keyContrasts);
+        structureMap.put("记录编号", contentMap.get("recId").toString());
+        structureMap.put("病历号", contentMap.get("behospitalCode").toString());
+
+        String text = CxXmlUtil.getXmlText(content);
+        Map<String, String> cutWordMap = Preproc.getCutWordMap(true, consultationRecord_sourceTitles, text);
+        cutWordMap.putAll(structureMap);
+        MapUtil.keyAssig(cutWordMap, "记录医师", "签名");
+
+        ConsultationRecordDoc consultationRecordDoc = ModelDocGenerate.consultationRecordDocGen(cutWordMap);
+        consultationRecordDoc.setText(text);
+        consultationRecordDoc.setPageData((Map) cutWordMap);
+
+        return consultationRecordDoc;
+    }
+
+    private List<String> consultationRecord_sourceTitles = Lists.newArrayList(
+            "医师签名"
+    );
+
+    private List<String> consultationRecord_keyContrasts = Lists.newArrayList(
+            "执行情况=会诊情况",
+            "记录日期=会诊申请日期",
+            "签名++++=签名",
+            "医师签名=签名"
+    );
+
+
+    /**************************************************会诊结果单*******************************************************/
+    private Map<String, ConsultationResultsDoc> getConsultationResultsDocMap(List<Map<String, Object>> contentMaps) {
+        Map<String, ConsultationResultsDoc> retMap = Maps.newHashMap();
+        if (ListUtil.isEmpty(contentMaps)) {
+            return retMap;
+        }
+        int index = 1;
+        String consultationName = null;
+        for (Map<String, Object> contentMap : contentMaps) {
+            if (contentMap.get("xmlText") == null || StringUtil.isBlank(contentMap.get("xmlText").toString())) {
+                continue;
+            }
+            consultationName = index + "";
+            ConsultationResultsDoc consultationResultsDoc = getConsultationResultsDoc(contentMap);
+            consultationResultsDoc.setConsultationName(consultationName);
+            retMap.put(consultationName, consultationResultsDoc);
+            index++;
+        }
+        return retMap;
+    }
+
+    private ConsultationResultsDoc getConsultationResultsDoc(Map<String, Object> contentMap) {
+        String content = contentMap.get("xmlText").toString();
+        Map<String, String> structureMap = null;
+        if (contentMap.get("isParsed") != null && "1".equals(contentMap.get("isParsed").toString())) {
+            structureMap = (Map) FastJsonUtils.getJsonToMap(content);
+        } else {
+            String recTitle = contentMap.get("recTitle").toString();
+            String recTypeId = contentMap.get("recTypeId").toString();
+            BeiLunHtmlAnalysis beiLunHtmlAnalysis = new BeiLunConsultationHtmlAnalysis();
+            Map<String, String> sourceMap = beiLunHtmlAnalysis.analysis(content, recTitle, recTypeId);
+            structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, consultationResults_pageDataTitles);
+            structureMap.put("记录编号", contentMap.get("recId").toString());
+            structureMap.put("病历号", contentMap.get("behospitalCode").toString());
+        }
+
+        ConsultationResultsDoc consultationResultsDoc = ModelDocGenerate.consultationResultsDocGen(structureMap);
+        consultationResultsDoc.setText(content);
+        consultationResultsDoc.setPageData((Map) structureMap);
+        return consultationResultsDoc;
+    }
+
+    private List<String> consultationResults_pageDataTitles = Lists.newArrayList(
+            "科室=科别",
+            "申请会诊科别=申请科室",
+            "会诊诊断=当前诊断",
+            "患者病情及诊疗经过、申请会诊的理由及目的=会诊目的",
+            "记录医师"
+    );
+
+
+    /**************************************************会诊申请单*******************************************************/
+    private Map<String, ConsultationApplicationDoc> getConsultationApplicationDocMap(List<Map<String, Object>> contentMaps) {
+        Map<String, ConsultationApplicationDoc> retMap = Maps.newHashMap();
+        if (ListUtil.isEmpty(contentMaps)) {
+            return retMap;
+        }
+        int index = 1;
+        String consultationName = null;
+        for (Map<String, Object> contentMap : contentMaps) {
+            if (contentMap.get("xmlText") == null || StringUtil.isBlank(contentMap.get("xmlText").toString())) {
+                continue;
+            }
+            consultationName = index + "";
+            ConsultationApplicationDoc consultationApplicationDoc = getConsultationApplicationDoc(contentMap);
+            consultationApplicationDoc.setConsultationName(consultationName);
+            retMap.put(consultationName, consultationApplicationDoc);
+            index++;
+        }
+        return retMap;
+    }
+
+    private ConsultationApplicationDoc getConsultationApplicationDoc(Map<String, Object> contentMap) {
+        String content = contentMap.get("xmlText").toString();
+        Map<String, String> xmlNodeValueMap = CxXmlUtil.firstLevelNodeValue(content);
+        xmlNodeValueMap.put("mode_id=" + contentMap.get("modeId").toString(), "");
+        xmlNodeValueMap.put("rec_title=" + contentMap.get("recTitle").toString(), "");
+        Map<String, String> structureMap = OrdinaryAssistant.mapKeyContrast(xmlNodeValueMap, consultationApplication_keyContrasts);
+        structureMap.put("记录编号", contentMap.get("recId").toString());
+        structureMap.put("病历号", contentMap.get("behospitalCode").toString());
+
+        String text = CxXmlUtil.getXmlText(content);
+        Map<String, String> cutWordMap = Preproc.getCutWordMap(true, consultationApplication_sourceTitles, text);
+        cutWordMap.putAll(structureMap);
+
+        ConsultationApplicationDoc consultationApplicationDoc = ModelDocGenerate.consultationApplicationDocGen(cutWordMap);
+        consultationApplicationDoc.setText(text);
+        consultationApplicationDoc.setPageData((Map) cutWordMap);
+
+        return consultationApplicationDoc;
+    }
+
+    private List<String> consultationApplication_sourceTitles = Lists.newArrayList(
+            "姓名",
+            "性别",
+            "病区",
+            "床号",
+            "病案号",
+            "简要病情及诊疗",
+            "申请理由目的",
+            "受邀科室",
+            "会诊分类",
+            "会诊时间",
+            "会诊地点",
+            "签名"
+    );
+
+    private List<String> consultationApplication_keyContrasts = Lists.newArrayList(
+            "++++姓名=姓名",
+            "性别=性别",
+            "++++病区=病区",
+            "床号=",
+            "++++病案号=病案号",
+            "新会诊-简要病情及诊疗=简要病情及诊疗",
+            "新会诊-申请理由目的=会诊目的",
+            "新会诊-受邀科室=受邀科室",
+            "新会诊-会诊分类=会诊分类",
+            "新会诊-会诊时间=会诊时间",
+            "新会诊-会诊地点=会诊地点",
+            "新会诊-接待医生=会诊医师",
+            "新会诊-会诊意见=会诊意见",
+            "新会诊-会诊科室=会诊科室",
+            "签名++++=签名",
+            "++++会诊医师=会诊医师"
+    );
+
+}

+ 36 - 0
trans/src/main/java/com/lantone/qc/trans/beilun/BeiLunCrisisInfoDocTrans.java

@@ -0,0 +1,36 @@
+package com.lantone.qc.trans.beilun;
+
+import com.google.common.collect.Lists;
+import com.lantone.qc.pub.model.doc.CrisisInfoDoc;
+import com.lantone.qc.pub.model.vo.MedrecVo;
+import com.lantone.qc.pub.util.FastJsonUtils;
+import com.lantone.qc.trans.ModelDocTrans;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Description: 危急值结构化信息
+ * @author: rengb
+ * @time: 2020/3/19 19:41
+ */
+public class BeiLunCrisisInfoDocTrans extends ModelDocTrans {
+
+    @Override
+    public List<CrisisInfoDoc> extract(MedrecVo medrecVo) {
+        List<CrisisInfoDoc> retList = Lists.newArrayList();
+        List<String> contents = (List) medrecVo.getContent().get("content");
+        contents.forEach(content -> {
+            retList.add(getCrisisInfoDoc((Map) FastJsonUtils.getJsonToMap(content)));
+        });
+        return retList;
+    }
+
+    private CrisisInfoDoc getCrisisInfoDoc(Map<String, String> content) {
+        CrisisInfoDoc crisisInfoDoc = new CrisisInfoDoc();
+        crisisInfoDoc.setStructureMap(content);
+        crisisInfoDoc.setPageData((Map) content);
+        return crisisInfoDoc;
+    }
+
+}

+ 57 - 0
trans/src/main/java/com/lantone/qc/trans/beilun/BeiLunCrisisValueReportDocTrans.java

@@ -0,0 +1,57 @@
+package com.lantone.qc.trans.beilun;
+
+import com.google.common.collect.Lists;
+import com.lantone.qc.pub.model.doc.CrisisValueReportDoc;
+import com.lantone.qc.pub.model.vo.MedrecVo;
+import com.lantone.qc.pub.util.FastJsonUtils;
+import com.lantone.qc.trans.ModelDocTrans;
+import com.lantone.qc.trans.beilun.util.BeiLunCrisisValueReportHtmlAnalysis;
+import com.lantone.qc.trans.beilun.util.BeiLunHtmlAnalysis;
+import com.lantone.qc.trans.comsis.ModelDocGenerate;
+import com.lantone.qc.trans.comsis.OrdinaryAssistant;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Description: 危急值记录文档生成
+ * @author: rengb
+ * @time: 2020/3/19 19:41
+ */
+public class BeiLunCrisisValueReportDocTrans extends ModelDocTrans {
+
+    @Override
+    public List<CrisisValueReportDoc> extract(MedrecVo medrecVo) {
+        List<CrisisValueReportDoc> retList = Lists.newArrayList();
+        List<Map<String, Object>> contentMaps = (List) medrecVo.getContent().get("content");
+        contentMaps.forEach(contentMap -> {
+            retList.add(getCrisisValueReportDoc(contentMap));
+        });
+        return retList;
+    }
+
+    private CrisisValueReportDoc getCrisisValueReportDoc(Map<String, Object> contentMap) {
+        String content = contentMap.get("xmlText").toString();
+        Map<String, String> structureMap = null;
+        if (contentMap.get("isParsed") != null && "1".equals(contentMap.get("isParsed").toString())) {
+            structureMap = (Map) FastJsonUtils.getJsonToMap(content);
+        } else {
+            String recTitle = contentMap.get("recTitle").toString();
+            String recTypeId = contentMap.get("recTypeId").toString();
+            BeiLunHtmlAnalysis beiLunHtmlAnalysis = new BeiLunCrisisValueReportHtmlAnalysis();
+            Map<String, String> sourceMap = beiLunHtmlAnalysis.analysis(content, recTitle, recTypeId);
+            structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, keyContrasts);
+            structureMap.put("记录编号", contentMap.get("recId").toString());
+            structureMap.put("病历号", contentMap.get("behospitalCode").toString());
+        }
+
+        CrisisValueReportDoc crisisValueReportDoc = ModelDocGenerate.crisisValueReportDocGen(structureMap);
+        crisisValueReportDoc.setPageData((Map) structureMap);
+        return crisisValueReportDoc;
+    }
+
+    private List<String> keyContrasts = Lists.newArrayList(
+            "病情记录=病情分析及处理"
+    );
+
+}

+ 61 - 0
trans/src/main/java/com/lantone/qc/trans/beilun/BeiLunCriticallyIllNoticeDocTrans.java

@@ -0,0 +1,61 @@
+package com.lantone.qc.trans.beilun;
+
+import com.google.common.collect.Lists;
+import com.lantone.qc.pub.model.doc.CriticallyIllNoticeDoc;
+import com.lantone.qc.pub.model.vo.MedrecVo;
+import com.lantone.qc.pub.util.FastJsonUtils;
+import com.lantone.qc.trans.ModelDocTrans;
+import com.lantone.qc.trans.beilun.util.BeiLunCriticallyIllNoticeHtmlAnalysis;
+import com.lantone.qc.trans.beilun.util.BeiLunHtmlAnalysis;
+import com.lantone.qc.trans.beilun.util.CommonAnalysisUtil;
+import com.lantone.qc.trans.comsis.ModelDocGenerate;
+import com.lantone.qc.trans.comsis.OrdinaryAssistant;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Description: 病危通知书文档生成
+ * @author: rengb
+ * @time: 2020/3/19 19:41
+ */
+public class BeiLunCriticallyIllNoticeDocTrans extends ModelDocTrans {
+
+    @Override
+    public List<CriticallyIllNoticeDoc> extract(MedrecVo medrecVo) {
+        List<CriticallyIllNoticeDoc> retList = Lists.newArrayList();
+        List<Map<String, Object>> contentMaps = (List) medrecVo.getContent().get("content");
+        contentMaps.forEach(contentMap -> {
+            retList.add(getCriticallyIllNoticeDoc(contentMap));
+        });
+        return retList;
+    }
+
+    private CriticallyIllNoticeDoc getCriticallyIllNoticeDoc(Map<String, Object> contentMap) {
+        String content = contentMap.get("xmlText").toString();
+        Map<String, String> structureMap = null;
+        if (contentMap.get("isParsed") != null && "1".equals(contentMap.get("isParsed").toString())) {
+            structureMap = (Map) FastJsonUtils.getJsonToMap(content);
+        } else {
+            String recTitle = contentMap.get("recTitle").toString();
+            String recTypeId = contentMap.get("recTypeId").toString();
+            BeiLunHtmlAnalysis beiLunHtmlAnalysis = new BeiLunCriticallyIllNoticeHtmlAnalysis();
+            Map<String, String> sourceMap = beiLunHtmlAnalysis.analysis(content, recTitle, recTypeId);
+            structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, keyContrasts);
+            structureMap.put("记录编号", contentMap.get("recId").toString());
+            structureMap.put("病历号", contentMap.get("behospitalCode").toString());
+        }
+
+        String text = CommonAnalysisUtil.html2String(content);
+        CriticallyIllNoticeDoc criticallyIllNoticeDoc = ModelDocGenerate.criticallyIllNoticeDocGen(structureMap);
+        criticallyIllNoticeDoc.setText(text);
+        criticallyIllNoticeDoc.setPageData((Map) structureMap);
+
+        return criticallyIllNoticeDoc;
+    }
+
+    private List<String> keyContrasts = Lists.newArrayList(
+            
+    );
+
+}

+ 53 - 0
trans/src/main/java/com/lantone/qc/trans/beilun/BeiLunDeathCaseDiscussDocTrans.java

@@ -0,0 +1,53 @@
+package com.lantone.qc.trans.beilun;
+
+import com.google.common.collect.Lists;
+import com.lantone.qc.pub.model.doc.DeathCaseDiscussDoc;
+import com.lantone.qc.pub.model.vo.MedrecVo;
+import com.lantone.qc.pub.util.FastJsonUtils;
+import com.lantone.qc.trans.ModelDocTrans;
+import com.lantone.qc.trans.beilun.util.BeiLunDeathCaseDiscussHtmlAnalysis;
+import com.lantone.qc.trans.beilun.util.BeiLunHtmlAnalysis;
+import com.lantone.qc.trans.comsis.ModelDocGenerate;
+import com.lantone.qc.trans.comsis.OrdinaryAssistant;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Description: 死亡病例讨论记录文档生成
+ * @author: rengb
+ * @time: 2020/3/17 13:22
+ */
+public class BeiLunDeathCaseDiscussDocTrans extends ModelDocTrans {
+
+    @Override
+    public DeathCaseDiscussDoc extract(MedrecVo medrecVo) {
+        Map<String, Object> contentMap = ((List<Map>) medrecVo.getContent().get("content")).get(0);
+        String content = contentMap.get("xmlText").toString();
+        Map<String, String> structureMap = null;
+        if (contentMap.get("isParsed") != null && "1".equals(contentMap.get("isParsed").toString())) {
+            structureMap = (Map) FastJsonUtils.getJsonToMap(content);
+        } else {
+            String recTitle = contentMap.get("recTitle").toString();
+            String recTypeId = contentMap.get("recTypeId").toString();
+            BeiLunHtmlAnalysis beiLunHtmlAnalysis = new BeiLunDeathCaseDiscussHtmlAnalysis();
+            Map<String, String> sourceMap = beiLunHtmlAnalysis.analysis(content, recTitle, recTypeId);
+            structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, keyContrasts);
+            structureMap.put("记录编号", contentMap.get("recId").toString());
+            structureMap.put("病历号", contentMap.get("behospitalCode").toString());
+        }
+
+        DeathCaseDiscussDoc deathCaseDiscussDoc = ModelDocGenerate.deathCaseDiscussDocGen(structureMap);
+        deathCaseDiscussDoc.setPageData((Map) structureMap);
+        return deathCaseDiscussDoc;
+    }
+
+    private List<String> keyContrasts = Lists.newArrayList(
+            "医生签名时间=记录时间",
+            "主持人小结意见=主持人小结",
+            "具体讨论意见=讨论内容",
+            "记录者签名=记录医生",
+            "主持人(签名)=主持人签名"
+    );
+
+}

+ 51 - 0
trans/src/main/java/com/lantone/qc/trans/beilun/BeiLunDeathRecordDocTrans.java

@@ -0,0 +1,51 @@
+package com.lantone.qc.trans.beilun;
+
+import com.google.common.collect.Lists;
+import com.lantone.qc.pub.model.doc.DeathRecordDoc;
+import com.lantone.qc.pub.model.vo.MedrecVo;
+import com.lantone.qc.pub.util.FastJsonUtils;
+import com.lantone.qc.trans.ModelDocTrans;
+import com.lantone.qc.trans.beilun.util.BeiLunDeathRecordHtmlAnalysis;
+import com.lantone.qc.trans.beilun.util.BeiLunHtmlAnalysis;
+import com.lantone.qc.trans.beilun.util.CommonAnalysisUtil;
+import com.lantone.qc.trans.comsis.ModelDocGenerate;
+import com.lantone.qc.trans.comsis.OrdinaryAssistant;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Description: 死亡记录文档生成
+ * @author: rengb
+ * @time: 2020/3/17 13:23
+ */
+public class BeiLunDeathRecordDocTrans extends ModelDocTrans {
+
+    @Override
+    public DeathRecordDoc extract(MedrecVo medrecVo) {
+        Map<String, Object> contentMap = ((List<Map>) medrecVo.getContent().get("content")).get(0);
+        String content = contentMap.get("xmlText").toString();
+        Map<String, String> structureMap = null;
+        if (contentMap.get("isParsed") != null && "1".equals(contentMap.get("isParsed").toString())) {
+            structureMap = (Map) FastJsonUtils.getJsonToMap(content);
+        } else {
+            String recTitle = contentMap.get("recTitle").toString();
+            String recTypeId = contentMap.get("recTypeId").toString();
+            BeiLunHtmlAnalysis beiLunHtmlAnalysis = new BeiLunDeathRecordHtmlAnalysis();
+            Map<String, String> sourceMap = beiLunHtmlAnalysis.analysis(content, recTitle, recTypeId);
+            structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, keyContrasts);
+            structureMap.put("记录编号", contentMap.get("recId").toString());
+            structureMap.put("病历号", contentMap.get("behospitalCode").toString());
+        }
+
+        DeathRecordDoc deathRecordDoc = ModelDocGenerate.deathRecordDocGen(structureMap);
+        deathRecordDoc.setText(CommonAnalysisUtil.html2String(content));
+        deathRecordDoc.setPageData((Map) structureMap);
+        return deathRecordDoc;
+    }
+
+    private List<String> keyContrasts = Lists.newArrayList(
+            "签名时间=记录时间"
+    );
+
+}

+ 57 - 0
trans/src/main/java/com/lantone/qc/trans/beilun/BeiLunDifficultCaseDiscussDocTrans.java

@@ -0,0 +1,57 @@
+package com.lantone.qc.trans.beilun;
+
+import com.google.common.collect.Lists;
+import com.lantone.qc.pub.model.doc.DifficultCaseDiscussDoc;
+import com.lantone.qc.pub.model.vo.MedrecVo;
+import com.lantone.qc.pub.util.FastJsonUtils;
+import com.lantone.qc.trans.ModelDocTrans;
+import com.lantone.qc.trans.beilun.util.BeiLunDifficultCaseDiscussHtmlAnalysis;
+import com.lantone.qc.trans.beilun.util.BeiLunHtmlAnalysis;
+import com.lantone.qc.trans.comsis.ModelDocGenerate;
+import com.lantone.qc.trans.comsis.OrdinaryAssistant;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Description: 疑难病例讨论记录文档生成
+ * @author: rengb
+ * @time: 2020/3/17 13:23
+ */
+public class BeiLunDifficultCaseDiscussDocTrans extends ModelDocTrans {
+
+    @Override
+    public List<DifficultCaseDiscussDoc> extract(MedrecVo medrecVo) {
+        List<DifficultCaseDiscussDoc> retList = Lists.newArrayList();
+        List<Map<String, Object>> contentMaps = (List) medrecVo.getContent().get("content");
+        contentMaps.forEach(contentMap -> {
+            retList.add(getDifficultCaseDiscussDoc(contentMap));
+        });
+        return retList;
+    }
+
+    private DifficultCaseDiscussDoc getDifficultCaseDiscussDoc(Map<String, Object> contentMap) {
+        String content = contentMap.get("xmlText").toString();
+        Map<String, String> structureMap = null;
+        if (contentMap.get("isParsed") != null && "1".equals(contentMap.get("isParsed").toString())) {
+            structureMap = (Map) FastJsonUtils.getJsonToMap(content);
+        } else {
+            String recTitle = contentMap.get("recTitle").toString();
+            String recTypeId = contentMap.get("recTypeId").toString();
+            BeiLunHtmlAnalysis beiLunHtmlAnalysis = new BeiLunDifficultCaseDiscussHtmlAnalysis();
+            Map<String, String> sourceMap = beiLunHtmlAnalysis.analysis(content, recTitle, recTypeId);
+            structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, keyContrasts);
+            structureMap.put("记录编号", contentMap.get("recId").toString());
+            structureMap.put("病历号", contentMap.get("behospitalCode").toString());
+        }
+
+        DifficultCaseDiscussDoc difficultCaseDiscussDoc = ModelDocGenerate.difficultCaseDiscussDocGen(structureMap);
+        difficultCaseDiscussDoc.setPageData((Map) structureMap);
+        return difficultCaseDiscussDoc;
+    }
+
+    private List<String> keyContrasts = Lists.newArrayList(
+
+    );
+
+}

+ 36 - 0
trans/src/main/java/com/lantone/qc/trans/beilun/BeiLunDoctorAdviceDocTrans.java

@@ -0,0 +1,36 @@
+package com.lantone.qc.trans.beilun;
+
+import com.google.common.collect.Lists;
+import com.lantone.qc.pub.model.doc.DoctorAdviceDoc;
+import com.lantone.qc.pub.model.vo.MedrecVo;
+import com.lantone.qc.pub.util.FastJsonUtils;
+import com.lantone.qc.trans.ModelDocTrans;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Description: 医嘱信息文档生成
+ * @author: rengb
+ * @time: 2020/3/19 19:41
+ */
+public class BeiLunDoctorAdviceDocTrans extends ModelDocTrans {
+
+    @Override
+    public List<DoctorAdviceDoc> extract(MedrecVo medrecVo) {
+        List<DoctorAdviceDoc> retList = Lists.newArrayList();
+        List<String> contents = (List) medrecVo.getContent().get("content");
+        contents.forEach(content -> {
+            retList.add(getDoctorAdviceDoc((Map) FastJsonUtils.getJsonToMap(content)));
+        });
+        return retList;
+    }
+
+    private DoctorAdviceDoc getDoctorAdviceDoc(Map<String, String> content) {
+        DoctorAdviceDoc doctorAdviceDoc = new DoctorAdviceDoc();
+        doctorAdviceDoc.setStructureMap(content);
+        doctorAdviceDoc.setPageData((Map) content);
+        return doctorAdviceDoc;
+    }
+
+}

+ 57 - 0
trans/src/main/java/com/lantone/qc/trans/beilun/BeiLunDutyShiftSystemDocTrans.java

@@ -0,0 +1,57 @@
+package com.lantone.qc.trans.beilun;
+
+import com.google.common.collect.Lists;
+import com.lantone.qc.pub.model.doc.DutyShiftSystemDoc;
+import com.lantone.qc.pub.model.vo.MedrecVo;
+import com.lantone.qc.pub.util.FastJsonUtils;
+import com.lantone.qc.trans.ModelDocTrans;
+import com.lantone.qc.trans.beilun.util.BeiLunDutyShiftSystemHtmlAnalysis;
+import com.lantone.qc.trans.beilun.util.BeiLunHtmlAnalysis;
+import com.lantone.qc.trans.comsis.ModelDocGenerate;
+import com.lantone.qc.trans.comsis.OrdinaryAssistant;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Description: 值班交接制度文档生成
+ * @author: rengb
+ * @time: 2020/3/17 13:24
+ */
+public class BeiLunDutyShiftSystemDocTrans extends ModelDocTrans {
+
+    @Override
+    public List<DutyShiftSystemDoc> extract(MedrecVo medrecVo) {
+        List<DutyShiftSystemDoc> retList = Lists.newArrayList();
+        List<Map<String, Object>> contentMaps = (List) medrecVo.getContent().get("content");
+        contentMaps.forEach(contentMap -> {
+            retList.add(getDutyShiftSystemDoc(contentMap));
+        });
+        return retList;
+    }
+
+    private DutyShiftSystemDoc getDutyShiftSystemDoc(Map<String, Object> contentMap) {
+        String content = contentMap.get("xmlText").toString();
+        Map<String, String> structureMap = null;
+        if (contentMap.get("isParsed") != null && "1".equals(contentMap.get("isParsed").toString())) {
+            structureMap = (Map) FastJsonUtils.getJsonToMap(content);
+        } else {
+            String recTitle = contentMap.get("recTitle").toString();
+            String recTypeId = contentMap.get("recTypeId").toString();
+            BeiLunHtmlAnalysis beiLunHtmlAnalysis = new BeiLunDutyShiftSystemHtmlAnalysis();
+            Map<String, String> sourceMap = beiLunHtmlAnalysis.analysis(content, recTitle, recTypeId);
+            structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, keyContrasts);
+            structureMap.put("记录编号", contentMap.get("recId").toString());
+            structureMap.put("病历号", contentMap.get("behospitalCode").toString());
+        }
+
+        DutyShiftSystemDoc dutyShiftSystemDoc = ModelDocGenerate.dutyShiftSystemDocGen(structureMap);
+        dutyShiftSystemDoc.setPageData((Map) structureMap);
+        return dutyShiftSystemDoc;
+    }
+
+    private List<String> keyContrasts = Lists.newArrayList(
+
+    );
+
+}

+ 68 - 0
trans/src/main/java/com/lantone/qc/trans/beilun/BeiLunFirstCourseRecordDocTrans.java

@@ -0,0 +1,68 @@
+package com.lantone.qc.trans.beilun;
+
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import com.lantone.qc.pub.model.doc.FirstCourseRecordDoc;
+import com.lantone.qc.pub.model.vo.MedrecVo;
+import com.lantone.qc.pub.util.FastJsonUtils;
+import com.lantone.qc.trans.ModelDocTrans;
+import com.lantone.qc.trans.beilun.util.BeiLunFirstCourseRecordHtmlAnalysis;
+import com.lantone.qc.trans.beilun.util.BeiLunHtmlAnalysis;
+import com.lantone.qc.trans.beilun.util.CommonAnalysisUtil;
+import com.lantone.qc.trans.comsis.ModelDocGenerate;
+import com.lantone.qc.trans.comsis.OrdinaryAssistant;
+
+import java.util.List;
+import java.util.Map;
+
+import static com.lantone.qc.trans.comsis.ModelDocGenerate.structureMapJoin;
+
+/**
+ * @Description: 首次病程录文档生成
+ * @author: rengb
+ * @time: 2020/3/17 13:25
+ */
+public class BeiLunFirstCourseRecordDocTrans extends ModelDocTrans {
+
+    @Override
+    public FirstCourseRecordDoc extract(MedrecVo medrecVo) {
+        Map<String, Object> contentMap = ((List<Map>) medrecVo.getContent().get("content")).get(0);
+        String content = contentMap.get("xmlText").toString();
+        Map<String, String> structureMap = null;
+        if (contentMap.get("isParsed") != null && "1".equals(contentMap.get("isParsed").toString())) {
+            structureMap = (Map) FastJsonUtils.getJsonToMap(content);
+        } else {
+            String recTitle = contentMap.get("recTitle").toString();
+            String recTypeId = contentMap.get("recTypeId").toString();
+            BeiLunHtmlAnalysis beiLunHtmlAnalysis = new BeiLunFirstCourseRecordHtmlAnalysis();
+            Map<String, String> sourceMap = beiLunHtmlAnalysis.analysis(content, recTitle, recTypeId);
+            sourceMap = removeSerialNumber(sourceMap);
+            structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, keyContrasts);
+            structureMap.put("记录编号", contentMap.get("recId").toString());
+            structureMap.put("病历号", contentMap.get("behospitalCode").toString());
+        }
+        
+        String text = CommonAnalysisUtil.html2String(content);
+        FirstCourseRecordDoc firstCourseRecordDoc = ModelDocGenerate.firstCourseRecordDocGen(structureMap);
+        firstCourseRecordDoc.setText(text);
+        firstCourseRecordDoc.setPageData((Map) structureMap);
+        List<String> keys = Lists.newArrayList("需求评估", "预期目标", "诊疗计划", "治疗监测计划");
+        String treatPlanJoin = structureMapJoin(structureMap, keys);
+        firstCourseRecordDoc.getTreatPlanLabel().setAiText(treatPlanJoin);
+        return firstCourseRecordDoc;
+    }
+
+    private Map<String, String> removeSerialNumber(Map<String, String> sourceMap) {
+        Map<String, String> structureMap = Maps.newLinkedHashMap();
+        sourceMap.forEach((key, value) -> structureMap.put(key.replaceAll("[一二三四五六()().123456]", ""), value));
+        return structureMap;
+    }
+
+    private List<String> keyContrasts = Lists.newArrayList(
+            "时间=病历日期",
+            "病历特点=病例特点",
+            "入院查体=查体",
+            "辅助检查=辅检"
+    );
+
+}

+ 65 - 0
trans/src/main/java/com/lantone/qc/trans/beilun/BeiLunFirstPageRecordDocTrans.java

@@ -0,0 +1,65 @@
+package com.lantone.qc.trans.beilun;
+
+import com.google.common.collect.Maps;
+import com.lantone.qc.dbanaly.util.ModuleMappingUtil;
+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.pub.util.ListUtil;
+import com.lantone.qc.pub.util.StringUtil;
+import com.lantone.qc.trans.ModelDocTrans;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Description: 病案首页文档生成
+ * @author: 胡敬
+ * @time: 2020/3/16 17:47
+ */
+public class BeiLunFirstPageRecordDocTrans extends ModelDocTrans {
+
+    @Override
+    public FirstPageRecordDoc extract(MedrecVo medrecVo) {
+        Map<String, String> content = (Map) medrecVo.getContent();
+        FirstPageRecordDoc firstPageRecordDoc = new FirstPageRecordDoc();
+        firstPageRecordDoc.setStructureMap(content);
+
+        Map<String, Object> structureExtMap = Maps.newHashMap();
+        structureExtMap.putAll(content);
+        structureExtMap.put(Content.diagnose_cts, FastJsonUtils.getJsonToBean(content.get(Content.diagnose_cts), Object.class));
+        //        structureExtMap.put(Content.outpatientEmergencyDiag, FastJsonUtils.getJsonToBean(content.get(Content.outpatientEmergencyDiag), Object.class));
+        structureExtMap.put(Content.operative_information, FastJsonUtils.getJsonToBean(content.get(Content.operative_information), Object.class));
+        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);
+        if (ListUtil.isNotEmpty(list)) {
+            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());
+        }
+
+        Map<String, String> setMap = Maps.newHashMap();
+        setMap.put("mode_id=6", "");
+        String modeId = ModuleMappingUtil.getXmlDataTypeModuleId(setMap);
+        if (StringUtil.isNotBlank(modeId)) {
+            medrecVo.getContent().put("mode_id", modeId);
+        }
+        firstPageRecordDoc.setPageData(medrecVo.getContent());
+        return firstPageRecordDoc;
+    }
+
+}

+ 75 - 0
trans/src/main/java/com/lantone/qc/trans/beilun/BeiLunLeaveHospitalDocTrans.java

@@ -0,0 +1,75 @@
+package com.lantone.qc.trans.beilun;
+
+import com.google.common.collect.Lists;
+import com.lantone.qc.dbanaly.facade.changx.CxXmlUtil;
+import com.lantone.qc.pub.model.doc.LeaveHospitalDoc;
+import com.lantone.qc.pub.model.label.LeaveHospitalDoctorAdviceLabel;
+import com.lantone.qc.pub.model.vo.MedrecVo;
+import com.lantone.qc.pub.util.FastJsonUtils;
+import com.lantone.qc.trans.ModelDocTrans;
+import com.lantone.qc.trans.beilun.util.BeiLunHtmlAnalysis;
+import com.lantone.qc.trans.beilun.util.BeiLunLeaveHospitalHtmlAnalysis;
+import com.lantone.qc.trans.beilun.util.CommonAnalysisUtil;
+import com.lantone.qc.trans.comsis.ModelDocGenerate;
+import com.lantone.qc.trans.comsis.OrdinaryAssistant;
+import org.apache.commons.lang3.StringUtils;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Description: 出院小结文档生成
+ * @author: rengb
+ * @time: 2020/3/17 13:25
+ */
+public class BeiLunLeaveHospitalDocTrans extends ModelDocTrans {
+
+    @Override
+    public LeaveHospitalDoc extract(MedrecVo medrecVo) {
+        Map<String, Object> contentMap = ((List<Map>) medrecVo.getContent().get("content")).get(0);
+        String content = contentMap.get("xmlText").toString();
+        Map<String, String> structureMap = null;
+        if (contentMap.get("isParsed") != null && "1".equals(contentMap.get("isParsed").toString())) {
+            structureMap = (Map) FastJsonUtils.getJsonToMap(content);
+        } else {
+            String recTitle = contentMap.get("recTitle").toString();
+            String recTypeId = contentMap.get("recTypeId").toString();
+            BeiLunHtmlAnalysis beiLunHtmlAnalysis = new BeiLunLeaveHospitalHtmlAnalysis();
+            Map<String, String> sourceMap = beiLunHtmlAnalysis.analysis(content, recTitle, recTypeId);
+            structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, keyContrasts);
+            structureMap.put("记录编号", contentMap.get("recId").toString());
+            structureMap.put("病历号", contentMap.get("behospitalCode").toString());
+        }
+
+        LeaveHospitalDoc leaveHospitalDoc = ModelDocGenerate.leaveHospitalDocGen(structureMap);
+        if (StringUtils.isNotEmpty(structureMap.get("出院医嘱"))) {
+            LeaveHospitalDoctorAdviceLabel leaveHospitalDoctorAdviceLabel = new LeaveHospitalDoctorAdviceLabel();
+            leaveHospitalDoctorAdviceLabel.setText(structureMap.get("出院医嘱"));
+            leaveHospitalDoctorAdviceLabel.setAiText(structureMap.get("出院医嘱"));
+            leaveHospitalDoc.setLeaveHospitalDoctorAdviceLabel(leaveHospitalDoctorAdviceLabel);
+        }
+        String text = CommonAnalysisUtil.html2String(content);
+        leaveHospitalDoc.setText(CxXmlUtil.getXmlText(text));
+        leaveHospitalDoc.setPageData((Map) structureMap);
+        return leaveHospitalDoc;
+    }
+
+    private List<String> keyContrasts = Lists.newArrayList(
+            "患者姓名=姓名",
+            "性别=",
+            "床号=",
+            "年龄=",
+            "科室=科别",
+            "入院诊断=入院诊断",
+            "出院诊断=出院诊断",
+            "实际住院天数=住院天数",
+            "入院情况=入院情况",
+            "诊疗经过=诊治经过",
+            "出院情况=",
+            "出院医嘱=",
+            "随访计划=",
+            "医师签名=记录医生",
+            "时间=记录时间"
+    );
+
+}

+ 36 - 0
trans/src/main/java/com/lantone/qc/trans/beilun/BeiLunLisDocTrans.java

@@ -0,0 +1,36 @@
+package com.lantone.qc.trans.beilun;
+
+import com.google.common.collect.Lists;
+import com.lantone.qc.pub.model.doc.LisDoc;
+import com.lantone.qc.pub.model.vo.MedrecVo;
+import com.lantone.qc.pub.util.FastJsonUtils;
+import com.lantone.qc.trans.ModelDocTrans;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Description: 化验信息文档生成
+ * @author: rengb
+ * @time: 2020/3/19 19:41
+ */
+public class BeiLunLisDocTrans extends ModelDocTrans {
+
+    @Override
+    public List<LisDoc> extract(MedrecVo medrecVo) {
+        List<LisDoc> retList = Lists.newArrayList();
+        List<String> contents = (List) medrecVo.getContent().get("content");
+        contents.forEach(content -> {
+            retList.add(getDoctorAdviceDoc((Map) FastJsonUtils.getJsonToMap(content)));
+        });
+        return retList;
+    }
+
+    private LisDoc getDoctorAdviceDoc(Map<String, String> content) {
+        LisDoc doctorAdviceDoc = new LisDoc();
+        doctorAdviceDoc.setStructureMap(content);
+        doctorAdviceDoc.setPageData((Map) content);
+        return doctorAdviceDoc;
+    }
+
+}

+ 26 - 0
trans/src/main/java/com/lantone/qc/trans/beilun/BeiLunMedicalRecordInfoDocTrans.java

@@ -0,0 +1,26 @@
+package com.lantone.qc.trans.beilun;
+
+import com.lantone.qc.pub.model.doc.MedicalRecordInfoDoc;
+import com.lantone.qc.pub.model.vo.MedrecVo;
+import com.lantone.qc.trans.ModelDocTrans;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Description: 住院病历信息
+ * @author: 胡敬
+ * @time: 2020/6/3 15:45
+ */
+public class BeiLunMedicalRecordInfoDocTrans extends ModelDocTrans {
+
+    @Override
+    public MedicalRecordInfoDoc extract(MedrecVo medrecVo) {
+        Map<String, String> content = (Map) ((List) medrecVo.getContent().get("content")).get(0);
+        MedicalRecordInfoDoc medicalRecordInfoDoc = new MedicalRecordInfoDoc();
+        medicalRecordInfoDoc.setStructureMap(content);
+        medicalRecordInfoDoc.setPageData(medrecVo.getContent());
+        return medicalRecordInfoDoc;
+    }
+
+}

+ 211 - 0
trans/src/main/java/com/lantone/qc/trans/beilun/BeiLunOperationDocTrans.java

@@ -0,0 +1,211 @@
+package com.lantone.qc.trans.beilun;
+
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import com.google.common.collect.Sets;
+import com.lantone.qc.pub.model.doc.operation.OperationDiscussionDoc;
+import com.lantone.qc.pub.model.doc.operation.OperationDoc;
+import com.lantone.qc.pub.model.doc.operation.OperationRecordDoc;
+import com.lantone.qc.pub.model.doc.operation.PreoperativeDiscussionDoc;
+import com.lantone.qc.pub.model.vo.MedrecVo;
+import com.lantone.qc.pub.util.FastJsonUtils;
+import com.lantone.qc.pub.util.ListUtil;
+import com.lantone.qc.pub.util.StringUtil;
+import com.lantone.qc.trans.ModelDocTrans;
+import com.lantone.qc.trans.beilun.util.BeiLunHtmlAnalysis;
+import com.lantone.qc.trans.beilun.util.BeiLunOperationHtmlAnalysis;
+import com.lantone.qc.trans.beilun.util.BeiLunOperationRecordHtmlAnalysis;
+import com.lantone.qc.trans.beilun.util.BeiLunPreoperativeHtmlAnalysis;
+import com.lantone.qc.trans.comsis.ModelDocGenerate;
+import com.lantone.qc.trans.comsis.OrdinaryAssistant;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * @Description: 手术文档生成
+ * @author: rengb
+ * @time: 2020/3/20 17:11
+ */
+public class BeiLunOperationDocTrans extends ModelDocTrans {
+
+    @Override
+    public List<OperationDoc> extract(MedrecVo medrecVo) {
+        List<OperationDoc> retList = Lists.newArrayList();
+
+        Map<String, List<String>> contentMap = (Map) medrecVo.getContent().get("content");
+        if (contentMap == null) {
+            return retList;
+        }
+
+        Map<String, OperationDiscussionDoc> operationDiscussionDocMap = getOperationDiscussionDocMap((List) contentMap.get("术后首次病程及谈话记录"));
+        Map<String, OperationRecordDoc> operationRecordDocMap = getOperationRecordDocMap((List) contentMap.get("手术记录"));
+        Map<String, PreoperativeDiscussionDoc> preoperativeDiscussionDocMap = getPreoperativeDiscussionDocMap((List) contentMap.get("术前讨论、术前小结"));
+
+        Set<String> operationNameSet = Sets.newHashSet();
+        operationNameSet.addAll(operationDiscussionDocMap.keySet());
+        operationNameSet.addAll(operationRecordDocMap.keySet());
+        operationNameSet.addAll(preoperativeDiscussionDocMap.keySet());
+
+        operationNameSet.forEach(operationName -> {
+            OperationDoc operationDoc = new OperationDoc();
+            operationDoc.setOperationName(operationName);
+            operationDoc.setOperationDiscussionDoc(operationDiscussionDocMap.get(operationName));
+            operationDoc.setOperationRecordDoc(operationRecordDocMap.get(operationName));
+            operationDoc.setPreoperativeDiscussionDoc(preoperativeDiscussionDocMap.get(operationName));
+            retList.add(operationDoc);
+        });
+
+        return retList;
+    }
+
+
+    /*******************************************术后首次病程及谈话记录***************************************************/
+    private Map<String, OperationDiscussionDoc> getOperationDiscussionDocMap(List<Map<String, Object>> contentMaps) {
+        Map<String, OperationDiscussionDoc> retMap = Maps.newHashMap();
+        if (ListUtil.isEmpty(contentMaps)) {
+            return retMap;
+        }
+        int index = 1;
+        String operationName = null;
+        for (Map<String, Object> contentMap : contentMaps) {
+            if (contentMap.get("xmlText") == null || StringUtil.isBlank(contentMap.get("xmlText").toString())) {
+                continue;
+            }
+            operationName = index + "";
+            OperationDiscussionDoc operationDiscussionDoc = getOperationDiscussionDoc(contentMap);
+            operationDiscussionDoc.setOperationName(operationName);
+            retMap.put(operationName, operationDiscussionDoc);
+            index++;
+        }
+        return retMap;
+    }
+
+    private OperationDiscussionDoc getOperationDiscussionDoc(Map<String, Object> contentMap) {
+        String content = contentMap.get("xmlText").toString();
+        Map<String, String> structureMap = null;
+        if (contentMap.get("isParsed") != null && "1".equals(contentMap.get("isParsed").toString())) {
+            structureMap = (Map) FastJsonUtils.getJsonToMap(content);
+        } else {
+            String recTitle = contentMap.get("recTitle").toString();
+            String recTypeId = contentMap.get("recTypeId").toString();
+            BeiLunHtmlAnalysis beiLunHtmlAnalysis = new BeiLunOperationHtmlAnalysis();
+            Map<String, String> sourceMap = beiLunHtmlAnalysis.analysis(content, recTitle, recTypeId);
+            structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, operationDiscussion_keyContrasts);
+            structureMap.put("记录编号", contentMap.get("recId").toString());
+            structureMap.put("病历号", contentMap.get("behospitalCode").toString());
+        }
+
+        OperationDiscussionDoc operationDiscussionDoc = ModelDocGenerate.operationDiscussionDocGen(structureMap);
+        operationDiscussionDoc.setPageData((Map) structureMap);
+        return operationDiscussionDoc;
+    }
+
+    private List<String> operationDiscussion_keyContrasts = Lists.newArrayList(
+            "病情记录=手术简要经过",
+            "术后诊断=术中后诊断",
+            "患者手术后情况=患者术后情况"
+    );
+
+
+    /**********************************************手术记录*************************************************************/
+    private Map<String, OperationRecordDoc> getOperationRecordDocMap(List<Map<String, Object>> contentMaps) {
+        Map<String, OperationRecordDoc> retMap = Maps.newHashMap();
+        if (ListUtil.isEmpty(contentMaps)) {
+            return retMap;
+        }
+        int index = 1;
+        String operationName = null;
+        for (Map<String, Object> contentMap : contentMaps) {
+            if (contentMap.get("xmlText") == null || StringUtil.isBlank(contentMap.get("xmlText").toString())) {
+                continue;
+            }
+            operationName = index + "";
+            OperationRecordDoc operationRecordDoc = getOperationRecordDoc(contentMap);
+            operationRecordDoc.setOperationName(operationName);
+            retMap.put(operationName, operationRecordDoc);
+            index++;
+        }
+        return retMap;
+    }
+
+    private OperationRecordDoc getOperationRecordDoc(Map<String, Object> contentMap) {
+        String content = contentMap.get("xmlText").toString();
+        Map<String, String> structureMap = null;
+        if (contentMap.get("isParsed") != null && "1".equals(contentMap.get("isParsed").toString())) {
+            structureMap = (Map) FastJsonUtils.getJsonToMap(content);
+        } else {
+            String recTitle = contentMap.get("recTitle").toString();
+            String recTypeId = contentMap.get("recTypeId").toString();
+            BeiLunHtmlAnalysis beiLunHtmlAnalysis = new BeiLunOperationRecordHtmlAnalysis();
+            Map<String, String> sourceMap = beiLunHtmlAnalysis.analysis(content, recTitle, recTypeId);
+            structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, operationRecord_keyContrasts);
+            structureMap.put("记录编号", contentMap.get("recId").toString());
+            structureMap.put("病历号", contentMap.get("behospitalCode").toString());
+        }
+
+        OperationRecordDoc operationRecordDoc = ModelDocGenerate.operationRecordDocGen(structureMap);
+        operationRecordDoc.setPageData((Map) structureMap);
+        return operationRecordDoc;
+    }
+
+    private List<String> operationRecord_keyContrasts = Lists.newArrayList(
+            "手术经过=手术经过及处理",
+            "术后诊断=术中后诊断",
+            "主刀=主刀医师",
+            "记录者=记录医生",
+            "患者手术后情况=患者术后情况"
+    );
+
+
+    /**********************************************术前讨论、术前小结****************************************************/
+    private Map<String, PreoperativeDiscussionDoc> getPreoperativeDiscussionDocMap(List<Map<String, Object>> contentMaps) {
+        Map<String, PreoperativeDiscussionDoc> retMap = Maps.newHashMap();
+        if (ListUtil.isEmpty(contentMaps)) {
+            return retMap;
+        }
+        int index = 1;
+        String operationName = null;
+        for (Map<String, Object> contentMap : contentMaps) {
+            if (contentMap.get("xmlText") == null || StringUtil.isBlank(contentMap.get("xmlText").toString())) {
+                continue;
+            }
+            operationName = index + "";
+            PreoperativeDiscussionDoc preoperativeDiscussionDoc = getPreoperativeDiscussionDoc(contentMap);
+            preoperativeDiscussionDoc.setOperationName(operationName);
+            retMap.put(operationName, preoperativeDiscussionDoc);
+            index++;
+        }
+        return retMap;
+    }
+
+    private PreoperativeDiscussionDoc getPreoperativeDiscussionDoc(Map<String, Object> contentMap) {
+        String content = contentMap.get("xmlText").toString();
+        Map<String, String> structureMap = null;
+        if (contentMap.get("isParsed") != null && "1".equals(contentMap.get("isParsed").toString())) {
+            structureMap = (Map) FastJsonUtils.getJsonToMap(content);
+        } else {
+            String recTitle = contentMap.get("recTitle").toString();
+            String recTypeId = contentMap.get("recTypeId").toString();
+            BeiLunHtmlAnalysis beiLunHtmlAnalysis = new BeiLunPreoperativeHtmlAnalysis();
+            Map<String, String> sourceMap = beiLunHtmlAnalysis.analysis(content, recTitle, recTypeId);
+            structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, preoperativeDiscussion_keyContrasts);
+            structureMap.put("记录编号", contentMap.get("recId").toString());
+            structureMap.put("病历号", contentMap.get("behospitalCode").toString());
+        }
+
+        PreoperativeDiscussionDoc preoperativeDiscussionDoc = ModelDocGenerate.preoperativeDiscussionDocGen(structureMap);
+        preoperativeDiscussionDoc.setPageData((Map) structureMap);
+        return preoperativeDiscussionDoc;
+    }
+
+    private List<String> preoperativeDiscussion_keyContrasts = Lists.newArrayList(
+            "术中、术后注意事项(含护理事项)=术后注意事项",
+            "拟施手术方式(名称)及可能的变更方案=拟施手术方式、名称及可能的变更与禁忌症",
+            "术前特殊准备=术前准备",
+            "手术指征与禁忌征=手术指征与禁忌",
+            "经治医生签字时间=记录时间"
+    );
+
+}

+ 40 - 0
trans/src/main/java/com/lantone/qc/trans/beilun/BeiLunOutDepDocTrans.java

@@ -0,0 +1,40 @@
+package com.lantone.qc.trans.beilun;
+
+import com.lantone.qc.pub.model.doc.BeHospitalizedDoc;
+import com.lantone.qc.pub.model.label.ChiefLabel;
+import com.lantone.qc.pub.model.label.PastLabel;
+import com.lantone.qc.pub.model.label.PresentLabel;
+import com.lantone.qc.pub.model.vo.MedrecVo;
+import com.lantone.qc.trans.ModelDocTrans;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Description: 门诊入院记录文档生成
+ * @author: rengb
+ * @time: 2020/3/19 19:41
+ */
+public class BeiLunOutDepDocTrans extends ModelDocTrans {
+
+    @Override
+    public BeHospitalizedDoc extract(MedrecVo medrecVo) {
+        BeHospitalizedDoc beHospitalizedDoc = new BeHospitalizedDoc();
+        Map<String, String> structureMap = ((List<Map>) medrecVo.getContent().get("content")).get(0);
+
+        ChiefLabel chiefLabel = new ChiefLabel();
+        chiefLabel.setText(structureMap.get("主诉"));
+        beHospitalizedDoc.setChiefLabel(chiefLabel);
+
+        PresentLabel presentLabel = new PresentLabel();
+        presentLabel.setText(structureMap.get("现病史"));
+        beHospitalizedDoc.setPresentLabel(presentLabel);
+
+        PastLabel pastLabel = new PastLabel();
+        pastLabel.setText(structureMap.get("既往史"));
+        beHospitalizedDoc.setPastLabel(pastLabel);
+
+        return beHospitalizedDoc;
+    }
+
+}

+ 58 - 0
trans/src/main/java/com/lantone/qc/trans/beilun/BeiLunRescueDocTrans.java

@@ -0,0 +1,58 @@
+package com.lantone.qc.trans.beilun;
+
+import com.google.common.collect.Lists;
+import com.lantone.qc.pub.model.doc.RescueDoc;
+import com.lantone.qc.pub.model.vo.MedrecVo;
+import com.lantone.qc.pub.util.FastJsonUtils;
+import com.lantone.qc.trans.ModelDocTrans;
+import com.lantone.qc.trans.beilun.util.BeiLunHtmlAnalysis;
+import com.lantone.qc.trans.beilun.util.BeiLunRescueHtmlAnalysis;
+import com.lantone.qc.trans.comsis.ModelDocGenerate;
+import com.lantone.qc.trans.comsis.OrdinaryAssistant;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Description: 抢救记录文档生成
+ * @author: rengb
+ * @time: 2020/3/17 17:34
+ */
+public class BeiLunRescueDocTrans extends ModelDocTrans {
+
+    @Override
+    public List<RescueDoc> extract(MedrecVo medrecVo) {
+        List<RescueDoc> retList = Lists.newArrayList();
+        List<Map<String, Object>> contentMaps = (List) medrecVo.getContent().get("content");
+        contentMaps.forEach(contentMap -> {
+            retList.add(getRescueDoc(contentMap));
+        });
+        return retList;
+    }
+
+    private RescueDoc getRescueDoc(Map<String, Object> contentMap) {
+        String content = contentMap.get("xmlText").toString();
+        Map<String, String> structureMap = null;
+        if (contentMap.get("isParsed") != null && "1".equals(contentMap.get("isParsed").toString())) {
+            structureMap = (Map) FastJsonUtils.getJsonToMap(content);
+        } else {
+            String recTitle = contentMap.get("recTitle").toString();
+            String recTypeId = contentMap.get("recTypeId").toString();
+            BeiLunHtmlAnalysis beiLunHtmlAnalysis = new BeiLunRescueHtmlAnalysis();
+            Map<String, String> sourceMap = beiLunHtmlAnalysis.analysis(content, recTitle, recTypeId);
+            structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, keyContrasts);
+            structureMap.put("记录编号", contentMap.get("recId").toString());
+            structureMap.put("病历号", contentMap.get("behospitalCode").toString());
+        }
+
+        RescueDoc rescueDoc = ModelDocGenerate.rescueDocGen(structureMap);
+        rescueDoc.setPageData((Map) structureMap);
+        return rescueDoc;
+    }
+
+    private List<String> keyContrasts = Lists.newArrayList(
+            "病历标题=标题",
+            "病情记录=抢救内容"
+    );
+
+}

+ 58 - 0
trans/src/main/java/com/lantone/qc/trans/beilun/BeiLunStagesSummaryDocTrans.java

@@ -0,0 +1,58 @@
+package com.lantone.qc.trans.beilun;
+
+import com.google.common.collect.Lists;
+import com.lantone.qc.pub.model.doc.StagesSummaryDoc;
+import com.lantone.qc.pub.model.vo.MedrecVo;
+import com.lantone.qc.pub.util.FastJsonUtils;
+import com.lantone.qc.trans.ModelDocTrans;
+import com.lantone.qc.trans.beilun.util.BeiLunHtmlAnalysis;
+import com.lantone.qc.trans.beilun.util.BeiLunStagesSummaryHtmlAnalysis;
+import com.lantone.qc.trans.comsis.ModelDocGenerate;
+import com.lantone.qc.trans.comsis.OrdinaryAssistant;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Description: 阶段小结文档生成
+ * @author: rengb
+ * @time: 2020/3/19 19:41
+ */
+public class BeiLunStagesSummaryDocTrans extends ModelDocTrans {
+
+    @Override
+    public List<StagesSummaryDoc> extract(MedrecVo medrecVo) {
+        List<StagesSummaryDoc> retList = Lists.newArrayList();
+        List<Map<String, Object>> contentMaps = (List) medrecVo.getContent().get("content");
+        contentMaps.forEach(contentMap -> {
+            retList.add(getStagesSummaryDoc(contentMap));
+        });
+        return retList;
+    }
+
+    private StagesSummaryDoc getStagesSummaryDoc(Map<String, Object> contentMap) {
+        String content = contentMap.get("xmlText").toString();
+        Map<String, String> structureMap = null;
+        if (contentMap.get("isParsed") != null && "1".equals(contentMap.get("isParsed").toString())) {
+            structureMap = (Map) FastJsonUtils.getJsonToMap(content);
+        } else {
+            String recTitle = contentMap.get("recTitle").toString();
+            String recTypeId = contentMap.get("recTypeId").toString();
+            BeiLunHtmlAnalysis beiLunHtmlAnalysis = new BeiLunStagesSummaryHtmlAnalysis();
+            Map<String, String> sourceMap = beiLunHtmlAnalysis.analysis(content, recTitle, recTypeId);
+            structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, keyContrasts);
+            structureMap.put("记录编号", contentMap.get("recId").toString());
+            structureMap.put("病历号", contentMap.get("behospitalCode").toString());
+        }
+
+        StagesSummaryDoc stagesSummaryDoc = ModelDocGenerate.stagesSummaryDocGen(structureMap);
+        stagesSummaryDoc.setPageData((Map) structureMap);
+        return stagesSummaryDoc;
+    }
+
+    private List<String> keyContrasts = Lists.newArrayList(
+            "病历标题=标题",
+            "病情记录=病历内容"
+    );
+
+}

+ 296 - 0
trans/src/main/java/com/lantone/qc/trans/beilun/BeiLunThreeLevelWardDocTrans.java

@@ -0,0 +1,296 @@
+package com.lantone.qc.trans.beilun;
+
+import com.google.common.collect.Lists;
+import com.lantone.qc.dbanaly.util.KernelConstants;
+import com.lantone.qc.dbanaly.util.SpecialStorageUtil;
+import com.lantone.qc.pub.model.doc.ThreeLevelWardDoc;
+import com.lantone.qc.pub.model.doc.operation.OperationDoc;
+import com.lantone.qc.pub.model.doc.operation.OperationRecordDoc;
+import com.lantone.qc.pub.model.doc.ward.AttendingDoctorWardDoc;
+import com.lantone.qc.pub.model.doc.ward.DirectorDoctorWardDoc;
+import com.lantone.qc.pub.model.doc.ward.GeneralDoctorWardDoc;
+import com.lantone.qc.pub.model.vo.MedrecVo;
+import com.lantone.qc.pub.util.FastJsonUtils;
+import com.lantone.qc.pub.util.SpringContextUtil;
+import com.lantone.qc.pub.util.StringUtil;
+import com.lantone.qc.trans.ModelDocTrans;
+import com.lantone.qc.trans.beilun.util.BeiLunHtmlAnalysis;
+import com.lantone.qc.trans.beilun.util.BeiLunThreeLevelWardHtmlAnalysis;
+import com.lantone.qc.trans.comsis.OrdinaryAssistant;
+import lombok.Setter;
+import org.apache.commons.lang3.StringUtils;
+
+import java.util.Calendar;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * @Description: 查房记录文档生成
+ * @author: rengb
+ * @time: 2020/3/17 13:27
+ */
+@Setter
+public class BeiLunThreeLevelWardDocTrans extends ModelDocTrans {
+
+    private List<OperationDoc> operationDocs;
+
+    @Override
+    public List<ThreeLevelWardDoc> extract(MedrecVo medrecVo) {
+        List<ThreeLevelWardDoc> retList = Lists.newArrayList();
+        ThreeLevelWardDoc threeLevelWardDoc = new ThreeLevelWardDoc();
+        List<Map<String, Object>> contentMaps = (List) medrecVo.getContent().get("content");
+        contentMaps.forEach(contentMap -> {
+            classifyThreeLevelWardDoc(threeLevelWardDoc, contentMap);
+        });
+        retList.add(threeLevelWardDoc);
+        return retList;
+    }
+
+    private void classifyThreeLevelWardDoc(ThreeLevelWardDoc threeLevelWardDoc, Map<String, Object> contentMap) {
+        String content = contentMap.get("xmlText").toString();
+        Map<String, String> structureMap = null;
+        if (contentMap.get("isParsed") != null && "1".equals(contentMap.get("isParsed").toString())) {
+            structureMap = (Map) FastJsonUtils.getJsonToMap(content);
+        } else {
+            String recTitle = contentMap.get("recTitle").toString();
+            String recTypeId = contentMap.get("recTypeId").toString();
+            BeiLunHtmlAnalysis beiLunHtmlAnalysis = new BeiLunThreeLevelWardHtmlAnalysis();
+            Map<String, String> sourceMap = beiLunHtmlAnalysis.analysis(content, recTitle, recTypeId);
+            structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, keyContrasts);
+            structureMap.put("记录编号", contentMap.get("recId").toString());
+            structureMap.put("病历号", contentMap.get("behospitalCode").toString());
+        }
+        //structureMap.put("查房日期", structureMap.get("记录时间"));
+
+        /*Map<String, String> cutWordMap = Maps.newHashMap();
+        String text = CxXmlUtil.getXmlText(content);
+        if (StringUtil.isNotBlank(text)) {
+            if (StringUtil.isBlank(structureMap.get("病情记录"))) {
+                structureMap.put("病情记录", text);
+            }
+            cutWordMap = Preproc.getCutWordMap(true, sourceTitles, text);
+            if (StringUtil.isBlank(structureMap.get("记录医师"))) {
+                Pattern p = Pattern.compile("^[^\\u4e00-\\u9fa5]+$");//分词结果如果不包含中文为日期,则不覆盖
+                if (StringUtil.isNotEmpty(cutWordMap.get("医师签名"))) {
+                    Matcher m = p.matcher(cutWordMap.get("医师签名"));
+                    if (!m.matches()) {
+                        structureMap.put("记录医师", cutWordMap.get("医师签名"));
+                    }
+                }
+                if (StringUtil.isNotEmpty(cutWordMap.get("记录医生"))) {
+                    Matcher m = p.matcher(cutWordMap.get("记录医生"));
+                    if (!m.matches()) {
+                        structureMap.put("记录医师", cutWordMap.get("记录医生"));
+                    }
+                }
+            }
+        }
+         */
+
+        //总的查房记录 汇总
+        ThreeLevelWardDoc allDoctorWradDoc = new ThreeLevelWardDoc();
+        allDoctorWradDoc.setStructureMap(structureMap);
+        allDoctorWradDoc.setPageData((Map) structureMap);
+        threeLevelWardDoc.addAllDoctorWradDoc(allDoctorWradDoc);
+
+        //主任医师查房
+        DirectorDoctorWardDoc directorDoctorWardDoc = findDirectorDoctorWardDoc(structureMap);
+        if (directorDoctorWardDoc != null) {
+            threeLevelWardDoc.addDirectorDoctorWardDoc(findDirectorDoctorWardDoc(structureMap));
+        }
+        //主治医师查房
+        AttendingDoctorWardDoc attendingDoctorWardDoc = findAttendingDoctorWardDoc(structureMap);
+        if (attendingDoctorWardDoc != null) {
+            threeLevelWardDoc.addAttendingDoctorWardDoc(attendingDoctorWardDoc);
+        }
+        //普通医师查房
+        if (directorDoctorWardDoc == null && attendingDoctorWardDoc == null) {
+            GeneralDoctorWardDoc generalDoctorWardDoc = new GeneralDoctorWardDoc();
+            generalDoctorWardDoc.setStructureMap(structureMap);
+            generalDoctorWardDoc.setPageData((Map) structureMap);
+            threeLevelWardDoc.addGeneralDoctorWardDoc(generalDoctorWardDoc);
+        }
+    }
+
+    /**
+     * 主任医师查房
+     *
+     * @param structureMap
+     */
+    private DirectorDoctorWardDoc findDirectorDoctorWardDoc(Map<String, String> structureMap) {
+        String title = structureMap.get("查房标题");
+        String content = structureMap.get("病情记录");
+        String recordDateStr = structureMap.get("查房日期");
+        Date recordDate = StringUtil.parseDateTime(recordDateStr);
+        //标题有代字
+        DirectorDoctorWardDoc directorDoctorWardDoc = null;
+        if (StringUtil.isNotBlank(title)) {
+            if (title.contains("主刀")) {
+                String doctorTitle = getDoctorTitle(operationDocs, recordDate, "主刀医师");
+                title = title.replace("主刀", doctorTitle);
+            } else if (title.contains("一助")) {
+                String doctorTitle = getDoctorTitle(operationDocs, recordDate, "一助");
+                title = title.replace("一助", doctorTitle);
+            }
+            if ((StringUtils.isNotEmpty(subTitle(title)) && subTitle(title).contains("主任")) || findDirector(title, content)) {
+                directorDoctorWardDoc = new DirectorDoctorWardDoc();
+                directorDoctorWardDoc.setStructureMap(structureMap);
+                directorDoctorWardDoc.setPageData((Map) structureMap);
+            }
+        }
+        return directorDoctorWardDoc;
+    }
+
+    /**
+     * 主治医师查房
+     *
+     * @param structureMap
+     */
+    private AttendingDoctorWardDoc findAttendingDoctorWardDoc(Map<String, String> structureMap) {
+        String title = structureMap.get("查房标题");
+        String content = structureMap.get("病情记录");
+        String recordDateStr = structureMap.get("查房日期");
+        Date recordDate = StringUtil.parseDateTime(recordDateStr);
+        AttendingDoctorWardDoc attendingDoctorWardDoc = null;
+        //标题有代字
+        if (StringUtil.isNotBlank(title)) {
+            if (title.contains("主刀")) {
+                String doctorTitle = getDoctorTitle(operationDocs, recordDate, "主刀医师");
+                title = title.replace("主刀", doctorTitle);
+            } else if (title.contains("一助")) {
+                String doctorTitle = getDoctorTitle(operationDocs, recordDate, "一助");
+                title = title.replace("一助", doctorTitle);
+            }
+            if ((StringUtils.isNotEmpty(subTitle(title)) && subTitle(title).contains("主治"))
+                    || findAttend(title, content)) {
+                attendingDoctorWardDoc = new AttendingDoctorWardDoc();
+                attendingDoctorWardDoc.setStructureMap(structureMap);
+                attendingDoctorWardDoc.setPageData((Map) structureMap);
+            }
+        }
+        return attendingDoctorWardDoc;
+    }
+
+    /**
+     * 共同照护讨论记录中找主任查房
+     *
+     * @param title
+     * @param content
+     * @return
+     */
+    private boolean findDirector(String title, String content) {
+        return title.contains("共同照护讨论记录") && content.contains("主任");
+    }
+
+    /**
+     * 共同照护讨论记录中找主治查房
+     *
+     * @param title
+     * @param content
+     * @return
+     */
+    private boolean findAttend(String title, String content) {
+        Pattern p = Pattern.compile("(?<=主治医师).+?(?=住院医师)");
+        Matcher m = p.matcher(content);
+        String result = "";
+        while (m.find()) {
+            result = m.group().trim();
+        }
+        return title.contains("共同照护讨论记录") && StringUtil.isNotEmpty(result.replace(":", "").replace(":", ""));
+    }
+
+    private String subTitle(String srcText) {
+        if (StringUtil.isNotBlank(srcText) && srcText.contains("代") && srcText.indexOf("代") != srcText.length() - 1) {
+            srcText = srcText.substring(srcText.lastIndexOf("代") + 1);
+        }
+        return srcText;
+    }
+
+    private List<String> keyContrasts = Lists.newArrayList(
+            "病历日期=查房日期",
+            "病历标题=查房标题",
+            "科主任=三级医师",
+            "记录日期=记录时间"
+    );
+
+    /**
+     * 获取主刀医师/一助职称(取距离查房记录时间最近的一次手术记录)
+     *
+     * @param operationDocs
+     * @return
+     */
+    public static String getDoctorTitle(List<OperationDoc> operationDocs, Date recordDate, String findTitle) {
+        String title = "";
+        SpecialStorageUtil specialStorageUtil = SpringContextUtil.getBean("specialStorageUtil");
+        Map<String, Object> surgeon = specialStorageUtil.getJsonStringValue(KernelConstants.HOSPITAL_DOCTOR_MAP);
+        if (surgeon == null) {
+            return title;
+        }
+        /* 用于存放手术结束时间距离查房时间最近的一次时间差 */
+        long timeDiff = 0L;
+        for (OperationDoc operationDoc : operationDocs) {
+            OperationRecordDoc operationRecordDoc = operationDoc.getOperationRecordDoc();
+            if (operationRecordDoc == null) {
+                continue;
+            }
+            Map<String, String> structureMap = operationRecordDoc.getStructureMap();
+            String chiefSurgeon = structureMap.get(findTitle);
+            String operatorEndDateStr = structureMap.get("手术结束时间");
+
+            if (StringUtil.isBlank(chiefSurgeon) || StringUtil.isBlank(operatorEndDateStr)) {
+                continue;
+            }
+            Map<String, String> doctor = (Map) surgeon.get(chiefSurgeon);
+            if (doctor != null) {
+                String professor = doctor.get("professor");
+                Date operatorEndDate = StringUtil.parseDateTime(operatorEndDateStr);
+                if (operatorEndDate != null) {
+                    long timeDifference = timeDifference(operatorEndDate, recordDate);
+                    if (timeDifference == 0) {
+                        continue;
+                    }
+                    if (timeDiff == 0 || timeDiff > timeDifference) {
+                        /* 取距离此次主刀医师查房最近的一次手术时间 */
+                        timeDiff = timeDifference;
+                        title = professor;
+                    }
+                }
+            }
+        }
+        return title;
+    }
+
+    public static long timeDifference(Date firstDate, Date secondDate) {
+        long timeDifference = 0L;
+        if (firstDate == null || secondDate == null) {
+            return timeDifference;
+        }
+        boolean flag = false;
+        if (firstDate.before(secondDate)) {
+            flag = true;
+        }
+        Calendar calendarS = Calendar.getInstance();
+        Calendar calendarE = Calendar.getInstance();
+        long timeS, timeE;
+        try {
+            calendarS.setTime(firstDate);
+            calendarE.setTime(secondDate);
+
+            timeS = calendarS.getTimeInMillis();
+            timeE = calendarE.getTimeInMillis();
+
+            if (flag) {
+                timeDifference = (timeE - timeS) / (1000 * 60);
+            } else {
+                timeDifference = (timeS - timeE) / (1000 * 60);
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return timeDifference;
+    }
+
+}

+ 259 - 0
trans/src/main/java/com/lantone/qc/trans/beilun/BeiLunTransferRecordDocTrans.java

@@ -0,0 +1,259 @@
+package com.lantone.qc.trans.beilun;
+
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import com.lantone.qc.pub.model.doc.transferrecord.TransferIntoDoc;
+import com.lantone.qc.pub.model.doc.transferrecord.TransferOutDoc;
+import com.lantone.qc.pub.model.doc.transferrecord.TransferRecordDoc;
+import com.lantone.qc.pub.model.vo.MedrecVo;
+import com.lantone.qc.pub.util.FastJsonUtils;
+import com.lantone.qc.pub.util.ListUtil;
+import com.lantone.qc.pub.util.StringUtil;
+import com.lantone.qc.trans.ModelDocTrans;
+import com.lantone.qc.trans.beilun.util.BeiLunHtmlAnalysis;
+import com.lantone.qc.trans.beilun.util.BeiLunTransferIntoHtmlAnalysis;
+import com.lantone.qc.trans.beilun.util.BeiLunTransferOutHtmlAnalysis;
+import com.lantone.qc.trans.comsis.OrdinaryAssistant;
+
+import java.util.ArrayList;
+import java.util.Comparator;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.TreeMap;
+
+/**
+ * @Description: 转科记录文档生成
+ * @author: rengb
+ * @time: 2020/3/20 16:10
+ */
+public class BeiLunTransferRecordDocTrans extends ModelDocTrans {
+
+    @Override
+    public TransferRecordDoc extract(MedrecVo medrecVo) {
+        TransferRecordDoc transferRecordDoc = new TransferRecordDoc();
+
+        Map<String, List<String>> contentMap = (Map) medrecVo.getContent().get("content");
+        if (contentMap == null) {
+            return transferRecordDoc;
+        }
+        List<Map<String, Object>> into = (List) contentMap.get("转入记录");
+        List<Map<String, Object>> out = (List) contentMap.get("转出记录");
+        List<Map<String, Object>> all = new ArrayList<>();
+
+        Map<String, TransferIntoDoc> transferIntoDocMap = new HashMap<>();
+        Map<String, TransferOutDoc> transferOutDocMap = new HashMap<>();
+        if (into != null) {
+            all.addAll(into);
+            transferIntoDocMap = getTransferIntoDocMap(into);
+        }
+        if (out != null) {
+            all.addAll(out);
+            transferOutDocMap = getTransferOutDocMap(out);
+        }
+        Map<String, TransferRecordDoc> transferAllDocMap = getTransferAllDocMap(all);
+
+        //转入
+        Map<Date, TransferIntoDoc> dateRecordIn = new TreeMap<>(new Comparator<Date>() {
+            @Override
+            public int compare(Date o1, Date o2) {
+                // 升序排列
+                return o1.compareTo(o2);
+            }
+        });
+        for (TransferIntoDoc transferIntoDoc : transferIntoDocMap.values()) {
+            Map<String, String> structureMap = transferIntoDoc.getStructureMap();
+            String inDateStr = structureMap.get("转科日期");
+            if (StringUtil.isBlank(inDateStr)) {
+                continue;
+            }
+            Date inDate = StringUtil.parseDateTime(inDateStr);
+            if (inDate == null) {
+                continue;
+            }
+            dateRecordIn.put(inDate, transferIntoDoc);
+        }
+        transferRecordDoc.setTransferIntoDocs(new ArrayList<>(dateRecordIn.values()));
+        //转出
+        Map<Date, TransferOutDoc> dateRecordOut = new TreeMap<>(new Comparator<Date>() {
+            @Override
+            public int compare(Date o1, Date o2) {
+                // 升序排列
+                return o1.compareTo(o2);
+            }
+        });
+        for (TransferOutDoc transferOutDoc : transferOutDocMap.values()) {
+            Map<String, String> structureMap = transferOutDoc.getStructureMap();
+            String outDateStr = structureMap.get("转科日期");
+            if (StringUtil.isBlank(outDateStr)) {
+                continue;
+            }
+            Date outDate = StringUtil.parseDateTime(outDateStr);
+            if (outDate == null) {
+                continue;
+            }
+            dateRecordOut.put(outDate, transferOutDoc);
+        }
+        transferRecordDoc.setTransferOutDocs(new ArrayList<>(dateRecordOut.values()));
+
+        //全部转科记录
+        Map<Date, TransferRecordDoc> dateRecordAll = new TreeMap<>(new Comparator<Date>() {
+            @Override
+            public int compare(Date o1, Date o2) {
+                // 升序排列
+                return o1.compareTo(o2);
+            }
+        });
+        for (TransferRecordDoc transferRecordAllDoc : transferAllDocMap.values()) {
+            Map<String, String> structureMap = transferRecordAllDoc.getStructureMap();
+            String transferDateStr = structureMap.get("转科日期");
+            if (StringUtil.isBlank(transferDateStr)) {
+                continue;
+            }
+            Date transferDate = StringUtil.parseDateTime(transferDateStr);
+            if (transferDate == null) {
+                continue;
+            }
+            dateRecordAll.put(transferDate, transferRecordAllDoc);
+        }
+        transferRecordDoc.setAllTransferDocs(new ArrayList<>(dateRecordAll.values()));
+
+        return transferRecordDoc;
+    }
+
+
+    /**************************************************转入*******************************************************/
+    private Map<String, TransferIntoDoc> getTransferIntoDocMap(List<Map<String, Object>> contentMaps) {
+        Map<String, TransferIntoDoc> retMap = Maps.newHashMap();
+        if (ListUtil.isEmpty(contentMaps)) {
+            return retMap;
+        }
+        int index = 1;
+        String transferRecordName = null;
+        for (Map<String, Object> contentMap : contentMaps) {
+            if (contentMap.get("xmlText") == null || StringUtil.isBlank(contentMap.get("xmlText").toString())) {
+                continue;
+            }
+            transferRecordName = index + "";
+            TransferIntoDoc transferIntoDoc = getTransferIntoDoc(contentMap);
+            transferIntoDoc.setTransferRecordName(transferRecordName);
+            retMap.put(transferRecordName, transferIntoDoc);
+            index++;
+        }
+        return retMap;
+    }
+
+    private TransferIntoDoc getTransferIntoDoc(Map<String, Object> contentMap) {
+        String content = contentMap.get("xmlText").toString();
+        Map<String, String> structureMap = null;
+        if (contentMap.get("isParsed") != null && "1".equals(contentMap.get("isParsed").toString())) {
+            structureMap = (Map) FastJsonUtils.getJsonToMap(content);
+        } else {
+            String recTitle = contentMap.get("recTitle").toString();
+            String recTypeId = contentMap.get("recTypeId").toString();
+            BeiLunHtmlAnalysis beiLunHtmlAnalysis = new BeiLunTransferIntoHtmlAnalysis();
+            Map<String, String> sourceMap = beiLunHtmlAnalysis.analysis(content, recTitle, recTypeId);
+            structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, keyContrasts);
+            structureMap.put("记录编号", contentMap.get("recId").toString());
+            structureMap.put("病历号", contentMap.get("behospitalCode").toString());
+        }
+
+        TransferIntoDoc transferIntoDoc = new TransferIntoDoc();
+        transferIntoDoc.setStructureMap(structureMap);
+        transferIntoDoc.setPageData((Map) structureMap);
+        return transferIntoDoc;
+    }
+
+    /**************************************************全部*******************************************************/
+    private Map<String, TransferRecordDoc> getTransferAllDocMap(List<Map<String, Object>> contentMaps) {
+        Map<String, TransferRecordDoc> retMap = Maps.newHashMap();
+        if (ListUtil.isEmpty(contentMaps)) {
+            return retMap;
+        }
+        int index = 1;
+        String transferRecordName = null;
+        for (Map<String, Object> contentMap : contentMaps) {
+            if (contentMap.get("xmlText") == null || StringUtil.isBlank(contentMap.get("xmlText").toString())) {
+                continue;
+            }
+            transferRecordName = index + "";
+            TransferRecordDoc transferRecordDoc = getTransferAllDoc(contentMap);
+            transferRecordDoc.setTransferRecordName(transferRecordName);
+            retMap.put(transferRecordName, transferRecordDoc);
+            index++;
+        }
+        return retMap;
+    }
+
+    private TransferRecordDoc getTransferAllDoc(Map<String, Object> contentMap) {
+        String content = contentMap.get("xmlText").toString();
+        Map<String, String> structureMap = null;
+        if (contentMap.get("isParsed") != null && "1".equals(contentMap.get("isParsed").toString())) {
+            structureMap = (Map) FastJsonUtils.getJsonToMap(content);
+        } else {
+            String recTitle = contentMap.get("recTitle").toString();
+            String recTypeId = contentMap.get("recTypeId").toString();
+            BeiLunHtmlAnalysis beiLunHtmlAnalysis = new BeiLunTransferOutHtmlAnalysis();
+            Map<String, String> sourceMap = beiLunHtmlAnalysis.analysis(content, recTitle, recTypeId);
+            structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, keyContrasts);
+            structureMap.put("记录编号", contentMap.get("recId").toString());
+            structureMap.put("病历号", contentMap.get("behospitalCode").toString());
+        }
+
+        TransferRecordDoc transferAllDoc = new TransferRecordDoc();
+        transferAllDoc.setStructureMap(structureMap);
+        transferAllDoc.setPageData((Map) structureMap);
+        return transferAllDoc;
+    }
+
+
+    /**************************************************转出*******************************************************/
+    private Map<String, TransferOutDoc> getTransferOutDocMap(List<Map<String, Object>> contentMaps) {
+        Map<String, TransferOutDoc> retMap = Maps.newHashMap();
+        if (ListUtil.isEmpty(contentMaps)) {
+            return retMap;
+        }
+        int index = 1;
+        String transferRecordName = null;
+        for (Map<String, Object> contentMap : contentMaps) {
+            if (contentMap.get("xmlText") == null || StringUtil.isBlank(contentMap.get("xmlText").toString())) {
+                continue;
+            }
+            transferRecordName = index + "";
+            TransferOutDoc transferOutDoc = getTransferOutDoc(contentMap);
+            transferOutDoc.setTransferRecordName(transferRecordName);
+            retMap.put(transferRecordName, transferOutDoc);
+            index++;
+        }
+        return retMap;
+    }
+
+    private TransferOutDoc getTransferOutDoc(Map<String, Object> contentMap) {
+        String content = contentMap.get("xmlText").toString();
+        Map<String, String> structureMap = null;
+        if (contentMap.get("isParsed") != null && "1".equals(contentMap.get("isParsed").toString())) {
+            structureMap = (Map) FastJsonUtils.getJsonToMap(content);
+        } else {
+            String recTitle = contentMap.get("recTitle").toString();
+            String recTypeId = contentMap.get("recTypeId").toString();
+            BeiLunHtmlAnalysis beiLunHtmlAnalysis = new BeiLunTransferOutHtmlAnalysis();
+            Map<String, String> sourceMap = beiLunHtmlAnalysis.analysis(content, recTitle, recTypeId);
+            structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, keyContrasts);
+            structureMap.put("记录编号", contentMap.get("recId").toString());
+            structureMap.put("病历号", contentMap.get("behospitalCode").toString());
+        }
+
+        TransferOutDoc transferOutDoc = new TransferOutDoc();
+        transferOutDoc.setStructureMap(structureMap);
+        transferOutDoc.setPageData((Map) structureMap);
+        return transferOutDoc;
+    }
+
+    private List<String> keyContrasts = Lists.newArrayList(
+            "医师签名=记录医生",
+            "病历标题=标题",
+            "病情记录=病历内容"
+    );
+
+}

+ 260 - 0
trans/src/main/java/com/lantone/qc/trans/beilun/BeilunDocTrans.java

@@ -0,0 +1,260 @@
+package com.lantone.qc.trans.beilun;
+
+import com.google.common.collect.Lists;
+import com.lantone.qc.pub.model.InputInfo;
+import com.lantone.qc.pub.model.vo.MedrecVo;
+import com.lantone.qc.pub.model.vo.QueryVo;
+import com.lantone.qc.pub.util.ListUtil;
+import com.lantone.qc.trans.DocTrans;
+import com.lantone.qc.trans.comsis.OrdinaryAssistant;
+
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * @ClassName : BeiLunDocTrans
+ * @Description :
+ * @Author : 楼辉荣
+ * @Date: 2020-03-03 19:47
+ */
+public class BeilunDocTrans extends DocTrans {
+
+    @Override
+    protected InputInfo extract(QueryVo queryVo) {
+        InputInfo inputInfo = new InputInfo();
+        for (MedrecVo i : queryVo.getMedrec()) {
+            if (i.getTitle().equals("会诊")) {
+                BeiLunConsultationDocTrans consultationDocTrans = new BeiLunConsultationDocTrans();
+                inputInfo.setConsultationDocs(consultationDocTrans.extract(i));
+            }
+            if (i.getTitle().equals("手术")) {
+                BeiLunOperationDocTrans operationDocTrans = new BeiLunOperationDocTrans();
+                inputInfo.setOperationDocs(operationDocTrans.extract(i));
+            }
+            if (i.getTitle().equals("转科")) {
+                BeiLunTransferRecordDocTrans transferRecordDocTrans = new BeiLunTransferRecordDocTrans();
+                inputInfo.setTransferRecordDocs(transferRecordDocTrans.extract(i));
+            }
+            if (i.getTitle().equals("入院记录")) {
+                BeiLunBeHospitalizedDocTrans beHospitalizedDocTrans = new BeiLunBeHospitalizedDocTrans();
+                inputInfo.setBeHospitalizedDoc(beHospitalizedDocTrans.extract(i));
+            }
+            if (i.getTitle().equals("输血/血制品病程记录")) {
+                BeiLunClinicalBloodDocTrans clinicalBloodDocTrans = new BeiLunClinicalBloodDocTrans();
+                inputInfo.setClinicalBloodDocs(clinicalBloodDocTrans.extract(i));
+            }
+            if (i.getTitle().equals("输血后效果评价")) {
+                BeiLunClinicBloodEffectDocTrans clinicBloodEffectDocTrans = new BeiLunClinicBloodEffectDocTrans();
+                inputInfo.setClinicBloodEffectDocs(clinicBloodEffectDocTrans.extract(i));
+            }
+            if (i.getTitle().equals("危急值记录")) {
+                BeiLunCrisisValueReportDocTrans crisisValueReportDocTrans = new BeiLunCrisisValueReportDocTrans();
+                inputInfo.setCrisisValueReportDocs(crisisValueReportDocTrans.extract(i));
+            }
+            if (i.getTitle().equals("危急值")) {
+                BeiLunCrisisInfoDocTrans crisisInfoDocTrans = new BeiLunCrisisInfoDocTrans();
+                inputInfo.setCrisisInfoDocs(crisisInfoDocTrans.extract(i));
+            }
+            if (i.getTitle().equals("病危通知书")) {
+                BeiLunCriticallyIllNoticeDocTrans criticallyIllNoticeDocTrans = new BeiLunCriticallyIllNoticeDocTrans();
+                inputInfo.setCriticallyIllNoticeDocs(criticallyIllNoticeDocTrans.extract(i));
+            }
+            if (i.getTitle().equals("死亡病例讨论记录")) {
+                BeiLunDeathCaseDiscussDocTrans deathCaseDiscussDocTrans = new BeiLunDeathCaseDiscussDocTrans();
+                inputInfo.setDeathCaseDiscussDoc(deathCaseDiscussDocTrans.extract(i));
+            }
+            if (i.getTitle().equals("死亡记录")) {
+                BeiLunDeathRecordDocTrans deathRecordDocTrans = new BeiLunDeathRecordDocTrans();
+                inputInfo.setDeathRecordDoc(deathRecordDocTrans.extract(i));
+            }
+            if (i.getTitle().equals("疑难病例讨论记录")) {
+                BeiLunDifficultCaseDiscussDocTrans difficultCaseDiscussDocTrans = new BeiLunDifficultCaseDiscussDocTrans();
+                inputInfo.setDifficultCaseDiscussDocs(difficultCaseDiscussDocTrans.extract(i));
+            }
+            if (i.getTitle().equals("医嘱信息")) {
+                BeiLunDoctorAdviceDocTrans doctorAdviceDocTrans = new BeiLunDoctorAdviceDocTrans();
+                inputInfo.setDoctorAdviceDocs(doctorAdviceDocTrans.extract(i));
+            }
+            if (i.getTitle().equals("值班交接制度")) {
+                BeiLunDutyShiftSystemDocTrans dutyShiftSystemDocTrans = new BeiLunDutyShiftSystemDocTrans();
+                inputInfo.setDutyShiftSystemDocs(dutyShiftSystemDocTrans.extract(i));
+            }
+            if (i.getTitle().equals("首次病程录")) {
+                BeiLunFirstCourseRecordDocTrans firstCourseRecordDocTrans = new BeiLunFirstCourseRecordDocTrans();
+                inputInfo.setFirstCourseRecordDoc(firstCourseRecordDocTrans.extract(i));
+            }
+            if (i.getTitle().equals("病案首页")) {
+                BeiLunFirstPageRecordDocTrans firstPageRecordDocTrans = new BeiLunFirstPageRecordDocTrans();
+                inputInfo.setFirstPageRecordDoc(firstPageRecordDocTrans.extract(i));
+            }
+            if (i.getTitle().equals("出院小结")) {
+                BeiLunLeaveHospitalDocTrans leaveHospitalDocTrans = new BeiLunLeaveHospitalDocTrans();
+                inputInfo.setLeaveHospitalDoc(leaveHospitalDocTrans.extract(i));
+            }
+            if (i.getTitle().equals("抢救记录")) {
+                BeiLunRescueDocTrans rescueDocTrans = new BeiLunRescueDocTrans();
+                inputInfo.setRescueDocs(rescueDocTrans.extract(i));
+            }
+            if (i.getTitle().equals("阶段小结")) {
+                BeiLunStagesSummaryDocTrans stagesSummaryDocTrans = new BeiLunStagesSummaryDocTrans();
+                inputInfo.setStagesSummaryDocs(stagesSummaryDocTrans.extract(i));
+            }
+            if (i.getTitle().equals("查房记录")) {
+                BeiLunThreeLevelWardDocTrans threeLevelWardDocTrans = new BeiLunThreeLevelWardDocTrans();
+                threeLevelWardDocTrans.setOperationDocs(inputInfo.getOperationDocs());
+                inputInfo.setThreeLevelWardDocs(threeLevelWardDocTrans.extract(i));
+            }
+            if (i.getTitle().equals("住院病历信息")) {
+                BeiLunMedicalRecordInfoDocTrans medicalRecordInfoDocTrans = new BeiLunMedicalRecordInfoDocTrans();
+                inputInfo.setMedicalRecordInfoDoc(medicalRecordInfoDocTrans.extract(i));
+            }
+            if (i.getTitle().equals("化验")) {
+                BeiLunLisDocTrans lisDocTrans = new BeiLunLisDocTrans();
+                inputInfo.setLisDocs(lisDocTrans.extract(i));
+            }
+            if (i.getTitle().equals("门诊")) {
+                BeiLunOutDepDocTrans outDepDocTrans = new BeiLunOutDepDocTrans();
+                inputInfo.setBeHospitalizedDoc(outDepDocTrans.extract(i));
+            }
+        }
+        pageDataHandle(inputInfo);
+        return inputInfo;
+    }
+
+    private void pageDataHandle(InputInfo inputInfo) {
+        if (inputInfo.getBeHospitalizedDoc() != null) {
+            inputInfo.getPageData().put("入院记录", Lists.newArrayList(inputInfo.getBeHospitalizedDoc().getPageData()));
+        }
+        if (inputInfo.getDeathCaseDiscussDoc() != null) {
+            inputInfo.getPageData().put("死亡病例讨论记录", Lists.newArrayList(inputInfo.getDeathCaseDiscussDoc().getPageData()));
+        }
+        if (inputInfo.getDeathRecordDoc() != null) {
+            inputInfo.getPageData().put("死亡记录", Lists.newArrayList(inputInfo.getDeathRecordDoc().getPageData()));
+        }
+        if (inputInfo.getFirstCourseRecordDoc() != null) {
+            inputInfo.getPageData().put("首次病程录", Lists.newArrayList(inputInfo.getFirstCourseRecordDoc().getPageData()));
+        }
+        if (inputInfo.getLeaveHospitalDoc() != null) {
+            inputInfo.getPageData().put("出院小结", Lists.newArrayList(inputInfo.getLeaveHospitalDoc().getPageData()));
+        }
+        if (inputInfo.getFirstPageRecordDoc() != null) {
+            inputInfo.getPageData().put("病案首页", Lists.newArrayList(inputInfo.getFirstPageRecordDoc().getPageData()));
+        }
+
+        if (ListUtil.isNotEmpty(inputInfo.getClinicalBloodDocs())) {
+            inputInfo.getPageData().put("输血/血制品病程记录", inputInfo.getClinicalBloodDocs().stream().map(i -> i.getPageData()).collect(Collectors.toList()));
+            inputInfo.setClinicalBloodDocs(inputInfo.getClinicalBloodDocs().stream().filter(i -> i.getText().indexOf("输白蛋白") == -1).collect(Collectors.toList()));
+        }
+        if (ListUtil.isNotEmpty(inputInfo.getClinicBloodEffectDocs())) {
+            inputInfo.getPageData().put(
+                    "输血后效果评价",
+                    inputInfo.getClinicBloodEffectDocs()
+                            .stream()
+                            .map(i -> i.getPageData())
+                            .sorted((map1, map2) -> OrdinaryAssistant.pageDataTimeSort(map1, map2, "记录时间", "yyyy-MM-dd HH:mm"))
+                            .collect(Collectors.toList()));
+        }
+        if (ListUtil.isNotEmpty(inputInfo.getCrisisValueReportDocs())) {
+            inputInfo.getPageData().put("危急值记录", inputInfo.getCrisisValueReportDocs().stream().map(i -> i.getPageData()).collect(Collectors.toList()));
+        }
+        if (ListUtil.isNotEmpty(inputInfo.getCriticallyIllNoticeDocs())) {
+            inputInfo.getPageData().put("病危通知书", inputInfo.getCriticallyIllNoticeDocs().stream().map(i -> i.getPageData()).collect(Collectors.toList()));
+        }
+        if (ListUtil.isNotEmpty(inputInfo.getDifficultCaseDiscussDocs())) {
+            inputInfo.getPageData().put("疑难病例讨论记录", inputInfo.getDifficultCaseDiscussDocs().stream().map(i -> i.getPageData()).collect(Collectors.toList()));
+        }
+        if (ListUtil.isNotEmpty(inputInfo.getDutyShiftSystemDocs())) {
+            inputInfo.getPageData().put("值班交接制度", inputInfo.getDutyShiftSystemDocs().stream().map(i -> i.getPageData()).collect(Collectors.toList()));
+        }
+        if (ListUtil.isNotEmpty(inputInfo.getRescueDocs())) {
+            inputInfo.getPageData().put("抢救记录", inputInfo.getRescueDocs().stream().map(i -> i.getPageData()).collect(Collectors.toList()));
+        }
+        if (ListUtil.isNotEmpty(inputInfo.getStagesSummaryDocs())) {
+            inputInfo.getPageData().put("阶段小结", inputInfo.getStagesSummaryDocs().stream().map(i -> i.getPageData()).collect(Collectors.toList()));
+        }
+        if (ListUtil.isNotEmpty(inputInfo.getThreeLevelWardDocs())) {
+            inputInfo.getPageData().put("查房记录", inputInfo.getThreeLevelWardDocs().get(0).getAllDoctorWradDocs().stream().map(i -> i.getPageData()).collect(Collectors.toList()));
+        }
+        if (ListUtil.isNotEmpty(inputInfo.getConsultationDocs())) {
+            List<Map<String, Object>> crPd = inputInfo.getConsultationDocs()
+                    .stream()
+                    .filter(consultationDoc -> consultationDoc != null && consultationDoc.getConsultationRecordDoc() != null)
+                    .map(consultationDoc -> consultationDoc.getConsultationRecordDoc().getPageData())
+                    .collect(Collectors.toList());
+            if (ListUtil.isNotEmpty(crPd)) {
+                inputInfo.getPageData().put("会诊记录", crPd);
+            }
+
+            List<Map<String, Object>> caPd = inputInfo.getConsultationDocs()
+                    .stream()
+                    .filter(consultationDoc -> consultationDoc != null && consultationDoc.getConsultationApplicationDoc() != null)
+                    .map(consultationDoc -> consultationDoc.getConsultationApplicationDoc().getPageData())
+                    .collect(Collectors.toList());
+            if (ListUtil.isNotEmpty(caPd)) {
+                inputInfo.getPageData().put("会诊申请单", caPd);
+            }
+
+            List<Map<String, Object>> ctPd = inputInfo.getConsultationDocs()
+                    .stream()
+                    .filter(consultationDoc -> consultationDoc != null && consultationDoc.getConsultationResultsDoc() != null)
+                    .map(consultationDoc -> consultationDoc.getConsultationResultsDoc().getPageData())
+                    .collect(Collectors.toList());
+            if (ListUtil.isNotEmpty(ctPd)) {
+                inputInfo.getPageData().put("会诊结果单", ctPd);
+            }
+        }
+        if (ListUtil.isNotEmpty(inputInfo.getOperationDocs())) {
+            List<Map<String, Object>> odPageDataList = inputInfo.getOperationDocs()
+                    .stream()
+                    .filter(operationDoc -> operationDoc != null && operationDoc.getOperationDiscussionDoc() != null)
+                    .map(operationDoc -> operationDoc.getOperationDiscussionDoc().getPageData())
+                    .collect(Collectors.toList());
+            if (ListUtil.isNotEmpty(odPageDataList)) {
+                inputInfo.getPageData().put("术后首次病程及谈话记录", odPageDataList);
+            }
+
+            List<Map<String, Object>> orPageDataList = inputInfo.getOperationDocs()
+                    .stream()
+                    .filter(operationDoc -> operationDoc != null && operationDoc.getOperationRecordDoc() != null)
+                    .map(operationDoc -> operationDoc.getOperationRecordDoc().getPageData())
+                    .collect(Collectors.toList());
+            if (ListUtil.isNotEmpty(orPageDataList)) {
+                inputInfo.getPageData().put("手术记录", orPageDataList);
+            }
+
+            List<Map<String, Object>> pdPageDataList = inputInfo.getOperationDocs()
+                    .stream()
+                    .filter(operationDoc -> operationDoc != null && operationDoc.getPreoperativeDiscussionDoc() != null)
+                    .map(operationDoc -> operationDoc.getPreoperativeDiscussionDoc().getPageData())
+                    .collect(Collectors.toList());
+            if (ListUtil.isNotEmpty(pdPageDataList)) {
+                inputInfo.getPageData().put("术前讨论、术前小结", pdPageDataList);
+            }
+        }
+        if (inputInfo.getTransferRecordDocs() != null) {
+            if (ListUtil.isNotEmpty(inputInfo.getTransferRecordDocs().getTransferIntoDocs())) {
+                inputInfo.getPageData().put(
+                        "转入记录",
+                        inputInfo.getTransferRecordDocs().getTransferIntoDocs()
+                                .stream()
+                                .filter(i -> i != null)
+                                .map(i -> i.getPageData())
+                                .collect(Collectors.toList())
+                );
+            }
+
+            if (ListUtil.isNotEmpty(inputInfo.getTransferRecordDocs().getTransferOutDocs())) {
+                inputInfo.getPageData().put(
+                        "转出记录",
+                        inputInfo.getTransferRecordDocs().getTransferOutDocs()
+                                .stream()
+                                .filter(i -> i != null)
+                                .map(i -> i.getPageData())
+                                .collect(Collectors.toList())
+                );
+            }
+        }
+    }
+
+}

+ 158 - 0
trans/src/main/java/com/lantone/qc/trans/beilun/util/BeiLunBeHospitalizedHtmlAnalysis.java

@@ -0,0 +1,158 @@
+package com.lantone.qc.trans.beilun.util;
+
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import com.lantone.qc.pub.util.StringUtil;
+import org.jsoup.Jsoup;
+import org.jsoup.nodes.Document;
+import org.jsoup.nodes.Element;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Description:
+ * @author: rengb
+ * @time: 2020/9/15 16:28
+ */
+public class BeiLunBeHospitalizedHtmlAnalysis implements BeiLunHtmlAnalysis {
+
+    private String modeId = "1";
+
+    @Override
+    public Map<String, String> analysis(String... args) {
+        Map<String, String> map = Maps.newLinkedHashMap();
+        String html = args[0];
+        String recTitle = args[1];
+        String recTypeId = args[2];
+        Document doc = Jsoup.parse(html);
+
+        if (recTitle.contains("24")) {
+            analysis24h(doc, map);
+        } else if (recTitle.contains("日间病历")) {
+            analysisDay(doc, map);
+        } else {
+            analysisGeneral(doc, recTitle, map);
+        }
+        BeiLunHtmlAnalysisUtil.insertModuleId(modeId, recTypeId, map);
+        return map;
+    }
+
+    //一般模板
+    private void analysisGeneral(Document doc, String recTitle, Map<String, String> map) {
+        //个人基础信息table解析
+        BeiLunHtmlAnalysisUtil.tableStyle1InsertMap(doc.getElementById("table1"), map);
+        //主诉、现病史等table解析
+        BeiLunHtmlAnalysisUtil.tableStyle2InsertMap(doc.getElementById("table6"), map);
+        //体 格 检 查 表(一) table解析
+        Element tgjcTableElement = doc.getElementById("table3");
+        BeiLunHtmlAnalysisUtil.tableStyle2InsertMap(tgjcTableElement, map);
+
+        //诊断 table解析
+        String disTableElementId = "table7_2_0_0_1_1_2_0_1_4_5_6_7_0_1";
+        if (recTitle.equals("妇科大病历")) {
+            disTableElementId = "table7_2_0_0_1_1_2_0_1_4_5_6_7_0_1_37";
+        }
+        Element disTableElement = doc.getElementById(disTableElementId);
+        BeiLunHtmlAnalysisUtil.tableStyle1InsertMap(disTableElement, map);
+        disHandleExt(map);
+
+        //医生签名、医生签名时间
+        Element docSignElement = null, docSignTimeElement = null;
+        if (disTableElement != null) {
+            for (Element disTableElementNt : disTableElement.nextElementSiblings()) {
+                docSignElement = disTableElementNt.selectFirst("image,img");
+                if (docSignElement != null) {
+                    docSignTimeElement = disTableElementNt.nextElementSibling();
+                    break;
+                }
+            }
+        }
+        if (docSignElement != null) {
+//            map.put("医生签名", docSignElement.outerHtml());
+            map.put("医生签名", "暂无");
+        }
+        if (docSignTimeElement != null) {
+            map.put("医生签名时间", BeiLunHtmlAnalysisUtil.elementLayer1ToStr(docSignTimeElement, false).trim());
+        }
+
+        //专科检查、辅助检查
+        Element yuElement = new Element("div");
+        if (tgjcTableElement != null) {
+            for (Element tgjcTableElementNt : tgjcTableElement.nextElementSiblings()) {
+                if (tgjcTableElementNt.id().contains("table7_2_0_0_1_1_2_0_1_4_5_6_7_0_1")) {
+                    break;
+                }
+                if (tgjcTableElementNt.tagName().equals("table")) {
+                    continue;
+                }
+                tgjcTableElementNt.appendTo(yuElement);
+            }
+        }
+        String yuText = BeiLunHtmlAnalysisUtil.blockDivToStr(yuElement, true)
+                .replace("体  格  检  查  表 (二)", "")
+                .replace("(补充及专科情况)", "")
+                .replace("辅  助  检  查", "辅助检查:")
+                .replace("诊断:", "")
+                .replace("补充专科情况", "补充专科情况:")
+                .trim();
+        CommonAnalysisUtil.cutByTitles(yuText, Lists.newArrayList("专科检查", "辅助检查"), 0, map);
+
+    }
+
+    //24小时出入院记录、24小时出入院记录(全院)、24小时入出院记录(全院通用)、24小时内入院死亡记录(全院通用)
+    private void analysis24h(Document doc, Map<String, String> map) {
+        String text = BeiLunHtmlAnalysisUtil.blockDivToStr(doc.selectFirst("body").child(0), false);
+        text = text.substring(text.lastIndexOf("24小时入出院记录姓    名")).replaceFirst("第1页", "");
+        List<String> titles = Lists.newArrayList("姓    名", "家庭住址", "性    别", "工作单位", "年    龄", "身份证号码", "民    族",
+                "联系人(关系)", "职    业", "入院时间", "婚    姻", "死亡时间", "记录时间", "出 生 地", "病史陈述者", "主    诉", "入院情况", "心理评估",
+                "疼痛评估", "营养评估", "功能评估", "入院诊断", "诊疗经过", "死亡原因", "死亡诊断", "出院情况", "出院诊断", "出院计划", "出院医嘱",
+                "出院去向", "医师签名", "书写时间");
+
+        CommonAnalysisUtil.cutByTitles(text, titles, 0, map);
+        CommonAnalysisUtil.processType(map, "出院去向");
+    }
+
+    //原-日间病历入出院记录、日间病历-性早熟
+    private void analysisDay(Document doc, Map<String, String> map) {
+        //个人基础信息table解析
+        BeiLunHtmlAnalysisUtil.tableStyle1InsertMap(doc.getElementById("table1"), map);
+        //主诉、入院情况等table解析
+        BeiLunHtmlAnalysisUtil.tableStyle2InsertMap(doc.getElementById("table6"), map);
+        //医生签名、医生签名时间
+        Element docSignElement = null, docSignTimeElement = null;
+        for (Element table6ElementNt : doc.getElementById("table6").parent().nextElementSiblings()) {
+            docSignElement = table6ElementNt.selectFirst("image,img");
+            if (docSignElement != null) {
+                docSignTimeElement = table6ElementNt.nextElementSibling();
+                break;
+            }
+        }
+        if (docSignElement != null) {
+//            map.put("医生签名", docSignElement.outerHtml());
+            map.put("医生签名", "暂无");
+        }
+        if (docSignTimeElement != null) {
+            map.put("医生签名时间", BeiLunHtmlAnalysisUtil.elementLayer1ToStr(docSignTimeElement, false).trim());
+        }
+    }
+
+    private void disHandleExt(Map<String, String> map) {
+        String[] keys = { "补充诊断", "修正诊断" };
+        String value = null;
+        int index = 0;
+        for (String key : keys) {
+            value = map.get(key);
+            if (StringUtil.isNotBlank(value)) {
+                for (String key_ : keys) {
+                    index = value.indexOf(key_);
+                    if (index > 0) {
+                        map.put(key_, value.substring(index + 5));
+                        map.put(key, value.substring(0, index));
+                    }
+                }
+            }
+        }
+    }
+
+}

+ 61 - 0
trans/src/main/java/com/lantone/qc/trans/beilun/util/BeiLunClinicBloodEffectHtmlAnalysis.java

@@ -0,0 +1,61 @@
+package com.lantone.qc.trans.beilun.util;
+
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import org.jsoup.Jsoup;
+import org.jsoup.nodes.Element;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Description:
+ * @author: rengb
+ * @time: 2020/9/28 19:41
+ */
+public class BeiLunClinicBloodEffectHtmlAnalysis implements BeiLunHtmlAnalysis {
+    List<String> titles = Lists.newArrayList("输血前症状", "输血前实验室指标", "输血目的", "输注成分", "输血时间",
+            "开始时间", "结束时间", "输血过程");
+
+    private String modeId = "32";
+
+    @Override
+    public Map<String, String> analysis(String... args) {
+        Map<String, String> map = Maps.newLinkedHashMap();
+        String html = args[0];
+        String recTitle = args[1];
+        String recTypeId = args[2];
+        Element bigDivElement = Jsoup.parse(html).selectFirst("body").child(0);
+        analysisGeneral(bigDivElement, map);
+        if (map.containsKey("病情记录")) {
+            String content = map.get("病情记录");
+            CommonAnalysisUtil.cutByTitles(content, titles, 0, map);
+        }
+        /*titles.remove(5);
+        titles.forEach(i -> {
+                    if (map.get(i).length() > 2) {
+                        map.put(i, map.get(i).substring(0, map.get(i).length() - 2));
+                    }
+                }
+        );
+
+         */
+        BeiLunHtmlAnalysisUtil.insertModuleId(modeId, recTypeId, map);
+        return map;
+    }
+
+    private void analysisGeneral(Element bigDivElement, Map<String, String> map) {
+        if (bigDivElement.selectFirst("hr") != null) {
+            bigDivElement.selectFirst("hr").previousElementSiblings().remove();
+        }
+        String text = BeiLunHtmlAnalysisUtil.blockDivToStr(bigDivElement, true);
+        CommonAnalysisUtil.extractWardInfo(text, map);
+        String bqjlText = "病情记录" + map.get("病情记录");
+        List<String> titles = Lists.newArrayList(
+                "病情记录"
+        );
+        titles = CommonAnalysisUtil.sortTitlesNoColon(titles, bqjlText);
+        CommonAnalysisUtil.cutByTitlesNoColon(bqjlText, titles, 0, map);
+    }
+
+}

+ 59 - 0
trans/src/main/java/com/lantone/qc/trans/beilun/util/BeiLunClinicalBloodHtmlAnalysis.java

@@ -0,0 +1,59 @@
+package com.lantone.qc.trans.beilun.util;
+
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import org.jsoup.Jsoup;
+import org.jsoup.nodes.Element;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Description:
+ * @author: rengb
+ * @time: 2020/9/28 17:56
+ */
+public class BeiLunClinicalBloodHtmlAnalysis implements BeiLunHtmlAnalysis {
+    List<String> titles = Lists.newArrayList("输血前症状", "输血前实验室指标", "输血目的", "输注成分", "输血时间",
+            "开始时间", "结束时间", "输血过程");
+
+    private String modeId = "10";
+
+    @Override
+    public Map<String, String> analysis(String... args) {
+        Map<String, String> map = Maps.newLinkedHashMap();
+        String html = args[0];
+        String recTitle = args[1];
+        String recTypeId = args[2];
+        Element bigDivElement = Jsoup.parse(html).selectFirst("body").child(0);
+        analysisGeneral(bigDivElement, map);
+        if (map.containsKey("病情记录")) {
+            String content = map.get("病情记录");
+            CommonAnalysisUtil.cutByTitles(content, titles, 0, map);
+        }
+        titles.remove(5);
+        titles.forEach(i -> {
+                    if (map.get(i).length() > 2) {
+                        map.put(i, map.get(i).substring(0, map.get(i).length() - 2));
+                    }
+                }
+        );
+        BeiLunHtmlAnalysisUtil.insertModuleId(modeId, recTypeId, map);
+        return map;
+    }
+
+    private void analysisGeneral(Element bigDivElement, Map<String, String> map) {
+        if (bigDivElement.selectFirst("hr") != null) {
+            bigDivElement.selectFirst("hr").previousElementSiblings().remove();
+        }
+        String text = BeiLunHtmlAnalysisUtil.blockDivToStr(bigDivElement, true);
+        CommonAnalysisUtil.extractWardInfo(text, map);
+        String bqjlText = "病情记录" + map.get("病情记录");
+        List<String> titles = Lists.newArrayList(
+                "病情记录"
+        );
+        titles = CommonAnalysisUtil.sortTitlesNoColon(titles, bqjlText);
+        CommonAnalysisUtil.cutByTitlesNoColon(bqjlText, titles, 0, map);
+    }
+
+}

+ 100 - 0
trans/src/main/java/com/lantone/qc/trans/beilun/util/BeiLunConsultationHtmlAnalysis.java

@@ -0,0 +1,100 @@
+package com.lantone.qc.trans.beilun.util;
+
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import com.lantone.qc.pub.util.StringUtil;
+import org.jsoup.Jsoup;
+import org.jsoup.nodes.Document;
+
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * @Description:
+ * @author: rengb
+ * @time: 2020/9/12 13:53
+ */
+public class BeiLunConsultationHtmlAnalysis implements BeiLunHtmlAnalysis {
+
+    private String modeId = "31";
+
+    @Override
+    public Map<String, String> analysis(String... args) {
+        List<String> titles = Lists.newArrayList("姓名", "性别", "出生日期", "科别", "病区", "床号", "住院号",
+                "会诊类型", "被邀医院", "被邀科室", "申请时间", "患者病情及诊疗经过、申请会诊的理由及目的", "申请会诊科别",
+                "被邀会诊科别", "申请会诊医师", "会诊意见", "会诊时间", "科主任", "会诊到达时间", "查体", "会诊建议",
+                "会诊诊断", "会诊科室", "会诊医师", "外院会诊医师所在医疗机构名称", "会诊医师所在医疗机构名称");
+        String html = args[0];
+        String recTitle = args[1];
+        String recTypeId = args[2];
+
+        Map<String, String> structureMap = Maps.newLinkedHashMap();
+        String htmlContent = null;
+        switch (recTypeId) {
+            case "377":
+                htmlContent = CommonAnalysisUtil.html2String(html);
+                if (StringUtil.isNotBlank(htmlContent)) {
+                    htmlContent = htmlContent.replaceAll("[   ]", " ");
+                    CommonAnalysisUtil.html2StructureMap(titles, htmlContent, structureMap);
+                }
+                structureMap.put("rec_title=", recTitle);
+                break;
+            case "7883":
+                htmlContent = CommonAnalysisUtil.html2String(html);
+                if (StringUtil.isNotBlank(htmlContent)) {
+                    htmlContent = htmlContent.replaceAll("[   ]", " ");
+                    CommonAnalysisUtil.html2StructureMap(titles, htmlContent, structureMap);
+                }
+                if (StringUtil.isNotBlank(structureMap.get("会诊时间"))) {
+                    String[] strArr = structureMap.get("会诊时间").split(" ");
+                    structureMap.put("会诊意见", strArr[strArr.length - 1]);
+                    structureMap.put("会诊时间", strArr[0]);
+                }
+                structureMap.put("rec_title=", recTitle);
+                break;
+            case "8084":
+                titles = Lists.newArrayList("姓名", "性别", "出生日期", "联系电话",
+                        "申请科室", "入院/首诊时间", "住院号", "病情概述(含主诉、病史、诊断、诊治过程等)", "拟申请MDT时间、地点",
+                        "拟请MDT参加科室", "MDT目的", "申请人签名", "申请递交时间", "科主任签字", "专家诊治建议", "专家科室", "签名",
+                        "填写时间", "主持科室小结(MDT的最终诊治决议)", "科主任(主持人)签名", "记录人(主管医师)签字", "日期");
+                htmlContent = CommonAnalysisUtil.html2String(html);
+                if (StringUtil.isNotBlank(htmlContent)) {
+                    htmlContent = htmlContent.replaceAll("[   ]", " ").replace("住院/门诊号", "");
+                    StringBuffer sbf = new StringBuffer();
+                    List<String> distinctText = Lists.newArrayList(htmlContent.split(" ")).stream().distinct().collect(Collectors.toList());
+                    for (String text : distinctText) {
+                        sbf.append(text).append(" ");
+                    }
+                    CommonAnalysisUtil.html2StructureMapNoColon(titles, sbf.toString(), structureMap);
+                }
+                if (StringUtil.isNotBlank(structureMap.get("主持科室小结(MDT的最终诊治决议)"))) {
+                    String[] valueArray = structureMap.get("主持科室小结(MDT的最终诊治决议)").split(" ");
+                    structureMap.put("主持科室小结(MDT的最终诊治决议)", valueArray[1]);
+                    String v = valueArray[2];
+                    String[] vArr = v.split(":");
+                    if (vArr.length > 1) {
+                        structureMap.put(vArr[0], vArr[1]);
+                    }
+                }
+
+                structureMap.put("rec_title=", recTitle);
+                break;
+            default:
+                Document doc = Jsoup.parse(html);
+                htmlContent = BeiLunHtmlAnalysisUtil.blockDivToStr(doc.selectFirst("body").child(0), true);
+                //htmlContent = CommonAnalysisUtil.html2String(html);
+                if (StringUtil.isNotBlank(htmlContent)) {
+                    htmlContent = htmlContent.replaceAll("[   ]", " ");
+                    CommonAnalysisUtil.html2StructureMap(titles, htmlContent, structureMap);
+                }
+                //structureMap.put("rec_title=", "371");
+                break;
+        }
+        CommonAnalysisUtil.extractDateByTitle(structureMap, "会诊到达时间");
+        CommonAnalysisUtil.processType(structureMap, "会诊类型");
+        BeiLunHtmlAnalysisUtil.insertModuleId(modeId, recTypeId, structureMap);
+        return structureMap;
+    }
+
+}

+ 46 - 0
trans/src/main/java/com/lantone/qc/trans/beilun/util/BeiLunCrisisValueReportHtmlAnalysis.java

@@ -0,0 +1,46 @@
+package com.lantone.qc.trans.beilun.util;
+
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import org.jsoup.Jsoup;
+import org.jsoup.nodes.Element;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Description:
+ * @author: rengb
+ * @time: 2020/9/28 19:48
+ */
+public class BeiLunCrisisValueReportHtmlAnalysis implements BeiLunHtmlAnalysis {
+
+    private String modeId = "23";
+
+    @Override
+    public Map<String, String> analysis(String... args) {
+        Map<String, String> map = Maps.newLinkedHashMap();
+        String html = args[0];
+        String recTitle = args[1];
+        String recTypeId = args[2];
+        Element bigDivElement = Jsoup.parse(html).selectFirst("body").child(0);
+        analysisGeneral(bigDivElement, map);
+        BeiLunHtmlAnalysisUtil.insertModuleId(modeId, recTypeId, map);
+        return map;
+    }
+
+    private void analysisGeneral(Element bigDivElement, Map<String, String> map) {
+        if (bigDivElement.selectFirst("hr") != null) {
+            bigDivElement.selectFirst("hr").previousElementSiblings().remove();
+        }
+        String text = BeiLunHtmlAnalysisUtil.blockDivToStr(bigDivElement, true);
+        CommonAnalysisUtil.extractWardInfo(text, map);
+        String bqjlText = "病情记录" + map.get("病情记录");
+        List<String> titles = Lists.newArrayList(
+                "病情记录"
+        );
+        titles = CommonAnalysisUtil.sortTitlesNoColon(titles, bqjlText);
+        CommonAnalysisUtil.cutByTitlesNoColon(bqjlText, titles, 0, map);
+    }
+
+}

+ 40 - 0
trans/src/main/java/com/lantone/qc/trans/beilun/util/BeiLunCriticallyIllNoticeHtmlAnalysis.java

@@ -0,0 +1,40 @@
+package com.lantone.qc.trans.beilun.util;
+
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import com.lantone.qc.pub.util.StringUtil;
+import org.jsoup.Jsoup;
+import org.jsoup.nodes.Document;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Description: 病危(重)通知单html解析
+ * @author: HUJING
+ * @time: 2020/9/14 15:28
+ */
+public class BeiLunCriticallyIllNoticeHtmlAnalysis implements BeiLunHtmlAnalysis {
+
+    private String modeId = "25";
+
+    @Override
+    public Map<String, String> analysis(String... args) {
+        List<String> titles = Lists.newArrayList("临床诊断", "主要症状", "体格检查", "辅助检查", "告知医师签名",
+                "告知时间", "患方意见", "患方签名", "手印说明", "与患者关系", "签字时间");
+        String html = args[0];
+        String recTitle = args[1];
+        String recTypeId = args[2];
+        Map<String, String> structureMap = Maps.newLinkedHashMap();
+        Document doc = Jsoup.parse(html);
+        String htmlContent = BeiLunHtmlAnalysisUtil.blockDivToStr(doc.selectFirst("body").child(0), true);
+        if (StringUtil.isNotBlank(htmlContent)) {
+            htmlContent = htmlContent.replaceAll("[   ]", " ");
+            CommonAnalysisUtil.html2StructureMap(titles, htmlContent, structureMap);
+        }
+        CommonAnalysisUtil.extractDateByTitle(structureMap, "告知时间");
+        BeiLunHtmlAnalysisUtil.insertModuleId(modeId, recTypeId, structureMap);
+        return structureMap;
+    }
+
+}

+ 43 - 0
trans/src/main/java/com/lantone/qc/trans/beilun/util/BeiLunDeathCaseDiscussHtmlAnalysis.java

@@ -0,0 +1,43 @@
+package com.lantone.qc.trans.beilun.util;
+
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import org.jsoup.Jsoup;
+import org.jsoup.nodes.Document;
+import org.jsoup.nodes.Element;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Description:
+ * @author: rengb
+ * @time: 2020/9/17 14:27
+ */
+public class BeiLunDeathCaseDiscussHtmlAnalysis implements BeiLunHtmlAnalysis {
+
+    private String modeId = "3";
+
+    @Override
+    public Map<String, String> analysis(String... args) {
+        Map<String, String> map = Maps.newLinkedHashMap();
+        String html = args[0];
+        String recTypeId = args[2];
+        Document doc = Jsoup.parse(html);
+        Element bigDivElement = doc.selectFirst("body").child(0);
+
+        bigDivElement.child(0).lastElementSibling().remove();
+        map.put("医生签名时间", BeiLunHtmlAnalysisUtil.elementLayer1ToStr(bigDivElement.child(0).lastElementSibling(), false));
+        bigDivElement.child(0).lastElementSibling().remove();
+
+        String text = BeiLunHtmlAnalysisUtil.blockDivToStr(bigDivElement, false);
+        List<String> titles = Lists.newArrayList("姓名", "性别", "出生日期", "科别", "病区", "床号", "住院号",
+                "入院诊断", "死亡诊断", "尸检结果", "讨论时间", "讨论地点",
+                "主 持 人", "参加人员", "具体讨论意见", "主持人小结意见", "主持人(签名)", "记录者签名");
+        CommonAnalysisUtil.cutByTitlesNoColon(text, titles, 0, map);
+        BeiLunHtmlAnalysisUtil.mapValueRemoveStartColon(map);
+        BeiLunHtmlAnalysisUtil.insertModuleId(modeId, recTypeId, map);
+        return map;
+    }
+
+}

+ 40 - 0
trans/src/main/java/com/lantone/qc/trans/beilun/util/BeiLunDeathRecordHtmlAnalysis.java

@@ -0,0 +1,40 @@
+package com.lantone.qc.trans.beilun.util;
+
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import com.lantone.qc.pub.util.StringUtil;
+import org.jsoup.Jsoup;
+import org.jsoup.nodes.Document;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Description: 死亡记录html解析
+ * @author: HUJING
+ * @time: 2020/9/14 15:41
+ */
+public class BeiLunDeathRecordHtmlAnalysis implements BeiLunHtmlAnalysis {
+
+    private String modeId = "24";
+
+    @Override
+    public Map<String, String> analysis(String... args) {
+        List<String> titles = Lists.newArrayList("入院日期", "死亡时间", "入院情况", "入院诊断",
+                "诊疗经过(重点记录病情演变、抢救经过)", "死亡原因", "死亡诊断", "医师签字", "记录时间");
+        String html = args[0];
+        String recTitle = args[1];
+        String recTypeId = args[2];
+        Map<String, String> structureMap = Maps.newLinkedHashMap();
+        Document doc = Jsoup.parse(html);
+        String htmlContent = BeiLunHtmlAnalysisUtil.blockDivToStr(doc.selectFirst("body").child(0), false);
+        if (StringUtil.isNotBlank(htmlContent)) {
+            htmlContent = htmlContent.replaceAll("[   ]", " ");
+            CommonAnalysisUtil.html2StructureMap(titles, htmlContent, structureMap);
+        }
+        CommonAnalysisUtil.extractDateByTitle(structureMap, "记录时间");
+        BeiLunHtmlAnalysisUtil.insertModuleId(modeId, recTypeId, structureMap);
+        return structureMap;
+    }
+
+}

+ 61 - 0
trans/src/main/java/com/lantone/qc/trans/beilun/util/BeiLunDifficultCaseDiscussHtmlAnalysis.java

@@ -0,0 +1,61 @@
+package com.lantone.qc.trans.beilun.util;
+
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import com.lantone.qc.pub.util.StringUtil;
+import org.jsoup.Jsoup;
+import org.jsoup.nodes.Document;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Description: 疑难、危重病例讨论记录html解析
+ * @author: HUJING
+ * @time: 2020/9/14 15:41
+ */
+public class BeiLunDifficultCaseDiscussHtmlAnalysis implements BeiLunHtmlAnalysis {
+
+    private String modeId = "19";
+
+    @Override
+    public Map<String, String> analysis(String... args) {
+        List<String> titles = Lists.newArrayList("姓名", "性别", "出生日期", "科别", "病区", "床号",
+                "住院号", "年龄", "床号", "住院号", "住址(单位)", "讨论日期", "讨论地点", "主持人", "参加人员", "具体讨论意见",
+                "主持人小结意见", "主持人签名", "记录医生签名");
+        String html = args[0];
+        String recTitle = args[1];
+        String recTypeId = args[2];
+        Map<String, String> structureMap = Maps.newLinkedHashMap();
+        Document doc = Jsoup.parse(html);
+        String htmlContent = BeiLunHtmlAnalysisUtil.blockDivToStr(doc.selectFirst("body").child(0), false);
+        if (StringUtil.isNotBlank(htmlContent)) {
+            htmlContent = htmlContent.replaceAll("[   ]", " ");
+            CommonAnalysisUtil.html2StructureMap(titles, htmlContent, structureMap);
+        }
+        CommonAnalysisUtil.extractDateByTitle(structureMap, "告知时间");
+        removeLast(structureMap);
+        BeiLunHtmlAnalysisUtil.insertModuleId(modeId, recTypeId, structureMap);
+        return structureMap;
+    }
+
+    /**
+     * 去除value中最后的逗号
+     *
+     * @param structureMap
+     */
+    private void removeLast(Map<String, String> structureMap) {
+        for (Map.Entry<String, String> entry : structureMap.entrySet()) {
+            structureMap.put(entry.getKey(), findLast(entry.getValue()));
+        }
+    }
+
+    private String findLast(String value) {
+        if (value.lastIndexOf(",") != value.length() - 1) {
+            return value;
+        }
+        value = value.substring(0, value.length() - 1);
+        findLast(value);
+        return value;
+    }
+}

+ 46 - 0
trans/src/main/java/com/lantone/qc/trans/beilun/util/BeiLunDutyShiftSystemHtmlAnalysis.java

@@ -0,0 +1,46 @@
+package com.lantone.qc.trans.beilun.util;
+
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import org.jsoup.Jsoup;
+import org.jsoup.nodes.Element;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Description:
+ * @author: rengb
+ * @time: 2020/9/28 20:00
+ */
+public class BeiLunDutyShiftSystemHtmlAnalysis implements BeiLunHtmlAnalysis {
+
+    private String modeId = "9";
+
+    @Override
+    public Map<String, String> analysis(String... args) {
+        Map<String, String> map = Maps.newLinkedHashMap();
+        String html = args[0];
+        String recTitle = args[1];
+        String recTypeId = args[2];
+        Element bigDivElement = Jsoup.parse(html).selectFirst("body").child(0);
+        analysisGeneral(bigDivElement, map);
+        BeiLunHtmlAnalysisUtil.insertModuleId(modeId, recTypeId, map);
+        return map;
+    }
+
+    private void analysisGeneral(Element bigDivElement, Map<String, String> map) {
+        if (bigDivElement.selectFirst("hr") != null) {
+            bigDivElement.selectFirst("hr").previousElementSiblings().remove();
+        }
+        String text = BeiLunHtmlAnalysisUtil.blockDivToStr(bigDivElement, true);
+        CommonAnalysisUtil.extractWardInfo(text, map);
+        String bqjlText = "病情记录" + map.get("病情记录");
+        List<String> titles = Lists.newArrayList(
+                "病情记录"
+        );
+        titles = CommonAnalysisUtil.sortTitlesNoColon(titles, bqjlText);
+        CommonAnalysisUtil.cutByTitlesNoColon(bqjlText, titles, 0, map);
+    }
+
+}

+ 57 - 0
trans/src/main/java/com/lantone/qc/trans/beilun/util/BeiLunFirstCourseRecordHtmlAnalysis.java

@@ -0,0 +1,57 @@
+package com.lantone.qc.trans.beilun.util;
+
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import com.lantone.qc.pub.util.StringUtil;
+import org.jsoup.Jsoup;
+import org.jsoup.nodes.Document;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Description:
+ * @author: HUJING
+ * @time: 2020/9/9 11:24
+ */
+public class BeiLunFirstCourseRecordHtmlAnalysis implements BeiLunHtmlAnalysis {
+
+    private String modeId = "2";
+
+    @Override
+    public Map<String, String> analysis(String... args) {
+        List<String> titles = Lists.newArrayList("(一)病历特点", "(二)诊断依据", "(三)鉴别诊断",
+                "(四)初步诊断", "(五)诊疗计划", "医生签名");
+        String html = args[0];
+        String recTitle = args[1];
+        Map<String, String> structureMap = Maps.newLinkedHashMap();
+        Document doc = Jsoup.parse(html);
+        String htmlContent = BeiLunHtmlAnalysisUtil.blockDivToStr(doc.selectFirst("body").child(0), true);
+        if (StringUtil.isNotBlank(htmlContent)) {
+            String[] lines = htmlContent.split("\n\n");
+            if (lines.length > 1) {
+                htmlContent = lines[1];
+                String date = CommonAnalysisUtil.extractDate(htmlContent);
+                if (StringUtil.isNotBlank(date)) {
+                    structureMap.put("时间", date);
+                    htmlContent = htmlContent.replace(date, "");
+                }
+                htmlContent = htmlContent.replaceAll("[   ]", " ");
+                CommonAnalysisUtil.html2StructureMap(titles, htmlContent, structureMap);
+            }
+        }
+        if (structureMap.containsKey("(一)病历特点")) {
+            CommonAnalysisUtil.cutByTitles(structureMap.get("(一)病历特点"), Lists.newArrayList("入院查体", "辅助检查"), 0, structureMap);
+            if (structureMap.containsKey("入院查体")) {
+                structureMap.put("(一)病历特点", structureMap.get("(一)病历特点").split("入院查体")[0]);
+            }
+        }
+        BeiLunHtmlAnalysisUtil.insertModuleId(modeId, args[2], structureMap);
+        //        CommonAnalysisUtil.extractDateByTitle(structureMap, "时间");
+        //        structureMap.forEach((k,v)-> System.out.println(k + "------" + v));
+        //        structureMap.put("rec_title=", "107");
+
+        return structureMap;
+    }
+
+}

+ 14 - 0
trans/src/main/java/com/lantone/qc/trans/beilun/util/BeiLunHtmlAnalysis.java

@@ -0,0 +1,14 @@
+package com.lantone.qc.trans.beilun.util;
+
+import java.util.Map;
+
+/**
+ * @Description: 北仑html解析
+ * @author: rengb
+ * @time: 2020/9/9 11:26
+ */
+public interface BeiLunHtmlAnalysis {
+
+    Map<String,String> analysis(String... args);
+
+}

+ 189 - 0
trans/src/main/java/com/lantone/qc/trans/beilun/util/BeiLunHtmlAnalysisUtil.java

@@ -0,0 +1,189 @@
+package com.lantone.qc.trans.beilun.util;
+
+import com.google.common.collect.Lists;
+import com.lantone.qc.dbanaly.util.ModuleMappingUtil;
+import com.lantone.qc.pub.util.StringUtil;
+import org.jsoup.nodes.Element;
+import org.jsoup.select.Elements;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Description:
+ * @author: rengb
+ * @time: 2020/9/15 16:31
+ */
+public class BeiLunHtmlAnalysisUtil {
+
+    /**
+     * table样式:key和value在同一个td中,以冒号分开;保留换行
+     *
+     * @param tableElement
+     * @param map
+     */
+    public static void tableStyle1InsertMap(Element tableElement, Map<String, String> map) {
+        if (tableElement == null || map == null) {
+            return;
+        }
+        List<Element> tdElements = Lists.newArrayList();
+        tableElement.selectFirst("tbody").children().forEach(trElement -> {
+            trElement.children().forEach(tdElement -> {
+                tdElements.add(tdElement);
+            });
+        });
+        String tdText = null;
+        int tdMhIndex = 0;
+        for (Element tdElement : tdElements) {
+            if (tdElement.childNodeSize() == 0) {
+                continue;
+            }
+            tdText = blockDivToStr(tdElement.child(0), true);
+            if (tdText.endsWith("\n")) {
+                tdText = tdText.substring(0, tdText.length() - 1);
+            }
+            if (StringUtil.isBlank(tdText)) {
+                continue;
+            }
+            tdMhIndex = tdText.indexOf(":");
+            if (tdMhIndex == -1) {
+                tdMhIndex = tdText.indexOf(":");
+            }
+            if (tdMhIndex < 1) {
+                continue;
+            }
+            map.put(
+                    StringUtil.removeBlank(tdText.substring(0, tdMhIndex)),
+                    tdText.length() - 1 <= tdMhIndex ? "" : tdText.substring(tdMhIndex + 1)
+            );
+        }
+    }
+
+    /**
+     * table样式:td两两配对,一个key,一个value;不保留换行
+     *
+     * @param tableElement
+     * @param map
+     */
+    public static void tableStyle2InsertMap(Element tableElement, Map<String, String> map) {
+        if (tableElement == null || map == null) {
+            return;
+        }
+        List<Element> tdElements = Lists.newArrayList();
+        tableElement.selectFirst("tbody").children().forEach(trElement -> {
+            trElement.children().forEach(tdElement -> {
+                tdElements.add(tdElement);
+            });
+        });
+        int index = 0;
+        String key = null, value = null, text = null;
+        for (Element tdElement : tdElements) {
+            if (tdElement.childNodeSize() == 0) {
+                text = "";
+            } else {
+                text = blockDivToStr(tdElement.child(0), false);
+            }
+            if (index % 2 == 0) {
+                key = text.replaceAll("[:: ]", "");
+            }
+            if (index % 2 == 1) {
+                value = text;
+                if (StringUtil.isNotBlank(key)) {
+                    map.put(key, value);
+                }
+            }
+            index++;
+        }
+    }
+
+    /**
+     * 一个大的块状div下包含很多行行状div
+     *
+     * @param divElement
+     * @param isLineBreak 是否保留换行
+     * @return
+     */
+    public static String blockDivToStr(Element divElement, boolean isLineBreak) {
+        if (divElement == null) {
+            return "";
+        }
+        StringBuffer sbf = new StringBuffer();
+        for (Element childElement : divElement.children()) {
+            if (isLineBreak) {
+                sbf.append(elementLayer1ToStr(childElement, false)).append("\n");
+            } else {
+                sbf.append(elementLayer1ToStr(childElement, false).trim());
+            }
+        }
+        return sbf.toString();
+    }
+
+    /**
+     * 标签仅遍历第一子层级后转字符串
+     *
+     * @param element
+     * @param isLineBreak 是否保留换行
+     * @return
+     */
+    public static String elementLayer1ToStr(Element element, boolean isLineBreak) {
+        if (element == null) {
+            return "";
+        }
+        StringBuffer sbf = new StringBuffer();
+        List<Element> elements = Lists.newArrayList();
+        Elements childElements = element.children();
+        if (childElements.size() == 0) {
+            elements.add(element);
+        }
+        for (Element childElement : childElements) {
+            elements.add(childElement);
+        }
+        for (Element childElement : elements) {
+            if (childElement.tagName().equals("img") || childElement.tagName().equals("image")) {
+//                sbf.append(childElement.outerHtml());
+                sbf.append("—");
+            } else {
+                sbf.append(childElement.text());
+            }
+            if (isLineBreak) {
+                sbf.append("\n");
+            }
+        }
+        return sbf.toString().replaceAll(" ", " ");
+    }
+
+    /**
+     * 查询并插入页面模板id
+     *
+     * @param modeId
+     * @param recTitle
+     * @param map
+     */
+    public static void insertModuleId(String modeId, String recTitle, Map<String, String> map) {
+        if ((StringUtil.isBlank(modeId) && StringUtil.isBlank(recTitle)) || map == null) {
+            return;
+        }
+        String moduleId = ModuleMappingUtil.getHtmlDataTypeModuleId(recTitle);
+        if (StringUtil.isBlank(moduleId)) {
+            moduleId = ModuleMappingUtil.getStandardModuleId(modeId);
+        }
+        map.put("mode_id", moduleId);
+    }
+
+    /**
+     * map中有的value以冒号开头,用此方法来去掉冒号
+     *
+     * @param map
+     */
+    public static void mapValueRemoveStartColon(Map<String, String> map) {
+        if (map == null) {
+            return;
+        }
+        map.keySet().forEach(key -> {
+            if (map.get(key).startsWith(":") || map.get(key).startsWith(":")) {
+                map.put(key, map.get(key).replaceFirst("[::]", ""));
+            }
+        });
+    }
+
+}

+ 41 - 0
trans/src/main/java/com/lantone/qc/trans/beilun/util/BeiLunLeaveHospitalHtmlAnalysis.java

@@ -0,0 +1,41 @@
+package com.lantone.qc.trans.beilun.util;
+
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import com.lantone.qc.pub.util.StringUtil;
+import org.jsoup.Jsoup;
+import org.jsoup.nodes.Document;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Description:
+ * @author: HUJING
+ * @time: 2020/9/9 11:24
+ */
+public class BeiLunLeaveHospitalHtmlAnalysis implements BeiLunHtmlAnalysis {
+
+    private String modeId = "5";
+
+    @Override
+    public Map<String, String> analysis(String... args) {
+        List<String> titles = Lists.newArrayList("姓名", "性别", "出生日期", "科室", "床号", "住院号 ",
+                "入院日期", "出院日期", "住院天数", "入院诊断", "出院诊断", "入院情况", "入院后检查化验结果", "诊疗经过",
+                "出院计划", "病理检查结果", "出院情况", "治疗效果", "出院医嘱", "医师签名", "时间");
+        String html = args[0];
+        String recTitle = args[1];
+        String recTypeId = args[2];
+        Document doc = Jsoup.parse(html);
+        Map<String, String> structureMap = Maps.newLinkedHashMap();
+        String htmlContent = BeiLunHtmlAnalysisUtil.blockDivToStr(doc.selectFirst("body").child(0), true);
+        if (StringUtil.isNotBlank(htmlContent)) {
+            htmlContent = htmlContent.replaceAll("[   ]", " ").replace("第1页", "");
+            CommonAnalysisUtil.html2StructureMap(titles, htmlContent, structureMap);
+        }
+        CommonAnalysisUtil.extractDateByTitle(structureMap, "时间");
+        BeiLunHtmlAnalysisUtil.insertModuleId(modeId, recTypeId, structureMap);
+        return structureMap;
+    }
+
+}

+ 46 - 0
trans/src/main/java/com/lantone/qc/trans/beilun/util/BeiLunOperationHtmlAnalysis.java

@@ -0,0 +1,46 @@
+package com.lantone.qc.trans.beilun.util;
+
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import org.jsoup.Jsoup;
+import org.jsoup.nodes.Element;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Description:
+ * @author: rengb
+ * @time: 2020/9/28 14:56
+ */
+public class BeiLunOperationHtmlAnalysis implements BeiLunHtmlAnalysis {
+
+    private String modeId = "18";
+
+    @Override
+    public Map<String, String> analysis(String... args) {
+        Map<String, String> map = Maps.newLinkedHashMap();
+        String html = args[0];
+        String recTitle = args[1];
+        String recTypeId = args[2];
+        Element bigDivElement = Jsoup.parse(html).selectFirst("body").child(0);
+        analysisGeneral(bigDivElement, map);
+        BeiLunHtmlAnalysisUtil.insertModuleId(modeId, recTypeId, map);
+        return map;
+    }
+
+    private void analysisGeneral(Element bigDivElement, Map<String, String> map) {
+        if (bigDivElement.selectFirst("hr") != null) {
+            bigDivElement.selectFirst("hr").previousElementSiblings().remove();
+        }
+        String text = BeiLunHtmlAnalysisUtil.blockDivToStr(bigDivElement, true);
+        CommonAnalysisUtil.extractWardInfo(text, map);
+        String bqjlText = "病情记录" + map.get("病情记录");
+        List<String> titles = Lists.newArrayList(
+                "病情记录", "患者手术后情况", "术后去向", "术后去向", "术后诊断", "术后处理措施", "术后应当特别注意观察的事项:"
+        );
+        titles = CommonAnalysisUtil.sortTitlesNoColon(titles, bqjlText);
+        CommonAnalysisUtil.cutByTitlesNoColon(bqjlText, titles, 0, map);
+    }
+
+}

+ 57 - 0
trans/src/main/java/com/lantone/qc/trans/beilun/util/BeiLunOperationRecordHtmlAnalysis.java

@@ -0,0 +1,57 @@
+package com.lantone.qc.trans.beilun.util;
+
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import com.lantone.qc.pub.util.StringUtil;
+import org.jsoup.Jsoup;
+import org.jsoup.nodes.Element;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Description:
+ * @author: rengb
+ * @time: 2020/9/28 16:36
+ */
+public class BeiLunOperationRecordHtmlAnalysis implements BeiLunHtmlAnalysis {
+
+    private String modeId = "17";
+
+    @Override
+    public Map<String, String> analysis(String... args) {
+        Map<String, String> map = Maps.newLinkedHashMap();
+        String html = args[0];
+        String recTitle = args[1];
+        String recTypeId = args[2];
+        Element bigDivElement = Jsoup.parse(html).selectFirst("body").child(0);
+        analysisGeneral(bigDivElement, map);
+        BeiLunHtmlAnalysisUtil.mapValueRemoveStartColon(map);
+        if (map.containsKey("手术人员")) {
+            String operatingCrew = map.get("手术人员");
+            if (StringUtil.isNotBlank(operatingCrew)) {
+                CommonAnalysisUtil.cutByTitles(operatingCrew, Lists.newArrayList("主刀", "一助", "二助", "洗手护士"), 0, map);
+            }
+        }
+        BeiLunHtmlAnalysisUtil.insertModuleId(modeId, recTypeId, map);
+        return map;
+    }
+
+    private void analysisGeneral(Element bigDivElement, Map<String, String> map) {
+        if (bigDivElement.selectFirst("hr") != null) {
+            bigDivElement.selectFirst("hr").previousElementSiblings().remove();
+        }
+        String text = BeiLunHtmlAnalysisUtil.blockDivToStr(bigDivElement, true);
+        text = text.replaceAll("第1页", "");
+        List<String> titles = Lists.newArrayList(
+                "手术时间", "手术日期", "术前诊断", "手术指征", "手术人员", "麻醉方式", "麻醉人员", "接生者",
+                "术前胎心", "手术名称", "术后诊断", "手术者及助手名称", "术中取病理标本", "麻醉方法", "麻 醉 者", "手术经过",
+                "医生签名", "记录时间", "时间", "记录者", "术中输血", "术前宫颈准备日期", "药物名称及用法", "导管或其他", "插入深度",
+                "阴道填塞纱布条", "准备者", "取出日期", "手术方法", "术中特殊情况", "病理检查", "其他", "记录者", "手术者",
+                "检查子宫位置"
+        );
+        titles = CommonAnalysisUtil.sortTitlesNoColon(titles, text);
+        CommonAnalysisUtil.cutByTitlesNoColon(text, titles, 0, map);
+    }
+
+}

+ 56 - 0
trans/src/main/java/com/lantone/qc/trans/beilun/util/BeiLunPreoperativeHtmlAnalysis.java

@@ -0,0 +1,56 @@
+package com.lantone.qc.trans.beilun.util;
+
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import org.jsoup.Jsoup;
+import org.jsoup.nodes.Element;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Description:
+ * @author: rengb
+ * @time: 2020/9/17 19:19
+ */
+public class BeiLunPreoperativeHtmlAnalysis implements BeiLunHtmlAnalysis {
+
+    private String modeId = "11";
+
+    @Override
+    public Map<String, String> analysis(String... args) {
+        Map<String, String> map = Maps.newLinkedHashMap();
+        String html = args[0];
+        String recTitle = args[1];
+        String recTypeId = args[2];
+        Element bigDivElement = Jsoup.parse(html).selectFirst("body").child(0);
+        analysisGeneral(bigDivElement, map);
+
+        BeiLunHtmlAnalysisUtil.mapValueRemoveStartColon(map);
+        BeiLunHtmlAnalysisUtil.insertModuleId(modeId, recTypeId, map);
+        return map;
+    }
+
+    private void analysisGeneral(Element bigDivElement, Map<String, String> map) {
+        if (bigDivElement.selectFirst("hr") != null) {
+            bigDivElement.selectFirst("hr").previousElementSiblings().remove();
+        }
+        String text = BeiLunHtmlAnalysisUtil.blockDivToStr(bigDivElement, true);
+
+        int index1 = text.lastIndexOf("经治医生签名");
+        int index2 = text.lastIndexOf("主刀医生签名");
+        text = text.substring(0, index1).replace("(如高血压病、冠心病、糖尿病、脑梗、心梗、心肺肝肾功能不全,口服抗凝药", "")
+                .replace("等)", "").replace("(如腹腔镜可能改开腹等)", "")
+                + text.substring(index1, index2).replace("签字时间", "经治医生签字时间").replace("年月日时分", "")
+                + text.substring(index2).replace("签字时间", "主刀医生签字时间").replace("年月日时分", "");
+
+        List<String> titles = Lists.newArrayList("讨论时间", "讨论方式", "参加人员", "简要病情", "具体讨论意见",
+                "术前诊断", "手术指征与禁忌征", "可替代方案", "拟施手术方式(名称)及可能的变更方案", "计划性多次手术",
+                "拟施麻醉方式", "术前特殊准备", "主要术中、术后风险及防范措施", "术中、术后注意事项(含护理事项)",
+                "经治医生签名", "经治医生签字时间", "主刀医生签名", "主刀医生签字时间");
+        CommonAnalysisUtil.cutByTitlesNoColon(text, titles, 0, map);
+        CommonAnalysisUtil.processType(map, "计划性多次手术");
+        CommonAnalysisUtil.processType(map, "讨论方式");
+    }
+
+}

+ 46 - 0
trans/src/main/java/com/lantone/qc/trans/beilun/util/BeiLunRescueHtmlAnalysis.java

@@ -0,0 +1,46 @@
+package com.lantone.qc.trans.beilun.util;
+
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import org.jsoup.Jsoup;
+import org.jsoup.nodes.Element;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Description:
+ * @author: rengb
+ * @time: 2020/9/28 20:12
+ */
+public class BeiLunRescueHtmlAnalysis implements BeiLunHtmlAnalysis {
+
+    private String modeId = "22";
+
+    @Override
+    public Map<String, String> analysis(String... args) {
+        Map<String, String> map = Maps.newLinkedHashMap();
+        String html = args[0];
+        String recTitle = args[1];
+        String recTypeId = args[2];
+        Element bigDivElement = Jsoup.parse(html).selectFirst("body").child(0);
+        analysisGeneral(bigDivElement, map);
+        BeiLunHtmlAnalysisUtil.insertModuleId(modeId, recTypeId, map);
+        return map;
+    }
+
+    private void analysisGeneral(Element bigDivElement, Map<String, String> map) {
+        if (bigDivElement.selectFirst("hr") != null) {
+            bigDivElement.selectFirst("hr").previousElementSiblings().remove();
+        }
+        String text = BeiLunHtmlAnalysisUtil.blockDivToStr(bigDivElement, true);
+        CommonAnalysisUtil.extractWardInfo(text, map);
+        String bqjlText = "病情记录" + map.get("病情记录");
+        List<String> titles = Lists.newArrayList(
+                "病情记录"
+        );
+        titles = CommonAnalysisUtil.sortTitlesNoColon(titles, bqjlText);
+        CommonAnalysisUtil.cutByTitlesNoColon(bqjlText, titles, 0, map);
+    }
+
+}

+ 46 - 0
trans/src/main/java/com/lantone/qc/trans/beilun/util/BeiLunStagesSummaryHtmlAnalysis.java

@@ -0,0 +1,46 @@
+package com.lantone.qc.trans.beilun.util;
+
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import org.jsoup.Jsoup;
+import org.jsoup.nodes.Element;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Description:
+ * @author: rengb
+ * @time: 2020/9/28 20:16
+ */
+public class BeiLunStagesSummaryHtmlAnalysis implements BeiLunHtmlAnalysis {
+
+    private String modeId = "28";
+
+    @Override
+    public Map<String, String> analysis(String... args) {
+        Map<String, String> map = Maps.newLinkedHashMap();
+        String html = args[0];
+        String recTitle = args[1];
+        String recTypeId = args[2];
+        Element bigDivElement = Jsoup.parse(html).selectFirst("body").child(0);
+        analysisGeneral(bigDivElement, map);
+        BeiLunHtmlAnalysisUtil.insertModuleId(modeId, recTypeId, map);
+        return map;
+    }
+
+    private void analysisGeneral(Element bigDivElement, Map<String, String> map) {
+        if (bigDivElement.selectFirst("hr") != null) {
+            bigDivElement.selectFirst("hr").previousElementSiblings().remove();
+        }
+        String text = BeiLunHtmlAnalysisUtil.blockDivToStr(bigDivElement, true);
+        CommonAnalysisUtil.extractWardInfo(text, map);
+        String bqjlText = "病情记录" + map.get("病情记录");
+        List<String> titles = Lists.newArrayList(
+                "病情记录"
+        );
+        titles = CommonAnalysisUtil.sortTitlesNoColon(titles, bqjlText);
+        CommonAnalysisUtil.cutByTitlesNoColon(bqjlText, titles, 0, map);
+    }
+
+}

+ 74 - 0
trans/src/main/java/com/lantone/qc/trans/beilun/util/BeiLunThreeLevelWardHtmlAnalysis.java

@@ -0,0 +1,74 @@
+package com.lantone.qc.trans.beilun.util;
+
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import org.jsoup.Jsoup;
+import org.jsoup.nodes.Document;
+import org.jsoup.nodes.Element;
+import org.jsoup.nodes.Node;
+import org.jsoup.select.Elements;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Description: 自定义病程记录html解析
+ * @author: HUJING
+ * @time: 2020/9/15 10:28
+ */
+public class BeiLunThreeLevelWardHtmlAnalysis implements BeiLunHtmlAnalysis {
+
+    private String modeId = "4";
+
+    @Override
+    public Map<String, String> analysis(String... args) {
+        String html = args[0];
+        String recTypeId = args[2];
+        Map<String, String> structureMap = Maps.newLinkedHashMap();
+        Document doc = Jsoup.parse(html);
+        String htmlText = BeiLunHtmlAnalysisUtil.blockDivToStr(doc.selectFirst("body").child(0), true);
+        CommonAnalysisUtil.extractWardInfo(htmlText, structureMap);
+        BeiLunHtmlAnalysisUtil.insertModuleId(modeId, recTypeId, structureMap);
+        return structureMap;
+    }
+
+    /**
+     * 将html内容以行为单位存进list,从<hr>之后开始处理
+     *
+     * @param html 原始html内容
+     * @return
+     */
+    public static List<String> html2List(String html, boolean existHr) {
+        List<String> htmlText = Lists.newArrayList();
+        Document document = Jsoup.parse(html);
+        Element body = document.select("body").first();
+        List<Node> nodes = body.childNodes();
+        List<Node> subNodes = nodes.get(0).childNodes();
+        boolean findNode = false;
+        for (Node node : subNodes) {
+            if ("hr".equals(node.nodeName())) {
+                findNode = true;
+                continue;
+            }
+            if (findNode || !existHr) {
+                String title = node.attr("title");
+                if ("main".equals(title)) {
+                    Element element = (Element) node;
+                    Elements elements = element.select("div");
+                    for (Element e : elements) {
+                        String text = e.text();
+                        if (text.length() > 150) {
+                            continue;
+                        }
+                        htmlText.add(text);
+                    }
+                }
+            }
+        }
+        if (htmlText.get(0).length() > 200) {
+            htmlText.remove(0);
+        }
+        return htmlText;
+    }
+
+}

+ 46 - 0
trans/src/main/java/com/lantone/qc/trans/beilun/util/BeiLunTransferIntoHtmlAnalysis.java

@@ -0,0 +1,46 @@
+package com.lantone.qc.trans.beilun.util;
+
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import org.jsoup.Jsoup;
+import org.jsoup.nodes.Element;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Description:
+ * @author: rengb
+ * @time: 2020/9/28 20:20
+ */
+public class BeiLunTransferIntoHtmlAnalysis implements BeiLunHtmlAnalysis {
+
+    private String modeId = "26";
+
+    @Override
+    public Map<String, String> analysis(String... args) {
+        Map<String, String> map = Maps.newLinkedHashMap();
+        String html = args[0];
+        String recTitle = args[1];
+        String recTypeId = args[2];
+        Element bigDivElement = Jsoup.parse(html).selectFirst("body").child(0);
+        analysisGeneral(bigDivElement, map);
+        BeiLunHtmlAnalysisUtil.insertModuleId(modeId, recTypeId, map);
+        return map;
+    }
+
+    private void analysisGeneral(Element bigDivElement, Map<String, String> map) {
+        if (bigDivElement.selectFirst("hr") != null) {
+            bigDivElement.selectFirst("hr").previousElementSiblings().remove();
+        }
+        String text = BeiLunHtmlAnalysisUtil.blockDivToStr(bigDivElement, true);
+        CommonAnalysisUtil.extractWardInfo(text, map);
+        String bqjlText = "病情记录" + map.get("病情记录");
+        List<String> titles = Lists.newArrayList(
+                "病情记录"
+        );
+        titles = CommonAnalysisUtil.sortTitlesNoColon(titles, bqjlText);
+        CommonAnalysisUtil.cutByTitlesNoColon(bqjlText, titles, 0, map);
+    }
+
+}

+ 46 - 0
trans/src/main/java/com/lantone/qc/trans/beilun/util/BeiLunTransferOutHtmlAnalysis.java

@@ -0,0 +1,46 @@
+package com.lantone.qc.trans.beilun.util;
+
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import org.jsoup.Jsoup;
+import org.jsoup.nodes.Element;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Description:
+ * @author: rengb
+ * @time: 2020/9/28 20:22
+ */
+public class BeiLunTransferOutHtmlAnalysis implements BeiLunHtmlAnalysis {
+
+    private String modeId = "27";
+
+    @Override
+    public Map<String, String> analysis(String... args) {
+        Map<String, String> map = Maps.newLinkedHashMap();
+        String html = args[0];
+        String recTitle = args[1];
+        String recTypeId = args[2];
+        Element bigDivElement = Jsoup.parse(html).selectFirst("body").child(0);
+        analysisGeneral(bigDivElement, map);
+        BeiLunHtmlAnalysisUtil.insertModuleId(modeId, recTypeId, map);
+        return map;
+    }
+
+    private void analysisGeneral(Element bigDivElement, Map<String, String> map) {
+        if (bigDivElement.selectFirst("hr") != null) {
+            bigDivElement.selectFirst("hr").previousElementSiblings().remove();
+        }
+        String text = BeiLunHtmlAnalysisUtil.blockDivToStr(bigDivElement, true);
+        CommonAnalysisUtil.extractWardInfo(text, map);
+        String bqjlText = "病情记录" + map.get("病情记录");
+        List<String> titles = Lists.newArrayList(
+                "病情记录"
+        );
+        titles = CommonAnalysisUtil.sortTitlesNoColon(titles, bqjlText);
+        CommonAnalysisUtil.cutByTitlesNoColon(bqjlText, titles, 0, map);
+    }
+
+}

+ 354 - 0
trans/src/main/java/com/lantone/qc/trans/beilun/util/CommonAnalysisUtil.java

@@ -0,0 +1,354 @@
+package com.lantone.qc.trans.beilun.util;
+
+import com.google.common.collect.Lists;
+import com.lantone.qc.pub.util.StringUtil;
+import org.jsoup.Jsoup;
+import org.jsoup.nodes.Document;
+import org.jsoup.nodes.Element;
+import org.jsoup.nodes.Node;
+import org.jsoup.select.Elements;
+
+import java.util.List;
+import java.util.Map;
+import java.util.TreeMap;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * @Description :
+ * @Author : HUJING
+ * @Date: 2020/9/10 13:48
+ */
+public class CommonAnalysisUtil {
+
+    /**
+     * 取文书中全部文本
+     *
+     * @param html
+     * @return
+     */
+    public static String html2String(String html) {
+        Document document = Jsoup.parse(html);
+        Element body = document.select("body").first();
+        List<Node> nodes = body.childNodes();
+        Node node = nodes.get(0);
+        String htmlContent = null;
+        if (node instanceof Element) {
+            Element element = (Element) node;
+            htmlContent = element.text();
+        }
+        return htmlContent;
+    }
+
+    public static void html2StructureMap(List<String> titles, String htmlText, Map<String, String> structureMap) {
+        List<String> sortTitles = sortTitles(titles, htmlText);
+        cutByTitles(htmlText, sortTitles, 0, structureMap);
+    }
+
+    /**
+     * 将html内容以行为单位存进list,从<hr>之后开始处理
+     *
+     * @param html 原始html内容
+     * @return
+     */
+    public List<String> html2List(String html, boolean existHr) {
+        List<String> htmlText = Lists.newArrayList();
+        Document document = Jsoup.parse(html);
+        Element body = document.select("body").first();
+        List<Node> nodes = body.childNodes();
+        List<Node> subNodes = nodes.get(0).childNodes();
+        boolean findNode = false;
+        for (Node node : subNodes) {
+            if ("hr".equals(node.nodeName())) {
+                findNode = true;
+                continue;
+            }
+            if (findNode || !existHr) {
+                Element element = (Element) node;
+                Elements elements = element.select("div");
+                for (Element e : elements) {
+                    String text = e.text();
+                    if (text.length() > 150) {
+                        continue;
+                    }
+                    htmlText.add(text);
+                }
+            }
+        }
+        if (htmlText.get(0).length() > 200) {
+            htmlText.remove(0);
+        }
+        return htmlText;
+    }
+
+    /**
+     * 将html内容以table的格式存进list
+     *
+     * @param html 原始html内容
+     * @return
+     */
+    public void html2ListByTable(String html, List<String> htmlText) {
+        Elements trs = Jsoup.parse(html).select("table").select("tr");
+        for (int i = 0; i < trs.size(); i++) {
+            Elements tds = trs.get(i).select("td");
+            for (int j = 0; j < tds.size(); j++) {
+                String text = tds.get(j).text();
+                htmlText.add(text);
+            }
+        }
+    }
+
+    /**
+     * 将list中html内容转换成structureMap
+     *
+     * @param titles       文书各标题
+     * @param htmlText     html内容以行的形式存储list
+     * @param structureMap
+     * @return
+     */
+    public void html2StructureMap(List<String> titles, List<String> htmlText, Map<String, String> structureMap) {
+        StringBuffer sb = new StringBuffer();
+        for (String line : htmlText) {
+            String text = line.replaceAll("[   ]", " ");
+            if (text.length() == 0) {
+                continue;
+            }
+            sb.append(text).append("\n");
+        }
+        html2StructureMap(titles, sb.toString(), structureMap);
+    }
+
+    /**
+     * 根据文书各标题截取相应文本,存入structmap中
+     *
+     * @param line         原始文本
+     * @param titles       文书各标题
+     * @param depth        递归深度,也就是titles取值时的下标值
+     * @param structureMap 存储结构化数据
+     */
+    public static void cutByTitles(String line, List<String> titles, int depth, Map<String, String> structureMap) {
+        if (depth > titles.size() || titles.size() == 0) {
+            return;
+        }
+        String beforeTitle = null, title = null, newTitle = null, value = null;
+        beforeTitle = titles.get(Math.max(depth - 1, 0));
+        title = titles.get(Math.min(depth, titles.size() - 1));
+        if (depth == titles.size()) {
+            if (line.contains("\n")) {
+                line = line.split("\n")[0];
+            }
+            value = line;
+            structureMap.put(beforeTitle, value.trim());
+            return;
+        }
+        if (line.contains(title + ":") || line.contains(title + ":")) {
+            if (line.contains(title + ":")) {
+                newTitle = title + ":";
+            } else {
+                newTitle = title + ":";
+            }
+            if (depth > 0) {
+                value = line.substring(0, line.indexOf(newTitle));
+                structureMap.put(beforeTitle.replace(" ", ""), value.trim());
+            }
+            line = line.substring(line.indexOf(newTitle) + newTitle.length());
+            depth++;
+        } else {
+            titles.remove(depth);
+        }
+        cutByTitles(line, titles, depth, structureMap);
+    }
+
+    /**
+     * 将title根据在文本中的位置排序
+     *
+     * @param titles
+     * @param content
+     * @return
+     */
+    public static List<String> sortTitles(List<String> titles, String content) {
+        Map<Integer, String> titleIndex = new TreeMap<>();
+        int index, index_1, index_2;
+        for (String title : titles) {
+            index_1 = content.indexOf(title + ":");
+            index_2 = content.indexOf(title + ":");
+            index = Math.max(index_1, index_2);
+            if (index != -1) {
+                titleIndex.put(index, title);
+                content = content.substring(0, index) + content.substring(index + title.length() + 1);
+            }
+        }
+        titles = Lists.newArrayList(titleIndex.values());
+        return titles;
+    }
+
+    /**
+     * 标题没有冒号版本
+     */
+    public static void html2StructureMapNoColon(List<String> titles, String htmlText, Map<String, String> structureMap) {
+        List<String> sortTitlesNoColon = sortTitlesNoColon(titles, htmlText);
+        cutByTitlesNoColon(htmlText, sortTitlesNoColon, 0, structureMap);
+    }
+
+    /**
+     * 标题没有冒号版本
+     */
+    public static void cutByTitlesNoColon(String line, List<String> titles, int depth, Map<String, String> structureMap) {
+        if (depth > titles.size() || titles.size() == 0) {
+            return;
+        }
+        String beforeTitle = null, title = null, newTitle = null, value = null;
+        beforeTitle = titles.get(Math.max(depth - 1, 0));
+        title = titles.get(Math.min(depth, titles.size() - 1));
+        if (depth == titles.size()) {
+            value = line;
+            value = value.trim();
+            if (value.startsWith(":") || value.startsWith(":")) {
+                value = value.replaceFirst("[::]", "");
+            }
+            structureMap.put(beforeTitle, value);
+            return;
+        }
+        if (line.contains(title)) {
+            newTitle = title;
+            if (depth > 0) {
+                value = line.substring(0, line.indexOf(newTitle));
+                value = value.trim();
+                if (value.startsWith(":") || value.startsWith(":")) {
+                    value = value.replaceFirst("[::]", "");
+                }
+                structureMap.put(beforeTitle.replace(" ", ""), value);
+            }
+            line = line.substring(line.indexOf(newTitle) + newTitle.length());
+            depth++;
+        } else {
+            titles.remove(depth);
+        }
+        cutByTitlesNoColon(line, titles, depth, structureMap);
+    }
+
+    /**
+     * 标题没有冒号版本
+     */
+    public static List<String> sortTitlesNoColon(List<String> titles, String content) {
+        Map<Integer, String> titleIndex = new TreeMap<>();
+        int index;
+        for (String title : titles) {
+            index = content.indexOf(title);
+            if (index != -1) {
+                titleIndex.put(index, title);
+                content = content.replace(title, "");
+            }
+        }
+        titles = Lists.newArrayList(titleIndex.values());
+        return titles;
+    }
+
+    /**
+     * 抽取文本中的第一个时间
+     *
+     * @param top
+     * @return
+     */
+    public static String extractDate(String top) {
+        Pattern pattern = Pattern.compile("[0-9]{4}[-][0-9]{1,2}[-][0-9]{1,2}([ ][0-9]{1,2}[:][0-9]{1,2}([:][0-9]{1,2})?)?");
+        Matcher matcher = pattern.matcher(top);
+        if (matcher.find()) {
+            return matcher.group(0);
+        }
+        return null;
+    }
+
+    /**
+     * 根据title重新存放时间
+     *
+     * @param structmap
+     * @param title
+     */
+    public static void extractDateByTitle(Map<String, String> structmap, String title) {
+        if (structmap.containsKey(title)) {
+            String date = extractDate(structmap.get(title));
+            if (StringUtil.isNotBlank(date)) {
+                structmap.put(title, date);
+            }
+        }
+    }
+
+    /**
+     * 若内容中是包含选择框(会诊类型:     急会诊       普通会诊         请院外会诊),特殊处理
+     *
+     * @param structureMap
+     */
+    public static void processType(Map<String, String> structureMap, String title) {
+        if (structureMap.containsKey(title)) {
+            String type = structureMap.get(title);
+            String[] types = type.split(" ");
+            for (String t : types) {
+                if (t.contains("\uF0FE")) {
+                    structureMap.put(title, t.replace("\uF0FE", ""));
+                    break;
+                }
+            }
+        }
+    }
+
+    /**
+     * 若list中其中一个元素包含之后第二个、第三个元素的文本,则把这个元素删除
+     *
+     * @param htmlList
+     */
+    public static void removeRepeat(List<String> htmlList) {
+        List<Integer> index = Lists.newArrayList();
+        if (htmlList.size() < 3) {
+            return;
+        }
+        String str1 = null, str2 = null, str3 = null;
+        for (int i = 0; i < htmlList.size() - 2; i++) {
+            str1 = htmlList.get(i);
+            str2 = htmlList.get(i + 1);
+            str3 = htmlList.get(i + 2);
+            if (str1.contains(str2) && str1.contains(str3)) {
+                index.add(i);
+            }
+        }
+
+        for (int i = 0; i < index.size(); i++) {
+            htmlList.remove(index.get(i) - i);
+        }
+    }
+
+    /**
+     * 抽取自定义病程录信息
+     *
+     * @param htmlText
+     * @param structureMap
+     */
+    public static void extractWardInfo(String htmlText, Map<String, String> structureMap) {
+        if (StringUtil.isNotBlank(htmlText)) {
+            htmlText = htmlText.replaceAll("[   \n]", " ").replace("第1页", "");
+            String date = extractDate(htmlText);
+            if (date != null) {
+                structureMap.put("病历日期", date);
+                htmlText = htmlText.replace(date, "").trim();
+            }
+            List<String> titleContent = Lists.newArrayList(htmlText.split(" "));
+            String title = titleContent.get(0);
+            if (StringUtil.isNotBlank(title)) {
+                structureMap.put("病历标题", title);
+                titleContent.remove(0);
+            }
+            StringBuffer sb = new StringBuffer();
+            for (String text : titleContent) {
+                sb.append(text).append(" ");
+            }
+            String content = sb.toString();
+            if (content.contains("<img")) {
+                String[] contentDoctor = content.split("<img");
+                structureMap.put("病情记录", contentDoctor[0]);
+                structureMap.put("记录医生", "<img" + contentDoctor[1]);
+            } else {
+                structureMap.put("病情记录", content);
+            }
+        }
+    }
+}

+ 337 - 0
trans/src/main/java/com/lantone/qc/trans/beilun/util/ez/EzXmlAnalysis.java

@@ -0,0 +1,337 @@
+package com.lantone.qc.trans.beilun.util.ez;
+
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import com.lantone.qc.pub.util.StringUtil;
+import com.lantone.qc.trans.beilun.util.CommonAnalysisUtil;
+import org.dom4j.Document;
+import org.dom4j.DocumentHelper;
+import org.dom4j.Element;
+import org.dom4j.Node;
+
+import java.util.List;
+import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * @Description:
+ * @author: rengb
+ * @time: 2020/9/24 11:28
+ */
+public class EzXmlAnalysis {
+
+    public static Map<String, String> analysis(String deptName, String xml) throws Exception {
+        if (deptName.equals("小儿外科")) {
+            return analysisEk(deptName, xml);
+        }
+        return null;
+    }
+
+    public static Map<String, String> analysisEk(String deptName, String xml) throws Exception {
+        Map<String, String> map = Maps.newLinkedHashMap();
+        Document doc = DocumentHelper.parseText(xml);
+        Element rootElement = doc.getRootElement();
+        jbxxInsertMap(rootElement, map);
+        tgjcInsertMap(rootElement, map);
+        fzjcInsertMap(rootElement, map);
+        zkjcInsertMap(rootElement, map);
+        disInsertMap(rootElement, map);
+        otherInsertMap(rootElement, map);
+        return map;
+    }
+
+    //其他信息
+    public static void otherInsertMap(Element rootElement, Map<String, String> map) {
+        List<String> titles = Lists.newArrayList(
+                "主诉", "现病史", "既往史", "手术史", "输血史", "过敏史", "个人史", "预防接种史", "家族史", "婚育史", "月经史"
+        );
+        String rootText = elementTxt(rootElement);
+        String signTimeStr = findTimeStr(rootText.substring(rootText.length() - 18));
+        if (StringUtil.isNotBlank(signTimeStr)) {
+            rootText = rootText.substring(0, rootText.lastIndexOf(signTimeStr));
+        }
+        titles = CommonAnalysisUtil.sortTitlesNoColon(titles, rootText);
+        CommonAnalysisUtil.cutByTitlesNoColon(rootText, titles, 0, map);
+    }
+
+    public static void disInsertMap(Element rootElement, Map<String, String> map) {
+        Node cbzdNode = rootElement.selectSingleNode("section[@name='初步诊断']");
+        if (cbzdNode != null) {
+            rootElement.remove(cbzdNode);
+        }
+        Node disNode = rootElement.selectSingleNode("section[@name='诊断']");
+        if (disNode != null) {
+            String disText = elementTxt(disNode);
+            List<String> titles = CommonAnalysisUtil.sortTitlesNoColon(Lists.newArrayList("初步诊断", "补充诊断", "再次补充诊断", "修正诊断", "出院诊断"), disText);
+            CommonAnalysisUtil.cutByTitlesNoColon(disText, titles, 0, map);
+            titles.forEach(title -> {
+                disExt(map, title);
+            });
+            rootElement.remove(disNode);
+        }
+    }
+
+    //诊断特殊处理
+    public static void disExt(Map<String, String> map, String key) {
+        String disMessage = map.get(key);
+        String sign = null;
+        String signTime = null;
+        int signIndex = 0;
+        if (StringUtil.isNotBlank(disMessage)) {
+            Pattern pattern = Pattern.compile("[0-9]+[年/-][0-9]+[月/-][0-9]+[日]{0,}");
+            Matcher matcher = pattern.matcher(disMessage);
+            if (matcher.find()) {
+                signTime = matcher.group();
+                disMessage = disMessage.substring(0, matcher.start());
+            }
+
+            signIndex = disMessage.indexOf("医师签名");
+            if (signIndex > -1) {
+                sign = disMessage.substring(signIndex).replace("医师签名", "").replaceAll("[::]", "");
+                disMessage = disMessage.substring(0, signIndex);
+            }
+            map.put(key, disMessage);
+            if (StringUtil.isNotBlank(sign)) {
+                map.put(key + "签名", sign.replaceAll("日期", ""));
+            }
+            if (StringUtil.isNotBlank(signTime)) {
+                map.put(key + "签名日期", signTime);
+            }
+        }
+    }
+
+    //辅助检查
+    public static void fzjcInsertMap(Element rootElement, Map<String, String> map) {
+        Node fzjcNode = rootElement.selectSingleNode("section[@name='辅助检查']");
+        if (fzjcNode != null) {
+            map.put("辅助检查", elementTxt(fzjcNode).replaceFirst("辅助检查", ""));
+            rootElement.remove(fzjcNode);
+        }
+    }
+
+    // 专科检查
+    public static void zkjcInsertMap(Element rootElement, Map<String, String> map) {
+        Node zkjcNode = rootElement.selectSingleNode("section[@name='专科检查']");
+        if (zkjcNode != null) {
+            map.put("专科检查", elementTxt(zkjcNode).replaceFirst("专科检查", ""));
+            rootElement.remove(zkjcNode);
+        }
+    }
+
+    //基本信息
+    public static void jbxxInsertMap(Element rootElement, Map<String, String> map) {
+        Node jbxxNode = rootElement.selectSingleNode("section[@name='基本信息']");
+        if (jbxxNode != null) {
+            ((List<Element>) jbxxNode.selectNodes("fieldelem")).forEach(i -> {
+                elementInsertMap(i, map);
+            });
+            String age = map.get("年龄");
+            String ageYear = "";
+            String ageMon = "";
+            if (StringUtil.isNotBlank(age)) {
+                ageYear = age;
+                if (age.indexOf("岁") > -1) {
+                    ageYear = age;
+                } else if (age.indexOf("月") > -1) {
+                    ageYear = "";
+                    ageMon = age;
+                }
+            }
+            map.put("年龄岁", ageYear);
+            map.put("年龄月", ageMon);
+            rootElement.remove(jbxxNode);
+        }
+    }
+
+    //身高体重
+    public static void sgtzInsertMap(Element rootElement, Map<String, String> map) {
+        Map<String, String> map2 = Maps.newHashMap();
+        Node tgjcNode = rootElement.selectSingleNode("section[@name='体格检查']");
+        if (tgjcNode != null) {
+            Node ybqkNode = tgjcNode.selectSingleNode("section[@name='一般情况']");
+            if (ybqkNode != null) {
+                if (StringUtil.isBlank(map.get("身高"))) {
+                    elementInsertMap((Element) ybqkNode.selectSingleNode("fieldelem[@name='身高']"), map);
+                }
+                if (StringUtil.isBlank(map.get("体重"))) {
+                    elementInsertMap((Element) ybqkNode.selectSingleNode("fieldelem[@name='体重']"), map);
+                }
+
+                String ybqkText = elementTxt(ybqkNode);
+                List<String> titles = Lists.newArrayList("身高", "体重");
+                titles = CommonAnalysisUtil.sortTitlesNoColon(titles, ybqkText);
+                CommonAnalysisUtil.cutByTitlesNoColon(ybqkText, titles, 0, map2);
+                sgtzxyInsertMap(map2);
+            }
+        }
+
+        smtzSgtzInsertMap(rootElement, map2);
+        if (!map.containsKey("身高")) {
+            map.put("身高", map2.get("身高"));
+
+        }
+        if (!map.containsKey("体重")) {
+            map.put("体重", map2.get("体重"));
+        }
+        if (!map.containsKey("收缩压")) {
+            map.put("收缩压", map2.get("收缩压"));
+        }
+        if (!map.containsKey("舒张压")) {
+            map.put("舒张压", map2.get("舒张压"));
+        }
+    }
+
+    //生命体征中提取身高体重
+    public static void smtzSgtzInsertMap(Element rootElement, Map<String, String> map) {
+        Node tgjcNode = rootElement.selectSingleNode("section[@name='体格检查']");
+        if (tgjcNode != null) {
+            Node smtzNode = tgjcNode.selectSingleNode("section[@name='生命体征']");
+            if (smtzNode != null) {
+                Map<String, String> map2 = Maps.newHashMap();
+                String smtzText = elementTxt(smtzNode);
+                List<String> titles = Lists.newArrayList("身高", "体重", "血压", "BP");
+                titles = CommonAnalysisUtil.sortTitlesNoColon(titles, smtzText);
+                CommonAnalysisUtil.cutByTitlesNoColon(smtzText, titles, 0, map2);
+                sgtzxyInsertMap(map2);
+
+                map.put("收缩压", map2.get("收缩压"));
+                map.put("舒张压", map2.get("舒张压"));
+                if (StringUtil.isBlank(map.get("身高"))) {
+                    map.put("身高", map2.get("身高"));
+                }
+                if (StringUtil.isBlank(map.get("体重"))) {
+                    map.put("体重", map2.get("体重"));
+                }
+            }
+        }
+    }
+
+    //身高、体重、血压公共处理方法
+    private static void sgtzxyInsertMap(Map<String, String> map) {
+        Pattern pattern = Pattern.compile("[0-9]+[.]{0,1}[0-9]*");
+        if (map.containsKey("身高")) {
+            String value = map.get("身高");
+            if (StringUtil.isNotBlank(value)) {
+                value = StringUtil.removeBlank(value);
+                Matcher matcher = pattern.matcher(value);
+                if (matcher.find()) {
+                    map.put("身高", matcher.group());
+                } else {
+                    map.put("身高", "");
+                }
+            }
+        }
+        if (map.containsKey("体重")) {
+            String value = map.get("体重");
+            if (StringUtil.isNotBlank(value)) {
+                value = StringUtil.removeBlank(value);
+                Matcher matcher = pattern.matcher(value);
+                if (matcher.find()) {
+                    map.put("体重", matcher.group());
+                } else {
+                    map.put("体重", "");
+                }
+            }
+        }
+        pattern = Pattern.compile("[0-9]+[.]{0,1}[0-9]*/[0-9]+[.]{0,1}[0-9]*");
+        if (map.containsKey("血压") || map.containsKey("BP")) {
+            String value = map.get("血压");
+            if (StringUtil.isBlank(value)) {
+                value = map.get("BP");
+            }
+            if (StringUtil.isNotBlank(value)) {
+                value = StringUtil.removeBlank(value);
+                Matcher matcher = pattern.matcher(value);
+                if (matcher.find()) {
+                    value = matcher.group();
+                    String[] arry = value.split("/");
+                    if (arry.length == 2) {
+                        map.put("收缩压", arry[0]);
+                        map.put("舒张压", arry[1]);
+                    }
+                }
+            }
+        }
+    }
+
+    //体格检查
+    public static void tgjcInsertMap(Element rootElement, Map<String, String> map) {
+        Node tgjcNode = rootElement.selectSingleNode("section[@name='体格检查']");
+        if (tgjcNode != null) {
+            Node smtzNode = tgjcNode.selectSingleNode("section[@name='生命体征']");
+            if (smtzNode != null) {
+                ((List<Element>) smtzNode.selectNodes("fieldelem")).forEach(i -> {
+                    elementInsertMap(i, map);
+                });
+            }
+            ((List<Element>) tgjcNode.selectNodes("section[@name!='生命体征']")).forEach(i -> {
+                elementInsertMap(i, map);
+            });
+
+            String jzsz = map.get("脊柱四肢");
+            String jz = "";
+            String sz = "";
+            if (StringUtil.isNotBlank(jzsz)) {
+                if (jzsz.indexOf("四肢") > -1) {
+                    jz = jzsz.substring(0, jzsz.indexOf("四肢"));
+                    sz = jzsz.substring(jzsz.indexOf("四肢"));
+                } else {
+                    jz = jzsz;
+                }
+            }
+            map.put("脊柱", jz);
+            map.put("四肢", sz);
+            sgtzInsertMap(rootElement, map);
+            rootElement.remove(tgjcNode);
+        }
+    }
+
+    public static String elementTxt(Node node) {
+        if (node != null) {
+            return StringUtil.removeBlank(node.getStringValue());
+        } else {
+            return "";
+        }
+    }
+
+    public static void elementInsertMap(Element element, Map<String, String> map) {
+        if (element == null || map == null) {
+            return;
+        }
+        String key = null;
+        List<Element> elements = element.elements();
+        if (elements.size() > 0 && (key = isKey(elementTxt(elements.get(0)))) != null) {
+            element.remove(elements.get(0));
+        } else {
+            key = element.attributeValue("name");
+        }
+        if (StringUtil.isNotBlank(key)) {
+            map.put(key, elementTxt(element));
+        }
+    }
+
+    public static String isKey(String key) {
+        if (StringUtil.isBlank(key)) {
+            return null;
+        }
+        key = StringUtil.removeBlank(key);
+        Pattern pattern = Pattern.compile("[\\u4e00-\\u9fa5]+[::]");
+        if (pattern.matcher(key).matches()) {
+            return key.substring(0, key.length() - 1);
+        } else {
+            return null;
+        }
+    }
+
+    public static String findTimeStr(String text) {
+        String ret = "";
+        Pattern pattern = Pattern.compile("[0-9]+[年/-][0-9]+[月/-][0-9]+[日]{0,}");
+        Matcher matcher = pattern.matcher(text);
+        if (matcher.find()) {
+            ret = matcher.group();
+        }
+        return ret;
+    }
+
+}

+ 3 - 1
trans/src/main/java/com/lantone/qc/trans/changx/ChangxAnesthesiaRelatedDocTrans.java

@@ -16,6 +16,8 @@ import java.util.Map;
  * @Date: 2020/5/11 16:23
  */
 public class ChangxAnesthesiaRelatedDocTrans extends ModelDocTrans {
+    private String modeId = "12";
+
     @Override
     public List<AnesthesiaRelatedDoc> extract(MedrecVo medrecVo) {
         List<AnesthesiaRelatedDoc> retList = Lists.newArrayList();
@@ -27,7 +29,7 @@ public class ChangxAnesthesiaRelatedDocTrans extends ModelDocTrans {
     }
 
     private AnesthesiaRelatedDoc getAnesthesiaRelatedDoc(Map<String, String> content) {
-        Map<String, String> structureMap = OrdinaryAssistant.mapKeyContrast(content, keyContrasts);
+        Map<String, String> structureMap = OrdinaryAssistant.mapKeyContrast(content, keyContrasts, modeId);
         AnesthesiaRelatedDoc anesthesiaRelatedDoc = new AnesthesiaRelatedDoc();
         anesthesiaRelatedDoc.setStructureMap(structureMap);
         anesthesiaRelatedDoc.setPageData((Map) content);

+ 30 - 23
trans/src/main/java/com/lantone/qc/trans/changx/ChangxBeHospitalizedDocTrans.java

@@ -3,6 +3,7 @@ package com.lantone.qc.trans.changx;
 import com.google.common.collect.Lists;
 import com.lantone.qc.pub.model.doc.BeHospitalizedDoc;
 import com.lantone.qc.pub.model.vo.MedrecVo;
+import com.lantone.qc.pub.util.FastJsonUtils;
 import com.lantone.qc.pub.util.StringUtil;
 import com.lantone.qc.trans.ModelDocTrans;
 import com.lantone.qc.dbanaly.facade.changx.CxXmlUtil;
@@ -18,37 +19,43 @@ import java.util.Map;
  * @time: 2020/3/5 15:47
  */
 public class ChangxBeHospitalizedDocTrans extends ModelDocTrans {
+    private String modeId = "1";
 
     @Override
     public BeHospitalizedDoc extract(MedrecVo medrecVo) {
         Map<String, Object> contentMap = ((List<Map>) medrecVo.getContent().get("content")).get(0);
         String content = contentMap.get("xmlText").toString();
-        Map<String, String> sourceMap = CxXmlUtil.firstLevelNodeValue(content);
-        String sex = "男";
-        for (String key : sourceMap.keySet()) {
-            if (key.indexOf("性别") > -1) {
-                if (sourceMap.get(key).indexOf("男") > -1 || sourceMap.get(key).indexOf("女") > -1) {
-                    sex = StringUtil.removeBlank(sourceMap.get(key));
+        Map<String, String> structureMap = null;
+        if (contentMap.get("isParsed") != null && "1".equals(contentMap.get("isParsed").toString())) {
+            structureMap = (Map) FastJsonUtils.getJsonToMap(content);
+        } else {
+            Map<String, String> sourceMap = CxXmlUtil.firstLevelNodeValue(content);
+            String sex = "男";
+            for (String key : sourceMap.keySet()) {
+                if (key.indexOf("性别") > -1) {
+                    if (sourceMap.get(key).indexOf("男") > -1 || sourceMap.get(key).indexOf("女") > -1) {
+                        sex = StringUtil.removeBlank(sourceMap.get(key));
+                    }
                 }
             }
-        }
-        sourceMap.put(sex, "");
-        sourceMap.put("mode_id=" + contentMap.get("modeId").toString(), "");
-        sourceMap.put("rec_title=" + contentMap.get("recTitle").toString(), "");
-        Map<String, String> structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, keyContrasts);
-        String specialCheck = structureMap.get("专科检查");
-        if (StringUtil.isNotBlank(specialCheck)) {
-            structureMap.put("专科体格检查", specialCheck);
-        } else {
-            String tgjc = concatSpecialCheck(sourceMap);
-            if (StringUtil.isNotBlank(tgjc)) {
-                structureMap.put("专科体格检查", tgjc);
+            sourceMap.put(sex, "");
+            sourceMap.put("mode_id=" + contentMap.get("modeId").toString(), "");
+            sourceMap.put("rec_title=" + contentMap.get("recTitle").toString(), "");
+            structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, keyContrasts, modeId);
+            String specialCheck = structureMap.get("专科检查");
+            if (StringUtil.isNotBlank(specialCheck)) {
+                structureMap.put("专科体格检查", specialCheck);
+            } else {
+                String tgjc = concatSpecialCheck(sourceMap);
+                if (StringUtil.isNotBlank(tgjc)) {
+                    structureMap.put("专科体格检查", tgjc);
+                }
+            }
+            String marital = structureMap.get("婚育史");
+            String marry = structureMap.get("婚姻");
+            if (StringUtil.isBlank(marital) && StringUtil.isNotBlank(marry)) {
+                structureMap.put("婚育史", marry);
             }
-        }
-        String marital = structureMap.get("婚育史");
-        String marry = structureMap.get("婚姻");
-        if (StringUtil.isBlank(marital) && StringUtil.isNotBlank(marry)) {
-            structureMap.put("婚育史", marry);
         }
         BeHospitalizedDoc beHospitalizedDoc = ModelDocGenerate.beHospitalizedDocGen(structureMap);
         beHospitalizedDoc.setText(content);

+ 19 - 11
trans/src/main/java/com/lantone/qc/trans/changx/ChangxClinicBloodEffectDocTrans.java

@@ -1,11 +1,11 @@
 package com.lantone.qc.trans.changx;
 
 import com.google.common.collect.Lists;
+import com.lantone.qc.dbanaly.facade.changx.CxXmlUtil;
 import com.lantone.qc.pub.model.doc.ClinicBloodEffectDoc;
 import com.lantone.qc.pub.model.vo.MedrecVo;
-import com.lantone.qc.pub.util.StringUtil;
+import com.lantone.qc.pub.util.FastJsonUtils;
 import com.lantone.qc.trans.ModelDocTrans;
-import com.lantone.qc.dbanaly.facade.changx.CxXmlUtil;
 import com.lantone.qc.trans.comsis.ModelDocGenerate;
 import com.lantone.qc.trans.comsis.OrdinaryAssistant;
 import com.lantone.qc.trans.comsis.Preproc;
@@ -19,6 +19,8 @@ import java.util.Map;
  * @desc 输血后效果评价
  **/
 public class ChangxClinicBloodEffectDocTrans extends ModelDocTrans {
+    private String modeId = "32";
+
     @Override
     public List<ClinicBloodEffectDoc> extract(MedrecVo medrecVo) {
         List<ClinicBloodEffectDoc> retList = Lists.newArrayList();
@@ -28,20 +30,26 @@ public class ChangxClinicBloodEffectDocTrans extends ModelDocTrans {
         });
         return retList;
     }
+
     private ClinicBloodEffectDoc getClinicalBloodDoc(Map<String, Object> contentMap) {
         String content = contentMap.get("xmlText").toString();
-        Map<String, String> xmlNodeValueMap = CxXmlUtil.firstLevelNodeValue(content);
-        xmlNodeValueMap.put("mode_id=" + contentMap.get("modeId").toString(), "");
-        xmlNodeValueMap.put("rec_title=" + contentMap.get("recTitle").toString(), "");
-        Map<String, String> structureMap = OrdinaryAssistant.mapKeyContrast(xmlNodeValueMap, keyContrasts);
-
-        String text = CxXmlUtil.getXmlText(content);
-        Map<String, String> cutWordMap = Preproc.getCutWordMap(true, sourceTitles, text);
-        cutWordMap.putAll(structureMap);
+        Map<String, String> cutWordMap = null;
+        if (contentMap.get("isParsed") != null && "1".equals(contentMap.get("isParsed").toString())) {
+            cutWordMap = (Map) FastJsonUtils.getJsonToMap(content);
+        } else {
+            Map<String, String> xmlNodeValueMap = CxXmlUtil.firstLevelNodeValue(content);
+            xmlNodeValueMap.put("mode_id=" + contentMap.get("modeId").toString(), "");
+            xmlNodeValueMap.put("rec_title=" + contentMap.get("recTitle").toString(), "");
+            Map<String, String> structureMap = OrdinaryAssistant.mapKeyContrast(xmlNodeValueMap, keyContrasts, modeId);
 
+            String text = CxXmlUtil.getXmlText(content);
+            structureMap.put("text", text);
+            cutWordMap = Preproc.getCutWordMap(true, sourceTitles, text);
+            cutWordMap.putAll(structureMap);
+        }
 
         ClinicBloodEffectDoc clinicBloodEffectDoc = ModelDocGenerate.clinicBloodEffectDoc(cutWordMap);
-        clinicBloodEffectDoc.setText(text);
+        clinicBloodEffectDoc.setText(cutWordMap.get("text"));
         clinicBloodEffectDoc.setPageData((Map) cutWordMap);
 
         return clinicBloodEffectDoc;

+ 18 - 10
trans/src/main/java/com/lantone/qc/trans/changx/ChangxClinicalBloodDocTrans.java

@@ -3,6 +3,7 @@ package com.lantone.qc.trans.changx;
 import com.google.common.collect.Lists;
 import com.lantone.qc.pub.model.doc.ClinicalBloodDoc;
 import com.lantone.qc.pub.model.vo.MedrecVo;
+import com.lantone.qc.pub.util.FastJsonUtils;
 import com.lantone.qc.pub.util.StringUtil;
 import com.lantone.qc.trans.ModelDocTrans;
 import com.lantone.qc.dbanaly.facade.changx.CxXmlUtil;
@@ -19,6 +20,7 @@ import java.util.Map;
  * @time: 2020/3/17 13:21
  */
 public class ChangxClinicalBloodDocTrans extends ModelDocTrans {
+    private String modeId = "10";
 
     @Override
     public List<ClinicalBloodDoc> extract(MedrecVo medrecVo) {
@@ -32,20 +34,26 @@ public class ChangxClinicalBloodDocTrans extends ModelDocTrans {
 
     private ClinicalBloodDoc getClinicalBloodDoc(Map<String, Object> contentMap) {
         String content = contentMap.get("xmlText").toString();
-        Map<String, String> xmlNodeValueMap = CxXmlUtil.firstLevelNodeValue(content);
-        xmlNodeValueMap.put("mode_id=" + contentMap.get("modeId").toString(), "");
-        xmlNodeValueMap.put("rec_title=" + contentMap.get("recTitle").toString(), "");
-        Map<String, String> structureMap = OrdinaryAssistant.mapKeyContrast(xmlNodeValueMap, keyContrasts);
+        Map<String, String> cutWordMap = null;
+        if (contentMap.get("isParsed") != null && "1".equals(contentMap.get("isParsed").toString())) {
+            cutWordMap = (Map) FastJsonUtils.getJsonToMap(content);
+        } else {
+            Map<String, String> xmlNodeValueMap = CxXmlUtil.firstLevelNodeValue(content);
+            xmlNodeValueMap.put("mode_id=" + contentMap.get("modeId").toString(), "");
+            xmlNodeValueMap.put("rec_title=" + contentMap.get("recTitle").toString(), "");
+            Map<String, String> structureMap = OrdinaryAssistant.mapKeyContrast(xmlNodeValueMap, keyContrasts, modeId);
 
-        String text = CxXmlUtil.getXmlText(content);
-        Map<String, String> cutWordMap = Preproc.getCutWordMap(true, sourceTitles, "");
-        cutWordMap.putAll(structureMap);
-        if (StringUtil.isNotBlank(structureMap.get("输注种类、血型、数量"))) {
-            cutWordMap.put("输血成分及数量", structureMap.get("输注种类、血型、数量"));
+            String text = CxXmlUtil.getXmlText(content);
+            structureMap.put("text", text);
+            cutWordMap = Preproc.getCutWordMap(true, sourceTitles, "");
+            cutWordMap.putAll(structureMap);
+            if (StringUtil.isNotBlank(structureMap.get("输注种类、血型、数量"))) {
+                cutWordMap.put("输血成分及数量", structureMap.get("输注种类、血型、数量"));
+            }
         }
 
         ClinicalBloodDoc clinicalBloodDoc = ModelDocGenerate.clinicalBloodDocGen(cutWordMap);
-        clinicalBloodDoc.setText(text);
+        clinicalBloodDoc.setText(cutWordMap.get("text"));
         clinicalBloodDoc.setPageData((Map) cutWordMap);
 
         return clinicalBloodDoc;

+ 49 - 29
trans/src/main/java/com/lantone/qc/trans/changx/ChangxConsultationDocTrans.java

@@ -3,16 +3,17 @@ package com.lantone.qc.trans.changx;
 import com.google.common.collect.Lists;
 import com.google.common.collect.Maps;
 import com.google.common.collect.Sets;
+import com.lantone.qc.dbanaly.facade.changx.CxXmlUtil;
 import com.lantone.qc.pub.model.doc.consultation.ConsultationApplicationDoc;
 import com.lantone.qc.pub.model.doc.consultation.ConsultationDoc;
 import com.lantone.qc.pub.model.doc.consultation.ConsultationRecordDoc;
 import com.lantone.qc.pub.model.doc.consultation.ConsultationResultsDoc;
 import com.lantone.qc.pub.model.vo.MedrecVo;
+import com.lantone.qc.pub.util.FastJsonUtils;
 import com.lantone.qc.pub.util.ListUtil;
 import com.lantone.qc.pub.util.MapUtil;
 import com.lantone.qc.pub.util.StringUtil;
 import com.lantone.qc.trans.ModelDocTrans;
-import com.lantone.qc.dbanaly.facade.changx.CxXmlUtil;
 import com.lantone.qc.trans.comsis.ModelDocGenerate;
 import com.lantone.qc.trans.comsis.OrdinaryAssistant;
 import com.lantone.qc.trans.comsis.Preproc;
@@ -27,6 +28,7 @@ import java.util.Set;
  * @time: 2020/3/17 13:22
  */
 public class ChangxConsultationDocTrans extends ModelDocTrans {
+    private String modeId = "31";
 
     @Override
     public List<ConsultationDoc> extract(MedrecVo medrecVo) {
@@ -82,18 +84,24 @@ public class ChangxConsultationDocTrans extends ModelDocTrans {
 
     private ConsultationRecordDoc getConsultationRecordDoc(Map<String, Object> contentMap) {
         String content = contentMap.get("xmlText").toString();
-        Map<String, String> xmlNodeValueMap = CxXmlUtil.firstLevelNodeValue(content);
-        xmlNodeValueMap.put("mode_id=" + contentMap.get("modeId").toString(), "");
-        xmlNodeValueMap.put("rec_title=" + contentMap.get("recTitle").toString(), "");
-        Map<String, String> structureMap = OrdinaryAssistant.mapKeyContrast(xmlNodeValueMap, consultationRecord_keyContrasts);
-
-        String text = CxXmlUtil.getXmlText(content);
-        Map<String, String> cutWordMap = Preproc.getCutWordMap(true, consultationRecord_sourceTitles, text);
-        cutWordMap.putAll(structureMap);
-        MapUtil.keyAssig(cutWordMap, "记录医师", "签名");
+        Map<String, String> cutWordMap = null;
+        if (contentMap.get("isParsed") != null && "1".equals(contentMap.get("isParsed").toString())) {
+            cutWordMap = (Map) FastJsonUtils.getJsonToMap(content);
+        } else {
+            Map<String, String> xmlNodeValueMap = CxXmlUtil.firstLevelNodeValue(content);
+            xmlNodeValueMap.put("mode_id=" + contentMap.get("modeId").toString(), "");
+            xmlNodeValueMap.put("rec_title=" + contentMap.get("recTitle").toString(), "");
+            Map<String, String> structureMap = OrdinaryAssistant.mapKeyContrast(xmlNodeValueMap, consultationRecord_keyContrasts, modeId);
+
+            String text = CxXmlUtil.getXmlText(content);
+            structureMap.put("text", text);
+            cutWordMap = Preproc.getCutWordMap(true, consultationRecord_sourceTitles, text);
+            cutWordMap.putAll(structureMap);
+            MapUtil.keyAssig(cutWordMap, "记录医师", "签名");
+        }
 
         ConsultationRecordDoc consultationRecordDoc = ModelDocGenerate.consultationRecordDocGen(cutWordMap);
-        consultationRecordDoc.setText(text);
+        consultationRecordDoc.setText(cutWordMap.get("text"));
         consultationRecordDoc.setPageData((Map) cutWordMap);
 
         return consultationRecordDoc;
@@ -134,17 +142,23 @@ public class ChangxConsultationDocTrans extends ModelDocTrans {
 
     private ConsultationResultsDoc getConsultationResultsDoc(Map<String, Object> contentMap) {
         String content = contentMap.get("xmlText").toString();
-        Map<String, String> xmlNodeValueMap = CxXmlUtil.firstLevelNodeValue(content);
-        xmlNodeValueMap.put("mode_id=" + contentMap.get("modeId").toString(), "");
-        xmlNodeValueMap.put("rec_title=" + contentMap.get("recTitle").toString(), "");
-        Map<String, String> structureMap = OrdinaryAssistant.mapKeyContrast(xmlNodeValueMap, consultationApplication_keyContrasts);
-
-        String text = CxXmlUtil.getXmlText(content);
-        Map<String, String> cutWordMap = Preproc.getCutWordMap(true, consultationApplication_sourceTitles, text);
-        cutWordMap.putAll(structureMap);
+        Map<String, String> cutWordMap = null;
+        if (contentMap.get("isParsed") != null && "1".equals(contentMap.get("isParsed").toString())) {
+            cutWordMap = (Map) FastJsonUtils.getJsonToMap(content);
+        } else {
+            Map<String, String> xmlNodeValueMap = CxXmlUtil.firstLevelNodeValue(content);
+            xmlNodeValueMap.put("mode_id=" + contentMap.get("modeId").toString(), "");
+            xmlNodeValueMap.put("rec_title=" + contentMap.get("recTitle").toString(), "");
+            Map<String, String> structureMap = OrdinaryAssistant.mapKeyContrast(xmlNodeValueMap, consultationApplication_keyContrasts, modeId);
+
+            String text = CxXmlUtil.getXmlText(content);
+            structureMap.put("text", text);
+            cutWordMap = Preproc.getCutWordMap(true, consultationApplication_sourceTitles, text);
+            cutWordMap.putAll(structureMap);
+        }
 
         ConsultationResultsDoc consultationResultsDoc = ModelDocGenerate.consultationResultsDocGen(cutWordMap);
-        consultationResultsDoc.setText(content);
+        consultationResultsDoc.setText(cutWordMap.get("text"));
         consultationResultsDoc.setPageData((Map) cutWordMap);
         return consultationResultsDoc;
     }
@@ -187,17 +201,23 @@ public class ChangxConsultationDocTrans extends ModelDocTrans {
 
     private ConsultationApplicationDoc getConsultationApplicationDoc(Map<String, Object> contentMap) {
         String content = contentMap.get("xmlText").toString();
-        Map<String, String> xmlNodeValueMap = CxXmlUtil.firstLevelNodeValue(content);
-        xmlNodeValueMap.put("mode_id=" + contentMap.get("modeId").toString(), "");
-        xmlNodeValueMap.put("rec_title=" + contentMap.get("recTitle").toString(), "");
-        Map<String, String> structureMap = OrdinaryAssistant.mapKeyContrast(xmlNodeValueMap, consultationApplication_keyContrasts);
-
-        String text = CxXmlUtil.getXmlText(content);
-        Map<String, String> cutWordMap = Preproc.getCutWordMap(true, consultationApplication_sourceTitles, text);
-        cutWordMap.putAll(structureMap);
+        Map<String, String> cutWordMap = null;
+        if (contentMap.get("isParsed") != null && "1".equals(contentMap.get("isParsed").toString())) {
+            cutWordMap = (Map) FastJsonUtils.getJsonToMap(content);
+        } else {
+            Map<String, String> xmlNodeValueMap = CxXmlUtil.firstLevelNodeValue(content);
+            xmlNodeValueMap.put("mode_id=" + contentMap.get("modeId").toString(), "");
+            xmlNodeValueMap.put("rec_title=" + contentMap.get("recTitle").toString(), "");
+            Map<String, String> structureMap = OrdinaryAssistant.mapKeyContrast(xmlNodeValueMap, consultationApplication_keyContrasts, modeId);
+
+            String text = CxXmlUtil.getXmlText(content);
+            structureMap.put("text", text);
+            cutWordMap = Preproc.getCutWordMap(true, consultationApplication_sourceTitles, text);
+            cutWordMap.putAll(structureMap);
+        }
 
         ConsultationApplicationDoc consultationApplicationDoc = ModelDocGenerate.consultationApplicationDocGen(cutWordMap);
-        consultationApplicationDoc.setText(text);
+        consultationApplicationDoc.setText(cutWordMap.get("text"));
         consultationApplicationDoc.setPageData((Map) cutWordMap);
 
         return consultationApplicationDoc;

+ 18 - 11
trans/src/main/java/com/lantone/qc/trans/changx/ChangxCrisisValueReportDocTrans.java

@@ -1,11 +1,11 @@
 package com.lantone.qc.trans.changx;
 
 import com.google.common.collect.Lists;
+import com.lantone.qc.dbanaly.facade.changx.CxXmlUtil;
 import com.lantone.qc.pub.model.doc.CrisisValueReportDoc;
 import com.lantone.qc.pub.model.vo.MedrecVo;
-import com.lantone.qc.pub.util.StringUtil;
+import com.lantone.qc.pub.util.FastJsonUtils;
 import com.lantone.qc.trans.ModelDocTrans;
-import com.lantone.qc.dbanaly.facade.changx.CxXmlUtil;
 import com.lantone.qc.trans.comsis.ModelDocGenerate;
 import com.lantone.qc.trans.comsis.OrdinaryAssistant;
 import com.lantone.qc.trans.comsis.Preproc;
@@ -19,6 +19,7 @@ import java.util.Map;
  * @time: 2020/3/19 19:41
  */
 public class ChangxCrisisValueReportDocTrans extends ModelDocTrans {
+    private String modeId = "23";
 
     @Override
     public List<CrisisValueReportDoc> extract(MedrecVo medrecVo) {
@@ -32,18 +33,24 @@ public class ChangxCrisisValueReportDocTrans extends ModelDocTrans {
 
     private CrisisValueReportDoc getCrisisValueReportDoc(Map<String, Object> contentMap) {
         String content = contentMap.get("xmlText").toString();
-        Map<String, String> xmlNodeValueMap = CxXmlUtil.firstLevelNodeValue(content);
-        xmlNodeValueMap.put("mode_id=" + contentMap.get("modeId").toString(), "");
-        xmlNodeValueMap.put("rec_title=" + contentMap.get("recTitle").toString(), "");
-        Map<String, String> structureMap = OrdinaryAssistant.mapKeyContrast(xmlNodeValueMap, keyContrasts);
-        structureMap.put("医生姓名", structureMap.get("医生签名"));
+        Map<String, String> cutWordMap = null;
+        if (contentMap.get("isParsed") != null && "1".equals(contentMap.get("isParsed").toString())) {
+            cutWordMap = (Map) FastJsonUtils.getJsonToMap(content);
+        } else {
+            Map<String, String> xmlNodeValueMap = CxXmlUtil.firstLevelNodeValue(content);
+            xmlNodeValueMap.put("mode_id=" + contentMap.get("modeId").toString(), "");
+            xmlNodeValueMap.put("rec_title=" + contentMap.get("recTitle").toString(), "");
+            Map<String, String> structureMap = OrdinaryAssistant.mapKeyContrast(xmlNodeValueMap, keyContrasts, modeId);
+            structureMap.put("医生姓名", structureMap.get("医生签名"));
 
-        String text = CxXmlUtil.getXmlText(content);
-        Map<String, String> cutWordMap = Preproc.getCutWordMap(true, sourceTitles, text);
-        cutWordMap.putAll(structureMap);
+            String text = CxXmlUtil.getXmlText(content);
+            structureMap.put("text", text);
+            cutWordMap = Preproc.getCutWordMap(true, sourceTitles, text);
+            cutWordMap.putAll(structureMap);
+        }
 
         CrisisValueReportDoc crisisValueReportDoc = ModelDocGenerate.crisisValueReportDocGen(cutWordMap);
-        crisisValueReportDoc.setText(text);
+        crisisValueReportDoc.setText(cutWordMap.get("text"));
         crisisValueReportDoc.setPageData((Map) cutWordMap);
 
         return crisisValueReportDoc;

+ 17 - 10
trans/src/main/java/com/lantone/qc/trans/changx/ChangxCriticallyIllNoticeDocTrans.java

@@ -1,11 +1,11 @@
 package com.lantone.qc.trans.changx;
 
 import com.google.common.collect.Lists;
+import com.lantone.qc.dbanaly.facade.changx.CxXmlUtil;
 import com.lantone.qc.pub.model.doc.CriticallyIllNoticeDoc;
 import com.lantone.qc.pub.model.vo.MedrecVo;
-import com.lantone.qc.pub.util.StringUtil;
+import com.lantone.qc.pub.util.FastJsonUtils;
 import com.lantone.qc.trans.ModelDocTrans;
-import com.lantone.qc.dbanaly.facade.changx.CxXmlUtil;
 import com.lantone.qc.trans.comsis.ModelDocGenerate;
 import com.lantone.qc.trans.comsis.OrdinaryAssistant;
 import com.lantone.qc.trans.comsis.Preproc;
@@ -19,6 +19,7 @@ import java.util.Map;
  * @time: 2020/3/19 19:41
  */
 public class ChangxCriticallyIllNoticeDocTrans extends ModelDocTrans {
+    private String modeId = "25";
 
     @Override
     public List<CriticallyIllNoticeDoc> extract(MedrecVo medrecVo) {
@@ -32,17 +33,23 @@ public class ChangxCriticallyIllNoticeDocTrans extends ModelDocTrans {
 
     private CriticallyIllNoticeDoc getCriticallyIllNoticeDoc(Map<String, Object> contentMap) {
         String content = contentMap.get("xmlText").toString();
-        Map<String, String> xmlNodeValueMap = CxXmlUtil.firstLevelNodeValue(content);
-        xmlNodeValueMap.put("mode_id=" + contentMap.get("modeId").toString(), "");
-        xmlNodeValueMap.put("rec_title=" + contentMap.get("recTitle").toString(), "");
-        Map<String, String> structureMap = OrdinaryAssistant.mapKeyContrast(xmlNodeValueMap, keyContrasts);
+        Map<String, String> cutWordMap = null;
+        if (contentMap.get("isParsed") != null && "1".equals(contentMap.get("isParsed").toString())) {
+            cutWordMap = (Map) FastJsonUtils.getJsonToMap(content);
+        } else {
+            Map<String, String> xmlNodeValueMap = CxXmlUtil.firstLevelNodeValue(content);
+            xmlNodeValueMap.put("mode_id=" + contentMap.get("modeId").toString(), "");
+            xmlNodeValueMap.put("rec_title=" + contentMap.get("recTitle").toString(), "");
+            Map<String, String> structureMap = OrdinaryAssistant.mapKeyContrast(xmlNodeValueMap, keyContrasts, modeId);
 
-        String text = CxXmlUtil.getXmlText(content);
-        Map<String, String> cutWordMap = Preproc.getCutWordMap(true, sourceTitles, text);
-        cutWordMap.putAll(structureMap);
+            String text = CxXmlUtil.getXmlText(content);
+            structureMap.put("text", text);
+            cutWordMap = Preproc.getCutWordMap(true, sourceTitles, text);
+            cutWordMap.putAll(structureMap);
+        }
 
         CriticallyIllNoticeDoc criticallyIllNoticeDoc = ModelDocGenerate.criticallyIllNoticeDocGen(cutWordMap);
-        criticallyIllNoticeDoc.setText(text);
+        criticallyIllNoticeDoc.setText(cutWordMap.get("text"));
         criticallyIllNoticeDoc.setPageData((Map) cutWordMap);
 
         return criticallyIllNoticeDoc;

+ 17 - 10
trans/src/main/java/com/lantone/qc/trans/changx/ChangxDailyCourseRecordDocTrans.java

@@ -1,11 +1,11 @@
 package com.lantone.qc.trans.changx;
 
 import com.google.common.collect.Lists;
+import com.lantone.qc.dbanaly.facade.changx.CxXmlUtil;
 import com.lantone.qc.pub.model.doc.DailyCourseRecordDoc;
 import com.lantone.qc.pub.model.vo.MedrecVo;
-import com.lantone.qc.pub.util.StringUtil;
+import com.lantone.qc.pub.util.FastJsonUtils;
 import com.lantone.qc.trans.ModelDocTrans;
-import com.lantone.qc.dbanaly.facade.changx.CxXmlUtil;
 import com.lantone.qc.trans.comsis.OrdinaryAssistant;
 import com.lantone.qc.trans.comsis.Preproc;
 
@@ -18,6 +18,7 @@ import java.util.Map;
  * @time: 2020/3/17 17:34
  */
 public class ChangxDailyCourseRecordDocTrans extends ModelDocTrans {
+    private String modeId = "56";
 
     @Override
     public List<DailyCourseRecordDoc> extract(MedrecVo medrecVo) {
@@ -31,17 +32,23 @@ public class ChangxDailyCourseRecordDocTrans extends ModelDocTrans {
 
     private DailyCourseRecordDoc getDailyCourseRecordDoc(Map<String, Object> contentMap) {
         String content = contentMap.get("xmlText").toString();
-        Map<String, String> xmlNodeValueMap = CxXmlUtil.firstLevelNodeValue(content);
-        xmlNodeValueMap.put("mode_id=" + contentMap.get("modeId").toString(), "");
-        xmlNodeValueMap.put("rec_title=" + contentMap.get("recTitle").toString(), "");
-        Map<String, String> structureMap = OrdinaryAssistant.mapKeyContrast(xmlNodeValueMap, keyContrasts);
+        Map<String, String> cutWordMap = null;
+        if (contentMap.get("isParsed") != null && "1".equals(contentMap.get("isParsed").toString())) {
+            cutWordMap = (Map) FastJsonUtils.getJsonToMap(content);
+        } else {
+            Map<String, String> xmlNodeValueMap = CxXmlUtil.firstLevelNodeValue(content);
+            xmlNodeValueMap.put("mode_id=" + contentMap.get("modeId").toString(), "");
+            xmlNodeValueMap.put("rec_title=" + contentMap.get("recTitle").toString(), "");
+            Map<String, String> structureMap = OrdinaryAssistant.mapKeyContrast(xmlNodeValueMap, keyContrasts, modeId);
 
-        String text = CxXmlUtil.getXmlText(content);
-        Map<String, String> cutWordMap = Preproc.getCutWordMap(true, sourceTitles, text);
-        cutWordMap.putAll(structureMap);
+            String text = CxXmlUtil.getXmlText(content);
+            structureMap.put("text", text);
+            cutWordMap = Preproc.getCutWordMap(true, sourceTitles, text);
+            cutWordMap.putAll(structureMap);
+        }
 
         DailyCourseRecordDoc dailyCourseRecordDoc = new DailyCourseRecordDoc();
-        dailyCourseRecordDoc.setText(text);
+        dailyCourseRecordDoc.setText(cutWordMap.get("text"));
         dailyCourseRecordDoc.setPageData((Map) cutWordMap);
 
         return dailyCourseRecordDoc;

+ 17 - 10
trans/src/main/java/com/lantone/qc/trans/changx/ChangxDeathCaseDiscussDocTrans.java

@@ -1,11 +1,11 @@
 package com.lantone.qc.trans.changx;
 
 import com.google.common.collect.Lists;
+import com.lantone.qc.dbanaly.facade.changx.CxXmlUtil;
 import com.lantone.qc.pub.model.doc.DeathCaseDiscussDoc;
 import com.lantone.qc.pub.model.vo.MedrecVo;
-import com.lantone.qc.pub.util.StringUtil;
+import com.lantone.qc.pub.util.FastJsonUtils;
 import com.lantone.qc.trans.ModelDocTrans;
-import com.lantone.qc.dbanaly.facade.changx.CxXmlUtil;
 import com.lantone.qc.trans.comsis.ModelDocGenerate;
 import com.lantone.qc.trans.comsis.OrdinaryAssistant;
 import com.lantone.qc.trans.comsis.Preproc;
@@ -19,22 +19,29 @@ import java.util.Map;
  * @time: 2020/3/17 13:22
  */
 public class ChangxDeathCaseDiscussDocTrans extends ModelDocTrans {
+    private String modeId = "3";
 
     @Override
     public DeathCaseDiscussDoc extract(MedrecVo medrecVo) {
         Map<String, Object> contentMap = ((List<Map>) medrecVo.getContent().get("content")).get(0);
         String content = contentMap.get("xmlText").toString();
-        Map<String, String> xmlNodeValueMap = CxXmlUtil.firstLevelNodeValue(content);
-        xmlNodeValueMap.put("mode_id=" + contentMap.get("modeId").toString(), "");
-        xmlNodeValueMap.put("rec_title=" + contentMap.get("recTitle").toString(), "");
-        Map<String, String> structureMap = OrdinaryAssistant.mapKeyContrast(xmlNodeValueMap, keyContrasts);
+        Map<String, String> cutWordMap = null;
+        if (contentMap.get("isParsed") != null && "1".equals(contentMap.get("isParsed").toString())) {
+            cutWordMap = (Map) FastJsonUtils.getJsonToMap(content);
+        } else {
+            Map<String, String> xmlNodeValueMap = CxXmlUtil.firstLevelNodeValue(content);
+            xmlNodeValueMap.put("mode_id=" + contentMap.get("modeId").toString(), "");
+            xmlNodeValueMap.put("rec_title=" + contentMap.get("recTitle").toString(), "");
+            Map<String, String> structureMap = OrdinaryAssistant.mapKeyContrast(xmlNodeValueMap, keyContrasts, modeId);
 
-        String text = CxXmlUtil.getXmlText(content);
-        Map<String, String> cutWordMap = Preproc.getCutWordMap(true, sourceTitles, text);
-        cutWordMap.putAll(structureMap);
+            String text = CxXmlUtil.getXmlText(content);
+            structureMap.put("text", text);
+            cutWordMap = Preproc.getCutWordMap(true, sourceTitles, text);
+            cutWordMap.putAll(structureMap);
+        }
 
         DeathCaseDiscussDoc deathCaseDiscussDoc = ModelDocGenerate.deathCaseDiscussDocGen(cutWordMap);
-        deathCaseDiscussDoc.setText(text);
+        deathCaseDiscussDoc.setText(cutWordMap.get("text"));
         deathCaseDiscussDoc.setPageData((Map) cutWordMap);
 
         return deathCaseDiscussDoc;

+ 17 - 11
trans/src/main/java/com/lantone/qc/trans/changx/ChangxDeathRecordDocTrans.java

@@ -1,11 +1,11 @@
 package com.lantone.qc.trans.changx;
 
 import com.google.common.collect.Lists;
+import com.lantone.qc.dbanaly.facade.changx.CxXmlUtil;
 import com.lantone.qc.pub.model.doc.DeathRecordDoc;
 import com.lantone.qc.pub.model.vo.MedrecVo;
-import com.lantone.qc.pub.util.StringUtil;
+import com.lantone.qc.pub.util.FastJsonUtils;
 import com.lantone.qc.trans.ModelDocTrans;
-import com.lantone.qc.dbanaly.facade.changx.CxXmlUtil;
 import com.lantone.qc.trans.comsis.ModelDocGenerate;
 import com.lantone.qc.trans.comsis.OrdinaryAssistant;
 import com.lantone.qc.trans.comsis.Preproc;
@@ -19,23 +19,29 @@ import java.util.Map;
  * @time: 2020/3/17 13:23
  */
 public class ChangxDeathRecordDocTrans extends ModelDocTrans {
+    private String modeId = "24";
 
     @Override
     public DeathRecordDoc extract(MedrecVo medrecVo) {
         Map<String, Object> contentMap = ((List<Map>) medrecVo.getContent().get("content")).get(0);
         String content = contentMap.get("xmlText").toString();
+        Map<String, String> cutWordMap = null;
+        if (contentMap.get("isParsed") != null && "1".equals(contentMap.get("isParsed").toString())) {
+            cutWordMap = (Map) FastJsonUtils.getJsonToMap(content);
+        } else {
+            Map<String, String> xmlNodeValueMap = CxXmlUtil.firstLevelNodeValue(content);
+            xmlNodeValueMap.put("mode_id=" + contentMap.get("modeId").toString(), "");
+            xmlNodeValueMap.put("rec_title=" + contentMap.get("recTitle").toString(), "");
+            Map<String, String> structureMap = OrdinaryAssistant.mapKeyContrast(xmlNodeValueMap, keyContrasts, modeId);
 
-        Map<String, String> xmlNodeValueMap = CxXmlUtil.firstLevelNodeValue(content);
-        xmlNodeValueMap.put("mode_id=" + contentMap.get("modeId").toString(), "");
-        xmlNodeValueMap.put("rec_title=" + contentMap.get("recTitle").toString(), "");
-        Map<String, String> structureMap = OrdinaryAssistant.mapKeyContrast(xmlNodeValueMap, keyContrasts);
-
-        String text = CxXmlUtil.getXmlText(content);
-        Map<String, String> cutWordMap = Preproc.getCutWordMap(true, sourceTitles, text);
-        cutWordMap.putAll(structureMap);
+            String text = CxXmlUtil.getXmlText(content);
+            structureMap.put("text", text);
+            cutWordMap = Preproc.getCutWordMap(true, sourceTitles, text);
+            cutWordMap.putAll(structureMap);
+        }
 
         DeathRecordDoc deathRecordDoc = ModelDocGenerate.deathRecordDocGen(cutWordMap);
-        deathRecordDoc.setText(text);
+        deathRecordDoc.setText(cutWordMap.get("text"));
         deathRecordDoc.setPageData((Map) cutWordMap);
 
         return deathRecordDoc;

+ 22 - 15
trans/src/main/java/com/lantone/qc/trans/changx/ChangxDifficultCaseDiscussDocTrans.java

@@ -1,11 +1,11 @@
 package com.lantone.qc.trans.changx;
 
 import com.google.common.collect.Lists;
+import com.lantone.qc.dbanaly.facade.changx.CxXmlUtil;
 import com.lantone.qc.pub.model.doc.DifficultCaseDiscussDoc;
 import com.lantone.qc.pub.model.vo.MedrecVo;
-import com.lantone.qc.pub.util.StringUtil;
+import com.lantone.qc.pub.util.FastJsonUtils;
 import com.lantone.qc.trans.ModelDocTrans;
-import com.lantone.qc.dbanaly.facade.changx.CxXmlUtil;
 import com.lantone.qc.trans.comsis.ModelDocGenerate;
 import com.lantone.qc.trans.comsis.OrdinaryAssistant;
 import com.lantone.qc.trans.comsis.Preproc;
@@ -19,6 +19,7 @@ import java.util.Map;
  * @time: 2020/3/17 13:23
  */
 public class ChangxDifficultCaseDiscussDocTrans extends ModelDocTrans {
+    private String modeId = "19";
 
     @Override
     public List<DifficultCaseDiscussDoc> extract(MedrecVo medrecVo) {
@@ -32,17 +33,23 @@ public class ChangxDifficultCaseDiscussDocTrans extends ModelDocTrans {
 
     private DifficultCaseDiscussDoc getDifficultCaseDiscussDoc(Map<String, Object> contentMap) {
         String content = contentMap.get("xmlText").toString();
-        Map<String, String> xmlNodeValueMap = CxXmlUtil.firstLevelNodeValue(content);
-        xmlNodeValueMap.put("mode_id=" + contentMap.get("modeId").toString(), "");
-        xmlNodeValueMap.put("rec_title=" + contentMap.get("recTitle").toString(), "");
-        Map<String, String> structureMap = OrdinaryAssistant.mapKeyContrast(xmlNodeValueMap, keyContrasts);
+        Map<String, String> cutWordMap = null;
+        if (contentMap.get("isParsed") != null && "1".equals(contentMap.get("isParsed").toString())) {
+            cutWordMap = (Map) FastJsonUtils.getJsonToMap(content);
+        } else {
+            Map<String, String> xmlNodeValueMap = CxXmlUtil.firstLevelNodeValue(content);
+            xmlNodeValueMap.put("mode_id=" + contentMap.get("modeId").toString(), "");
+            xmlNodeValueMap.put("rec_title=" + contentMap.get("recTitle").toString(), "");
+            Map<String, String> structureMap = OrdinaryAssistant.mapKeyContrast(xmlNodeValueMap, keyContrasts, modeId);
 
-        String text = CxXmlUtil.getXmlText(content);
-        Map<String, String> cutWordMap = Preproc.getCutWordMap(true, sourceTitles, text);
-        cutWordMap.putAll(structureMap);
+            String text = CxXmlUtil.getXmlText(content);
+            structureMap.put("text", text);
+            cutWordMap = Preproc.getCutWordMap(true, sourceTitles, text);
+            cutWordMap.putAll(structureMap);
+        }
 
         DifficultCaseDiscussDoc difficultCaseDiscussDoc = ModelDocGenerate.difficultCaseDiscussDocGen(cutWordMap);
-        difficultCaseDiscussDoc.setText(content);
+        difficultCaseDiscussDoc.setText(cutWordMap.get("text"));
         difficultCaseDiscussDoc.setPageData((Map) cutWordMap);
 
         return difficultCaseDiscussDoc;
@@ -63,11 +70,11 @@ public class ChangxDifficultCaseDiscussDocTrans extends ModelDocTrans {
     );
 
     private List<String> keyContrasts = Lists.newArrayList(
-          "讨论日期=讨论时间",
-          "人员及专业技术职务++++专业技术职务=参加讨论者",
-          "患者病情汇报=简要病情",
-          "讨论结果++++主持人小结意见=结论",
-          "签名++++=签名",
+            "讨论日期=讨论时间",
+            "人员及专业技术职务++++专业技术职务=参加讨论者",
+            "患者病情汇报=简要病情",
+            "讨论结果++++主持人小结意见=结论",
+            "签名++++=签名",
             "患者病情汇报=讨论内容"
     );
 

+ 8 - 20
trans/src/main/java/com/lantone/qc/trans/changx/ChangxDocTrans.java

@@ -80,10 +80,6 @@ public class ChangxDocTrans extends DocTrans {
                 ChangxAnesthesiaRelatedDocTrans changxAnesthesiaRelatedDocTrans = new ChangxAnesthesiaRelatedDocTrans();
                 inputInfo.setAnesthesiaRelatedDocs(changxAnesthesiaRelatedDocTrans.extract(i));
             }
-            //            if (i.getTitle().equals("值班交接制度")) {
-            //                ChangxDutyShiftSystemDocTrans dutyShiftSystemDocTrans = new ChangxDutyShiftSystemDocTrans();
-            //                inputInfo.setDutyShiftSystemDocs(dutyShiftSystemDocTrans.extract(i));
-            //            }
             if (i.getTitle().equals("首次病程录")) {
                 ChangxFirstCourseRecordDocTrans firstCourseRecordDocTrans = new ChangxFirstCourseRecordDocTrans();
                 inputInfo.setFirstCourseRecordDoc(firstCourseRecordDocTrans.extract(i));
@@ -96,18 +92,10 @@ public class ChangxDocTrans extends DocTrans {
                 ChangxLeaveHospitalDocTrans leaveHospitalDocTrans = new ChangxLeaveHospitalDocTrans();
                 inputInfo.setLeaveHospitalDoc(leaveHospitalDocTrans.extract(i));
             }
-            //            if (i.getTitle().equals("分级护理制度")) {
-            //                ChangxNursingSystemDocTrans nursingSystemDocTrans = new ChangxNursingSystemDocTrans();
-            //                inputInfo.setNursingSystemDoc(nursingSystemDocTrans.extract(i));
-            //            }
             if (i.getTitle().equals("抢救记录")) {
                 ChangxRescueDocTrans rescueDocTrans = new ChangxRescueDocTrans();
                 inputInfo.setRescueDocs(rescueDocTrans.extract(i));
             }
-            //            if (i.getTitle().equals("病重通知书")) {
-            //                ChangxSeriouslyIllNoticeDocTrans seriouslyIllNoticeDocTrans = new ChangxSeriouslyIllNoticeDocTrans();
-            //                inputInfo.setSeriouslyIllNoticeDocs(seriouslyIllNoticeDocTrans.extract(i));
-            //            }
             if (i.getTitle().equals("阶段小结")) {
                 ChangxStagesSummaryDocTrans stagesSummaryDocTrans = new ChangxStagesSummaryDocTrans();
                 inputInfo.setStagesSummaryDocs(stagesSummaryDocTrans.extract(i));
@@ -121,14 +109,6 @@ public class ChangxDocTrans extends DocTrans {
                 ChangxPathologyShipDocTrans pathologyShipDocTrans = new ChangxPathologyShipDocTrans();
                 inputInfo.setPathologyShipDocs(pathologyShipDocTrans.extract(i));
             }
-            //            if (i.getTitle().equals("知情同意书")) {
-            //                ChangxInformedConsentDocTrans informedConsentDocTrans = new ChangxInformedConsentDocTrans();
-            //                inputInfo.setInformedConsentDoc(informedConsentDocTrans.extract(i));
-            //            }
-            //            if (i.getTitle().equals("谈话告知书")) {
-            //                ChangxNoticeOfConversationDocTrans noticeOfConversationDocTrans = new ChangxNoticeOfConversationDocTrans();
-            //                inputInfo.setNoticeOfConversationDoc(noticeOfConversationDocTrans.extract(i));
-            //            }
             if (i.getTitle().equals("日常病程录")) {
                 ChangxDailyCourseRecordDocTrans dailyCourseRecordDocTrans = new ChangxDailyCourseRecordDocTrans();
                 inputInfo.setDailyCourseRecordDocs(dailyCourseRecordDocTrans.extract(i));
@@ -137,6 +117,14 @@ public class ChangxDocTrans extends DocTrans {
                 ChangxMedicalRecordInfoDocTrans medicalRecordInfoDocTrans = new ChangxMedicalRecordInfoDocTrans();
                 inputInfo.setMedicalRecordInfoDoc(medicalRecordInfoDocTrans.extract(i));
             }
+            if (i.getTitle().equals("化验")) {
+                ChangxLisDocTrans changxLisDocTrans = new ChangxLisDocTrans();
+                inputInfo.setLisDocs(changxLisDocTrans.extract(i));
+            }
+            if (i.getTitle().equals("门诊")) {
+                ChangxOutDepDocTrans changxOutDepDocTrans = new ChangxOutDepDocTrans();
+                inputInfo.setBeHospitalizedDoc(changxOutDepDocTrans.extract(i));
+            }
         }
         pageDataHandle(inputInfo);
         return inputInfo;

+ 18 - 10
trans/src/main/java/com/lantone/qc/trans/changx/ChangxFirstCourseRecordDocTrans.java

@@ -2,11 +2,12 @@ package com.lantone.qc.trans.changx;
 
 import com.google.common.collect.Lists;
 import com.google.common.collect.Maps;
+import com.lantone.qc.dbanaly.facade.changx.CxXmlUtil;
 import com.lantone.qc.pub.model.doc.FirstCourseRecordDoc;
 import com.lantone.qc.pub.model.vo.MedrecVo;
+import com.lantone.qc.pub.util.FastJsonUtils;
 import com.lantone.qc.pub.util.StringUtil;
 import com.lantone.qc.trans.ModelDocTrans;
-import com.lantone.qc.dbanaly.facade.changx.CxXmlUtil;
 import com.lantone.qc.trans.comsis.ModelDocGenerate;
 import com.lantone.qc.trans.comsis.OrdinaryAssistant;
 import com.lantone.qc.trans.comsis.Preproc;
@@ -22,25 +23,32 @@ import static com.lantone.qc.trans.comsis.ModelDocGenerate.structureMapJoin;
  * @time: 2020/3/17 13:25
  */
 public class ChangxFirstCourseRecordDocTrans extends ModelDocTrans {
+    private String modeId = "2";
 
     @Override
     public FirstCourseRecordDoc extract(MedrecVo medrecVo) {
         Map<String, Object> contentMap = ((List<Map>) medrecVo.getContent().get("content")).get(0);
         String content = contentMap.get("xmlText").toString();
-        Map<String, String> xmlNodeValueMap = CxXmlUtil.firstLevelNodeValue(content);
-        xmlNodeValueMap.put("mode_id=" + contentMap.get("modeId").toString(), "");
-        xmlNodeValueMap.put("rec_title=" + contentMap.get("recTitle").toString(), "");
-        Map<String, String> structureMap = OrdinaryAssistant.mapKeyContrast(xmlNodeValueMap, keyContrasts);
+        Map<String, String> cutWordMap = null;
+        if (contentMap.get("isParsed") != null && "1".equals(contentMap.get("isParsed").toString())) {
+            cutWordMap = (Map) FastJsonUtils.getJsonToMap(content);
+        } else {
+            Map<String, String> xmlNodeValueMap = CxXmlUtil.firstLevelNodeValue(content);
+            xmlNodeValueMap.put("mode_id=" + contentMap.get("modeId").toString(), "");
+            xmlNodeValueMap.put("rec_title=" + contentMap.get("recTitle").toString(), "");
+            Map<String, String> structureMap = OrdinaryAssistant.mapKeyContrast(xmlNodeValueMap, keyContrasts, modeId);
 
-        String text = CxXmlUtil.getXmlText(content);
-        Map<String, String> cutWordMap = getCutWordMap(text);
-        cutWordMap.putAll(structureMap);
+            String text = CxXmlUtil.getXmlText(content);
+            structureMap.put("text", text);
+            cutWordMap = getCutWordMap(text);
+            cutWordMap.putAll(structureMap);
+        }
 
         FirstCourseRecordDoc firstCourseRecordDoc = ModelDocGenerate.firstCourseRecordDocGen(cutWordMap);
-        firstCourseRecordDoc.setText(text);
+        firstCourseRecordDoc.setText(cutWordMap.get("text"));
         firstCourseRecordDoc.setPageData((Map) cutWordMap);
         List<String> keys = Lists.newArrayList("需求评估", "预期目标", "诊疗计划", "治疗监测计划");
-        String treatPlanJoin = structureMapJoin(structureMap, keys);
+        String treatPlanJoin = structureMapJoin(cutWordMap, keys);
         firstCourseRecordDoc.getTreatPlanLabel().setAiText(treatPlanJoin);
         return firstCourseRecordDoc;
     }

+ 12 - 5
trans/src/main/java/com/lantone/qc/trans/changx/ChangxLeaveHospitalDocTrans.java

@@ -1,11 +1,12 @@
 package com.lantone.qc.trans.changx;
 
 import com.google.common.collect.Lists;
+import com.lantone.qc.dbanaly.facade.changx.CxXmlUtil;
 import com.lantone.qc.pub.model.doc.LeaveHospitalDoc;
 import com.lantone.qc.pub.model.label.LeaveHospitalDoctorAdviceLabel;
 import com.lantone.qc.pub.model.vo.MedrecVo;
+import com.lantone.qc.pub.util.FastJsonUtils;
 import com.lantone.qc.trans.ModelDocTrans;
-import com.lantone.qc.dbanaly.facade.changx.CxXmlUtil;
 import com.lantone.qc.trans.comsis.ModelDocGenerate;
 import com.lantone.qc.trans.comsis.OrdinaryAssistant;
 import org.apache.commons.lang3.StringUtils;
@@ -19,15 +20,21 @@ import java.util.Map;
  * @time: 2020/3/17 13:25
  */
 public class ChangxLeaveHospitalDocTrans extends ModelDocTrans {
+    private String modeId = "5";
 
     @Override
     public LeaveHospitalDoc extract(MedrecVo medrecVo) {
         Map<String, Object> contentMap = ((List<Map>) medrecVo.getContent().get("content")).get(0);
         String content = contentMap.get("xmlText").toString();
-        Map<String, String> sourceMap = CxXmlUtil.firstLevelNodeValue(content);
-        sourceMap.put("mode_id=" + contentMap.get("modeId").toString(), "");
-        sourceMap.put("rec_title=" + contentMap.get("recTitle").toString(), "");
-        Map<String, String> structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, keyContrasts);
+        Map<String, String> structureMap = null;
+        if (contentMap.get("isParsed") != null && "1".equals(contentMap.get("isParsed").toString())) {
+            structureMap = (Map) FastJsonUtils.getJsonToMap(content);
+        } else {
+            Map<String, String> sourceMap = CxXmlUtil.firstLevelNodeValue(content);
+            sourceMap.put("mode_id=" + contentMap.get("modeId").toString(), "");
+            sourceMap.put("rec_title=" + contentMap.get("recTitle").toString(), "");
+            structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, keyContrasts, modeId);
+        }
         LeaveHospitalDoc leaveHospitalDoc = ModelDocGenerate.leaveHospitalDocGen(structureMap);
 
         if (StringUtils.isNotEmpty(structureMap.get("出院医嘱"))) {

+ 36 - 0
trans/src/main/java/com/lantone/qc/trans/changx/ChangxLisDocTrans.java

@@ -0,0 +1,36 @@
+package com.lantone.qc.trans.changx;
+
+import com.google.common.collect.Lists;
+import com.lantone.qc.pub.model.doc.LisDoc;
+import com.lantone.qc.pub.model.vo.MedrecVo;
+import com.lantone.qc.pub.util.FastJsonUtils;
+import com.lantone.qc.trans.ModelDocTrans;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Description: 化验信息文档生成
+ * @author: rengb
+ * @time: 2020/3/19 19:41
+ */
+public class ChangxLisDocTrans extends ModelDocTrans {
+
+    @Override
+    public List<LisDoc> extract(MedrecVo medrecVo) {
+        List<LisDoc> retList = Lists.newArrayList();
+        List<String> contents = (List) medrecVo.getContent().get("content");
+        contents.forEach(content -> {
+            retList.add(getDoctorAdviceDoc((Map) FastJsonUtils.getJsonToMap(content)));
+        });
+        return retList;
+    }
+
+    private LisDoc getDoctorAdviceDoc(Map<String, String> content) {
+        LisDoc doctorAdviceDoc = new LisDoc();
+        doctorAdviceDoc.setStructureMap(content);
+        doctorAdviceDoc.setPageData((Map) content);
+        return doctorAdviceDoc;
+    }
+
+}

+ 105 - 75
trans/src/main/java/com/lantone/qc/trans/changx/ChangxOperationDocTrans.java

@@ -4,13 +4,9 @@ import com.google.common.collect.Lists;
 import com.google.common.collect.Maps;
 import com.google.common.collect.Sets;
 import com.lantone.qc.dbanaly.facade.changx.CxXmlUtil;
-import com.lantone.qc.pub.model.doc.operation.OperationDiscussionDoc;
-import com.lantone.qc.pub.model.doc.operation.OperationDoc;
-import com.lantone.qc.pub.model.doc.operation.OperationInformedConsentDoc;
-import com.lantone.qc.pub.model.doc.operation.OperationRecordDoc;
-import com.lantone.qc.pub.model.doc.operation.OperationSafetyChecklistDoc;
-import com.lantone.qc.pub.model.doc.operation.PreoperativeDiscussionDoc;
+import com.lantone.qc.pub.model.doc.operation.*;
 import com.lantone.qc.pub.model.vo.MedrecVo;
+import com.lantone.qc.pub.util.FastJsonUtils;
 import com.lantone.qc.pub.util.ListUtil;
 import com.lantone.qc.pub.util.StringUtil;
 import com.lantone.qc.trans.ModelDocTrans;
@@ -28,7 +24,6 @@ import java.util.Set;
  * @time: 2020/3/20 17:11
  */
 public class ChangxOperationDocTrans extends ModelDocTrans {
-
     @Override
     public List<OperationDoc> extract(MedrecVo medrecVo) {
         List<OperationDoc> retList = Lists.newArrayList();
@@ -88,24 +83,31 @@ public class ChangxOperationDocTrans extends ModelDocTrans {
     }
 
     private OperationDiscussionDoc getOperationDiscussionDoc(Map<String, Object> contentMap) {
+        String modeId = "18";
         String content = contentMap.get("xmlText").toString();
-        Map<String, String> xmlNodeValueMap = CxXmlUtil.firstLevelNodeValue(content);
-        xmlNodeValueMap.put("mode_id=" + contentMap.get("modeId").toString(), "");
-        xmlNodeValueMap.put("rec_title=" + contentMap.get("recTitle").toString(), "");
-        Map<String, String> structureMap = OrdinaryAssistant.mapKeyContrast(xmlNodeValueMap, operationDiscussion_keyContrasts);
-        if (StringUtil.isNotBlank(structureMap.get("手术开始时间"))) {
-            structureMap.put("手术时间", structureMap.get("手术开始时间"));
-        }
-        if (StringUtil.isNotBlank(structureMap.get("签名"))) {
-            structureMap.put("记录医师", structureMap.get("签名"));
-        }
+        Map<String, String> cutWordMap = null;
+        if (contentMap.get("isParsed") != null && "1".equals(contentMap.get("isParsed").toString())) {
+            cutWordMap = (Map) FastJsonUtils.getJsonToMap(content);
+        } else {
+            Map<String, String> xmlNodeValueMap = CxXmlUtil.firstLevelNodeValue(content);
+            xmlNodeValueMap.put("mode_id=" + contentMap.get("modeId").toString(), "");
+            xmlNodeValueMap.put("rec_title=" + contentMap.get("recTitle").toString(), "");
+            Map<String, String> structureMap = OrdinaryAssistant.mapKeyContrast(xmlNodeValueMap, operationDiscussion_keyContrasts, modeId);
+            if (StringUtil.isNotBlank(structureMap.get("手术开始时间"))) {
+                structureMap.put("手术时间", structureMap.get("手术开始时间"));
+            }
+            if (StringUtil.isNotBlank(structureMap.get("签名"))) {
+                structureMap.put("记录医师", structureMap.get("签名"));
+            }
 
-        String text = CxXmlUtil.getXmlText(content);
-        Map<String, String> cutWordMap = Preproc.getCutWordMap(true, operationDiscussion_sourceTitles, text);
-        cutWordMap.putAll(structureMap);
+            String text = CxXmlUtil.getXmlText(content);
+            structureMap.put("text", text);
+            cutWordMap = Preproc.getCutWordMap(true, operationDiscussion_sourceTitles, text);
+            cutWordMap.putAll(structureMap);
+        }
 
         OperationDiscussionDoc operationDiscussionDoc = ModelDocGenerate.operationDiscussionDocGen(cutWordMap);
-        operationDiscussionDoc.setText(text);
+        operationDiscussionDoc.setText(cutWordMap.get("text"));
         operationDiscussionDoc.setPageData((Map) cutWordMap);
 
         return operationDiscussionDoc;
@@ -176,21 +178,28 @@ public class ChangxOperationDocTrans extends ModelDocTrans {
     }
 
     private OperationRecordDoc getOperationRecordDoc(Map<String, Object> contentMap) {
+        String modeId = "17";
         String content = contentMap.get("xmlText").toString();
-        Map<String, String> xmlNodeValueMap = CxXmlUtil.firstLevelNodeValue(content);
-        xmlNodeValueMap.put("mode_id=" + contentMap.get("modeId").toString(), "");
-        xmlNodeValueMap.put("rec_title=" + contentMap.get("recTitle").toString(), "");
-        Map<String, String> structureMap = OrdinaryAssistant.mapKeyContrast(xmlNodeValueMap, operationRecord_keyContrasts);
-        if (StringUtil.isNotBlank(structureMap.get("签名"))) {
-            structureMap.put("记录医师", structureMap.get("签名"));
-        }
+        Map<String, String> cutWordMap = null;
+        if (contentMap.get("isParsed") != null && "1".equals(contentMap.get("isParsed").toString())) {
+            cutWordMap = (Map) FastJsonUtils.getJsonToMap(content);
+        } else {
+            Map<String, String> xmlNodeValueMap = CxXmlUtil.firstLevelNodeValue(content);
+            xmlNodeValueMap.put("mode_id=" + contentMap.get("modeId").toString(), "");
+            xmlNodeValueMap.put("rec_title=" + contentMap.get("recTitle").toString(), "");
+            Map<String, String> structureMap = OrdinaryAssistant.mapKeyContrast(xmlNodeValueMap, operationRecord_keyContrasts, modeId);
+            if (StringUtil.isNotBlank(structureMap.get("签名"))) {
+                structureMap.put("记录医师", structureMap.get("签名"));
+            }
 
-        String text = CxXmlUtil.getXmlText(content);
-        Map<String, String> cutWordMap = Preproc.getCutWordMap(true, operationRecord_sourceTitles, text);
-        cutWordMap.putAll(structureMap);
+            String text = CxXmlUtil.getXmlText(content);
+            structureMap.put("text", text);
+            cutWordMap = Preproc.getCutWordMap(true, operationRecord_sourceTitles, text);
+            cutWordMap.putAll(structureMap);
+        }
 
         OperationRecordDoc operationRecordDoc = ModelDocGenerate.operationRecordDocGen(cutWordMap);
-        operationRecordDoc.setText(text);
+        operationRecordDoc.setText(cutWordMap.get("text"));
         operationRecordDoc.setPageData((Map) cutWordMap);
 
         return operationRecordDoc;
@@ -267,36 +276,43 @@ public class ChangxOperationDocTrans extends ModelDocTrans {
     }
 
     private PreoperativeDiscussionDoc getPreoperativeDiscussionDoc(Map<String, Object> contentMap) {
+        String modeId = "11";
         String content = contentMap.get("xmlText").toString();
-        Map<String, String> xmlNodeValueMap = CxXmlUtil.firstLevelNodeValue(content);
-        xmlNodeValueMap.put("mode_id=" + contentMap.get("modeId").toString(), "");
-        xmlNodeValueMap.put("rec_title=" + contentMap.get("recTitle").toString(), "");
-        Map<String, String> structureMap = OrdinaryAssistant.mapKeyContrast(xmlNodeValueMap, preoperativeDiscussion_keyContrasts);
-        structureMap.put(
-                "术前准备内容",
-                (StringUtil.isBlank(structureMap.get("术前准备内容")) ? "" : structureMap.get("术前准备内容")) + (StringUtil.isBlank(structureMap.get("术前准备++++术前准备情况")) ? "" : structureMap.get("术前准备++++术前准备情况"))
-        );
-        structureMap.put(
-                "术前术后注意事项",
-                (StringUtil.isBlank(structureMap.get("术前术后注意事项")) ? "" : structureMap.get("术前术后注意事项")) + (StringUtil.isBlank(structureMap.get("术后注意事项")) ? "" : structureMap.get("术后注意事项"))
-        );
-        structureMap.put("讨论时间", structureMap.get("记录时间"));
-        if (StringUtil.isNotBlank(structureMap.get("签名"))) {
-            structureMap.put("记录医师", structureMap.get("签名"));
-        }
-        if (StringUtil.isNotBlank(structureMap.get("拟行治疗指征及禁忌症"))) {
-            structureMap.put("拟行术式", structureMap.get("拟行治疗指征及禁忌症"));
-        } else if (StringUtil.isNotBlank(structureMap.get("拟施手术方式"))) {
-            structureMap.put("拟行术式", structureMap.get("拟施手术方式"));
-        }
+        Map<String, String> cutWordMap = null;
+        if (contentMap.get("isParsed") != null && "1".equals(contentMap.get("isParsed").toString())) {
+            cutWordMap = (Map) FastJsonUtils.getJsonToMap(content);
+        } else {
+            Map<String, String> xmlNodeValueMap = CxXmlUtil.firstLevelNodeValue(content);
+            xmlNodeValueMap.put("mode_id=" + contentMap.get("modeId").toString(), "");
+            xmlNodeValueMap.put("rec_title=" + contentMap.get("recTitle").toString(), "");
+            Map<String, String> structureMap = OrdinaryAssistant.mapKeyContrast(xmlNodeValueMap, preoperativeDiscussion_keyContrasts, modeId);
+            structureMap.put(
+                    "术前准备内容",
+                    (StringUtil.isBlank(structureMap.get("术前准备内容")) ? "" : structureMap.get("术前准备内容")) + (StringUtil.isBlank(structureMap.get("术前准备++++术前准备情况")) ? "" : structureMap.get("术前准备++++术前准备情况"))
+            );
+            structureMap.put(
+                    "术前术后注意事项",
+                    (StringUtil.isBlank(structureMap.get("术前术后注意事项")) ? "" : structureMap.get("术前术后注意事项")) + (StringUtil.isBlank(structureMap.get("术后注意事项")) ? "" : structureMap.get("术后注意事项"))
+            );
+            structureMap.put("讨论时间", structureMap.get("记录时间"));
+            if (StringUtil.isNotBlank(structureMap.get("签名"))) {
+                structureMap.put("记录医师", structureMap.get("签名"));
+            }
+            if (StringUtil.isNotBlank(structureMap.get("拟行治疗指征及禁忌症"))) {
+                structureMap.put("拟行术式", structureMap.get("拟行治疗指征及禁忌症"));
+            } else if (StringUtil.isNotBlank(structureMap.get("拟施手术方式"))) {
+                structureMap.put("拟行术式", structureMap.get("拟施手术方式"));
+            }
 
 
-        String text = CxXmlUtil.getXmlText(content);
-        Map<String, String> cutWordMap = Preproc.getCutWordMap(true, preoperativeDiscussion_sourceTitles, text);
-        cutWordMap.putAll(structureMap);
+            String text = CxXmlUtil.getXmlText(content);
+            structureMap.put("text", text);
+            cutWordMap = Preproc.getCutWordMap(true, preoperativeDiscussion_sourceTitles, text);
+            cutWordMap.putAll(structureMap);
+        }
 
         PreoperativeDiscussionDoc preoperativeDiscussionDoc = ModelDocGenerate.preoperativeDiscussionDocGen(cutWordMap);
-        preoperativeDiscussionDoc.setText(text);
+        preoperativeDiscussionDoc.setText(cutWordMap.get("text"));
         preoperativeDiscussionDoc.setPageData((Map) cutWordMap);
 
         return preoperativeDiscussionDoc;
@@ -367,18 +383,25 @@ public class ChangxOperationDocTrans extends ModelDocTrans {
     }
 
     private OperationInformedConsentDoc getOperationInformedConsentDoc(Map<String, Object> contentMap) {
+        String modeId = "16";
         String content = contentMap.get("xmlText").toString();
-        Map<String, String> xmlNodeValueMap = CxXmlUtil.firstLevelNodeValue(content);
-        xmlNodeValueMap.put("mode_id=" + contentMap.get("modeId").toString(), "");
-        xmlNodeValueMap.put("rec_title=" + contentMap.get("recTitle").toString(), "");
-        Map<String, String> structureMap = OrdinaryAssistant.mapKeyContrast(xmlNodeValueMap, operationInformedConsent_keyContrasts);
-
-        String text = CxXmlUtil.getXmlText(content);
-        Map<String, String> cutWordMap = Preproc.getCutWordMap(true, operationInformedConsent_sourceTitles, text);
-        cutWordMap.putAll(structureMap);
+        Map<String, String> cutWordMap = null;
+        if (contentMap.get("isParsed") != null && "1".equals(contentMap.get("isParsed").toString())) {
+            cutWordMap = (Map) FastJsonUtils.getJsonToMap(content);
+        } else {
+            Map<String, String> xmlNodeValueMap = CxXmlUtil.firstLevelNodeValue(content);
+            xmlNodeValueMap.put("mode_id=" + contentMap.get("modeId").toString(), "");
+            xmlNodeValueMap.put("rec_title=" + contentMap.get("recTitle").toString(), "");
+            Map<String, String> structureMap = OrdinaryAssistant.mapKeyContrast(xmlNodeValueMap, operationInformedConsent_keyContrasts, modeId);
+
+            String text = CxXmlUtil.getXmlText(content);
+            structureMap.put("text", text);
+            cutWordMap = Preproc.getCutWordMap(true, operationInformedConsent_sourceTitles, text);
+            cutWordMap.putAll(structureMap);
+        }
 
         OperationInformedConsentDoc operationInformedConsentDoc = ModelDocGenerate.operationInformedConsentDocGen(cutWordMap);
-        operationInformedConsentDoc.setText(text);
+        operationInformedConsentDoc.setText(cutWordMap.get("text"));
         operationInformedConsentDoc.setPageData((Map) cutWordMap);
 
         return operationInformedConsentDoc;
@@ -441,18 +464,25 @@ public class ChangxOperationDocTrans extends ModelDocTrans {
     }
 
     private OperationSafetyChecklistDoc getOperationSafetyChecklistDoc(Map<String, Object> contentMap) {
+        String modeId = "21";
         String content = contentMap.get("xmlText").toString();
-        Map<String, String> xmlNodeValueMap = CxXmlUtil.firstLevelNodeValue(content);
-        xmlNodeValueMap.put("mode_id=" + contentMap.get("modeId").toString(), "");
-        xmlNodeValueMap.put("rec_title=" + contentMap.get("recTitle").toString(), "");
-        Map<String, String> structureMap = OrdinaryAssistant.mapKeyContrast(xmlNodeValueMap, operationSafetyChecklist_keyContrasts);
-
-        String text = CxXmlUtil.getXmlText(content);
-        Map<String, String> cutWordMap = Preproc.getCutWordMap(true, operationSafetyChecklist_sourceTitles, text);
-        cutWordMap.putAll(structureMap);
+        Map<String, String> cutWordMap = null;
+        if (contentMap.get("isParsed") != null && "1".equals(contentMap.get("isParsed").toString())) {
+            cutWordMap = (Map) FastJsonUtils.getJsonToMap(content);
+        } else {
+            Map<String, String> xmlNodeValueMap = CxXmlUtil.firstLevelNodeValue(content);
+            xmlNodeValueMap.put("mode_id=" + contentMap.get("modeId").toString(), "");
+            xmlNodeValueMap.put("rec_title=" + contentMap.get("recTitle").toString(), "");
+            Map<String, String> structureMap = OrdinaryAssistant.mapKeyContrast(xmlNodeValueMap, operationSafetyChecklist_keyContrasts, modeId);
+
+            String text = CxXmlUtil.getXmlText(content);
+            structureMap.put("text", text);
+            cutWordMap = Preproc.getCutWordMap(true, operationSafetyChecklist_sourceTitles, text);
+            cutWordMap.putAll(structureMap);
+        }
 
         OperationSafetyChecklistDoc operationSafetyChecklistDoc = ModelDocGenerate.operationSafetyChecklistDocGen(cutWordMap);
-        operationSafetyChecklistDoc.setText(text);
+        operationSafetyChecklistDoc.setText(cutWordMap.get("text"));
         operationSafetyChecklistDoc.setPageData((Map) cutWordMap);
 
         return operationSafetyChecklistDoc;

+ 40 - 0
trans/src/main/java/com/lantone/qc/trans/changx/ChangxOutDepDocTrans.java

@@ -0,0 +1,40 @@
+package com.lantone.qc.trans.changx;
+
+import com.lantone.qc.pub.model.doc.BeHospitalizedDoc;
+import com.lantone.qc.pub.model.label.ChiefLabel;
+import com.lantone.qc.pub.model.label.PastLabel;
+import com.lantone.qc.pub.model.label.PresentLabel;
+import com.lantone.qc.pub.model.vo.MedrecVo;
+import com.lantone.qc.trans.ModelDocTrans;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Description: 门诊入院记录文档生成
+ * @author: rengb
+ * @time: 2020/3/19 19:41
+ */
+public class ChangxOutDepDocTrans extends ModelDocTrans {
+
+    @Override
+    public BeHospitalizedDoc extract(MedrecVo medrecVo) {
+        BeHospitalizedDoc beHospitalizedDoc = new BeHospitalizedDoc();
+        Map<String, String> structureMap = ((List<Map>) medrecVo.getContent().get("content")).get(0);
+
+        ChiefLabel chiefLabel = new ChiefLabel();
+        chiefLabel.setText(structureMap.get("主诉"));
+        beHospitalizedDoc.setChiefLabel(chiefLabel);
+
+        PresentLabel presentLabel = new PresentLabel();
+        presentLabel.setText(structureMap.get("现病史"));
+        beHospitalizedDoc.setPresentLabel(presentLabel);
+
+        PastLabel pastLabel = new PastLabel();
+        pastLabel.setText(structureMap.get("既往史"));
+        beHospitalizedDoc.setPastLabel(pastLabel);
+
+        return beHospitalizedDoc;
+    }
+
+}

+ 10 - 5
trans/src/main/java/com/lantone/qc/trans/changx/ChangxPathologyShipDocTrans.java

@@ -3,6 +3,7 @@ package com.lantone.qc.trans.changx;
 import com.google.common.collect.Lists;
 import com.lantone.qc.pub.model.doc.PathologyShipDoc;
 import com.lantone.qc.pub.model.vo.MedrecVo;
+import com.lantone.qc.pub.util.FastJsonUtils;
 import com.lantone.qc.trans.ModelDocTrans;
 import com.lantone.qc.dbanaly.facade.changx.CxXmlUtil;
 import com.lantone.qc.trans.comsis.OrdinaryAssistant;
@@ -29,11 +30,15 @@ public class ChangxPathologyShipDocTrans extends ModelDocTrans {
 
     private PathologyShipDoc getPathologyShipDoc(Map<String, Object> contentMap) {
         String content = contentMap.get("xmlText").toString();
-        Map<String, String> sourceMap = CxXmlUtil.firstLevelNodeValue(content);
-        sourceMap.put("mode_id=" + contentMap.get("modeId").toString(), "");
-        sourceMap.put("rec_title=" + contentMap.get("recTitle").toString(), "");
-        Map<String, String> structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, keyContrasts);
-
+        Map<String, String> structureMap = null;
+        if (contentMap.get("isParsed") != null && "1".equals(contentMap.get("isParsed").toString())) {
+            structureMap = (Map) FastJsonUtils.getJsonToMap(content);
+        } else {
+            Map<String, String> sourceMap = CxXmlUtil.firstLevelNodeValue(content);
+            sourceMap.put("mode_id=" + contentMap.get("modeId").toString(), "");
+            sourceMap.put("rec_title=" + contentMap.get("recTitle").toString(), "");
+            structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, keyContrasts);
+        }
         PathologyShipDoc pathologyShipDoc = new PathologyShipDoc();
         pathologyShipDoc.setStructureMap(structureMap);
         pathologyShipDoc.setPageData((Map) structureMap);

+ 17 - 10
trans/src/main/java/com/lantone/qc/trans/changx/ChangxRescueDocTrans.java

@@ -1,11 +1,11 @@
 package com.lantone.qc.trans.changx;
 
 import com.google.common.collect.Lists;
+import com.lantone.qc.dbanaly.facade.changx.CxXmlUtil;
 import com.lantone.qc.pub.model.doc.RescueDoc;
 import com.lantone.qc.pub.model.vo.MedrecVo;
-import com.lantone.qc.pub.util.StringUtil;
+import com.lantone.qc.pub.util.FastJsonUtils;
 import com.lantone.qc.trans.ModelDocTrans;
-import com.lantone.qc.dbanaly.facade.changx.CxXmlUtil;
 import com.lantone.qc.trans.comsis.ModelDocGenerate;
 import com.lantone.qc.trans.comsis.OrdinaryAssistant;
 import com.lantone.qc.trans.comsis.Preproc;
@@ -19,6 +19,7 @@ import java.util.Map;
  * @time: 2020/3/17 17:34
  */
 public class ChangxRescueDocTrans extends ModelDocTrans {
+    private String modeId = "22";
 
     @Override
     public List<RescueDoc> extract(MedrecVo medrecVo) {
@@ -32,17 +33,23 @@ public class ChangxRescueDocTrans extends ModelDocTrans {
 
     private RescueDoc getRescueDoc(Map<String, Object> contentMap) {
         String content = contentMap.get("xmlText").toString();
-        Map<String, String> xmlNodeValueMap = CxXmlUtil.firstLevelNodeValue(content);
-        xmlNodeValueMap.put("mode_id=" + contentMap.get("modeId").toString(), "");
-        xmlNodeValueMap.put("rec_title=" + contentMap.get("recTitle").toString(), "");
-        Map<String, String> structureMap = OrdinaryAssistant.mapKeyContrast(xmlNodeValueMap, keyContrasts);
+        Map<String, String> cutWordMap = null;
+        if (contentMap.get("isParsed") != null && "1".equals(contentMap.get("isParsed").toString())) {
+            cutWordMap = (Map) FastJsonUtils.getJsonToMap(content);
+        } else {
+            Map<String, String> xmlNodeValueMap = CxXmlUtil.firstLevelNodeValue(content);
+            xmlNodeValueMap.put("mode_id=" + contentMap.get("modeId").toString(), "");
+            xmlNodeValueMap.put("rec_title=" + contentMap.get("recTitle").toString(), "");
+            Map<String, String> structureMap = OrdinaryAssistant.mapKeyContrast(xmlNodeValueMap, keyContrasts, modeId);
 
-        String text = CxXmlUtil.getXmlText(content);
-        Map<String, String> cutWordMap = Preproc.getCutWordMap(true, sourceTitles, text);
-        cutWordMap.putAll(structureMap);
+            String text = CxXmlUtil.getXmlText(content);
+            structureMap.put("text", text);
+            cutWordMap = Preproc.getCutWordMap(true, sourceTitles, text);
+            cutWordMap.putAll(structureMap);
+        }
 
         RescueDoc rescueDoc = ModelDocGenerate.rescueDocGen(cutWordMap);
-        rescueDoc.setText(text);
+        rescueDoc.setText(cutWordMap.get("text"));
         rescueDoc.setPageData((Map) cutWordMap);
 
         return rescueDoc;

+ 17 - 10
trans/src/main/java/com/lantone/qc/trans/changx/ChangxStagesSummaryDocTrans.java

@@ -1,11 +1,11 @@
 package com.lantone.qc.trans.changx;
 
 import com.google.common.collect.Lists;
+import com.lantone.qc.dbanaly.facade.changx.CxXmlUtil;
 import com.lantone.qc.pub.model.doc.StagesSummaryDoc;
 import com.lantone.qc.pub.model.vo.MedrecVo;
-import com.lantone.qc.pub.util.StringUtil;
+import com.lantone.qc.pub.util.FastJsonUtils;
 import com.lantone.qc.trans.ModelDocTrans;
-import com.lantone.qc.dbanaly.facade.changx.CxXmlUtil;
 import com.lantone.qc.trans.comsis.ModelDocGenerate;
 import com.lantone.qc.trans.comsis.OrdinaryAssistant;
 import com.lantone.qc.trans.comsis.Preproc;
@@ -19,6 +19,7 @@ import java.util.Map;
  * @time: 2020/3/19 19:41
  */
 public class ChangxStagesSummaryDocTrans extends ModelDocTrans {
+    private String modeId = "28";
 
     @Override
     public List<StagesSummaryDoc> extract(MedrecVo medrecVo) {
@@ -32,17 +33,23 @@ public class ChangxStagesSummaryDocTrans extends ModelDocTrans {
 
     private StagesSummaryDoc getStagesSummaryDoc(Map<String, Object> contentMap) {
         String content = contentMap.get("xmlText").toString();
-        Map<String, String> xmlNodeValueMap = CxXmlUtil.firstLevelNodeValue(content);
-        xmlNodeValueMap.put("mode_id=" + contentMap.get("modeId").toString(), "");
-        xmlNodeValueMap.put("rec_title=" + contentMap.get("recTitle").toString(), "");
-        Map<String, String> structureMap = OrdinaryAssistant.mapKeyContrast(xmlNodeValueMap, keyContrasts);
+        Map<String, String> cutWordMap = null;
+        if (contentMap.get("isParsed") != null && "1".equals(contentMap.get("isParsed").toString())) {
+            cutWordMap = (Map) FastJsonUtils.getJsonToMap(content);
+        } else {
+            Map<String, String> xmlNodeValueMap = CxXmlUtil.firstLevelNodeValue(content);
+            xmlNodeValueMap.put("mode_id=" + contentMap.get("modeId").toString(), "");
+            xmlNodeValueMap.put("rec_title=" + contentMap.get("recTitle").toString(), "");
+            Map<String, String> structureMap = OrdinaryAssistant.mapKeyContrast(xmlNodeValueMap, keyContrasts, modeId);
 
-        String text = CxXmlUtil.getXmlText(content);
-        Map<String, String> cutWordMap = Preproc.getCutWordMap(true, sourceTitles, text);
-        cutWordMap.putAll(structureMap);
+            String text = CxXmlUtil.getXmlText(content);
+            structureMap.put("text", text);
+            cutWordMap = Preproc.getCutWordMap(true, sourceTitles, text);
+            cutWordMap.putAll(structureMap);
+        }
 
         StagesSummaryDoc stagesSummaryDoc = ModelDocGenerate.stagesSummaryDocGen(cutWordMap);
-        stagesSummaryDoc.setText(text);
+        stagesSummaryDoc.setText(cutWordMap.get("text"));
         stagesSummaryDoc.setPageData((Map) cutWordMap);
 
         return stagesSummaryDoc;

+ 41 - 29
trans/src/main/java/com/lantone/qc/trans/changx/ChangxThreeLevelWardDocTrans.java

@@ -13,6 +13,7 @@ import com.lantone.qc.pub.model.doc.ward.AttendingDoctorWardDoc;
 import com.lantone.qc.pub.model.doc.ward.DirectorDoctorWardDoc;
 import com.lantone.qc.pub.model.doc.ward.GeneralDoctorWardDoc;
 import com.lantone.qc.pub.model.vo.MedrecVo;
+import com.lantone.qc.pub.util.FastJsonUtils;
 import com.lantone.qc.pub.util.SpringContextUtil;
 import com.lantone.qc.pub.util.StringUtil;
 import com.lantone.qc.trans.ModelDocTrans;
@@ -35,7 +36,7 @@ import java.util.regex.Pattern;
  */
 @Setter
 public class ChangxThreeLevelWardDocTrans extends ModelDocTrans {
-
+    private String modeId = "4";
     private List<String> recTitles;
     private List<OperationDoc> operationDocs;
 
@@ -56,34 +57,39 @@ public class ChangxThreeLevelWardDocTrans extends ModelDocTrans {
 
     private void classifyThreeLevelWardDoc(ThreeLevelWardDoc threeLevelWardDoc, Map<String, Object> contentMap) {
         String content = contentMap.get("xmlText").toString();
-        Map<String, String> xmlNodeValueMap = CxXmlUtil.firstLevelNodeValue(content);
-        xmlNodeValueMap.put("mode_id=" + contentMap.get("modeId").toString(), "");
-        String recTitle = contentMap.get("recTitle").toString();
-        if (recTitles.contains(recTitle)) {
-            xmlNodeValueMap.put("rec_title=" + contentMap.get("recTitle").toString(), "");
-        }
-        Map<String, String> structureMap = OrdinaryAssistant.mapKeyContrast(xmlNodeValueMap, keyContrasts);
-        structureMap.put("查房日期", structureMap.get("记录时间"));
-
-        Map<String, String> cutWordMap = Maps.newHashMap();
-        String text = CxXmlUtil.getXmlText(content);
-        if (StringUtil.isNotBlank(text)) {
-            if (StringUtil.isBlank(structureMap.get("病情记录"))) {
-                structureMap.put("病情记录", text);
+        Map<String, String> structureMap = null;
+        if (contentMap.get("isParsed") != null && "1".equals(contentMap.get("isParsed").toString())) {
+            structureMap = (Map) FastJsonUtils.getJsonToMap(content);
+        } else {
+            Map<String, String> xmlNodeValueMap = CxXmlUtil.firstLevelNodeValue(content);
+            xmlNodeValueMap.put("mode_id=" + contentMap.get("modeId").toString(), "");
+            String recTitle = contentMap.get("recTitle").toString();
+            if (recTitles.contains(recTitle)) {
+                xmlNodeValueMap.put("rec_title=" + contentMap.get("recTitle").toString(), "");
             }
-            cutWordMap = Preproc.getCutWordMap(true, sourceTitles, text);
-            if (StringUtil.isBlank(structureMap.get("记录医师"))) {
-                Pattern p = Pattern.compile("^[^\\u4e00-\\u9fa5]+$");//分词结果如果不包含中文为日期,则不覆盖
-                if (StringUtil.isNotEmpty(cutWordMap.get("医师签名"))) {
-                    Matcher m = p.matcher(cutWordMap.get("医师签名"));
-                    if (!m.matches()) {
-                        structureMap.put("记录医师", cutWordMap.get("医师签名"));
-                    }
+            structureMap = OrdinaryAssistant.mapKeyContrast(xmlNodeValueMap, keyContrasts, modeId);
+            structureMap.put("查房日期", structureMap.get("记录时间"));
+
+            Map<String, String> cutWordMap = Maps.newHashMap();
+            String text = CxXmlUtil.getXmlText(content);
+            if (StringUtil.isNotBlank(text)) {
+                if (StringUtil.isBlank(structureMap.get("病情记录"))) {
+                    structureMap.put("病情记录", text);
                 }
-                if (StringUtil.isNotEmpty(cutWordMap.get("记录医生"))) {
-                    Matcher m = p.matcher(cutWordMap.get("记录医生"));
-                    if (!m.matches()) {
-                        structureMap.put("记录医师", cutWordMap.get("记录医生"));
+                cutWordMap = Preproc.getCutWordMap(true, sourceTitles, text);
+                if (StringUtil.isBlank(structureMap.get("记录医师"))) {
+                    Pattern p = Pattern.compile("^[^\\u4e00-\\u9fa5]+$");//分词结果如果不包含中文为日期,则不覆盖
+                    if (StringUtil.isNotEmpty(cutWordMap.get("医师签名"))) {
+                        Matcher m = p.matcher(cutWordMap.get("医师签名"));
+                        if (!m.matches()) {
+                            structureMap.put("记录医师", cutWordMap.get("医师签名"));
+                        }
+                    }
+                    if (StringUtil.isNotEmpty(cutWordMap.get("记录医生"))) {
+                        Matcher m = p.matcher(cutWordMap.get("记录医生"));
+                        if (!m.matches()) {
+                            structureMap.put("记录医师", cutWordMap.get("记录医生"));
+                        }
                     }
                 }
             }
@@ -192,7 +198,13 @@ public class ChangxThreeLevelWardDocTrans extends ModelDocTrans {
      * @return
      */
     private boolean findAttend(String title, String content) {
-        return title.contains("共同照护讨论记录") && content.contains("主治");
+        Pattern p = Pattern.compile("(?<=主治医师).+?(?=住院医师)");
+        Matcher m = p.matcher(content);
+        String result = "";
+        while (m.find()) {
+            result = m.group().trim();
+        }
+        return title.contains("共同照护讨论记录") && StringUtil.isNotEmpty(result.replace(":", "").replace(":", ""));
     }
 
     private String subTitle(String srcText) {
@@ -254,7 +266,7 @@ public class ChangxThreeLevelWardDocTrans extends ModelDocTrans {
                 Date operatorEndDate = StringUtil.parseDateTime(operatorEndDateStr);
                 if (operatorEndDate != null) {
                     long timeDifference = timeDifference(operatorEndDate, recordDate);
-                    if (timeDifference == 0){
+                    if (timeDifference == 0) {
                         continue;
                     }
                     if (timeDiff == 0 || timeDiff > timeDifference) {

+ 30 - 19
trans/src/main/java/com/lantone/qc/trans/changx/ChangxTransferRecordDocTrans.java

@@ -2,23 +2,18 @@ package com.lantone.qc.trans.changx;
 
 import com.google.common.collect.Lists;
 import com.google.common.collect.Maps;
+import com.lantone.qc.dbanaly.facade.changx.CxXmlUtil;
 import com.lantone.qc.pub.model.doc.transferrecord.TransferIntoDoc;
 import com.lantone.qc.pub.model.doc.transferrecord.TransferOutDoc;
 import com.lantone.qc.pub.model.doc.transferrecord.TransferRecordDoc;
 import com.lantone.qc.pub.model.vo.MedrecVo;
+import com.lantone.qc.pub.util.FastJsonUtils;
 import com.lantone.qc.pub.util.ListUtil;
 import com.lantone.qc.pub.util.StringUtil;
 import com.lantone.qc.trans.ModelDocTrans;
-import com.lantone.qc.dbanaly.facade.changx.CxXmlUtil;
 import com.lantone.qc.trans.comsis.OrdinaryAssistant;
 
-import java.util.ArrayList;
-import java.util.Comparator;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.TreeMap;
+import java.util.*;
 
 /**
  * @Description: 转科记录文档生成
@@ -142,11 +137,17 @@ public class ChangxTransferRecordDocTrans extends ModelDocTrans {
     }
 
     private TransferIntoDoc getTransferIntoDoc(Map<String, Object> contentMap) {
+        String modeId = "26";
         String content = contentMap.get("xmlText").toString();
-        Map<String, String> xmlNodeValueMap = CxXmlUtil.firstLevelNodeValue(content);
-        xmlNodeValueMap.put("mode_id=" + contentMap.get("modeId").toString(), "");
-        xmlNodeValueMap.put("rec_title=" + contentMap.get("recTitle").toString(), "");
-        Map<String, String> structureMap = OrdinaryAssistant.mapKeyContrast(xmlNodeValueMap, keyContrasts);
+        Map<String, String> structureMap = null;
+        if (contentMap.get("isParsed") != null && "1".equals(contentMap.get("isParsed").toString())) {
+            structureMap = (Map) FastJsonUtils.getJsonToMap(content);
+        } else {
+            Map<String, String> xmlNodeValueMap = CxXmlUtil.firstLevelNodeValue(content);
+            xmlNodeValueMap.put("mode_id=" + contentMap.get("modeId").toString(), "");
+            xmlNodeValueMap.put("rec_title=" + contentMap.get("recTitle").toString(), "");
+            structureMap = OrdinaryAssistant.mapKeyContrast(xmlNodeValueMap, keyContrasts, modeId);
+        }
 
         //        sourceMap.put("记录时间", sourceMap.get("病程记录时间"));
         TransferIntoDoc transferIntoDoc = new TransferIntoDoc();
@@ -180,8 +181,13 @@ public class ChangxTransferRecordDocTrans extends ModelDocTrans {
 
     private TransferRecordDoc getTransferAllDoc(Map<String, Object> contentMap) {
         String content = contentMap.get("xmlText").toString();
-        Map<String, String> xmlNodeValueMap = CxXmlUtil.firstLevelNodeValue(content);
-        Map<String, String> structureMap = OrdinaryAssistant.mapKeyContrast(xmlNodeValueMap, keyContrasts);
+        Map<String, String> structureMap = null;
+        if (contentMap.get("isParsed") != null && "1".equals(contentMap.get("isParsed").toString())) {
+            structureMap = (Map) FastJsonUtils.getJsonToMap(content);
+        } else {
+            Map<String, String> xmlNodeValueMap = CxXmlUtil.firstLevelNodeValue(content);
+            structureMap = OrdinaryAssistant.mapKeyContrast(xmlNodeValueMap, keyContrasts);
+        }
         TransferRecordDoc transferAllDoc = new TransferRecordDoc();
         transferAllDoc.setText(content);
         transferAllDoc.setStructureMap(structureMap);
@@ -212,12 +218,17 @@ public class ChangxTransferRecordDocTrans extends ModelDocTrans {
     }
 
     private TransferOutDoc getTransferOutDoc(Map<String, Object> contentMap) {
+        String modeId = "27";
         String content = contentMap.get("xmlText").toString();
-        Map<String, String> xmlNodeValueMap = CxXmlUtil.firstLevelNodeValue(content);
-        xmlNodeValueMap.put("mode_id=" + contentMap.get("modeId").toString(), "");
-        xmlNodeValueMap.put("rec_title=" + contentMap.get("recTitle").toString(), "");
-        Map<String, String> structureMap = OrdinaryAssistant.mapKeyContrast(xmlNodeValueMap, keyContrasts);
-
+        Map<String, String> structureMap = null;
+        if (contentMap.get("isParsed") != null && "1".equals(contentMap.get("isParsed").toString())) {
+            structureMap = (Map) FastJsonUtils.getJsonToMap(content);
+        } else {
+            Map<String, String> xmlNodeValueMap = CxXmlUtil.firstLevelNodeValue(content);
+            xmlNodeValueMap.put("mode_id=" + contentMap.get("modeId").toString(), "");
+            xmlNodeValueMap.put("rec_title=" + contentMap.get("recTitle").toString(), "");
+            structureMap = OrdinaryAssistant.mapKeyContrast(xmlNodeValueMap, keyContrasts, modeId);
+        }
         TransferOutDoc transferOutDoc = new TransferOutDoc();
         transferOutDoc.setText(content);
         transferOutDoc.setStructureMap(structureMap);