|
@@ -35,15 +35,43 @@ public class BeiLunFirstCourseRecordHtmlAnalysis implements BeiLunHtmlAnalysis {
|
|
|
);
|
|
|
String htmlContent = XszyyCommonAnalysisUtil.html2String(doc.toString());
|
|
|
if (StringUtil.isNotBlank(htmlContent)) {
|
|
|
+ //有冒号
|
|
|
+ //XszyyCommonAnalysisUtil.html2StructureMap(titles,htmlContent,structureMap);
|
|
|
//无冒号版本
|
|
|
XszyyCommonAnalysisUtil.html2StructureMapNoColon(titles,htmlContent,structureMap);
|
|
|
+ if(XszyyCommonAnalysisUtil.extractDate(htmlContent)!=null){
|
|
|
+ structureMap.put("病历日期",XszyyCommonAnalysisUtil.extractDate(htmlContent.replace(":",":")));
|
|
|
+ }
|
|
|
if(htmlContent.contains("病历特点")){
|
|
|
- structureMap.put("病历内容",htmlContent.substring(0,htmlContent.indexOf("病历特点")));
|
|
|
+ structureMap.put("病历内容",htmlContent.substring(0,htmlContent.indexOf("病历特点")).replace(recTitle,""));
|
|
|
}else if(htmlContent.contains("病例特点")){
|
|
|
- structureMap.put("病历内容",htmlContent.substring(0,htmlContent.indexOf("出院记录内容缺诊疗经过")));
|
|
|
+ structureMap.put("病历内容",htmlContent.substring(0,htmlContent.indexOf("病例特点")).replace(recTitle,""));
|
|
|
}
|
|
|
- if(XszyyCommonAnalysisUtil.extractDate(htmlContent)!=null){
|
|
|
- structureMap.put("病历日期",XszyyCommonAnalysisUtil.extractDate(htmlContent));
|
|
|
+ structureMap.put("病历内容",structureMap.get("病历内容").replace(":",":").replace(structureMap.get("病历日期"),""));
|
|
|
+
|
|
|
+ List<String> specialString = Lists.newArrayList(
|
|
|
+ "无需其他特殊鉴别诊断","无需鉴别","无须鉴别"
|
|
|
+ );
|
|
|
+ if(StringUtil.isNotEmpty(structureMap.get("西医诊断依据及鉴别诊断"))){
|
|
|
+ String diag=structureMap.get("西医诊断依据及鉴别诊断");
|
|
|
+ if(diag.contains("入院诊断")){
|
|
|
+ int index=diag.indexOf("入院诊断");
|
|
|
+ structureMap.put("初步诊断",diag.substring(index));
|
|
|
+ diag=diag.replace(structureMap.get("初步诊断"),"");
|
|
|
+ }
|
|
|
+ if(StringUtil.isEmpty(structureMap.get("西医诊断依据")) && StringUtil.isEmpty(structureMap.get("西医鉴别诊断"))){
|
|
|
+ structureMap.put("西医诊断依据",diag);
|
|
|
+ structureMap.put("西医诊断依据及鉴别诊断","");
|
|
|
+ /*for (String specialC:specialString){
|
|
|
+ if(structureMap.get("西医诊断依据").contains(specialC)){
|
|
|
+ structureMap.put("西医鉴别诊断","无需鉴别");
|
|
|
+ }
|
|
|
+ }*/
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(StringUtil.isNotEmpty(structureMap.get("拟诊讨论")) && StringUtil.isEmpty(structureMap.get("中医辨病辩证依据及鉴别诊断"))){
|
|
|
+ structureMap.put("中医辨病辩证依据及鉴别诊断",structureMap.get("拟诊讨论"));
|
|
|
+ structureMap.put("拟诊讨论","");
|
|
|
}
|
|
|
}
|
|
|
structureMap.put("标题",recTitle);
|