|
@@ -26,40 +26,40 @@ public class CriticallyIllNoticeHtmlAnalysis implements HtmlAnalysis {
|
|
Map<String, String> structureMap = Maps.newLinkedHashMap();
|
|
Map<String, String> structureMap = Maps.newLinkedHashMap();
|
|
|
|
|
|
try {
|
|
try {
|
|
- List<String> titles = Lists.newArrayList("姓名", "科别", "床号", "病案号",
|
|
|
|
- "1.简要病情", "2.目前诊断", "3.目前病情评估", "4.目前患者病情危重,随时出现以下一种或多种危及患者生命的并发症,且病情有进一步恶化\n" +
|
|
|
|
- "可能", "5.注意事项", "谈话医师签名", "签名日期", "时间", "6.患方知情选择",
|
|
|
|
- "患者签名", "指印", "患者签名时间", "若患者无法签署知情同意书或授权于亲属,请法定监护人或被授权人在此签名", "法定监护人/被授权人签名", "与患者关系", "法定监护人签名时间");
|
|
|
|
|
|
+ List<String> titles = Lists.newArrayList("姓名", "健康号", "年龄", "病区",
|
|
|
|
+ "床号", "入院日期", "入院诊断", "病情概括及治疗措施", "可能的风险及预后", "医师签名", "时间", "患方签名");
|
|
String html = args[0];
|
|
String html = args[0];
|
|
String recTitle = args[1];
|
|
String recTitle = args[1];
|
|
String recTypeId = args[2];
|
|
String recTypeId = args[2];
|
|
Document doc = Jsoup.parse(html);
|
|
Document doc = Jsoup.parse(html);
|
|
String htmlContent = HtmlAnalysisUtil.blockDivToStr(doc.selectFirst("body").child(0), true)
|
|
String htmlContent = HtmlAnalysisUtil.blockDivToStr(doc.selectFirst("body").child(0), true)
|
|
- .replace("患者签名", "患者签名:")
|
|
|
|
- .replace("法定监护人/被授权人签名", "法定监护人/被授权人签名:")
|
|
|
|
- .replace("与患者关系", "与患者关系:")
|
|
|
|
- .replace("指印", "指印:")
|
|
|
|
- .replace("第1页", "");
|
|
|
|
|
|
+ .replace("姓名", "姓名:")
|
|
|
|
+ .replace("健康号", "健康号:")
|
|
|
|
+ .replace("年龄", "年龄:")
|
|
|
|
+ .replace("病区", "病区:")
|
|
|
|
+ .replace("床号", "床号:")
|
|
|
|
+ .replace("入院日期", "入院日期:");
|
|
|
|
+
|
|
|
|
|
|
- int index1 = htmlContent.indexOf("患者签名");
|
|
|
|
- int index2 = htmlContent.lastIndexOf("法定监护人/被授权人签名");
|
|
|
|
- if (index1 != -1 && index2 != -1) {
|
|
|
|
- htmlContent = htmlContent.substring(0, index1)
|
|
|
|
- + htmlContent.substring(index1, index2).replace("签名时间", "患者签名时间").replace("年 月 日 时 分", "")
|
|
|
|
- + htmlContent.substring(index2).replace("签名时间", "法定监护人签名时间").replace("年 月 日 时 分", "");
|
|
|
|
- }
|
|
|
|
|
|
|
|
if (StringUtil.isNotBlank(htmlContent)) {
|
|
if (StringUtil.isNotBlank(htmlContent)) {
|
|
htmlContent = htmlContent.replaceAll("[ ]", " ");
|
|
htmlContent = htmlContent.replaceAll("[ ]", " ");
|
|
CommonAnalysisUtil.html2StructureMap(titles, htmlContent, structureMap);
|
|
CommonAnalysisUtil.html2StructureMap(titles, htmlContent, structureMap);
|
|
}
|
|
}
|
|
- structureMap.put("患者签名", structureMap.get("患者签名").replace("患者签名", ""));
|
|
|
|
- if (StringUtil.isNotBlank(structureMap.get("法定监护人/被授权人签名"))) {
|
|
|
|
- structureMap.put("法定监护人/被授权人签名", structureMap.get("法定监护人/被授权人签名").replace("患方签名", ""));
|
|
|
|
|
|
+ //拆分患方签名时间
|
|
|
|
+ String s = structureMap.get("患方签名");
|
|
|
|
+ if (StringUtil.isNotBlank(s)) {
|
|
|
|
+ int index = s.indexOf("时间:");
|
|
|
|
+ if (index == -1) {
|
|
|
|
+ index = s.indexOf("时间:");
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ if (index != -1) {
|
|
|
|
+ structureMap.put("患方签名", s.substring(0, index));
|
|
|
|
+ structureMap.put("患方签名时间", s.substring(index + 3));
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- CommonAnalysisUtil.processTypeRight(structureMap, "3.目前病情评估");
|
|
|
|
- CommonAnalysisUtil.processType(structureMap, "6.患方知情选择");
|
|
|
|
- CommonAnalysisUtil.processType(structureMap, "指印");
|
|
|
|
|
|
+
|
|
HtmlAnalysisUtil.insertModuleId(modeId, recTypeId, structureMap);
|
|
HtmlAnalysisUtil.insertModuleId(modeId, recTypeId, structureMap);
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
log.error(e.getMessage(), e);
|
|
log.error(e.getMessage(), e);
|