|
@@ -31,7 +31,7 @@ public class XyBeHospitalizedHtmlAnalysis implements XyHtmlAnalysis {
|
|
|
String html = args[0];
|
|
|
String recTitle = args[1];
|
|
|
String recTypeId = args[2];
|
|
|
- Document doc = Jsoup.parse(html);
|
|
|
+ Document doc = Jsoup.parse(html.replace("<b>", "").replace("</b>", ""));
|
|
|
|
|
|
if (recTitle.contains("24")) {
|
|
|
analysis24h(doc, map);
|
|
@@ -52,44 +52,68 @@ public class XyBeHospitalizedHtmlAnalysis implements XyHtmlAnalysis {
|
|
|
|
|
|
String htmlString = XyHtmlAnalysisUtil.blockDivToStr(doc.selectFirst("body"), true)
|
|
|
.replace(" ", ":")
|
|
|
- .replace("8220","“")
|
|
|
- .replace("8221","”");
|
|
|
+ .replace("8220", "“")
|
|
|
+ .replace("8221", "”");
|
|
|
|
|
|
- List<String> titles = Lists.newArrayList("姓名", "出生地", "性别", "民族", "年龄", "职业", "婚姻", "病史陈述者",
|
|
|
- "入院日期", "入院时间", "病历记录时间", "住址", "联系电话",
|
|
|
+ List<String> titles = Lists.newArrayList("姓名", "出生地", "性别", "民族", "年龄", "职业", "父母姓名", "监护人", "婚姻", "病史陈述者",
|
|
|
+ "入科时间", "入院日期", "入院时间", "病历记录时间", "住址", "联系电话",
|
|
|
"入院方式", "主诉", "现病史", "既往史", "个人史", "婚育史", "月经史", "家族史",
|
|
|
- "初步诊断", "入院诊断", "体 格 检 查", "体 格 检 查 ", "专科情况", "辅助检查", "入院诊断", "医师", "上级医师", "签字时间");
|
|
|
+ "初步诊断", "入院诊断", "体 格 检 查", "体 格 检 查 ", "专科情况", "辅助检查", "入院诊断", "医师", "上级医师", "签字时间", "体 格 检 查");
|
|
|
titles = CommonAnalysisUtil.sortTitles(titles, htmlString);
|
|
|
CommonAnalysisUtil.cutByTitles(htmlString, titles, 0, map);
|
|
|
|
|
|
//家族史其中可能包括体格检查
|
|
|
if (StringUtil.isNotBlank(map.get("家族史"))) {
|
|
|
- map.put("家族史",map.get("家族史").replace(":", ""));
|
|
|
+ map.put("家族史", map.get("家族史").replace(":", ""));
|
|
|
}
|
|
|
- if (StringUtils.isNotEmpty(map.get("家族史"))){
|
|
|
-// if (map.get("家族史").contains("体 格 检 查 ")) {
|
|
|
-// Integer index = map.get("家族史").indexOf("体 格 检 查 ");
|
|
|
-// map.put("体格检查", map.get("家族史").substring(index + "体 格 检 查 ".length(), map.get("家族史").length()));
|
|
|
-// map.put("家族史", map.get("家族史").substring(0, index));
|
|
|
-// }
|
|
|
+ if (StringUtils.isNotEmpty(map.get("家族史"))) {
|
|
|
if (map.get("家族史").contains("体 格 检 查")) {
|
|
|
Integer index = map.get("家族史").indexOf("体 格 检 查");
|
|
|
map.put("体格检查", map.get("家族史").substring(index + "体 格 检 查".length(), map.get("家族史").length()));
|
|
|
map.put("家族史", map.get("家族史").substring(0, index));
|
|
|
}
|
|
|
}
|
|
|
+ //现病史中包括体格检查
|
|
|
+ if (StringUtils.isNotEmpty(map.get("现病史"))) {
|
|
|
+ String info = map.get("现病史");
|
|
|
+ if (map.get("现病史").contains("体 格 检 查")) {
|
|
|
+ Integer index = map.get("现病史").indexOf("体 格 检 查");
|
|
|
+ map.put("体格检查", map.get("现病史").substring(index + "体 格 检 查".length(), map.get("现病史").length()));
|
|
|
+ map.put("现病史", map.get("现病史").substring(0, index));
|
|
|
+ } else if (map.get("现病史").contains("体 :格 :检 :查")) {
|
|
|
+ Integer index = map.get("现病史").indexOf("体 :格 :检 :查");
|
|
|
+ map.put("体格检查", map.get("现病史").substring(index + "体 :格 :检 :查".length(), map.get("现病史").length()));
|
|
|
+ map.put("现病史", map.get("现病史").substring(0, index));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //签字时间中包括体格检查
|
|
|
+ if (StringUtils.isNotEmpty(map.get("签字时间"))) {
|
|
|
+ if (map.get("签字时间").contains("体 格 检 查")) {
|
|
|
+ Integer index = map.get("签字时间").indexOf("体 格 检 查");
|
|
|
+ map.put("体格检查", map.get("签字时间").substring(index + "体 格 检 查".length(), map.get("签字时间").length()));
|
|
|
+ map.put("签字时间", map.get("签字时间").substring(0, index));
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- if (StringUtils.isNotEmpty(map.get("体格检查"))){
|
|
|
- String str =map.get("体格检查");
|
|
|
- str = str.replace("神 经 系 统 检 查","神经系统检查: ").replace("浅 感 觉 检 查 记 录 图","浅感觉检查记录:");
|
|
|
- List<String> titlestr = Lists.newArrayList("神经系统检查","运动系统","浅感觉检查记录","感觉系统","自主神经系统");
|
|
|
+ if (StringUtils.isNotEmpty(map.get("体格检查"))) {
|
|
|
+ String str = map.get("体格检查");
|
|
|
+ str = str.replace("神 经 系 统 检 查", "神经系统检查: ").replace("浅 感 觉 检 查 记 录 图", "浅感觉检查记录:");
|
|
|
+ List<String> titlestr = Lists.newArrayList("神经系统检查", "运动系统", "浅感觉检查记录", "感觉系统", "自主神经系统");
|
|
|
titlestr = CommonAnalysisUtil.sortTitles(titlestr, str);
|
|
|
CommonAnalysisUtil.cutByTitles(str, titlestr, 0, map);
|
|
|
}
|
|
|
|
|
|
- if (StringUtils.isEmpty(map.get("专科情况"))){
|
|
|
- map.put("专科情况","神经系统检查:"+map.get("神经系统检查")+"\n运动系统:"+map.get("运动系统")+"\n浅感觉检查记录:"+
|
|
|
- map.get("浅感觉检查记录")+"\n感觉系统:"+map.get("感觉系统")+"\n自主神经系统:"+map.get("自主神经系统"));
|
|
|
+ if (StringUtils.isEmpty(map.get("专科情况"))) {
|
|
|
+ map.put("专科情况",
|
|
|
+ "神经系统检查:" + (StringUtil.isBlank(map.get("神经系统检查")) ? "空" : map.get("神经系统检查")) +
|
|
|
+ "\n运动系统:" + (StringUtil.isBlank(map.get("运动系统")) ? "空" : map.get("运动系统")) +
|
|
|
+ "\n浅感觉检查记录:" + (StringUtil.isBlank(map.get("浅感觉检查记录")) ? "空" : map.get("浅感觉检查记录")) +
|
|
|
+ "\n感觉系统:" + (StringUtil.isBlank(map.get("感觉系统")) ? "空" : map.get("感觉系统")) +
|
|
|
+ "\n自主神经系统:" + (StringUtil.isBlank(map.get("自主神经系统")) ? "空" : map.get("自主神经系统")));
|
|
|
+ }
|
|
|
+
|
|
|
+ if (StringUtil.isNotBlank(map.get("入院日期"))) {
|
|
|
+ map.put("入院日期", map.get("入院日期").replace(",", " "));
|
|
|
}
|
|
|
}
|
|
|
|