Przeglądaj źródła

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

# Conflicts:
#	trans/src/main/java/com/lantone/qc/trans/hangzhoufubao/BeHospitalizedDocTrans.java
#	trans/src/main/java/com/lantone/qc/trans/hangzhoufubao/util/BeHospitalizedHtmlAnalysis.java
#	trans/src/main/java/com/lantone/qc/trans/hangzhoufubao/util/OperationRecordHtmlAnalysis.java
username 3 lat temu
rodzic
commit
358d0b0edb
26 zmienionych plików z 578 dodań i 53 usunięć
  1. 45 0
      dbanaly/src/main/resources/application-db.yml
  2. 1 1
      dbanaly/src/main/resources/application-debug.yml
  3. 1 1
      kernel/src/main/java/com/lantone/qc/kernel/catalogue/firstpagerecord/FIRP03213.java
  4. 66 0
      kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/shengzhouyy/firstcourserecord/FIRC03086.java
  5. 264 0
      kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/xszyy/behospitalized/BEH02980.java
  6. 29 0
      kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/xszyy/deathcasediscuss/DEAC0556.java
  7. 29 0
      kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/xszyy/deathcasediscuss/DEAC0558.java
  8. 39 0
      kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/xszyy/firstpagerecord/FIRP0516.java
  9. 4 1
      kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/xszyy/operationdiscussion/OPE03143.java
  10. 1 1
      kernel/src/main/java/com/lantone/qc/kernel/catalogue/operationdiscussion/OPE03143.java
  11. 3 0
      trans/src/main/java/com/lantone/qc/trans/beilun/util/BeiLunThreeLevelWardHtmlAnalysis.java
  12. 10 5
      trans/src/main/java/com/lantone/qc/trans/hangzhoufubao/BeHospitalizedDocTrans.java
  13. 6 6
      trans/src/main/java/com/lantone/qc/trans/hangzhoufubao/util/BeHospitalizedHtmlAnalysis.java
  14. 6 4
      trans/src/main/java/com/lantone/qc/trans/hangzhoufubao/util/LeaveHospitalHtmlAnalysis.java
  15. 1 1
      trans/src/main/java/com/lantone/qc/trans/hangzhoufubao/util/OperationRecordHtmlAnalysis.java
  16. 3 2
      trans/src/main/java/com/lantone/qc/trans/hangzhoufubao/util/PreoperativeHtmlAnalysis.java
  17. 3 1
      trans/src/main/java/com/lantone/qc/trans/xszyy/BeiLunBeHospitalizedDocTrans.java
  18. 3 2
      trans/src/main/java/com/lantone/qc/trans/xszyy/BeiLunDeathCaseDiscussDocTrans.java
  19. 10 3
      trans/src/main/java/com/lantone/qc/trans/xszyy/BeiLunOperationDocTrans.java
  20. 9 9
      trans/src/main/java/com/lantone/qc/trans/xszyy/util/BeiLunBeHospitalizedHtmlAnalysis.java
  21. 3 1
      trans/src/main/java/com/lantone/qc/trans/xszyy/util/BeiLunDeathCaseDiscussHtmlAnalysis.java
  22. 2 1
      trans/src/main/java/com/lantone/qc/trans/xszyy/util/BeiLunFirstCourseRecordHtmlAnalysis.java
  23. 9 3
      trans/src/main/java/com/lantone/qc/trans/xszyy/util/BeiLunOperationRecordHtmlAnalysis.java
  24. 16 4
      trans/src/main/java/com/lantone/qc/trans/xszyy/util/BeiLunPreoperativeHtmlAnalysis.java
  25. 2 3
      trans/src/main/java/com/lantone/qc/trans/xszyy/util/BeiLunThreeLevelWardHtmlAnalysis.java
  26. 13 4
      trans/src/main/java/com/lantone/qc/trans/xszyy/util/comsis/XszyyCommonAnalysisUtil.java

+ 45 - 0
dbanaly/src/main/resources/application-db.yml

@@ -0,0 +1,45 @@
+spring:
+  datasource:
+    name: druidDataSource
+    type: com.alibaba.druid.pool.DruidDataSource
+    druid:
+      lantone:
+        driver-class-name: com.mysql.jdbc.Driver
+        url: jdbc:mysql://192.168.2.122:3306/qc?useUnicode=true&characterEncoding=utf8
+        username: root
+        password: lantone
+        initial-size: 8
+        min-idle: 1
+        max-active: 20
+        max-wait: 60000
+        time-between-eviction-runsMillis: 60000
+        min-evictable-idle-timeMillis: 300000
+        validation-query: select 'x' FROM DUAL
+        test-while-idle: true
+        test-on-borrow: false
+        test-on-return: false
+        pool-prepared-statements: true
+        max-open-prepared-statements: 20
+        max-pool-prepared-statement-per-connection-size: 20
+        filters: stat
+        connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
+        use-global-data-source-stat: true
+  redis:
+    database: 10
+    host: 192.168.2.121
+    port: 6379
+    password: lantone
+    timeout: 2000
+    lettuce:
+      pool:
+        max-active: 8
+        min-idle: 0
+        max-wait: -1ms
+        max-idle: 8
+
+mybatis-plus:
+  type-aliases-package: com.lantone.qc.dbanaly.lt.entity
+  configuration:
+    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+
+xml-is-encryped: true

+ 1 - 1
dbanaly/src/main/resources/application-debug.yml

@@ -41,7 +41,7 @@ spring:
         min-idle: 0 # 连接池中的最小空闲连接
     timeout: 20000 # 连接超时时间(毫秒)
 
-xml-is-encryped: true
+xml-is-encryped: false
 
 CRF:
   url: http://192.168.2.234:3456/api/mr_info_ex/entity_predict

+ 1 - 1
kernel/src/main/java/com/lantone/qc/kernel/catalogue/firstpagerecord/FIRP03213.java

@@ -70,7 +70,7 @@ public class FIRP03213 extends QCCatalogue {
         }
 
         for (String noMatchWord : noMatchWords) {
-            if (icdCode.contains(noMatchWord)) {
+            if (icdCode.equals(noMatchWord)) {
                 status.set("-1");
                 info.set(noMatchWord);
                 return;

+ 66 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/shengzhouyy/firstcourserecord/FIRC03086.java

@@ -0,0 +1,66 @@
+package com.lantone.qc.kernel.catalogue.hospital.shengzhouyy.firstcourserecord;
+
+import com.lantone.qc.kernel.catalogue.QCCatalogue;
+import com.lantone.qc.pub.model.InputInfo;
+import com.lantone.qc.pub.model.OutputInfo;
+import com.lantone.qc.pub.model.doc.FirstCourseRecordDoc;
+import com.lantone.qc.pub.model.label.TreatPlanLabel;
+import com.lantone.qc.pub.util.StringUtil;
+import org.springframework.stereotype.Component;
+
+import java.util.Map;
+
+/**
+ * @ClassName : FIRC03086
+ * @Description : 治疗措施不具体(缺护理级别)
+ * @Author : wsy
+ * @Date: 2021-01-07 15:21
+ */
+@Component
+public class FIRC03086 extends QCCatalogue {
+    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        FirstCourseRecordDoc firstCourseRecordDoc = inputInfo.getFirstCourseRecordDoc();
+        if (firstCourseRecordDoc == null) {
+            status.set("0");
+            return;
+        }
+        TreatPlanLabel treatPlanLabel = firstCourseRecordDoc.getTreatPlanLabel();
+        if (treatPlanLabel == null) {
+            status.set("0");
+            return;
+        }
+        String text = treatPlanLabel.getText();
+        boolean findText = false;
+        if (StringUtil.isNotBlank(text) && text.contains("护理")) {
+            findText = true;
+        }
+        Map<String, String> structureMap = firstCourseRecordDoc.getStructureMap();
+        String structureV = structureMap.get("诊疗计划");
+        if (StringUtil.isBlank(structureV) && StringUtil.isBlank(text)) {
+            status.set("0");
+            return;
+        }
+        //规则匹配增加
+        if (structureV.contains("一级") || structureV.contains("二级") || structureV.contains("三级") ||
+                structureV.contains("Ⅰ级") || structureV.contains("Ⅱ级") || structureV.contains("Ⅲ级") ||
+                structureV.contains("I级") || structureV.contains("II级") || structureV.contains("III级") ||
+                structureV.contains("I护") || structureV.contains("II护") || structureV.contains("III护") ||
+                structureV.contains("Ⅰ护") || structureV.contains("Ⅱ护") || structureV.contains("Ⅲ护")) {
+            status.set("0");
+            return;
+        }
+        if (StringUtil.isNotBlank(structureV) && structureV.contains("护理")) {
+            findText = true;
+        }
+        if (treatPlanLabel.getNursingLevel() != null) {
+            if (findText && !"护理常规".equals(treatPlanLabel.getNursingLevel().getName())) {
+                status.set("0");
+                return;
+            }
+        }
+        if (treatPlanLabel.getNursingLevel() == null || "护理常规".equals(treatPlanLabel.getNursingLevel().getName())) {
+            status.set("-1");
+            return;
+        }
+    }
+}

+ 264 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/xszyy/behospitalized/BEH02980.java

@@ -0,0 +1,264 @@
+package com.lantone.qc.kernel.catalogue.hospital.xszyy.behospitalized;
+
+import com.alibaba.fastjson.JSONArray;
+import com.lantone.qc.kernel.catalogue.QCCatalogue;
+import com.lantone.qc.kernel.client.ChiefPresentSimilarityServiceClient;
+import com.lantone.qc.kernel.structure.ai.ModelAI;
+import com.lantone.qc.pub.Content;
+import com.lantone.qc.pub.model.InputInfo;
+import com.lantone.qc.pub.model.OutputInfo;
+import com.lantone.qc.pub.model.entity.Allergy;
+import com.lantone.qc.pub.model.entity.Diag;
+import com.lantone.qc.pub.model.entity.GeneralDesc;
+import com.lantone.qc.pub.model.entity.Negative;
+import com.lantone.qc.pub.model.label.DiagLabel;
+import com.lantone.qc.pub.model.label.PastLabel;
+import com.lantone.qc.pub.model.label.PresentLabel;
+import com.lantone.qc.pub.util.StringUtil;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * @ClassName : BEH02980
+ * @Description : 病历前后描述不一致
+ * @Author : Mark
+ * @Date: 2020-06-23 11:02
+ */
+@Component
+public class BEH02980 extends QCCatalogue {
+    @Autowired
+    ChiefPresentSimilarityServiceClient chiefPresentSimilarityServiceClient;
+
+    private List<String> containList = Arrays.asList("脑萎缩", "慢性", "纤颤", "高血压", "糖尿", "冠状", "冠心病", "支架", "起搏器", "房颤", "风湿");
+    private List<String> filterList = Arrays.asList("心脏病", "低血糖", "急性", ";");
+
+    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        status.set("0");
+        if (inputInfo.getBeHospitalizedDoc() == null) {
+            return;
+        }
+        PresentLabel presentLabel = inputInfo.getBeHospitalizedDoc().getPresentLabel();
+        DiagLabel initialDiagLabel = inputInfo.getBeHospitalizedDoc().getInitialDiagLabel();
+        PastLabel pastLabel = inputInfo.getBeHospitalizedDoc().getPastLabel();
+
+        List<String> pos_diags = new ArrayList<>();
+        List<String> neg_diags = new ArrayList<>();
+        //现病史需要取一般情况之后疾病
+        if (presentLabel != null) {
+            List<GeneralDesc> generals = presentLabel.getGenerals();
+            if (generals.size() > 0) {
+                String presentText = presentLabel.getText();
+                List<Diag> presentDiags = presentLabel.getDiags();
+                /* 取现病史中一般情况之后的疾病名称 */
+                if (StringUtil.isNotBlank(presentText) && presentDiags.size() > 0) {
+                    String lastGeneral = generals.get(generals.size() - 1).getName();
+                    int lastGeneralIndex = presentText.indexOf(lastGeneral);
+                    for (Diag presentDiag : presentDiags) {
+                        if (presentDiag.getNegative() != null || presentDiag.getHospitalDiagName().contains("否认")) {
+                            continue;
+                        }
+                        /* 现病史中一般情况之后的疾病名称 */
+                        if (presentText.indexOf(presentDiag.getHospitalDiagName()) > lastGeneralIndex) {
+                            if (isContains(presentDiag.getHospitalDiagName()) && !isFilter(presentDiag.getHospitalDiagName())) {
+                                String dgname = presentDiag.getHospitalDiagName();
+                                if (presentDiag.getNegative() == null) {
+                                    if (!pos_diags.contains(dgname)) {
+                                        pos_diags.add(dgname);
+                                    }
+                                } else {
+                                    if (!neg_diags.contains(dgname)) {
+                                        neg_diags.add(dgname);
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+        }
+
+        if (pastLabel != null && StringUtils.isNotEmpty(pastLabel.getText())) {
+            extract_diags(pastLabel.getDiags(), pos_diags, neg_diags);
+            //否认其他的情况
+            String pasttext = pastLabel.getText();
+            //冠状动脉支架植入术特殊情况,只要出现,就从否认的史中去掉
+            if (neg_diags.contains("冠状动脉支架植入术")) {
+                neg_diags.remove("冠状动脉支架植入术");
+            }
+            String neg_diags_first[] = pasttext.split("否认");
+            for (String str1 : neg_diags_first) {
+                String neg_diags_second[] = str1.split("、");
+                for (String str2 : neg_diags_second) {
+                    for (String neg_diag : neg_diags) {
+                        if (str2.contains(neg_diag)) {
+                            String str3 = str2.substring(0, str2.indexOf(neg_diag));
+                            if (str3.contains("其它") || str3.contains("其他")) {
+                                int index = neg_diags.indexOf(neg_diag);
+                                neg_diags.set(index, "其它的");
+                            }
+                        }
+                    }
+                }
+            }
+//            //过敏史
+//            if(!"7".equals(Content.hospital_Id))
+//            {
+//                extract_Allergy(pastLabel.getAllergies(), pos_diags, neg_diags, pastLabel.getText());
+//            }
+        } else {
+            //例如邵逸夫 台州这种结构化数据,判断高血压 和 糖尿病是否有冲突
+            List<Diag> pastDiags = new ArrayList<>();
+            Map<String, String> structureMap = inputInfo.getBeHospitalizedDoc().getStructureMap();
+            String a1 = structureMap.get("高血压");
+            Diag diag = new Diag();
+            diag.setName("高血压");
+            diag.setHospitalDiagName("高血压");
+            if (StringUtils.isNotEmpty(a1) && "否认".equals(a1)) {
+                Negative negative = new Negative();
+                negative.setName("否认");
+                pastDiags.add(diag);
+            } else if (StringUtils.isNotEmpty(a1) && !"否认".equals(a1)) {
+                pastDiags.add(diag);
+            }
+
+            a1 = structureMap.get("糖尿病");
+            diag = new Diag();
+            diag.setName("糖尿病");
+            diag.setHospitalDiagName("糖尿病");
+            if (StringUtils.isNotEmpty(a1) && "否认".equals(a1)) {
+                Negative negative = new Negative();
+                negative.setName("否认");
+                pastDiags.add(diag);
+            } else if (StringUtils.isNotEmpty(a1) && !"否认".equals(a1)) {
+                pastDiags.add(diag);
+            }
+
+            extract_diags(pastDiags, pos_diags, neg_diags);
+        }
+        if (initialDiagLabel != null) {
+            extract_diags(initialDiagLabel.getDiags(), pos_diags, neg_diags);
+        }
+
+        String infoStr = "";
+        int matchSum = 0;
+        ModelAI modelAI = new ModelAI();
+        for (String negdiag : neg_diags) {
+            JSONArray jsonArray = modelAI.loadChiefPresentSimilarAI(negdiag, pos_diags, false
+                    , "diagnose", chiefPresentSimilarityServiceClient);
+            if (jsonArray.size() == 2) {
+                /* 相似度最高症状 */
+                String dgname = jsonArray.getString(0);
+                if ("糖尿病".equals(negdiag) && "妊娠期糖尿病".equals(dgname)) {
+                    continue;
+                }
+                if ("高血压史".equals(negdiag) && "高血压病".equals(dgname)) {
+                    matchSum++;
+                    if (StringUtils.isEmpty(infoStr)) {
+                        infoStr = negdiag;
+                    } else {
+                        infoStr = infoStr + "," + negdiag;
+                    }
+                    continue;
+                }
+                /* 相似度分数 */
+                double likeRate = jsonArray.getDoubleValue(1);
+                if (likeRate > 0.99) {
+                    matchSum++;
+                    if (StringUtils.isEmpty(infoStr)) {
+                        infoStr = negdiag;
+                    } else {
+                        infoStr = infoStr + "," + negdiag;
+                    }
+                    continue;
+                }
+            }
+        }
+        if (matchSum > 0) {
+            status.set("-1");
+            info.set(infoStr);
+        }
+
+    }
+
+    //疾病史
+    private List<String> extract_diags(List<Diag> diags, List<String> pos_diags, List<String> neg_diags) {
+        List<String> dgs = new ArrayList<>();
+        for (Diag dg : diags) {
+            String dgname = dg.getHospitalDiagName();
+            if (dg.getNegative() == null) {
+                if (!pos_diags.contains(dgname)) {
+                    pos_diags.add(dgname);
+                }
+            } else {
+                if (!neg_diags.contains(dgname)) {
+                    neg_diags.add(dgname);
+                    dgs.add(dgname);
+                }
+            }
+        }
+        return dgs;
+    }
+
+//    //过敏史
+//    private List<String> extract_Allergy(List<Allergy> allergys, List<String> pos_diags, List<String> neg_diags, String text) {
+//        List<String> dgs = new ArrayList<>();
+//        String content = text;
+//        int allergyNum = 0;
+//        for (Allergy dg : allergys) {
+//            String dgname = dg.getName();
+//            if (dg.getNegative() == null) {
+//                if (!pos_diags.contains(dgname)) {
+//                    pos_diags.add(dgname);
+//                }
+//                if (dg.getAllergyFood() != null) {
+//                    allergyNum = 1;
+//                }
+//                if (dg.getAllergyMedicine() != null) {
+//                    allergyNum = 2;
+//                }
+//            } else {
+//                int index = content.lastIndexOf(dgname);
+//                text = content.substring(Math.max(0, index - 10), index);
+//                if (allergyNum == 0 && !neg_diags.contains(dgname) && !text.contains("其他") && !text.contains("其它") && !text.contains("其余")) {
+//                    neg_diags.add(dgname);
+//                    dgs.add(dgname);
+//                }
+//                if (allergyNum == 1 && text.contains("食物") && !neg_diags.contains(dgname) && !text.contains("其他") && !text.contains("其它") && !text.contains("其余")) {
+//                    neg_diags.add(dgname);
+//                    dgs.add(dgname);
+//                }
+//                if (allergyNum == 2 && text.contains("药物") && !neg_diags.contains(dgname) && !text.contains("其他") && !text.contains("其它") && !text.contains("其余")) {
+//                    neg_diags.add(dgname);
+//                    dgs.add(dgname);
+//                }
+//            }
+//        }
+//        return dgs;
+//    }
+
+    private boolean isContains(String diagName) {
+        for (String c : containList) {
+            if (diagName.contains(c)) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    private boolean isFilter(String diagName) {
+        for (String c : filterList) {
+            if (diagName.contains(c)) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+}

+ 29 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/xszyy/deathcasediscuss/DEAC0556.java

@@ -0,0 +1,29 @@
+package com.lantone.qc.kernel.catalogue.hospital.xszyy.deathcasediscuss;
+
+import com.lantone.qc.kernel.catalogue.QCCatalogue;
+import com.lantone.qc.kernel.util.CatalogueUtil;
+import com.lantone.qc.pub.model.InputInfo;
+import com.lantone.qc.pub.model.OutputInfo;
+import org.springframework.stereotype.Component;
+
+import java.util.Map;
+
+/**
+ * @ClassName : DEAC0556
+ * @Description :  死亡病例讨论参加人员姓名及职称未填写
+ * @Author :kwz
+ * @Date: 2020-03-18 18:38
+ */
+@Component
+public class DEAC0556 extends QCCatalogue {
+    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        status.set("0");
+        if (inputInfo.getDeathCaseDiscussDoc() != null) {
+            Map<String, String> deathCaseDiscussStructureMap = inputInfo.getDeathCaseDiscussDoc().getStructureMap();
+            String deathTime = deathCaseDiscussStructureMap.get("参加人员姓名及专业技术职称");
+            if (CatalogueUtil.isEmpty(deathTime)) {
+                status.set("-1");
+            }
+        }
+    }
+}

+ 29 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/xszyy/deathcasediscuss/DEAC0558.java

@@ -0,0 +1,29 @@
+package com.lantone.qc.kernel.catalogue.hospital.xszyy.deathcasediscuss;
+
+import com.lantone.qc.kernel.catalogue.QCCatalogue;
+import com.lantone.qc.kernel.util.CatalogueUtil;
+import com.lantone.qc.pub.model.InputInfo;
+import com.lantone.qc.pub.model.OutputInfo;
+import org.springframework.stereotype.Component;
+
+import java.util.Map;
+
+/**
+ * @ClassName : DEAC0558
+ * @Description :  死亡病例讨论无主持人小结意见
+ * @Author :kwz
+ * @Date: 2020-03-18 18:38
+ */
+@Component
+public class DEAC0558 extends QCCatalogue {
+    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        status.set("0");
+        if (inputInfo.getDeathCaseDiscussDoc() != null) {
+            Map<String, String> deathCaseDiscussStructureMap = inputInfo.getDeathCaseDiscussDoc().getStructureMap();
+            String deathTime = deathCaseDiscussStructureMap.get("主持人小结意见");
+            if (CatalogueUtil.isEmpty(deathTime)) {
+                status.set("-1");
+            }
+        }
+    }
+}

+ 39 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/xszyy/firstpagerecord/FIRP0516.java

@@ -0,0 +1,39 @@
+package com.lantone.qc.kernel.catalogue.hospital.xszyy.firstpagerecord;
+
+import com.lantone.qc.kernel.catalogue.QCCatalogue;
+import com.lantone.qc.pub.Content;
+import com.lantone.qc.pub.model.InputInfo;
+import com.lantone.qc.pub.model.OutputInfo;
+import com.lantone.qc.pub.model.doc.BeHospitalizedDoc;
+import com.lantone.qc.pub.model.doc.FirstPageRecordDoc;
+import com.lantone.qc.pub.util.StringUtil;
+import org.springframework.stereotype.Component;
+
+import java.util.Map;
+
+/**
+ * @ClassName : FIRP0516
+ * @Description : 身份证号码与入院记录不一致
+ * @Author : 楼辉荣
+ * @Date: 2020-03-06 17:28
+ */
+@Component
+public class FIRP0516 extends QCCatalogue {
+    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        status.set("0");
+        BeHospitalizedDoc beHospitalizedDoc = inputInfo.getBeHospitalizedDoc();
+        FirstPageRecordDoc firstPageRecordDoc = inputInfo.getFirstPageRecordDoc();
+        if (beHospitalizedDoc != null && firstPageRecordDoc != null) {
+            Map<String, String> structureMap_bh = beHospitalizedDoc.getStructureMap();
+            Map<String, String> structureMap_fpr = firstPageRecordDoc.getStructureMap();
+            String bhIdNumber = structureMap_bh.get("身份证号码");
+            String fprIdNumber = structureMap_fpr.get(Content.idNumber);
+            if (StringUtil.isBlank(bhIdNumber) || StringUtil.isBlank(fprIdNumber)) {
+                return;
+            }
+            if (!bhIdNumber.equals(fprIdNumber)) {
+                status.set("-1");
+            }
+        }
+    }
+}

+ 4 - 1
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/xszyy/operationdiscussion/OPE03143.java

@@ -31,7 +31,7 @@ public class OPE03143 extends QCCatalogue {
         boolean flag = true;
         //先判断有无手术记录
         List<OperationDoc> operationDocs = inputInfo.getOperationDocs();
-        if (operationDocs == null && operationDocs.size() == 0) {
+        if (operationDocs == null || operationDocs.size() == 0) {
             return;
         }
         //先判断有无输血记录
@@ -60,6 +60,9 @@ public class OPE03143 extends QCCatalogue {
                         flag = false;
                     }
                 }
+                //不存在手术记录返回
+            } else {
+                return;
             }
         }
         if (flag) {

+ 1 - 1
kernel/src/main/java/com/lantone/qc/kernel/catalogue/operationdiscussion/OPE03143.java

@@ -31,7 +31,7 @@ public class OPE03143 extends QCCatalogue {
         boolean flag = true;
         //先判断有无手术记录
         List<OperationDoc> operationDocs = inputInfo.getOperationDocs();
-        if (operationDocs == null && operationDocs.size() == 0) {
+        if (operationDocs == null || operationDocs.size() == 0) {
             return;
         }
         //先判断有无输血记录

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

@@ -41,6 +41,9 @@ public class BeiLunThreeLevelWardHtmlAnalysis implements BeiLunHtmlAnalysis {
             String htmlText = BeiLunHtmlAnalysisUtil.blockDivToStr(bigDivElement, true);
             htmlText = htmlText.replace("注意:上级医师查房主要记 录:患者病情、诊断、鉴别诊断、当前治疗措施和疗效的分析及下一步诊疗意见等,能反应上级医 师的水平。", "")
                     .replace("提醒:有创诊疗操作记录内容包括操作名称、时间、步骤、结果及患者的一般情况,记录操作过 程是否顺利,有无不良反应,术后注意事项,操作医师签名、记录时间等。 手术室完成的、治疗性质的及全麻下完成的有创诊疗操作参照手术管理。(包括介入治疗、胃肠镜 下肿瘤切除/粘膜下肿瘤剥除等)", "");
+            if (htmlText.contains("SignControl-")) {
+                htmlText = htmlText.substring(0, htmlText.indexOf("SignControl-"));
+            }
             CommonAnalysisUtil.extractWardInfo(recTitle, htmlText, structureMap);
             BeiLunHtmlAnalysisUtil.insertModuleId(modeId, recTypeId, structureMap);
         } catch (Exception e) {

+ 10 - 5
trans/src/main/java/com/lantone/qc/trans/hangzhoufubao/BeHospitalizedDocTrans.java

@@ -62,12 +62,17 @@ public class BeHospitalizedDocTrans extends ModelDocTrans {
     }
 
     private List<String> keyContrasts = Lists.newArrayList(
-            "家庭地址=住址","生于=出生日期",
-            "出  地=出生地","籍贯=户口地址",
+            "家庭地址=住址",
+            "出生地=籍贯",
             "疼痛评估=疼痛",
-            "主  诉=主诉",
-            "入院日期=入院时间","一般情况=一般体格检查一般情况",
-            "记录日期=记录时间","入院于=入院日期"
+            "代诉=主诉",
+            "入院日期=入院时间",
+            "入院于=入院时间",
+            "记录日期=记录时间",
+            "体格检查一般情况=一般体格检查一般情况",
+            "一般体格检查一般状况=一般体格检查一般情况",
+            "一般状况=一般体格检查一般情况",
+            "联系电话=电话"
 //            "西医诊断"
     );
 

+ 6 - 6
trans/src/main/java/com/lantone/qc/trans/hangzhoufubao/util/BeHospitalizedHtmlAnalysis.java

@@ -49,16 +49,16 @@ public class BeHospitalizedHtmlAnalysis implements HtmlAnalysis {
     //一般模板
     private void analysisGeneral(Document doc, String recTitle, Map<String, String> map) {
 
-        List<String> titles = Lists.newArrayList("姓 名", "性 别","年 龄","民 族","父母姓名","出生日期","生 于","户口地址","籍 贯","出 生 地","供 史 者","住 址","职 业",  "宗教信仰", "入 院 于",
-                "联系地址","联系电话","入院日期","记录日期","身份证号码","病史陈述者", "病史可靠程度", "产前检查", "丈夫姓名","电 话",
-                "主  诉","现 病 史","既 往 史","出 生 史","喂 养 史","家 族 史","新生儿一般体格检查","一般测量","一般情况","皮 肤", "皮下脂肪","头 面 部","胸 部","腹 部",
-                "外生殖器", "肛 门","脊柱四肢","神经反射","辅助检查","初步诊断","医生签名", "医师签名", "签名时间", "记录时间", "补充诊断", "修正诊断","其    他");
+        List<String> titles = Lists.newArrayList("姓名", "性别", "年龄","出生日期","父母姓名", "出生地", "职业", "民族", "宗教信仰", "婚 姻","入院时间","籍贯","入院于","生于","电话","供史者",
+                "联系地址", "联系电话", "入院日期", "记录日期", "身份证号码", "病史陈述者", "病史可靠程度", "产前检查", "丈夫姓名",
+                "主诉", "现病史", "既往史", "个人史", "月经史", "婚姻史", "生育史", "家族史", "体格检查","一般状况","一般体格检查一般情况","一般体格检查一般状况","体格检查一般情况","辅助检查", "妇科检查","产科检查","实验室检查", "特殊检查",
+                "初步诊断", "康复需求","营养需求","医生签名", "医师签名", "签名时间", "记录时间", "补充诊断", "修正诊断","其他");
         //个人基础信息table解析
-        String htmlContent = CommonAnalysisUtil.html2String(doc.toString());
+        String htmlContent = CommonAnalysisUtil.html2String(doc.toString()).replaceAll(" ","").replaceAll("[   ]", "").replaceAll(" ", "");
         if (StringUtil.isNotBlank(htmlContent)) {
             CommonAnalysisUtil.html2StructureMap(titles,htmlContent,map);
         }
-        //去掉生育史里面的表格jj
+        //去掉生育史里面的表格
         String reproductiveHistory = map.get("生育史");
         if (StringUtil.isNotBlank(reproductiveHistory)) {
             int index = reproductiveHistory.indexOf("孕次生产年月流产早产足月产");

+ 6 - 4
trans/src/main/java/com/lantone/qc/trans/hangzhoufubao/util/LeaveHospitalHtmlAnalysis.java

@@ -25,10 +25,10 @@ public class LeaveHospitalHtmlAnalysis implements HtmlAnalysis {
     public Map<String, String> analysis(String... args) {
         Map<String, String> structureMap = Maps.newLinkedHashMap();
         try {
-            List<String> titles = Lists.newArrayList("姓名", "性别","出生年月","主诊医师",
-                    "入院日期", "出院日期", "入院诊断", "出院诊断","疗效评价", "住院天数","入院情况", "住院诊治经过(包括重要发现和结论、接受手术和操作、药物和其它治疗)","辅助检查"
-                    ,"出院情况","出院去向", "出院带药","出院指导","复诊", "健康宣教",
-                    "可能需要的紧急医疗", "出院交通需求", "监护人意见", "监护人签名",
+            List<String> titles = Lists.newArrayList("姓名", "性别", "出生年月", "主诊医师",
+                    "入院日期", "出院日期", "入院诊断", "出院诊断", "疗效评价", "住院天数", "入院情况", "住院诊治经过(包括重要发现和结论、接受手术和操作、药物和其它治疗)", "辅助检查"
+                    , "出院情况", "出院去向", "出院带药", "出院指导", "复诊", "健康宣教",
+                    "可能需要的紧急医疗", "出院交通需求", "监护人意见", "监护人签名", "时间", "医生签名", "患者或家属意见", "患方签名",
                     "健康指导");
             String html = args[0];
             String recTitle = args[1];
@@ -39,6 +39,8 @@ public class LeaveHospitalHtmlAnalysis implements HtmlAnalysis {
             if (StringUtil.isNotBlank(htmlContent)) {
                 CommonAnalysisUtil.html2StructureMap(titles,htmlContent,structureMap);
             }
+            String s = structureMap.get("住院诊治经过(包括重要发现和结论、接受手术和操作、药物和其它治疗)");
+            structureMap.put("住院诊治经过", s);
 /*            if (StringUtil.isNotBlank(CommonAnalysisUtil.extractDate(structureMap.get("出院日期")))) {
                 structureMap.put("住院天数", structureMap.get("出院日期").replace(CommonAnalysisUtil.extractDate(structureMap.get("出院日期")), ""));
                 structureMap.put("出院日期", CommonAnalysisUtil.extractDate(structureMap.get("出院日期")));*/

+ 1 - 1
trans/src/main/java/com/lantone/qc/trans/hangzhoufubao/util/OperationRecordHtmlAnalysis.java

@@ -42,7 +42,7 @@ public class OperationRecordHtmlAnalysis implements HtmlAnalysis {
     private void analysisGeneral(Element bigDivElement, Map<String, String> map) {
         String text = HtmlAnalysisUtil.blockDivToStr(bigDivElement, true);
         text = text.replaceAll("第1页", "")
-                .replace("(包括体位、切口处理经过,病灶所见及手术步骤等):", "");
+                .replace("输入血/血制品", "输入血或血制品");
         List<String> titles = Lists.newArrayList(
                 "手术时间", "手术结束时间", "手术全程时间", "术前诊断", "手术名称", "手术指征", "术后诊断", "主刀医师", "麻醉人员", "器械护士",
                 "儿科医生", "护婴人", "指导人", "麻醉方式", "麻醉体位", "麻醉效果", "手术经过", "术中并发症", "冰冻切片诊断", "送检手术标本","手术切口类别",

+ 3 - 2
trans/src/main/java/com/lantone/qc/trans/hangzhoufubao/util/PreoperativeHtmlAnalysis.java

@@ -60,9 +60,10 @@ public class PreoperativeHtmlAnalysis implements HtmlAnalysis {
                 .replace("(如高血压病、冠心病、糖尿病、脑梗、心梗、心肺肝肾功能不全、口服抗凝药等)", "")
                 .replace("年月日时\n" + "分", "")
                 .replace("一、简要病情", "简要病情");*/
-        text = text.replace("参加人员(姓名及专业技术职务) ", "参加人员");
+        text = text.replace("参加人员(姓名及专业技术职务)", "参加人员");
+        text = text.replace("患者目前心理状态/文化需求 ", "患者目前心理状态或文化需求");
         List<String> titles = Lists.newArrayList("记录时间", "术前讨论时间", "讨论方式", "参加人员", "简要病情", "术前诊断", "手术指征"
-                ,  "术前诊断", "手术指征", "术前准备", "手术禁忌证", "患者目前心理状态/文化需求", "拟行手术方案",
+                ,  "术前诊断", "手术指征", "术前准备", "手术禁忌证", "患者目前心理状态文化需求", "拟行手术方案",
                 "拟施麻醉", "手术目标",
                 "手术中注意点", "术后注意点", "出院后潜在的医疗与康复需求", "主刀医师意见与手术安排","医生签名");
         CommonAnalysisUtil.cutByTitles(text, titles, 0, map);

+ 3 - 1
trans/src/main/java/com/lantone/qc/trans/xszyy/BeiLunBeHospitalizedDocTrans.java

@@ -75,7 +75,9 @@ public class BeiLunBeHospitalizedDocTrans extends ModelDocTrans {
             "补充及专科检查=专科检查",
             "辅 助 检 查=辅助检查",
             "入 院 诊 断=入院诊断",
-            "初步诊断=入院诊断"
+            "初步诊断=入院诊断",
+            "住址=单位或住址",
+            "住院号=住院号码"
     );
 
 }

+ 3 - 2
trans/src/main/java/com/lantone/qc/trans/xszyy/BeiLunDeathCaseDiscussDocTrans.java

@@ -54,11 +54,12 @@ public class BeiLunDeathCaseDiscussDocTrans extends ModelDocTrans {
     }
 
     private List<String> keyContrasts = Lists.newArrayList(
-            "讨论日期=讨论时间",
+            "讨论日期=讨论时间","记录者签名=记录医生"
+           /*
             "参加人员姓名及专业技术职称=参加人员",
             "讨论意见=病史简介",
             "主持人小结意见=主持人小结",
-            "记录者签名=记录医生"
+            */
     );
 
 }

+ 10 - 3
trans/src/main/java/com/lantone/qc/trans/xszyy/BeiLunOperationDocTrans.java

@@ -206,11 +206,15 @@ public class BeiLunOperationDocTrans extends ModelDocTrans {
 
     private List<String> operationRecord_keyContrasts = Lists.newArrayList(
             "术后诊断=术中后诊断",
-            "麻醉人员=麻醉医师",
+            "麻醉人员=麻醉医师","手法方式=手术名称","手术方式=手术名称","手术方案=手术名称","手术前诊断=术前诊断",
+            "手术经过(包括病人体位、切口选择、病灶所见、术中出现情况及处理等)=手术经过及处理",
+            "口选择、病灶所见、术中出现情况及处理等)=手术经过及处理",
+            "手术前诊断=术前诊断",
             "手术经过=手术经过及处理",
             "主刀医师签名=主刀医师",
             "记录医师签名=记录医生",
             "记录医师=记录医生",
+            "医师签名=记录医生",
             "手术时间=手术日期"
     );
 
@@ -304,9 +308,12 @@ public class BeiLunOperationDocTrans extends ModelDocTrans {
             "主 持 人=主持人",
             "参加人员姓名及专业技术职称=参加人员",
             "报告病史=简要病情",
+            "讨论意见内容记录=具体讨论意见","讨论记录=具体讨论意见",
+            "拟施手术名称和方式=拟施手术名称及方式","手术方式=拟施手术名称及方式",
             "讨论意见内容记录=具体讨论意见",
-            "记录者签名=记录医生",
-            "记录者签名=记录医生"
+            "入院时间=入院日期","麻醉方式=拟施麻醉方式",
+            "(6)目前诊断=术前诊断","(2)术前准备=术前准备",
+            "(4)可能出现的意外及防范措施=注意事项","(1)手术指征=手术指征","报告病史=简要病情","(3)手术方案=拟施手术名称及方式"
 
     );
 

+ 9 - 9
trans/src/main/java/com/lantone/qc/trans/xszyy/util/BeiLunBeHospitalizedHtmlAnalysis.java

@@ -46,17 +46,17 @@ public class BeiLunBeHospitalizedHtmlAnalysis implements BeiLunHtmlAnalysis {
 
     //一般模板
     private void analysisGeneral(Document doc, String recTitle, Map<String, String> map) {
-        List<String> titles = Lists.newArrayList("姓名","病区","床号","住院号码","入 院 记 录","住 院 大 病 历",
-                "姓 名", "职 业", "性 别", "入院日期","年 龄", "记录日期", "婚 姻","病史陈述者", "出生地","可靠程度",
+        List<String> titles = Lists.newArrayList("家长姓名","病区","床号","住院号码","病案号","住院号","入 院 记 录","住 院 大 病 历",
+                "姓 名","职业", "职 业", "性 别", "入院日期","年 龄", "记录日期", "婚 姻","病史陈述者", "出生地","可靠程度",
                 "民 族","身份证号码","发病节气","病案号","单位或住址","主 诉","现病史","既往史","个人史","婚育史","家族史",
                 "专项 评估","专项评估",
-                "体 格 检 查","体 格 检 查 表 ( 一 )","补充及专科检查","辅 助 检 查", "入 院 诊 断","初步诊断",
-                "书写医生","医师签名","书写医师","修正诊断"
+                "体 格 检 查","体 格 检 查 表 ( 一 )","补充及专科检查","辅 助 检 查","辅助检查", "入 院 诊 断","初步诊断",
+                "书写医生","医师签名","书写医师","修正诊断","家长电话","出生年月","住 址"
         );
         String htmlContent = XszyyCommonAnalysisUtil.html2String(doc.toString());
         if (StringUtil.isNotBlank(htmlContent)) {
             //有冒号版本
-//            XszyyCommonAnalysisUtil.html2StructureMap(titles,htmlContent,map);
+            XszyyCommonAnalysisUtil.html2StructureMap(titles,htmlContent,map);
             //无冒号版本
             XszyyCommonAnalysisUtil.html2StructureMapNoColon(titles,htmlContent,map);
         }
@@ -83,11 +83,11 @@ public class BeiLunBeHospitalizedHtmlAnalysis implements BeiLunHtmlAnalysis {
 
     //24小时出入院记录、24小时出入院记录(全院)、24小时入出院记录(全院通用)、24小时内入院死亡记录(全院通用)
     private void analysis24h(Document doc, Map<String, String> map) {
-        List<String> titles = Lists.newArrayList("姓名","病区","床号","住院号码","入 院 记 录","住 院 大 病 历",
+        List<String> titles = Lists.newArrayList("姓名","病区","床号","住院号码","病案号","住院号","入 院 记 录","住 院 大 病 历",
                 "姓 名", "职 业", "性 别", "入院日期","年 龄", "记录日期", "婚 姻","病史陈述者", "出生地","可靠程度",
                 "民 族","身份证号码","发病节气","病案号","单位或住址","主 诉","现病史","既往史","个人史","婚育史","家族史",
                 "专项 评估","专项评估",
-                "体 格 检 查","体 格 检 查 表 ( 一 )","补充及专科检查","辅 助 检 查", "入 院 诊 断","初步诊断",
+                "体 格 检 查","体 格 检 查 表 ( 一 )","补充及专科检查","辅 助 检 查","辅助检查", "入 院 诊 断","初步诊断",
                 "书写医生","医师签名","书写医师","修正诊断"
         );
         String htmlContent = XszyyCommonAnalysisUtil.html2String(doc.toString());
@@ -121,11 +121,11 @@ public class BeiLunBeHospitalizedHtmlAnalysis implements BeiLunHtmlAnalysis {
 
     //原-日间病历入出院记录、日间病历-性早熟
     private void analysisDay(Document doc, Map<String, String> map) {
-        List<String> titles = Lists.newArrayList("姓名","病区","床号","住院号码","入 院 记 录","住 院 大 病 历",
+        List<String> titles = Lists.newArrayList("家长姓名","病区","床号","住院号码","病案号","住院号","入 院 记 录","住 院 大 病 历",
                 "姓 名", "职 业", "性 别", "入院日期","年 龄", "记录日期", "婚 姻","病史陈述者", "出生地","可靠程度",
                 "民 族","身份证号码","发病节气","病案号","单位或住址","主 诉","现病史","既往史","个人史","婚育史","家族史",
                 "专项 评估","专项评估",
-                "体 格 检 查","体 格 检 查 表 ( 一 )","补充及专科检查","辅 助 检 查", "入 院 诊 断","初步诊断",
+                "体 格 检 查","体 格 检 查 表 ( 一 )","补充及专科检查","辅 助 检 查","辅助检查", "入 院 诊 断","初步诊断",
                 "书写医生","医师签名","书写医师","修正诊断"
         );
         String htmlContent = XszyyCommonAnalysisUtil.html2String(doc.toString());

+ 3 - 1
trans/src/main/java/com/lantone/qc/trans/xszyy/util/BeiLunDeathCaseDiscussHtmlAnalysis.java

@@ -38,10 +38,12 @@ public class BeiLunDeathCaseDiscussHtmlAnalysis implements BeiLunHtmlAnalysis {
             String htmlContent = XszyyCommonAnalysisUtil.html2String(doc.toString());
 
             if (StringUtil.isNotBlank(htmlContent)) {
+                XszyyCommonAnalysisUtil.html2StructureMap(titles,htmlContent,map);
                 //无冒号版本
                 XszyyCommonAnalysisUtil.html2StructureMapNoColon(titles,htmlContent,map);
+
                 //死亡诊断包含医师发言
-                if(map.containsKey("死亡诊断")&&map.get("死亡诊断").contains("主任医师")){
+                if(map.containsKey("死亡诊断") && map.get("死亡诊断").contains("主任医师")){
                     String swzd = map.get("死亡诊断");
                     map.put("死亡诊断",swzd.substring(0,swzd.indexOf("主任医师")));
                     map.put("医师发言",swzd.substring(swzd.indexOf("主任医师")));

+ 2 - 1
trans/src/main/java/com/lantone/qc/trans/xszyy/util/BeiLunFirstCourseRecordHtmlAnalysis.java

@@ -29,7 +29,8 @@ public class BeiLunFirstCourseRecordHtmlAnalysis implements BeiLunHtmlAnalysis {
             String recTitle = args[1];
             String recTypeId = args[2];
             Document doc = Jsoup.parse(html);
-            List<String> titles = Lists.newArrayList("病例特点","拟诊讨论","初步诊断","诊疗方案","医师签名"
+            List<String> titles = Lists.newArrayList("病例特点","拟诊讨论","初步诊断","诊疗方案",
+                    "医师签名","诊疗计划"
             );
             String htmlContent = XszyyCommonAnalysisUtil.html2String(doc.toString());
             if (StringUtil.isNotBlank(htmlContent)) {

+ 9 - 3
trans/src/main/java/com/lantone/qc/trans/xszyy/util/BeiLunOperationRecordHtmlAnalysis.java

@@ -32,8 +32,9 @@ public class BeiLunOperationRecordHtmlAnalysis implements BeiLunHtmlAnalysis {
             String recTypeId = args[2];
             Document doc = Jsoup.parse(html);
             List<String> titles = Lists.newArrayList("姓名","病区","床号","住院号","手 术 记 录 单",
-                    "手术日期","手术时间","开始时间","结束时间","术前诊断","手术名称","术后诊断","手术人员","麻醉方式","麻醉人员","手术经过",
-                    "记录医师签名","主刀医师签名","主刀医师","记录医师","科室意见","科主任"
+                    "手术日期","手术时间","开始时间","结束时间","手术前诊断","术前诊断","手法方式","手术方式","手术方案","手术名称","术后诊断","手术人员","麻醉方式","麻醉人员","手术经过",
+                    "手术经过(包括病人体位、切口选择、病灶所见、术中出现情况及处理等)","口选择、病灶所见、术中出现情况及处理等)",
+                    "记录医师签名","主刀医师签名","主刀医师","记录医师","科室意见","科主任","医师签名"
             );
             String htmlContent = XszyyCommonAnalysisUtil.html2String(doc.toString());
 
@@ -45,11 +46,16 @@ public class BeiLunOperationRecordHtmlAnalysis implements BeiLunHtmlAnalysis {
                     map.put("记录时间",XszyyCommonAnalysisUtil.extractDate(map.get("主刀医师签名")));
                     map.put("主刀医师签名",map.get("主刀医师签名").substring(0,map.get("主刀医师签名").indexOf(map.get("记录时间"))));
                 }
-                //记录医师存在记录时间
+                //记录医师存在记录时间
                 if(map.containsKey("记录医师")&&XszyyCommonAnalysisUtil.extractDate(map.get("记录医师"))!=null){
                     map.put("记录时间",XszyyCommonAnalysisUtil.extractDate(map.get("记录医师")));
                     map.put("记录医师",map.get("记录医师").substring(0,map.get("记录医师").indexOf(map.get("记录时间"))));
                 }
+                //医师签名存在记录时间
+                if(map.containsKey("医师签名")&&XszyyCommonAnalysisUtil.extractDate(map.get("医师签名"))!=null){
+                    map.put("记录时间",XszyyCommonAnalysisUtil.extractDate(map.get("医师签名")));
+                    map.put("医师签名",map.get("医师签名").substring(0,map.get("医师签名").indexOf(map.get("记录时间"))));
+                }
             }
 
             XszyyHtmlAnalysisUtil.insertModuleId(modeId, recTypeId, map);

+ 16 - 4
trans/src/main/java/com/lantone/qc/trans/xszyy/util/BeiLunPreoperativeHtmlAnalysis.java

@@ -32,10 +32,10 @@ public class BeiLunPreoperativeHtmlAnalysis implements BeiLunHtmlAnalysis {
             String recTypeId = args[2];
             Document doc = Jsoup.parse(html);
             List<String> titles = Lists.newArrayList("简要病情","术前诊断","手术指征","拟施手术名称和方式","拟施麻醉方式",
-                    "注意事项","术者术前查房情况","书写医师",
-
-                    "入院日期","讨论日期","讨论地点","主 持 人","参加人员姓名及专业技术职称","报告病史", "讨论意见内容记录","主持人小结意见","记录者签名","记录者",
-                    "主持人签名"
+                    "注意事项","术者术前查房情况","书写医师","医师签名",
+                    "术前准备","麻醉方式","手术人员","手术方式",
+                    "入院日期","入院时间","讨论日期","讨论时间","讨论地点","主 持 人","参加人员姓名及专业技术职称","参加人员","报告病史", "讨论记录","讨论意见内容记录","记录者签名","记录者",
+                    "主持人签名","(4)可能出现的意外及防范措施","(3)手术方案","(2)术前准备","(1)手术指征","主持人小结意见","主持人小结"
             );
             String htmlContent = XszyyCommonAnalysisUtil.html2String(doc.toString());
 
@@ -47,6 +47,18 @@ public class BeiLunPreoperativeHtmlAnalysis implements BeiLunHtmlAnalysis {
                 }
             }
 
+            if(StringUtil.isNotEmpty(structureMap.get("主持人小结意见")) && structureMap.get("主持人小结意见").contains("手术指征")){
+                String operationDesc=structureMap.get("主持人小结意见").substring(structureMap.get("主持人小结意见").lastIndexOf("手术指征")+4);
+                structureMap.put("手术指征",operationDesc);
+            }
+            if(StringUtil.isNotEmpty(structureMap.get("主持人小结")) && structureMap.get("主持人小结").contains("手术指征")){
+                String operationDesc=structureMap.get("主持人小结").substring(structureMap.get("主持人小结").lastIndexOf("手术指征")+4);
+                structureMap.put("手术指征",operationDesc);
+            }
+            if(StringUtil.isNotEmpty(structureMap.get("报告病史")) && structureMap.get("报告病史").contains("目前诊断")){
+                String diag=structureMap.get("报告病史").substring(structureMap.get("报告病史").lastIndexOf("目前诊断"),structureMap.get("报告病史").lastIndexOf("讨论目的")-3);
+                structureMap.put("(6)目前诊断",diag);
+            }
             structureMap.put("文书标题",recTitle);
             XszyyHtmlAnalysisUtil.insertModuleId(modeId, recTypeId, structureMap);
         } catch (Exception e) {

+ 2 - 3
trans/src/main/java/com/lantone/qc/trans/xszyy/util/BeiLunThreeLevelWardHtmlAnalysis.java

@@ -35,7 +35,7 @@ public class BeiLunThreeLevelWardHtmlAnalysis implements BeiLunHtmlAnalysis {
             XszyyCommonAnalysisUtil.xszyyExtractWardInfo(recTitle, htmlContent, structureMap);
 
             //病情记录存在副主任医师和书写医师字段
-            if(structureMap.containsKey("病情记录")){
+            /*if(structureMap.containsKey("病情记录")){
                 String bqtext = structureMap.get("病情记录");
 
                 //无冒号版本
@@ -45,8 +45,7 @@ public class BeiLunThreeLevelWardHtmlAnalysis implements BeiLunHtmlAnalysis {
                 if(bqtext.contains("副主任医师")){
                     structureMap.put("病情记录",bqtext.substring(0,bqtext.lastIndexOf("副主任医师")));
                 }
-            }
-
+            }*/
 
             XszyyHtmlAnalysisUtil.insertModuleId(modeId, recTypeId, structureMap);
         } catch (Exception e) {

+ 13 - 4
trans/src/main/java/com/lantone/qc/trans/xszyy/util/comsis/XszyyCommonAnalysisUtil.java

@@ -282,10 +282,10 @@ public class XszyyCommonAnalysisUtil {
         Pattern pattern2 = 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);
         Matcher matcher2 = pattern2.matcher(top);
-        if (matcher2.find()) {
-            return matcher2.group(0);
-        } else if (matcher.find()) {
+        if (matcher.find()) {
             return matcher.group(0);
+        } else if (matcher2.find()) {
+            return matcher2.group(0);
         } else {
             Pattern p1 = Pattern.compile("[0-9]{4}年[0-9]+月[0-9]+日[0-9]+时[0-9]+分");
             Matcher m1 = p1.matcher(top);
@@ -674,6 +674,12 @@ public class XszyyCommonAnalysisUtil {
             }
             String content = sb.toString();
             structureMap.put("病情记录", content);
+            /*if(content.contains("/书写医师签名")){
+                structureMap.put("记录医生",content.substring(content.lastIndexOf("/书写医师签名")+1));
+            }else if(content.contains("/书写医师")){
+                structureMap.put("记录医生",content.substring(content.lastIndexOf("/书写医师")+1));
+            }*/
+            /*
             if (structureMap.containsKey("病情记录")) {
                 String info = structureMap.get("病情记录");
                 if (info.contains("记录医师")) {
@@ -682,8 +688,11 @@ public class XszyyCommonAnalysisUtil {
                 } else if (info.contains("医师签名")) {
                     structureMap.put("病情记录", info.substring(0, info.lastIndexOf("医师签名")));
                     structureMap.put("医师签名", info.substring(info.lastIndexOf("医师签名") + "医师签名:".length()));
+                }else if (info.contains("主治医师")) {
+                    structureMap.put("病情记录", info.substring(0, info.lastIndexOf("主治医师")));
+                    structureMap.put("医师签名", info.substring(info.lastIndexOf("主治医师") + "主治医师:".length()));
                 }
-            }
+            }*/
         }
     }