|
@@ -50,7 +50,7 @@ public class YiWuBeHospitalizedDocTrans extends ModelDocTrans {
|
|
|
} else {
|
|
|
Map<String, String> sourceMap = YiWuXmlUtil.xmlToMap(content);
|
|
|
sourceMap.put("mode_id", ModuleMappingUtil.getDeptModuleId(modeId));
|
|
|
- List<String> titles = Lists.newArrayList("婚 姻","婚姻状况","住 址","供 史 者","性 别","婚 姻","民 族","民 族","个人史","妇科检查","产科检查","实验室","初步诊断","修正诊断","补充诊断","医师签名","日 期","诊断和诊断修正");
|
|
|
+ List<String> titles = Lists.newArrayList("婚 姻", "婚姻状况", "住 址", "供 史 者", "性 别", "婚 姻", "民 族", "民 族", "个人史", "妇科检查", "产科检查", "实验室", "初步诊断", "修正诊断", "补充诊断", "医师签名", "日 期", "诊断和诊断修正");
|
|
|
String text = sourceMap.get("原始文本");
|
|
|
List<String> sortTitles = CommonAnalysisUtil.sortTitlesNoColon(titles, text);
|
|
|
CommonAnalysisUtil.cutByTitlesNoColon(text, sortTitles, 0, sourceMap);
|
|
@@ -62,11 +62,11 @@ public class YiWuBeHospitalizedDocTrans extends ModelDocTrans {
|
|
|
});
|
|
|
sourceMap.putAll(addEntry);
|
|
|
//妇科日间出院医嘱部分特殊处理
|
|
|
- List<String> titles1 = Lists.newArrayList("注意事项","医生办公室电话","随访安排","活动能力与生活自理情况"
|
|
|
- ,"出院带药","出院去向");
|
|
|
- String text1=sourceMap.get("出院医嘱");
|
|
|
- if(text1!=null){
|
|
|
- text1.replaceAll("[0-9,、]","");
|
|
|
+ List<String> titles1 = Lists.newArrayList("注意事项", "医生办公室电话", "随访安排", "活动能力与生活自理情况"
|
|
|
+ , "出院带药", "出院去向");
|
|
|
+ String text1 = sourceMap.get("出院医嘱");
|
|
|
+ if (text1 != null) {
|
|
|
+ text1.replaceAll("[0-9,、]", "");
|
|
|
List<String> sortTitles1 = CommonAnalysisUtil.sortTitles(titles1, text1);
|
|
|
CommonAnalysisUtil.cutByTitles(text1, sortTitles1, 0, sourceMap);
|
|
|
}
|
|
@@ -85,54 +85,59 @@ public class YiWuBeHospitalizedDocTrans extends ModelDocTrans {
|
|
|
}
|
|
|
//入院记录下方的记录者签名和时间
|
|
|
List<String> diagnosetitles = Lists.newArrayList("修正诊断",
|
|
|
- "诊断和诊断修正","补充诊断");
|
|
|
- for (String diagnose: diagnosetitles) {
|
|
|
- if(sourceMap.containsKey(diagnose)){
|
|
|
- String value=sourceMap.get(diagnose).replaceAll("医师签名","").
|
|
|
- replaceAll(":","").
|
|
|
- replaceAll("日 期","").
|
|
|
- replaceAll("■","").
|
|
|
- replaceAll("补充诊断","").
|
|
|
- replaceAll("修正诊断","").
|
|
|
- replaceAll("\"","").
|
|
|
- replaceAll(":","").
|
|
|
- replaceAll("日期","").
|
|
|
- replaceAll("医生签名","").
|
|
|
- replaceAll("签名时间","").
|
|
|
- replaceAll("[0-9]{4}-[0-9]{2}-[0-9]{2}","").
|
|
|
- replaceAll("--","");
|
|
|
- sourceMap.put(diagnose,value);
|
|
|
+ "诊断和诊断修正", "补充诊断");
|
|
|
+ for (String diagnose : diagnosetitles) {
|
|
|
+ if (sourceMap.containsKey(diagnose)) {
|
|
|
+ String value = sourceMap.get(diagnose).replaceAll("医师签名", "").
|
|
|
+ replaceAll(":", "").
|
|
|
+ replaceAll("日 期", "").
|
|
|
+ replaceAll("■", "").
|
|
|
+ replaceAll("补充诊断", "").
|
|
|
+ replaceAll("修正诊断", "").
|
|
|
+ replaceAll("\"", "").
|
|
|
+ replaceAll(":", "").
|
|
|
+ replaceAll("日期", "").
|
|
|
+ replaceAll("医生签名", "").
|
|
|
+ replaceAll("签名时间", "").
|
|
|
+ replaceAll("[0-9]{4}-[0-9]{2}-[0-9]{2}", "").
|
|
|
+ replaceAll("--", "");
|
|
|
+ sourceMap.put(diagnose, value);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if(sourceMap.containsKey("初步诊断医师签名")){
|
|
|
- String value=sourceMap.get("初步诊断").replaceAll("日期","").
|
|
|
- replaceAll(":","").replaceAll("医师签名","");
|
|
|
- sourceMap.put("初步诊断",value);
|
|
|
+ if (sourceMap.containsKey("初步诊断医师签名")) {
|
|
|
+ String value = sourceMap.get("初步诊断").replaceAll("日期", "").
|
|
|
+ replaceAll(":", "").replaceAll("医师签名", "");
|
|
|
+ sourceMap.put("初步诊断", value);
|
|
|
+ }
|
|
|
+ if (sourceMap.containsKey("医师签名")) {
|
|
|
+ String value = sourceMap.get("医师签名").replaceAll("日期", "").
|
|
|
+ replaceAll(":", "").replaceAll("\\d", "").replaceAll("--", "");
|
|
|
+ sourceMap.put("医师签名", value);
|
|
|
}
|
|
|
//产科入院记录个人史处理
|
|
|
- if(sourceMap.containsKey("个人史")){
|
|
|
- String value=sourceMap.get("个人史").split("月经史")[0];
|
|
|
- sourceMap.put("个人史",value);
|
|
|
+ if (sourceMap.containsKey("个人史")) {
|
|
|
+ String value = sourceMap.get("个人史").split("月经史")[0];
|
|
|
+ sourceMap.put("个人史", value);
|
|
|
}
|
|
|
//小儿外科(住)现病史去除多余字段
|
|
|
- if(sourceMap.containsKey("现病史")){
|
|
|
- sourceMap.put("现病史",sourceMap.get("现病史").replace("以上病史确认无误,家属签字: 签字时间: 年 月 日",""));
|
|
|
+ if (sourceMap.containsKey("现病史")) {
|
|
|
+ sourceMap.put("现病史", sourceMap.get("现病史").replace("以上病史确认无误,家属签字: 签字时间: 年 月 日", ""));
|
|
|
}
|
|
|
|
|
|
//入院记录标题部分解析不出的 婚姻和民族处理
|
|
|
//注意中间的空格是什么字符
|
|
|
List<String> titletitles = Lists.newArrayList("住 址",
|
|
|
- "婚 姻","民 族","民 族","供 史 者","性 别","婚 姻","婚姻状况");
|
|
|
- for (String str: titletitles) {
|
|
|
- String str1=str.replaceAll(" ","").replaceAll(" ","");
|
|
|
- if(sourceMap.containsKey(str)){
|
|
|
- String value=(sourceMap.get(str).split(" ")[0]).split("\\\\n")[0];
|
|
|
- sourceMap.put(str1,value);
|
|
|
+ "婚 姻", "民 族", "民 族", "供 史 者", "性 别", "婚 姻", "婚姻状况");
|
|
|
+ for (String str : titletitles) {
|
|
|
+ String str1 = str.replaceAll(" ", "").replaceAll(" ", "");
|
|
|
+ if (sourceMap.containsKey(str)) {
|
|
|
+ String value = (sourceMap.get(str).split(" ")[0]).split("\\\\n")[0];
|
|
|
+ sourceMap.put(str1, value);
|
|
|
}
|
|
|
- if(sourceMap.containsKey(str1)){
|
|
|
- String value=(sourceMap.get(str1).split(" ")[0]).split("\\\\n")[0];
|
|
|
- sourceMap.put(str1,value);
|
|
|
+ if (sourceMap.containsKey(str1)) {
|
|
|
+ String value = (sourceMap.get(str1).split(" ")[0]).split("\\\\n")[0];
|
|
|
+ sourceMap.put(str1, value);
|
|
|
}
|
|
|
}
|
|
|
structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, keyContrasts, modeId);
|