|
@@ -25,20 +25,31 @@ public class NingHaiYiYiDifficultCaseDiscussHtmlAnalysis implements NingHaiYiYiH
|
|
|
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];
|
|
|
String recTypeId = args[2];
|
|
|
Document doc = Jsoup.parse(html);
|
|
|
+ NingHaiYiYiHtmlAnalysisUtil.tableStyle1InsertMap(doc.getElementById("header"), structureMap);
|
|
|
+ structureMap.forEach((key, value) -> structureMap.put(key, value.replace("\n", "")));
|
|
|
String htmlContent = NingHaiYiYiHtmlAnalysisUtil.blockDivToStr(doc.selectFirst("body").child(0).getElementById("main"), true);
|
|
|
if (StringUtil.isNotBlank(htmlContent)) {
|
|
|
- htmlContent = htmlContent.replaceAll("[ ]", " ").replace("第一页","");
|
|
|
+ htmlContent = htmlContent.replaceAll("[ ]", " ").replace("第一页", "");
|
|
|
CommonAnalysisUtil.html2StructureMap(titles, htmlContent, structureMap);
|
|
|
+ if (structureMap.size() == 0) {
|
|
|
+ CommonAnalysisUtil.NHExtractWardInfo(recTitle, htmlContent, structureMap);
|
|
|
+ String bqjlText = "病情记录" + structureMap.get("病情记录");
|
|
|
+ List<String> keys = Lists.newArrayList(
|
|
|
+ "病情记录", "医师签名", "医师签字"
|
|
|
+ );
|
|
|
+ keys = CommonAnalysisUtil.sortTitlesNoColon(keys, bqjlText);
|
|
|
+ CommonAnalysisUtil.cutByTitlesNoColon(bqjlText, keys, 0, structureMap);
|
|
|
+ }
|
|
|
}
|
|
|
CommonAnalysisUtil.extractDateByTitle(structureMap, "告知时间");
|
|
|
removeLast(structureMap);
|
|
|
+
|
|
|
if (structureMap.containsKey("住院号")) {
|
|
|
String date = CommonAnalysisUtil.extractDate(structureMap.get("住院号"));
|
|
|
if (StringUtil.isNotBlank(date)) {
|