Explorar o código

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

chengyao %!s(int64=3) %!d(string=hai) anos
pai
achega
804401371b

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

@@ -44,16 +44,16 @@ spring:
 xml-is-encryped: true
 
 CRF:
-  url: http://192.168.2.234:3456/api/mr_info_ex/entity_predict
+  url: http://192.168.3.150:3456/api/mr_info_ex/entity_predict
 
 Similarity:
-  url: http://192.168.2.234:3456/api/mr_info_ex/similarity
+  url: http://192.168.3.150:3456/api/mr_info_ex/similarity
 
 NewSimilarity:
-  url: http://192.168.2.234:23232/api/similarity
+  url: http://192.168.3.150:23232/api/similarity
 
 NewBatchSimilarity:
-  url: http://192.168.2.234:23232/api/similarity_batch
+  url: http://192.168.3.150:23232/api/similarity_batch
 
 ChiefPresentSimilarity:
-  url: http://192.168.2.234:3456/api/mr_info_ex/chief_present_similarity
+  url: http://192.168.3.150:3456/api/mr_info_ex/chief_present_similarity

+ 2 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/leavehospital/LEA0149.java

@@ -60,6 +60,8 @@ public class LEA0149 extends QCCatalogue {
 
             //如果出院小结结构化数据能取出主诉,则直接用该主诉和入院记录主诉比较
             if (StringUtil.isNotBlank(leaveChief)) {
+                leaveChief=leaveChief.replaceAll(" ","");
+                bhChief=bhChief.replaceAll(" ","");
                 leaveChief = CatalogueUtil.int2ChineseNum(leaveChief.replaceAll("[\\p{Punct}\\pP。-]", ""));
                 if (bhChief.equals(leaveChief)) {
                     status.set("0");

+ 20 - 8
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/leavehospital/LEA0507.java

@@ -21,7 +21,7 @@ import java.util.Map;
 @Component
 public class LEA0507 extends QCCatalogue {
     /**
-     * 获取存在病案首页,或出院信息表,存在出院时间的病人。
+     * 获取存在病案首页,出院时间有填写的病人,或出院信息表,存在出院时间的病人(如果都有取住院信息表为准)
      * 判断是否是死亡病人,存在“死亡”医嘱,排除“死亡蛋白”医嘱;存在抢救记录并抢救文书内包含“死亡”;存在死亡记录;存在24小时内入院死亡记录;存在死亡病例讨论记录。上述情况任意一中存在不报
      * 非死亡患者存在24小时内入出院记录,不报。
      * 非死亡患者存在24小时内入出院记录,但入院时间和出院时间超过30小时,报出
@@ -36,10 +36,13 @@ public class LEA0507 extends QCCatalogue {
         FirstPageRecordDoc firstPageRecordDoc = inputInfo.getFirstPageRecordDoc();
         MedicalRecordInfoDoc medicalRecordInfoDoc = inputInfo.getMedicalRecordInfoDoc();
         String leaveHospitalDate = null;
+        if(firstPageRecordDoc!=null){
+            leaveHospitalDate = firstPageRecordDoc.getStructureMap().get("出院时间");
+        }
         if (medicalRecordInfoDoc != null) {
             leaveHospitalDate = medicalRecordInfoDoc.getStructureMap().get("leaveHospitalDate");
         }
-        if (firstPageRecordDoc == null || StringUtil.isEmpty(leaveHospitalDate)) {
+        if (StringUtil.isEmpty(leaveHospitalDate)) {
             return;
         }
         //排除医嘱死亡
@@ -89,13 +92,22 @@ public class LEA0507 extends QCCatalogue {
         if (beHospitalizedDoc != null) {
             Map<String, String> structureMap = beHospitalizedDoc.getStructureMap();
             String title = structureMap.get("文书名称");
+            String outDate =null;
+            String inDate=null;
             if (title.equals("24小时内入出院记录")) {
-                Map<String, String> pageMap = firstPageRecordDoc.getStructureMap();
-                String outDate = pageMap.get("出院时间");
-                String inDate = pageMap.get("入院时间");
-                if(StringUtil.isEmpty(outDate) || StringUtil.isEmpty(inDate)){
-                    outDate = medicalRecordInfoDoc.getStructureMap().get("behospitalDate");
-                    inDate=leaveHospitalDate;
+                if(medicalRecordInfoDoc!=null){
+                    //取出入院时间
+                    inDate = medicalRecordInfoDoc.getStructureMap().get("behospitalDate");
+                    outDate = medicalRecordInfoDoc.getStructureMap().get("leaveHospitalDate");
+                    if(firstPageRecordDoc!=null) {
+                        //首页存在取出入院时间
+                        Map<String, String> pageMap = firstPageRecordDoc.getStructureMap();
+                        if (StringUtil.isEmpty(outDate) || StringUtil.isEmpty(inDate)) {
+                            //任一为空则去首页中取时间
+                            outDate = pageMap.get("出院时间");
+                            inDate = pageMap.get("入院时间");
+                        }
+                    }
                 }
                 if(StringUtil.isNotEmpty(outDate) && StringUtil.isNotEmpty(inDate)) {
                     Date infusionEndDate = StringUtil.parseDateTime(inDate);

+ 13 - 1
trans/src/main/java/com/lantone/qc/trans/changshaxy/util/XyDeathCaseDiscussHtmlAnalysis.java

@@ -40,7 +40,19 @@ public class XyDeathCaseDiscussHtmlAnalysis implements XyHtmlAnalysis {
                 XyCommonAnalysisUtil.cutByTitles(text, titles, 0, map);
             }
 //            XyHtmlAnalysisUtil.mapValueRemoveStartColon(map);
-
+            if(map!=null){
+                String mapTitle = map.get("地点");
+                if(StringUtil.isNotEmpty(mapTitle)){
+                    if(mapTitle.contains("参加人员")){
+                        int indexOf = mapTitle.indexOf("参加人员");
+                        String place = mapTitle.substring(0, indexOf);
+                        String participants = mapTitle.substring(indexOf, mapTitle.length());
+                        map.put("地点",place);
+                        participants=participants.replaceAll("参加人员","").replaceAll(":","");
+                        map.put("参加人员",participants);
+                    }
+                }
+            }
             XyHtmlAnalysisUtil.insertModuleId(modeId, recTypeId, map);
         } catch (Exception e) {
             log.error(e.getMessage(), e);