|
@@ -18,15 +18,16 @@ public class BeiLunLeaveHospitalHtmlAnalysis implements BeiLunHtmlAnalysis {
|
|
|
|
|
|
@Override
|
|
|
public Map<String, String> analysis(String... args) {
|
|
|
- List<String> titles = Lists.newArrayList("入院日期", "出院日期", "住院天数", "入院诊断", "出院诊断",
|
|
|
- "入院情况", "入院后检查化验结果", "诊疗经过", "出院计划", "病理检查结果", "出院情况", "治疗效果", "出院医嘱", "医师签名", "时间");
|
|
|
+ List<String> titles = Lists.newArrayList("姓名", "性别", "出生日期", "科室", "床号", "住院号",
|
|
|
+ "入院日期", "出院日期", "住院天数", "入院诊断", "出院诊断", "入院情况", "入院后检查化验结果", "诊疗经过",
|
|
|
+ "出院计划", "病理检查结果", "出院情况", "治疗效果", "出院医嘱", "医师签名", "时间");
|
|
|
String html = args[0];
|
|
|
String recTitle = args[1];
|
|
|
Document doc = Jsoup.parse(html);
|
|
|
Map<String, String> structureMap = Maps.newLinkedHashMap();
|
|
|
String htmlContent = BeiLunHtmlAnalysisUtil.blockDivToStr(doc.selectFirst("body").child(0), true);
|
|
|
if (StringUtil.isNotBlank(htmlContent)) {
|
|
|
- htmlContent = htmlContent.replaceAll("[ ]", " ");
|
|
|
+ htmlContent = htmlContent.replaceAll("[ ]", " ").replace("第1页", "");
|
|
|
CommonAnalysisUtil.html2StructureMap(titles, htmlContent, structureMap);
|
|
|
}
|
|
|
CommonAnalysisUtil.extractDateByTitle(structureMap, "时间");
|