|
@@ -1,5 +1,6 @@
|
|
|
package com.lantone.qc.trans.changshaxy.util;
|
|
|
|
|
|
+import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
|
|
import com.google.common.collect.Lists;
|
|
|
import com.google.common.collect.Maps;
|
|
|
import com.lantone.qc.pub.util.StringUtil;
|
|
@@ -33,8 +34,7 @@ public class XyConsultationRecordHtmlAnalysis implements XyHtmlAnalysis {
|
|
|
Document doc = Jsoup.parse(html);
|
|
|
// XyHtmlAnalysisUtil.tableStyle1InsertMap(Jsoup.parse(html).getElementById("table1_1"), map);
|
|
|
Element bigDivElement = Jsoup.parse(html).selectFirst("body");
|
|
|
-
|
|
|
- analysisGeneral(recTitle,bigDivElement, map);
|
|
|
+ analysisGeneral(recTitle, bigDivElement, map);
|
|
|
XyHtmlAnalysisUtil.insertModuleId(modeId, recTypeId, map);
|
|
|
} catch (Exception e) {
|
|
|
log.error(e.getMessage(), e);
|
|
@@ -50,43 +50,39 @@ public class XyConsultationRecordHtmlAnalysis implements XyHtmlAnalysis {
|
|
|
// bigDivElement.selectFirst("hr").previousElementSiblings().remove();
|
|
|
// }
|
|
|
String htmlContent = XyHtmlAnalysisUtil.blockDivToStr(bigDivElement, true).replace(" ", "");
|
|
|
- List<String> titles = Lists.newArrayList("会诊病人姓名", "主诉","现病史","既往史","相关检验检查","24h动态",
|
|
|
- "目前诊断","治疗","主持人","会诊意见回报","总结意见",
|
|
|
- "初步诊断", "会诊目的","申请会诊病室负责人签名", "申请日期","医师签名","记录人", "医务办意见", "主任签名");
|
|
|
-
|
|
|
- //获取病历标题和文书标题
|
|
|
- List<String> titleContent = Lists.newArrayList(htmlContent.split(" "));
|
|
|
- String title = titleContent.get(0);
|
|
|
- if (StringUtil.isNotBlank(title) && title.equals(recTitle)) {
|
|
|
- structureMap.put("病历标题", title);
|
|
|
- titleContent.remove(0);
|
|
|
- } else {
|
|
|
- structureMap.put("病历标题", recTitle);
|
|
|
- structureMap.put("文书标题", title);
|
|
|
- if (titleContent.size() > 2) {
|
|
|
- titleContent.remove(0);
|
|
|
- titleContent.remove(0);
|
|
|
- }
|
|
|
- }
|
|
|
+ List<String> titles = Lists.newArrayList("会诊意见回报", "会诊意见执行情况", "医师签名");
|
|
|
|
|
|
- for (String t: titles) {
|
|
|
- if (htmlContent.contains(t + ":") || htmlContent.contains(t + ":")) {
|
|
|
- structureMap.put("通知信息", htmlContent.substring(0, htmlContent.indexOf(t)));
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- if (StringUtil.isNotBlank(htmlContent)) {
|
|
|
- CommonAnalysisUtil.html2StructureMap(titles, htmlContent, structureMap);
|
|
|
- structureMap.put("病情简介",htmlContent);
|
|
|
+// //获取病历标题和文书标题
|
|
|
+// List<String> titleContent = Lists.newArrayList(htmlContent.split(" "));
|
|
|
+// String title = titleContent.get(0);
|
|
|
+// if (StringUtil.isNotBlank(title) && title.equals(recTitle)) {
|
|
|
+// structureMap.put("病历标题", title);
|
|
|
+// titleContent.remove(0);
|
|
|
+// } else {
|
|
|
+// structureMap.put("病历标题", recTitle);
|
|
|
+// structureMap.put("病历日期", title);
|
|
|
+// if (titleContent.size() > 2) {
|
|
|
+// titleContent.remove(0);
|
|
|
+// titleContent.remove(0);
|
|
|
+// }
|
|
|
+// }
|
|
|
+//
|
|
|
+// for (String t : titles) {
|
|
|
+// if (htmlContent.contains(t + ":") || htmlContent.contains(t + ":")) {
|
|
|
+// structureMap.put("通知信息", htmlContent.substring(0, htmlContent.indexOf(t)));
|
|
|
+// break;
|
|
|
+// }
|
|
|
+// }
|
|
|
+// if (StringUtil.isNotBlank(htmlContent)) {
|
|
|
+// CommonAnalysisUtil.html2StructureMap(titles, htmlContent, structureMap);
|
|
|
+// }
|
|
|
+ CommonAnalysisUtil.extractWardInfo(recTitle, htmlContent, structureMap);
|
|
|
+ titles = CommonAnalysisUtil.sortTitlesNoColon(titles, htmlContent);
|
|
|
+ CommonAnalysisUtil.cutByTitlesNoColon(htmlContent, titles, 0, structureMap);
|
|
|
+ if (StringUtils.isNotEmpty(structureMap.get("医师签名"))&&structureMap.get("医师签名").contains("记录人")){
|
|
|
+ String[] strings = structureMap.get("医师签名").split("记录人");
|
|
|
+ structureMap.put("医师签名",strings[0]);
|
|
|
}
|
|
|
-// CommonAnalysisUtil.extractWardInfo(recTitle,text, map);
|
|
|
-// String bqjlText = "病情记录" + map.get("病情记录").replace("请在此填写会诊处理意见","").replace("会诊回复时间","");
|
|
|
-// List<String> titles = Lists.newArrayList(
|
|
|
-// "病情记录","答复","日期时间"
|
|
|
-// );
|
|
|
- XyCommonAnalysisUtil.processType(structureMap, "会诊类型");
|
|
|
-// titles = CommonAnalysisUtil.sortTitlesNoColon(titles, bqjlText);
|
|
|
-// CommonAnalysisUtil.cutByTitlesNoColon(bqjlText, titles, 0, map);
|
|
|
}
|
|
|
|
|
|
}
|