|
@@ -55,18 +55,6 @@ public class NingBoZhongYiLeaveHospitalHtmlAnalysis implements NingBoZhongYiHtml
|
|
structureMap.put("出院诊断", discharge.substring(0, index));
|
|
structureMap.put("出院诊断", discharge.substring(0, index));
|
|
structureMap.put("入院情况", discharge.substring(index + 4));
|
|
structureMap.put("入院情况", discharge.substring(index + 4));
|
|
}
|
|
}
|
|
- if (structureMap.containsKey("出院诊断") && StringUtil.isNotBlank(structureMap.get("出院诊断"))){
|
|
|
|
- String discharge = structureMap.get("出院诊断");
|
|
|
|
- StringBuilder sb = new StringBuilder();
|
|
|
|
- int num =0;
|
|
|
|
- if(discharge.contains("西医诊断")){
|
|
|
|
- String xdischarge = discharge.split("西医诊断")[1].replace(":","");
|
|
|
|
- String sbStr = extractDischarge(num, sb, xdischarge);
|
|
|
|
- if(StringUtil.isNotBlank(sbStr)){
|
|
|
|
- structureMap.put("出院诊断规则",sbStr);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
CommonAnalysisUtil.extractDateByTitle(structureMap, "时间");
|
|
CommonAnalysisUtil.extractDateByTitle(structureMap, "时间");
|
|
NingBoZhongYiHtmlAnalysisUtil.insertModuleId(modeId, recTypeId, structureMap);
|
|
NingBoZhongYiHtmlAnalysisUtil.insertModuleId(modeId, recTypeId, structureMap);
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
@@ -74,27 +62,4 @@ public class NingBoZhongYiLeaveHospitalHtmlAnalysis implements NingBoZhongYiHtml
|
|
}
|
|
}
|
|
return structureMap;
|
|
return structureMap;
|
|
}
|
|
}
|
|
-
|
|
|
|
- public String extractDischarge( int num, StringBuilder sb,String zdischarge){
|
|
|
|
- String rex =",?,?[0-9]\\.";
|
|
|
|
- boolean matches = zdischarge.matches(rex);
|
|
|
|
- String[] zleaveDiags = null;
|
|
|
|
- if(matches){
|
|
|
|
- zleaveDiags = zdischarge.split(",?,?[0-9]\\.");
|
|
|
|
- }else{
|
|
|
|
- if(zdischarge.contains(" ")){
|
|
|
|
- zleaveDiags = zdischarge.split(" ");
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- if(null != zleaveDiags || zleaveDiags.length>0){
|
|
|
|
- for (String zleaveDiag : zleaveDiags) {
|
|
|
|
- zleaveDiag = zleaveDiag.trim();
|
|
|
|
- if(StringUtil.isNotBlank(zleaveDiag)){
|
|
|
|
- num++;
|
|
|
|
- sb.append(num+"."+zleaveDiag);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- return sb.toString();
|
|
|
|
- }
|
|
|
|
}
|
|
}
|