|
@@ -49,7 +49,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);
|
|
@@ -64,20 +64,20 @@ public class YiWuBeHospitalizedDocTrans extends ModelDocTrans {
|
|
|
}
|
|
|
sourceMap.put("mode_id=" + contentMap.get("modeId").toString(), "");
|
|
|
sourceMap.put("rec_title=" + contentMap.get("recTitle").toString(), "");
|
|
|
- structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, keyContrasts, modeId);
|
|
|
+
|
|
|
//新生儿科姓名+姓名问题解决
|
|
|
- if (structureMap.containsKey("姓名")) {
|
|
|
- String value = structureMap.get("姓名").split(" ")[0];
|
|
|
- structureMap.put("姓名", value);
|
|
|
+ if (sourceMap.containsKey("姓名")) {
|
|
|
+ String value = sourceMap.get("姓名").split(" ")[0];
|
|
|
+ sourceMap.put("姓名", value);
|
|
|
}
|
|
|
//产科孕产次
|
|
|
- if (structureMap.containsKey("入院记录")) {
|
|
|
- String value = structureMap.get("入院记录").split(" ")[0];
|
|
|
- structureMap.put("孕产次", value);
|
|
|
+ if (sourceMap.containsKey("入院记录")) {
|
|
|
+ String value = sourceMap.get("入院记录").split(" ")[0];
|
|
|
+ sourceMap.put("孕产次", value);
|
|
|
}
|
|
|
//入院记录下方的记录者签名和时间
|
|
|
- if(structureMap.containsKey("修正诊断")){
|
|
|
- String value=structureMap.get("修正诊断").replaceAll("医师签名","").
|
|
|
+ if(sourceMap.containsKey("修正诊断")){
|
|
|
+ String value=sourceMap.get("修正诊断").replaceAll("医师签名","").
|
|
|
replaceAll(":","").
|
|
|
replaceAll("日 期","").
|
|
|
replaceAll("■","").
|
|
@@ -88,10 +88,10 @@ public class YiWuBeHospitalizedDocTrans extends ModelDocTrans {
|
|
|
replaceAll("日期","").
|
|
|
replaceAll("医生签名","").
|
|
|
replaceAll("签名时间","");
|
|
|
- structureMap.put("修正诊断",value);
|
|
|
+ sourceMap.put("修正诊断",value);
|
|
|
}
|
|
|
- if(structureMap.containsKey("补充诊断")){
|
|
|
- String value=structureMap.get("修正诊断").replaceAll("医师签名","").
|
|
|
+ if(sourceMap.containsKey("补充诊断")){
|
|
|
+ String value=sourceMap.get("修正诊断").replaceAll("医师签名","").
|
|
|
replaceAll(":","").
|
|
|
replaceAll("日 期","").
|
|
|
replaceAll("■","").
|
|
@@ -102,27 +102,30 @@ public class YiWuBeHospitalizedDocTrans extends ModelDocTrans {
|
|
|
replaceAll("日期","").
|
|
|
replaceAll("医生签名","").
|
|
|
replaceAll("签名时间","");
|
|
|
- structureMap.put("补充诊断",value);
|
|
|
+ sourceMap.put("补充诊断",value);
|
|
|
}
|
|
|
- if(structureMap.containsKey("初步诊断医师签名")){
|
|
|
- String value=structureMap.get("初步诊断").replaceAll("日期","").
|
|
|
+ if(sourceMap.containsKey("初步诊断医师签名")){
|
|
|
+ String value=sourceMap.get("初步诊断").replaceAll("日期","").
|
|
|
replaceAll(":","");
|
|
|
- structureMap.put("初步诊断",value);
|
|
|
+ sourceMap.put("初步诊断",value);
|
|
|
}
|
|
|
//产科入院记录个人史处理
|
|
|
- if(structureMap.containsKey("个人史")){
|
|
|
- String value=structureMap.get("个人史").split("月经史")[0];
|
|
|
- structureMap.put("个人史",value);
|
|
|
+ if(sourceMap.containsKey("个人史")){
|
|
|
+ String value=sourceMap.get("个人史").split("月经史")[0];
|
|
|
+ sourceMap.put("个人史",value);
|
|
|
}
|
|
|
- //婚姻和民族处理
|
|
|
- if(structureMap.containsKey("婚 姻")){
|
|
|
- String value=structureMap.get("婚 姻").split(" ")[0];
|
|
|
- structureMap.put("婚姻状况",value);
|
|
|
- }
|
|
|
- if(structureMap.containsKey("民 族")){
|
|
|
- String value=structureMap.get("民 族").split(" ")[0];
|
|
|
- structureMap.put("民族",value);
|
|
|
+ //入院记录标题部分解析不出的 婚姻和民族处理
|
|
|
+ //注意中间的空格是什么字符
|
|
|
+ List<String> titletitles = Lists.newArrayList("住 址",
|
|
|
+ "婚 姻","民 族","供 史 者","性 别","婚 姻");
|
|
|
+ for (String str: titletitles) {
|
|
|
+ String str1=str.replaceAll(" ","").replaceAll(" ","");
|
|
|
+ if(sourceMap.containsKey(str1)){
|
|
|
+ String value=(sourceMap.get(str1).split(" ")[0]).split("\\\\n")[0];
|
|
|
+ sourceMap.put(str1,value);
|
|
|
+ }
|
|
|
}
|
|
|
+ structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, keyContrasts, modeId);
|
|
|
OrdinaryAssistant.removeBlank(structureMap);
|
|
|
}
|
|
|
/*if (StringUtils.isEmpty(structureMap.get("入院时间")) && StringUtils.isNotEmpty(structureMap.get("入病房时间"))) {
|
|
@@ -212,7 +215,8 @@ public class YiWuBeHospitalizedDocTrans extends ModelDocTrans {
|
|
|
"现住址邮编=邮政编码",
|
|
|
"患者签名时间=初步诊断日期",
|
|
|
"日期=初步诊断日期",
|
|
|
- "骨盆外测量=专科检查"
|
|
|
+ "骨盆外测量=专科检查",
|
|
|
+ "婚姻=婚姻状况"
|
|
|
|
|
|
);
|
|
|
|