|
@@ -45,11 +45,14 @@ public class TaiZhouBeHospitalizedDocTrans extends ModelDocTrans {
|
|
sourceMap.put("rec_title=" + contentMap.get("recTitle").toString(), "");
|
|
sourceMap.put("rec_title=" + contentMap.get("recTitle").toString(), "");
|
|
Map<String, String> structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, keyContrasts);
|
|
Map<String, String> structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, keyContrasts);
|
|
OrdinaryAssistant.removeBlank(structureMap);
|
|
OrdinaryAssistant.removeBlank(structureMap);
|
|
- //如果有入院时间,优先使用
|
|
|
|
- if (StringUtils.isEmpty(structureMap.get("入院时间")) && StringUtils.isNotEmpty(structureMap.get("入病房时间"))) {
|
|
|
|
|
|
+ /*if (StringUtils.isEmpty(structureMap.get("入院时间")) && StringUtils.isNotEmpty(structureMap.get("入病房时间"))) {
|
|
structureMap.put("入院时间", structureMap.get("入病房时间"));
|
|
structureMap.put("入院时间", structureMap.get("入病房时间"));
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ */
|
|
|
|
+ //如果有入院时间,优先使用
|
|
|
|
+ addKeyMapping(structureMap,"入院时间","入病房时间");
|
|
|
|
+ //如果有职业,优先使用
|
|
|
|
+ addKeyMapping(structureMap,"职业","工作性质");
|
|
BeHospitalizedDoc beHospitalizedDoc = beHospitalizedDocGen(structureMap); // 不走共用
|
|
BeHospitalizedDoc beHospitalizedDoc = beHospitalizedDocGen(structureMap); // 不走共用
|
|
beHospitalizedDoc.setPageData((Map) structureMap);
|
|
beHospitalizedDoc.setPageData((Map) structureMap);
|
|
return beHospitalizedDoc;
|
|
return beHospitalizedDoc;
|
|
@@ -228,4 +231,16 @@ public class TaiZhouBeHospitalizedDocTrans extends ModelDocTrans {
|
|
return beHospitalizedDoc;
|
|
return beHospitalizedDoc;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 给structureMap添加一个key(映射)
|
|
|
|
+ * @param structureMap
|
|
|
|
+ * @param target 需要用到的key
|
|
|
|
+ * @param source structureMap中含有的key
|
|
|
|
+ */
|
|
|
|
+ protected void addKeyMapping(Map<String, String> structureMap, String target, String source) {
|
|
|
|
+ if (StringUtils.isEmpty(structureMap.get(target)) && StringUtils.isNotEmpty(structureMap.get(source))) {
|
|
|
|
+ structureMap.put(target, structureMap.get(source));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|