|
@@ -98,17 +98,17 @@ public class AssembleAggregate {
|
|
|
searchData.setDrugOrder(convertItem);
|
|
|
}
|
|
|
}
|
|
|
- //给药途径
|
|
|
- if (MapUtils.isNotEmpty(routeConfigMap)) {
|
|
|
- if (ListUtil.isNotEmpty(searchData.getDrug())) {
|
|
|
- List<Drug> convertItem = addUniqueName(searchData.getDrug(), routeConfigMap, ConceptTypeEnum.AdministrationRoute.getKey(), "routeName", "routeUniqueName");
|
|
|
- searchData.setDrug(convertItem);
|
|
|
- }
|
|
|
- if (ListUtil.isNotEmpty(searchData.getDrugOrder())) {
|
|
|
- List<Drug> convertItem = addUniqueName(searchData.getDrugOrder(), routeConfigMap, ConceptTypeEnum.AdministrationRoute.getKey(), "routeName", "routeUniqueName");
|
|
|
- searchData.setDrugOrder(convertItem);
|
|
|
- }
|
|
|
+ //给药途径,没有映射的数据标准术语名称赋值成医院术语名称
|
|
|
+ //if (MapUtils.isNotEmpty(routeConfigMap)) {
|
|
|
+ if (ListUtil.isNotEmpty(searchData.getDrug())) {
|
|
|
+ List<Drug> convertItem = addUniqueName(searchData.getDrug(), routeConfigMap, ConceptTypeEnum.AdministrationRoute.getKey(), "routeName", "routeUniqueName");
|
|
|
+ searchData.setDrug(convertItem);
|
|
|
+ }
|
|
|
+ if (ListUtil.isNotEmpty(searchData.getDrugOrder())) {
|
|
|
+ List<Drug> convertItem = addUniqueName(searchData.getDrugOrder(), routeConfigMap, ConceptTypeEnum.AdministrationRoute.getKey(), "routeName", "routeUniqueName");
|
|
|
+ searchData.setDrugOrder(convertItem);
|
|
|
}
|
|
|
+ //}
|
|
|
|
|
|
//手术
|
|
|
if (MapUtils.isNotEmpty(operationConfigMap)) {
|
|
@@ -518,8 +518,9 @@ public class AssembleAggregate {
|
|
|
if (ListUtil.isEmpty(list)) {
|
|
|
return list;
|
|
|
}
|
|
|
- if (configMap == null || configMap.size() == 0) {
|
|
|
- return list;
|
|
|
+
|
|
|
+ if (configMap == null) {
|
|
|
+ configMap = new HashMap<>();
|
|
|
}
|
|
|
|
|
|
try {
|
|
@@ -542,19 +543,31 @@ public class AssembleAggregate {
|
|
|
Map<String, Map<String, List<String>>> subMap = configMap.get(name);
|
|
|
if (subMap.containsKey(hisDetailName)) {
|
|
|
List<String> standNames = new ArrayList<>(subMap.get(hisDetailName).keySet());
|
|
|
- for (String stdName : standNames) {
|
|
|
+ //映射关系没找到,uniqueName赋值成name
|
|
|
+ if (ListUtil.isEmpty(standNames)) {
|
|
|
T o = (T) item.getClass().newInstance();
|
|
|
BeanUtil.copyProperties(item, o);
|
|
|
Method setUniqueName = o.getClass().getMethod("set" + uniqueFieldName.substring(0, 1).toUpperCase() + uniqueFieldName.substring(1), String.class);
|
|
|
- setUniqueName.invoke(o, stdName);
|
|
|
+ setUniqueName.invoke(o, name);
|
|
|
retList.add(o);
|
|
|
+ } else {
|
|
|
+ for (String stdName : standNames) {
|
|
|
+ T o = (T) item.getClass().newInstance();
|
|
|
+ BeanUtil.copyProperties(item, o);
|
|
|
+ Method setUniqueName = o.getClass().getMethod("set" + uniqueFieldName.substring(0, 1).toUpperCase() + uniqueFieldName.substring(1), String.class);
|
|
|
+ setUniqueName.invoke(o, stdName);
|
|
|
+ retList.add(o);
|
|
|
+ }
|
|
|
}
|
|
|
-
|
|
|
} else {
|
|
|
retList.add(item);
|
|
|
}
|
|
|
} else {
|
|
|
- retList.add(item);
|
|
|
+ T o = (T) item.getClass().newInstance();
|
|
|
+ BeanUtil.copyProperties(item, o);
|
|
|
+ Method setUniqueName = o.getClass().getMethod("set" + uniqueFieldName.substring(0, 1).toUpperCase() + uniqueFieldName.substring(1), String.class);
|
|
|
+ setUniqueName.invoke(o, name);
|
|
|
+ retList.add(o);
|
|
|
}
|
|
|
}
|
|
|
} catch (Exception e) {
|