|
@@ -10,6 +10,7 @@ import com.diagbot.client.bean.GdbResponse;
|
|
|
import com.diagbot.client.bean.Response;
|
|
|
import com.diagbot.client.bean.ResponseData;
|
|
|
import com.diagbot.client.bean.SearchData;
|
|
|
+import com.diagbot.dto.EMRQuestionDTO;
|
|
|
import com.diagbot.dto.PushDTO;
|
|
|
import com.diagbot.dto.PushEMRDTO;
|
|
|
import com.diagbot.dto.PushKYJDTO;
|
|
@@ -499,23 +500,53 @@ public class PushFacade {
|
|
|
Set<String> featureTypeSet = new HashSet(Arrays.asList(featureTypes));
|
|
|
|
|
|
if (featureTypeSet.contains(String.valueOf(QuestionTypeEnum.Lis.getKey()))) {
|
|
|
- List<FeatureRate> labs = data.getLabs();
|
|
|
- if (labs.size() > 0) {
|
|
|
- List<String> lisList = labs.stream().map(lab -> lab.getFeatureName()).collect(Collectors.toList());
|
|
|
+ List<FeatureRate> lisFeatures = data.getLabs();
|
|
|
+ if (lisFeatures.size() > 0) {
|
|
|
+ Map<String, List<String>> lisMappingByUniqueName = new LinkedHashMap<>();
|
|
|
+ if (isDocking) {
|
|
|
+ lisMappingByUniqueName = tranServiceClient.getLisConfigByUniqueNameAndHosCode(hosCodeVO).data;
|
|
|
+ } else {
|
|
|
+ lisMappingByUniqueName = lisMappingFacade.getLisMappingByUniqueName();
|
|
|
+ }
|
|
|
+ List<EMRQuestionDTO> lisList = Lists.newLinkedList();
|
|
|
+ for (FeatureRate featureRate : lisFeatures) {
|
|
|
+ EMRQuestionDTO lis = new EMRQuestionDTO();
|
|
|
+ lis.setUniqueName(featureRate.getFeatureName());
|
|
|
+ if (ListUtil.isNotEmpty(lisMappingByUniqueName.get(featureRate.getFeatureName()))) {
|
|
|
+ lis.setName(lisMappingByUniqueName.get(featureRate.getFeatureName()).get(0));
|
|
|
+ }
|
|
|
+ lisList.add(lis);
|
|
|
+ }
|
|
|
pushEMRDTO.setLisList(lisList);
|
|
|
}
|
|
|
}
|
|
|
if (featureTypeSet.contains(String.valueOf(QuestionTypeEnum.Pacs.getKey()))) {
|
|
|
List<FeatureRate> pacsFeatures = data.getPacs();
|
|
|
if (pacsFeatures.size() > 0) {
|
|
|
- List<String> pacsList = pacsFeatures.stream().map(pacs -> pacs.getFeatureName()).collect(Collectors.toList());
|
|
|
+ Map<String, List<String>> pacsConfigMapByUniqueName = new LinkedHashMap<>();
|
|
|
+ if (isDocking) {
|
|
|
+ pacsConfigMapByUniqueName = tranServiceClient.getPacsConfigByUniqueNameAndHosCode(hosCodeVO).data;
|
|
|
+ }
|
|
|
+ List<EMRQuestionDTO> pacsList = Lists.newLinkedList();
|
|
|
+ for (FeatureRate featureRate : pacsFeatures) {
|
|
|
+ EMRQuestionDTO pacs = new EMRQuestionDTO();
|
|
|
+ pacs.setUniqueName(featureRate.getFeatureName());
|
|
|
+ if (isDocking) {
|
|
|
+ if (ListUtil.isNotEmpty(pacsConfigMapByUniqueName.get(featureRate.getFeatureName()))) {
|
|
|
+ pacs.setName(pacsConfigMapByUniqueName.get(featureRate.getFeatureName()).get(0));
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ pacs.setName(featureRate.getFeatureName());
|
|
|
+ }
|
|
|
+ pacsList.add(pacs);
|
|
|
+ }
|
|
|
pushEMRDTO.setPacsList(pacsList);
|
|
|
}
|
|
|
}
|
|
|
if (featureTypeSet.contains(String.valueOf(QuestionTypeEnum.Disease.getKey()))) {
|
|
|
List<FeatureRate> dis = data.getDis();
|
|
|
List<String> disNameList = dis.stream().map(disease -> disease.getFeatureName()).collect(Collectors.toList());
|
|
|
- Map<String, List<String>> retDisMap = new LinkedHashMap<>();
|
|
|
+ Map<String, List<EMRQuestionDTO>> retDisMap = new LinkedHashMap<>();
|
|
|
Map<String, String> disMap = tranServiceClient.getDiseaseIcdByHosCode(hosCodeVO).data;
|
|
|
|
|
|
//诊断分类
|
|
@@ -525,16 +556,19 @@ public class PushFacade {
|
|
|
}
|
|
|
Map<String, Object> descMap = FastJsonUtils.getJsonToMap(featureRate.getDesc());
|
|
|
for (String disClass : descMap.keySet()) {
|
|
|
- List<String> retDisList = Lists.newLinkedList();
|
|
|
+ List<EMRQuestionDTO> retDisList = Lists.newLinkedList();
|
|
|
if (retDisMap.get(disClass) != null) {
|
|
|
retDisList = retDisMap.get(disClass);
|
|
|
}
|
|
|
+ EMRQuestionDTO retDis = new EMRQuestionDTO();
|
|
|
+ retDis.setUniqueName(featureRate.getFeatureName());
|
|
|
if (isDocking) {
|
|
|
//对接模式转icd10名称
|
|
|
- retDisList.add(disMap.get(featureRate.getFeatureName()));
|
|
|
+ retDis.setName(disMap.get(featureRate.getFeatureName()));
|
|
|
} else {
|
|
|
- retDisList.add(featureRate.getFeatureName());
|
|
|
+ retDis.setName(featureRate.getFeatureName());
|
|
|
}
|
|
|
+ retDisList.add(retDis);
|
|
|
retDisMap.put(disClass, retDisList);
|
|
|
}
|
|
|
}
|
|
@@ -544,14 +578,17 @@ public class PushFacade {
|
|
|
Response<GdbResponse> graphRes = graphServiceClient.highRiskPageData(searchData);
|
|
|
Map<String, String> graphResult = graphRes.getData().getResult();
|
|
|
if (graphResult.size() > 0) {
|
|
|
- List<String> highRiskDisList = Lists.newLinkedList();
|
|
|
+ List<EMRQuestionDTO> highRiskDisList = Lists.newLinkedList();
|
|
|
for (Map.Entry<String, String> entry : graphResult.entrySet()) {
|
|
|
if (entry.getValue().equals("1")) {
|
|
|
+ EMRQuestionDTO hrDis = new EMRQuestionDTO();
|
|
|
+ hrDis.setUniqueName(entry.getKey());
|
|
|
if (isDocking) {
|
|
|
- highRiskDisList.add(disMap.get(entry.getKey()));
|
|
|
+ hrDis.setName(disMap.get(entry.getKey()));
|
|
|
} else {
|
|
|
- highRiskDisList.add(entry.getKey());
|
|
|
+ hrDis.setName(entry.getValue());
|
|
|
}
|
|
|
+ highRiskDisList.add(hrDis);
|
|
|
}
|
|
|
}
|
|
|
retDisMap.put("警惕", highRiskDisList);
|