|
@@ -406,8 +406,8 @@ public class CommonFacade {
|
|
|
// // 3、开单辅检项目
|
|
|
// CoreUtil.setPropertyList(wordCrfDTO.getPacsOrder(), "name", "uniqueName", map.get(StandConvertEnum.pacs.toString()));
|
|
|
|
|
|
-// CoreUtil.setUninameFromDetail(wordCrfDTO.getLis(), "detailName");
|
|
|
-// CoreUtil.setUninameFromDetail(wordCrfDTO.getLisOrder(), "name");
|
|
|
+ // CoreUtil.setUninameFromDetail(wordCrfDTO.getLis(), "detailName");
|
|
|
+ // CoreUtil.setUninameFromDetail(wordCrfDTO.getLisOrder(), "name");
|
|
|
lisGetAndSet(wordCrfDTO);
|
|
|
pacsGetAndSet(wordCrfDTO);
|
|
|
|
|
@@ -439,7 +439,7 @@ public class CommonFacade {
|
|
|
* 类型,疾病: disease,症状: symptom,手术和操作:operation,药品: drug,实验室检查:lis,辅助检查:pacs, 辅助检查:vital"
|
|
|
*
|
|
|
* @param standConvert
|
|
|
- * @return Map<String,Map<String,String>> -->Map<类型, Map<原始词, 标准词>>
|
|
|
+ * @return Map<String , Map < String , String>> -->Map<类型, Map<原始词, 标准词>>
|
|
|
*/
|
|
|
public Map<String, Map<String, String>> standConvertCrf(StandConvert standConvert) {
|
|
|
Map<String, Map<String, String>> map = new LinkedHashMap<>();
|
|
@@ -664,25 +664,25 @@ public class CommonFacade {
|
|
|
.distinct()
|
|
|
.collect(Collectors.toList());
|
|
|
|
|
|
-// Map<String, Map<String, Long>> configMap = new LinkedHashMap<>();
|
|
|
+ // Map<String, Map<String, Long>> configMap = new LinkedHashMap<>();
|
|
|
if (ListUtil.isNotEmpty(operationList)) {
|
|
|
-// configMap = tranOperationConfigFacade.getConfigMap(wordCrfDTO.getHospitalId(), operationList, null);
|
|
|
+ // configMap = tranOperationConfigFacade.getConfigMap(wordCrfDTO.getHospitalId(), operationList, null);
|
|
|
Map<String, Map<String, Map<String, List<String>>>> operstionMap = mappingConfigFacade.groupByHisNameWithName(operationList, ConceptTypeEnum.Operation.getKey(), wordCrfDTO.getHospitalId());
|
|
|
// 1、主诉手术
|
|
|
-// setListProperty(wordCrfDTO.getChiefLabel(), "operations", "standName", configMap);
|
|
|
- setListProperty(wordCrfDTO.getChiefLabel(), "operations", ConceptTypeEnum.Operation.getKey(),"StandName",operstionMap);
|
|
|
+ // setListProperty(wordCrfDTO.getChiefLabel(), "operations", "standName", configMap);
|
|
|
+ setListProperty(wordCrfDTO.getChiefLabel(), "operations", ConceptTypeEnum.Operation.getKey(), "StandName", operstionMap);
|
|
|
// 2、现病史手术
|
|
|
-// setListProperty(wordCrfDTO.getPresentLabel(), "operations", "standName", configMap);
|
|
|
- setListProperty(wordCrfDTO.getPresentLabel(),"operations", ConceptTypeEnum.Operation.getKey(),"StandName",operstionMap);
|
|
|
+ // setListProperty(wordCrfDTO.getPresentLabel(), "operations", "standName", configMap);
|
|
|
+ setListProperty(wordCrfDTO.getPresentLabel(), "operations", ConceptTypeEnum.Operation.getKey(), "StandName", operstionMap);
|
|
|
// 3、既往史手术
|
|
|
-// setListProperty(wordCrfDTO.getPastLabel(), "operations", "standName", configMap);
|
|
|
- setListProperty(wordCrfDTO.getPastLabel(),"operations", ConceptTypeEnum.Operation.getKey(),"StandName",operstionMap);
|
|
|
+ // setListProperty(wordCrfDTO.getPastLabel(), "operations", "standName", configMap);
|
|
|
+ setListProperty(wordCrfDTO.getPastLabel(), "operations", ConceptTypeEnum.Operation.getKey(), "StandName", operstionMap);
|
|
|
// 4、结构化手术
|
|
|
-// setListProperty(wordCrfDTO, "operation", "uniqueName", configMap);
|
|
|
- setListProperty(wordCrfDTO, "operation", ConceptTypeEnum.Operation.getKey(),"UniqueName",operstionMap);
|
|
|
+ // setListProperty(wordCrfDTO, "operation", "uniqueName", configMap);
|
|
|
+ setListProperty(wordCrfDTO, "operation", ConceptTypeEnum.Operation.getKey(), "UniqueName", operstionMap);
|
|
|
// 5、手术
|
|
|
-// setListProperty(wordCrfDTO, "operationOrder", "uniqueName", configMap);
|
|
|
- setListProperty(wordCrfDTO, "operationOrder", ConceptTypeEnum.Operation.getKey(),"UniqueName",operstionMap);
|
|
|
+ // setListProperty(wordCrfDTO, "operationOrder", "uniqueName", configMap);
|
|
|
+ setListProperty(wordCrfDTO, "operationOrder", ConceptTypeEnum.Operation.getKey(), "UniqueName", operstionMap);
|
|
|
// 6、选中手术
|
|
|
if (wordCrfDTO.getOperationName() != null &&
|
|
|
StringUtil.isNotBlank(wordCrfDTO.getOperationName().getName()) &&
|
|
@@ -702,10 +702,10 @@ public class CommonFacade {
|
|
|
List<String> pacsList = new ArrayList<>();
|
|
|
// 1、结构化
|
|
|
CoreUtil.addList(pacsList, CoreUtil.filterUniqueList(wordCrfDTO.getPacs()));
|
|
|
-// // 2、开单
|
|
|
+ // // 2、开单
|
|
|
CoreUtil.addList(pacsList, CoreUtil.filterUniqueList(wordCrfDTO.getPacsOrder()));
|
|
|
PacsLabel pacsLabel = wordCrfDTO.getPacsLabel();
|
|
|
- if(pacsLabel != null){
|
|
|
+ if (pacsLabel != null) {
|
|
|
pacsList = pacsLabel.getItem().stream()
|
|
|
.map(x -> x.getName())
|
|
|
.collect(Collectors.toList());
|
|
@@ -713,9 +713,9 @@ public class CommonFacade {
|
|
|
|
|
|
if (ListUtil.isNotEmpty(pacsList)) {
|
|
|
Map<String, Map<String, Map<String, List<String>>>> pacsMap = mappingConfigFacade.groupByHisNameWithName(pacsList, ConceptTypeEnum.Pacs.getKey(), wordCrfDTO.getHospitalId());
|
|
|
- setListProperty(wordCrfDTO, "pacs", ConceptTypeEnum.Pacs.getKey(),"UniqueName",pacsMap);
|
|
|
- setListProperty(wordCrfDTO, "pacsOrder", ConceptTypeEnum.Pacs.getKey(),"UniqueName",pacsMap);
|
|
|
- setListProperty(pacsLabel, "item", ConceptTypeEnum.Pacs.getKey(),"UniqueName",pacsMap);
|
|
|
+ setListProperty(wordCrfDTO, "pacs", ConceptTypeEnum.Pacs.getKey(), "UniqueName", pacsMap);
|
|
|
+ setListProperty(wordCrfDTO, "pacsOrder", ConceptTypeEnum.Pacs.getKey(), "UniqueName", pacsMap);
|
|
|
+ setListProperty(pacsLabel, "item", ConceptTypeEnum.Pacs.getKey(), "UniqueName", pacsMap);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -729,7 +729,7 @@ public class CommonFacade {
|
|
|
List<String> lisHisNameList = Lists.newArrayList();
|
|
|
// 【所有化验】
|
|
|
List<Lis> lisList = wordCrfDTO.getLis();
|
|
|
- if(ListUtil.isNotEmpty(lisList)){
|
|
|
+ if (ListUtil.isNotEmpty(lisList)) {
|
|
|
lisHisNameList.addAll(lisList
|
|
|
.stream()
|
|
|
.filter(i -> StringUtil.isNotBlank(i.getName()) || StringUtil.isNotBlank(i.getUniqueName()))
|
|
@@ -742,7 +742,7 @@ public class CommonFacade {
|
|
|
.collect(Collectors.toList());
|
|
|
if (ListUtil.isNotEmpty(lisHisNameList)) {
|
|
|
Map<String, Map<String, Map<String, List<String>>>> lisConfigMap = mappingConfigFacade.groupByHisNameWithName(lisHisNameList, ConceptTypeEnum.LisPack.getKey(), wordCrfDTO.getHospitalId());
|
|
|
- setListProperty(wordCrfDTO, "lis", ConceptTypeEnum.LisPack.getKey(),"UniqueName",lisConfigMap);
|
|
|
+ setListProperty(wordCrfDTO, "lis", ConceptTypeEnum.LisPack.getKey(), "UniqueName", lisConfigMap);
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -761,9 +761,9 @@ public class CommonFacade {
|
|
|
ReflectUtil.setProperty(obj, listProperty, newList);
|
|
|
}
|
|
|
|
|
|
- public <T> void setListProperty(Object obj, String listProperty,Integer type,String propertyName, Map<String, Map<String, Map<String, List<String>>>> configMap) {
|
|
|
+ public <T> void setListProperty(Object obj, String listProperty, Integer type, String propertyName, Map<String, Map<String, Map<String, List<String>>>> configMap) {
|
|
|
Object tList = CoreUtil.getFieldValue(obj, listProperty);
|
|
|
- List<T> newList = convertStandName((List) tList,type, propertyName,configMap);
|
|
|
+ List<T> newList = convertStandName((List) tList, type, propertyName, configMap);
|
|
|
ReflectUtil.setProperty(obj, listProperty, newList);
|
|
|
}
|
|
|
|
|
@@ -825,7 +825,7 @@ public class CommonFacade {
|
|
|
* @param <T>
|
|
|
* @return
|
|
|
*/
|
|
|
- public <T> List<T> convertStandName(List<T> list,Integer type,String propertyName, Map<String, Map<String, Map<String, List<String>>>> configMap) {
|
|
|
+ public <T> List<T> convertStandName(List<T> list, Integer type, String propertyName, Map<String, Map<String, Map<String, List<String>>>> configMap) {
|
|
|
List<T> retList = new ArrayList<>();
|
|
|
if (ListUtil.isEmpty(list)) {
|
|
|
return list;
|
|
@@ -839,7 +839,7 @@ public class CommonFacade {
|
|
|
continue;
|
|
|
}
|
|
|
|
|
|
-// String uniqueName = item.getClass().getMethod("getUniqueName").invoke(item).toString();
|
|
|
+ // String uniqueName = item.getClass().getMethod("getUniqueName").invoke(item).toString();
|
|
|
|
|
|
String uniqueName = ReflectUtil.getProperty(item, "uniqueName");
|
|
|
if (StringUtil.isNotBlank(uniqueName) && !"StandName".equals(propertyName)) {
|
|
@@ -848,7 +848,7 @@ public class CommonFacade {
|
|
|
}
|
|
|
|
|
|
String hisDetailName = "";
|
|
|
- if(type.equals(ConceptTypeEnum.LisPack.getKey())) {
|
|
|
+ if (type.equals(ConceptTypeEnum.LisPack.getKey())) {
|
|
|
hisDetailName = ReflectUtil.getProperty(item, "detailName");
|
|
|
if (StringUtil.isBlank(hisDetailName)) {
|
|
|
hisDetailName = "";
|
|
@@ -864,7 +864,7 @@ public class CommonFacade {
|
|
|
for (String form : thirdEntry.getValue()) {
|
|
|
T o = (T) item.getClass().newInstance();
|
|
|
BeanUtil.copyProperties(item, o);
|
|
|
- Method setUniqueName = o.getClass().getMethod("set"+propertyName, String.class);
|
|
|
+ Method setUniqueName = o.getClass().getMethod("set" + propertyName, String.class);
|
|
|
setUniqueName.invoke(o, thirdEntry.getKey());
|
|
|
Method setForm = o.getClass().getMethod("setForm", String.class);
|
|
|
setForm.invoke(o, form);
|
|
@@ -873,7 +873,7 @@ public class CommonFacade {
|
|
|
} else {
|
|
|
T o = (T) item.getClass().newInstance();
|
|
|
BeanUtil.copyProperties(item, o);
|
|
|
- Method setUniqueName = o.getClass().getMethod("set"+propertyName, String.class);
|
|
|
+ Method setUniqueName = o.getClass().getMethod("set" + propertyName, String.class);
|
|
|
setUniqueName.invoke(o, thirdEntry.getKey());
|
|
|
retList.add(o);
|
|
|
}
|
|
@@ -884,7 +884,7 @@ public class CommonFacade {
|
|
|
for (String stdName : standNames) {
|
|
|
T o = (T) item.getClass().newInstance();
|
|
|
BeanUtil.copyProperties(item, o);
|
|
|
- Method setUniqueName = o.getClass().getMethod("set"+propertyName, String.class);
|
|
|
+ Method setUniqueName = o.getClass().getMethod("set" + propertyName, String.class);
|
|
|
setUniqueName.invoke(o, stdName);
|
|
|
retList.add(o);
|
|
|
}
|
|
@@ -894,7 +894,11 @@ public class CommonFacade {
|
|
|
}
|
|
|
} else {
|
|
|
if (propertyName.equals("UniqueName")) {
|
|
|
- BeanUtils.copyProperty(item, "uniqueName", name);
|
|
|
+ if (StringUtil.isNotBlank(hisDetailName)) {
|
|
|
+ BeanUtils.copyProperty(item, "uniqueName", hisDetailName);
|
|
|
+ } else {
|
|
|
+ BeanUtils.copyProperty(item, "uniqueName", name);
|
|
|
+ }
|
|
|
}
|
|
|
retList.add(item);
|
|
|
}
|
|
@@ -1082,11 +1086,11 @@ public class CommonFacade {
|
|
|
getPacsStruct(pacsLabel, wordCrfDTO.getPresentLabel().getPacsLabel());
|
|
|
//结构化pacs
|
|
|
List<com.diagbot.biz.push.entity.Pacs> pacs = wordCrfDTO.getPacs();
|
|
|
- if(ListUtil.isNotEmpty(pacs)){
|
|
|
- pacs.forEach(p ->{
|
|
|
+ if (ListUtil.isNotEmpty(pacs)) {
|
|
|
+ pacs.forEach(p -> {
|
|
|
Item item = new Item();
|
|
|
- item.setName(p.getName()==null?"":p.getName());
|
|
|
- item.setUniqueName(p.getUniqueName()==null?"":p.getUniqueName());
|
|
|
+ item.setName(p.getName() == null ? "" : p.getName());
|
|
|
+ item.setUniqueName(p.getUniqueName() == null ? "" : p.getUniqueName());
|
|
|
pacsLabel.getItem().add(item);
|
|
|
});
|
|
|
}
|
|
@@ -1122,8 +1126,8 @@ public class CommonFacade {
|
|
|
if (ListUtil.isNotEmpty(res.getDisease())) {
|
|
|
for (Pacs pacs : res.getDisease()) {
|
|
|
Item item = new Item();
|
|
|
- item.setName(pacs.getName()==null?"":pacs.getName());
|
|
|
- item.setUniqueName(pacs.getStandName()==null?"":pacs.getStandName());
|
|
|
+ item.setName(pacs.getName() == null ? "" : pacs.getName());
|
|
|
+ item.setUniqueName(pacs.getStandName() == null ? "" : pacs.getStandName());
|
|
|
pacsResList.add(item);
|
|
|
}
|
|
|
}
|
|
@@ -1163,18 +1167,17 @@ public class CommonFacade {
|
|
|
*
|
|
|
* @param lises
|
|
|
* @param lisList
|
|
|
- *
|
|
|
*/
|
|
|
public void getLisStruct(List<com.diagbot.model.entity.Lis> lises, List<Lis> lisList) {
|
|
|
if (ListUtil.isNotEmpty(lises)) {
|
|
|
- lises.stream().forEach(x -> {
|
|
|
- String bigName = x.getBigItem().getName();//大项名
|
|
|
- String detailName = x.getName();//小项名
|
|
|
- String value = x.getPd().getValue();
|
|
|
- String unit = x.getPd().getUnit();
|
|
|
- String standName = x.getStandName();
|
|
|
- lisList.add(getLis(bigName,detailName,value,unit,standName));
|
|
|
- });
|
|
|
+ lises.stream().forEach(x -> {
|
|
|
+ String bigName = x.getBigItem().getName();//大项名
|
|
|
+ String detailName = x.getName();//小项名
|
|
|
+ String value = x.getPd().getValue();
|
|
|
+ String unit = x.getPd().getUnit();
|
|
|
+ String standName = x.getStandName();
|
|
|
+ lisList.add(getLis(bigName, detailName, value, unit, standName));
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
|