|
@@ -2,7 +2,9 @@ package com.lantone.qc.trans.xszyy.util;
|
|
|
|
|
|
import com.google.common.collect.Lists;
|
|
|
import com.google.common.collect.Maps;
|
|
|
+import com.lantone.qc.pub.util.StringUtil;
|
|
|
import com.lantone.qc.trans.comsis.CommonAnalysisUtil;
|
|
|
+import com.lantone.qc.trans.xszyy.util.comsis.XszyyCommonAnalysisUtil;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.jsoup.Jsoup;
|
|
|
import org.jsoup.nodes.Document;
|
|
@@ -28,18 +30,30 @@ public class BeiLunDeathCaseDiscussHtmlAnalysis implements BeiLunHtmlAnalysis {
|
|
|
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("医生签名时间", XszyyHtmlAnalysisUtil.elementLayer1ToStr(bigDivElement.child(0).lastElementSibling(), false));
|
|
|
- bigDivElement.child(0).lastElementSibling().remove();
|
|
|
-
|
|
|
- String text = XszyyHtmlAnalysisUtil.blockDivToStr(bigDivElement, false);
|
|
|
- List<String> titles = Lists.newArrayList("姓名", "性别", "出生日期", "科别", "病区", "床号", "住院号",
|
|
|
- "入院诊断", "死亡诊断", "尸检结果", "讨论时间", "讨论地点",
|
|
|
- "主 持 人", "参加人员", "具体讨论意见", "主持人小结意见", "主持人(签名)", "记录者签名");
|
|
|
- CommonAnalysisUtil.cutByTitlesNoColon(text, titles, 0, map);
|
|
|
- XszyyHtmlAnalysisUtil.mapValueRemoveStartColon(map);
|
|
|
+ List<String> titles = Lists.newArrayList("姓名","病区","床号","住院号",
|
|
|
+ "讨论日期","讨论地点","主持人","参加人员姓名及专业技术职称",
|
|
|
+ "讨论意见","死亡原因","死亡诊断",
|
|
|
+ "主持人小结意见","记录者签名"
|
|
|
+ );
|
|
|
+ String htmlContent = XszyyCommonAnalysisUtil.html2String(doc.toString());
|
|
|
+
|
|
|
+ if (StringUtil.isNotBlank(htmlContent)) {
|
|
|
+ //无冒号版本
|
|
|
+ XszyyCommonAnalysisUtil.html2StructureMapNoColon(titles,htmlContent,map);
|
|
|
+ //死亡诊断包含医师发言
|
|
|
+ if(map.containsKey("死亡诊断")&&map.get("死亡诊断").contains("主任医师")){
|
|
|
+ String swzd = map.get("死亡诊断");
|
|
|
+ map.put("死亡诊断",swzd.substring(0,swzd.indexOf("主任医师")));
|
|
|
+ map.put("医师发言",swzd.substring(swzd.indexOf("主任医师")));
|
|
|
+ }
|
|
|
+ //住院号包含死亡病例讨论记录
|
|
|
+ if(map.containsKey("住院号")&&map.get("住院号").contains("死亡病例讨论记录")){
|
|
|
+ String zyh = map.get("住院号");
|
|
|
+ map.put("住院号",zyh.substring(0,zyh.indexOf("死亡病例讨论记录")));
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
XszyyHtmlAnalysisUtil.insertModuleId(modeId, recTypeId, map);
|
|
|
} catch (Exception e) {
|
|
|
log.error(e.getMessage(), e);
|