|
@@ -31,10 +31,12 @@ import com.diagbot.vo.HospitalSetVO;
|
|
|
import com.diagbot.vo.LisConfigVO;
|
|
|
import com.diagbot.vo.SearchVo;
|
|
|
import com.google.common.collect.Lists;
|
|
|
+import io.github.lvyahui8.spring.aggregate.facade.DataBeanAggregateQueryFacade;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
import java.util.Arrays;
|
|
|
+import java.util.HashMap;
|
|
|
import java.util.HashSet;
|
|
|
import java.util.LinkedHashMap;
|
|
|
import java.util.List;
|
|
@@ -57,6 +59,8 @@ public class PushFacade {
|
|
|
private TreatmentFacade treatmentFacade;
|
|
|
@Autowired
|
|
|
private TranServiceClient tranServiceClient;
|
|
|
+ @Autowired
|
|
|
+ DataBeanAggregateQueryFacade dataBeanAggregateQueryFacade;
|
|
|
|
|
|
/**
|
|
|
* 推理接口
|
|
@@ -111,159 +115,172 @@ public class PushFacade {
|
|
|
List<FeatureRate> dis = data.getDis();
|
|
|
pushDTO.setDept(getDept(dis));
|
|
|
|
|
|
- //症状 概念列表
|
|
|
- if (featureTypeSet.contains(String.valueOf(FeatureTypeEnum.Feature_Type_Symptom.getKey()))) {
|
|
|
- List<FeatureRate> symptom = data.getSymptom();
|
|
|
- if (ListUtil.isNotEmpty(symptom)) {
|
|
|
- List<String> nameList = symptom
|
|
|
- .stream()
|
|
|
- .map(featureRate -> featureRate.getFeatureName())
|
|
|
- .collect(Collectors.toList());
|
|
|
- if (ListUtil.isNotEmpty(nameList)) {
|
|
|
- pushDTO.setSymptom(getConceptDTOList(nameList, LexiconTypeEnum.SYMPTOM.getKey()));
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- //查体 查体结果
|
|
|
- if (featureTypeSet.contains(String.valueOf(FeatureTypeEnum.Feature_Type_Vital_Result.getKey()))) {
|
|
|
- List<FeatureRate> vital = data.getVitals();
|
|
|
- if (ListUtil.isNotEmpty(vital)) {
|
|
|
- List<String> nameList = vital
|
|
|
- .stream()
|
|
|
- .map(featureRate -> featureRate.getFeatureName())
|
|
|
- .collect(Collectors.toList());
|
|
|
- if (ListUtil.isNotEmpty(nameList)) {
|
|
|
- pushDTO.setVital(getConceptDTOList(nameList, LexiconTypeEnum.VITAL_RESULT.getKey()));
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- //查体 查体指标
|
|
|
- if (featureTypeSet.contains(String.valueOf(FeatureTypeEnum.Feature_Type_Vital_Index.getKey()))) {
|
|
|
- List<FeatureRate> vital = data.getVitals();
|
|
|
- if (ListUtil.isNotEmpty(vital)) {
|
|
|
- List<String> nameList = vital
|
|
|
- .stream()
|
|
|
- .map(featureRate -> featureRate.getFeatureName())
|
|
|
- .collect(Collectors.toList());
|
|
|
- if (ListUtil.isNotEmpty(nameList)) {
|
|
|
- pushDTO.setVital(getConceptDTOList(nameList, LexiconTypeEnum.VITAL_INDEX.getKey()));
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- //化验 概念列表-公表项
|
|
|
- if (featureTypeSet.contains(String.valueOf(FeatureTypeEnum.Feature_Type_Lis.getKey()))) {
|
|
|
- List<FeatureRate> lis = data.getLabs();
|
|
|
- if (ListUtil.isNotEmpty(lis)) {
|
|
|
- List<String> nameList = lis
|
|
|
- .stream()
|
|
|
- .map(featureRate -> featureRate.getFeatureName())
|
|
|
- .collect(Collectors.toList());
|
|
|
- if (ListUtil.isNotEmpty(nameList)) {
|
|
|
- List<ConceptPushDTO> lisDTO = getConceptDTOList(nameList, LexiconTypeEnum.LIS_PACKAGE.getKey());
|
|
|
- if (isConnect) {
|
|
|
- lisDTO = addClientName(lisDTO, searchVo.getHosCode(), ConceptTypeEnum.Lis.getKey());
|
|
|
- //lisDTO = removeLisDetail(lisDTO);
|
|
|
- }
|
|
|
- pushDTO.setLab(lisDTO);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- //辅检 概念列表
|
|
|
- if (featureTypeSet.contains(String.valueOf(FeatureTypeEnum.Feature_Type_Pacs.getKey()))) {
|
|
|
- List<FeatureRate> pacs = data.getPacs();
|
|
|
- if (ListUtil.isNotEmpty(pacs)) {
|
|
|
- List<String> nameList = pacs
|
|
|
- .stream()
|
|
|
- .map(featureRate -> featureRate.getFeatureName())
|
|
|
- .collect(Collectors.toList());
|
|
|
- if (ListUtil.isNotEmpty(nameList)) {
|
|
|
- List<ConceptPushDTO> pacsDTO = getConceptDTOList(nameList, LexiconTypeEnum.PACS_ITEMS.getKey());
|
|
|
- if (isConnect) {
|
|
|
- pacsDTO = addClientName(pacsDTO, searchVo.getHosCode(), ConceptTypeEnum.Pacs.getKey());
|
|
|
- }
|
|
|
- pushDTO.setPacs(pacsDTO);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- //诊断 map
|
|
|
- if (featureTypeSet.contains(String.valueOf(FeatureTypeEnum.Feature_Type_Disease.getKey()))) {
|
|
|
- if (ListUtil.isNotEmpty(dis)) {
|
|
|
- Map<String, List<ConceptPushDTO>> disMapDTO = new LinkedHashMap<>();
|
|
|
- Map<String, List<FeatureRate>> disFeatureMap = new LinkedHashMap<>();
|
|
|
- //诊断分类
|
|
|
- for (FeatureRate featureRate : dis) {
|
|
|
- if (StringUtil.isBlank(featureRate.getDesc())) {
|
|
|
- featureRate.setDesc("{\"可能诊断\":\"\"}");
|
|
|
- }
|
|
|
- Map<String, Object> descMap = FastJsonUtils.getJsonToMap(featureRate.getDesc());
|
|
|
- for (String disClass : descMap.keySet()) {
|
|
|
- List<FeatureRate> featureRateList = Lists.newLinkedList();
|
|
|
- if (disFeatureMap.get(disClass) != null) {
|
|
|
- featureRateList = disFeatureMap.get(disClass);
|
|
|
- }
|
|
|
- featureRateList.add(featureRate);
|
|
|
- disFeatureMap.put(disClass, featureRateList);
|
|
|
- }
|
|
|
- }
|
|
|
- for (Map.Entry<String, List<FeatureRate>> entry : disFeatureMap.entrySet()) {
|
|
|
- List<String> nameListByDisClass = entry.getValue()
|
|
|
- .stream()
|
|
|
- .map(featureRate -> featureRate.getFeatureName())
|
|
|
- .collect(Collectors.toList());
|
|
|
- if (ListUtil.isNotEmpty(nameListByDisClass)) {
|
|
|
- List<ConceptPushDTO> disDTO
|
|
|
- = getConceptDTOList(nameListByDisClass, LexiconTypeEnum.DIAGNOSIS.getKey());
|
|
|
- if (isConnect) {
|
|
|
- disDTO = addClientName(disDTO, searchVo.getHosCode(), ConceptTypeEnum.Disease.getKey());
|
|
|
- }
|
|
|
- disMapDTO.put(entry.getKey(), disDTO);
|
|
|
- }
|
|
|
- }
|
|
|
- pushDTO.setDis(disMapDTO);
|
|
|
- }
|
|
|
- }
|
|
|
- //核心指标 list
|
|
|
- if (featureTypeSet.contains(String.valueOf(FeatureTypeEnum.Feature_Type_Indication.getKey()))) {
|
|
|
- List<MedicalIndication> medicalIndicationList = data.getMedicalIndications();
|
|
|
- ConceptBaseVO conceptBaseVO = new ConceptBaseVO();
|
|
|
- if (ListUtil.isNotEmpty(medicalIndicationList)) {
|
|
|
- for (MedicalIndication medicalIndication : medicalIndicationList) {
|
|
|
- medicalIndication.setLibType(LexiconTypeEnum.CORE_INDICATORS.getKey());
|
|
|
- medicalIndication.setType(ConceptTypeEnum.Indication.getKey());
|
|
|
- //关联概念,增加概念id
|
|
|
- conceptBaseVO.setName(medicalIndication.getName());
|
|
|
- conceptBaseVO.setLibType(LexiconTypeEnum.CORE_INDICATORS.getKey());
|
|
|
- Concept medConcept = conceptFacade.getConcept(conceptBaseVO);
|
|
|
- if (medConcept != null) {
|
|
|
- medicalIndication.setConceptId(medConcept.getId());
|
|
|
- }
|
|
|
- if (ListUtil.isNotEmpty(medicalIndication.getDetails())) {
|
|
|
- for (MedicalIndicationDetail detail : medicalIndication.getDetails()) {
|
|
|
- //量表,增加概念id;其他类型保留图谱返回结果
|
|
|
- if (detail.getType().equals(1)) {
|
|
|
- JSONObject scaleJson = detail.getContent();
|
|
|
- if (null != scaleJson.get("name")) {
|
|
|
- String scaleName = scaleJson.get("name").toString();
|
|
|
- conceptBaseVO.setName(scaleName);
|
|
|
- conceptBaseVO.setLibType(LexiconTypeEnum.GAUGE.getKey());
|
|
|
- Concept scaleConcept = conceptFacade.getConcept(conceptBaseVO);
|
|
|
- scaleJson.put("libType", LexiconTypeEnum.GAUGE.getKey());
|
|
|
- scaleJson.put("type", ConceptTypeEnum.Scale.getKey());
|
|
|
- if (scaleConcept != null) {
|
|
|
- scaleJson.put("conceptId", scaleConcept.getId());
|
|
|
- } else {
|
|
|
- scaleJson.put("conceptId", null);
|
|
|
- }
|
|
|
- detail.setContent(scaleJson);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- pushDTO.setMedicalIndications(medicalIndicationList);
|
|
|
- }
|
|
|
+ try {
|
|
|
+ Map<String, Object> invokeParams = new HashMap<>();
|
|
|
+ invokeParams.put("pushDTO", pushDTO);
|
|
|
+ invokeParams.put("featureTypeSet", featureTypeSet);
|
|
|
+ invokeParams.put("data", data);
|
|
|
+ invokeParams.put("isConnect", isConnect);
|
|
|
+ invokeParams.put("hosCode", searchVo.getHosCode());
|
|
|
+ invokeParams.put("dis", dis);
|
|
|
+ pushDTO
|
|
|
+ = dataBeanAggregateQueryFacade.get("setAll", invokeParams, PushDTO.class);
|
|
|
+ } catch (Exception e) {
|
|
|
+ throw new CommonException(CommonErrorCode.SERVER_IS_ERROR);
|
|
|
}
|
|
|
+// //症状 概念列表
|
|
|
+// if (featureTypeSet.contains(String.valueOf(FeatureTypeEnum.Feature_Type_Symptom.getKey()))) {
|
|
|
+// List<FeatureRate> symptom = data.getSymptom();
|
|
|
+// if (ListUtil.isNotEmpty(symptom)) {
|
|
|
+// List<String> nameList = symptom
|
|
|
+// .stream()
|
|
|
+// .map(featureRate -> featureRate.getFeatureName())
|
|
|
+// .collect(Collectors.toList());
|
|
|
+// if (ListUtil.isNotEmpty(nameList)) {
|
|
|
+// pushDTO.setSymptom(getConceptDTOList(nameList, LexiconTypeEnum.SYMPTOM.getKey()));
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
+// //查体 查体结果
|
|
|
+// if (featureTypeSet.contains(String.valueOf(FeatureTypeEnum.Feature_Type_Vital_Result.getKey()))) {
|
|
|
+// List<FeatureRate> vital = data.getVitals();
|
|
|
+// if (ListUtil.isNotEmpty(vital)) {
|
|
|
+// List<String> nameList = vital
|
|
|
+// .stream()
|
|
|
+// .map(featureRate -> featureRate.getFeatureName())
|
|
|
+// .collect(Collectors.toList());
|
|
|
+// if (ListUtil.isNotEmpty(nameList)) {
|
|
|
+// pushDTO.setVital(getConceptDTOList(nameList, LexiconTypeEnum.VITAL_RESULT.getKey()));
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
+// //查体 查体指标
|
|
|
+// if (featureTypeSet.contains(String.valueOf(FeatureTypeEnum.Feature_Type_Vital_Index.getKey()))) {
|
|
|
+// List<FeatureRate> vital = data.getVitals();
|
|
|
+// if (ListUtil.isNotEmpty(vital)) {
|
|
|
+// List<String> nameList = vital
|
|
|
+// .stream()
|
|
|
+// .map(featureRate -> featureRate.getFeatureName())
|
|
|
+// .collect(Collectors.toList());
|
|
|
+// if (ListUtil.isNotEmpty(nameList)) {
|
|
|
+// pushDTO.setVital(getConceptDTOList(nameList, LexiconTypeEnum.VITAL_INDEX.getKey()));
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
+//
|
|
|
+// //化验 概念列表-公表项
|
|
|
+// if (featureTypeSet.contains(String.valueOf(FeatureTypeEnum.Feature_Type_Lis.getKey()))) {
|
|
|
+// List<FeatureRate> lis = data.getLabs();
|
|
|
+// if (ListUtil.isNotEmpty(lis)) {
|
|
|
+// List<String> nameList = lis
|
|
|
+// .stream()
|
|
|
+// .map(featureRate -> featureRate.getFeatureName())
|
|
|
+// .collect(Collectors.toList());
|
|
|
+// if (ListUtil.isNotEmpty(nameList)) {
|
|
|
+// List<ConceptPushDTO> lisDTO = getConceptDTOList(nameList, LexiconTypeEnum.LIS_PACKAGE.getKey());
|
|
|
+// if (isConnect) {
|
|
|
+// lisDTO = addClientName(lisDTO, searchVo.getHosCode(), ConceptTypeEnum.Lis.getKey());
|
|
|
+// //lisDTO = removeLisDetail(lisDTO);
|
|
|
+// }
|
|
|
+// pushDTO.setLab(lisDTO);
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
+// //辅检 概念列表
|
|
|
+// if (featureTypeSet.contains(String.valueOf(FeatureTypeEnum.Feature_Type_Pacs.getKey()))) {
|
|
|
+// List<FeatureRate> pacs = data.getPacs();
|
|
|
+// if (ListUtil.isNotEmpty(pacs)) {
|
|
|
+// List<String> nameList = pacs
|
|
|
+// .stream()
|
|
|
+// .map(featureRate -> featureRate.getFeatureName())
|
|
|
+// .collect(Collectors.toList());
|
|
|
+// if (ListUtil.isNotEmpty(nameList)) {
|
|
|
+// List<ConceptPushDTO> pacsDTO = getConceptDTOList(nameList, LexiconTypeEnum.PACS_ITEMS.getKey());
|
|
|
+// if (isConnect) {
|
|
|
+// pacsDTO = addClientName(pacsDTO, searchVo.getHosCode(), ConceptTypeEnum.Pacs.getKey());
|
|
|
+// }
|
|
|
+// pushDTO.setPacs(pacsDTO);
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
+// //诊断 map
|
|
|
+// if (featureTypeSet.contains(String.valueOf(FeatureTypeEnum.Feature_Type_Disease.getKey()))) {
|
|
|
+// if (ListUtil.isNotEmpty(dis)) {
|
|
|
+// Map<String, List<ConceptPushDTO>> disMapDTO = new LinkedHashMap<>();
|
|
|
+// Map<String, List<FeatureRate>> disFeatureMap = new LinkedHashMap<>();
|
|
|
+// //诊断分类
|
|
|
+// for (FeatureRate featureRate : dis) {
|
|
|
+// if (StringUtil.isBlank(featureRate.getDesc())) {
|
|
|
+// featureRate.setDesc("{\"可能诊断\":\"\"}");
|
|
|
+// }
|
|
|
+// Map<String, Object> descMap = FastJsonUtils.getJsonToMap(featureRate.getDesc());
|
|
|
+// for (String disClass : descMap.keySet()) {
|
|
|
+// List<FeatureRate> featureRateList = Lists.newLinkedList();
|
|
|
+// if (disFeatureMap.get(disClass) != null) {
|
|
|
+// featureRateList = disFeatureMap.get(disClass);
|
|
|
+// }
|
|
|
+// featureRateList.add(featureRate);
|
|
|
+// disFeatureMap.put(disClass, featureRateList);
|
|
|
+// }
|
|
|
+// }
|
|
|
+// for (Map.Entry<String, List<FeatureRate>> entry : disFeatureMap.entrySet()) {
|
|
|
+// List<String> nameListByDisClass = entry.getValue()
|
|
|
+// .stream()
|
|
|
+// .map(featureRate -> featureRate.getFeatureName())
|
|
|
+// .collect(Collectors.toList());
|
|
|
+// if (ListUtil.isNotEmpty(nameListByDisClass)) {
|
|
|
+// List<ConceptPushDTO> disDTO
|
|
|
+// = getConceptDTOList(nameListByDisClass, LexiconTypeEnum.DIAGNOSIS.getKey());
|
|
|
+// if (isConnect) {
|
|
|
+// disDTO = addClientName(disDTO, searchVo.getHosCode(), ConceptTypeEnum.Disease.getKey());
|
|
|
+// }
|
|
|
+// disMapDTO.put(entry.getKey(), disDTO);
|
|
|
+// }
|
|
|
+// }
|
|
|
+// pushDTO.setDis(disMapDTO);
|
|
|
+// }
|
|
|
+// }
|
|
|
+// //核心指标 list
|
|
|
+// if (featureTypeSet.contains(String.valueOf(FeatureTypeEnum.Feature_Type_Indication.getKey()))) {
|
|
|
+// List<MedicalIndication> medicalIndicationList = data.getMedicalIndications();
|
|
|
+// ConceptBaseVO conceptBaseVO = new ConceptBaseVO();
|
|
|
+// if (ListUtil.isNotEmpty(medicalIndicationList)) {
|
|
|
+// for (MedicalIndication medicalIndication : medicalIndicationList) {
|
|
|
+// medicalIndication.setLibType(LexiconTypeEnum.CORE_INDICATORS.getKey());
|
|
|
+// medicalIndication.setType(ConceptTypeEnum.Indication.getKey());
|
|
|
+// //关联概念,增加概念id
|
|
|
+// conceptBaseVO.setName(medicalIndication.getName());
|
|
|
+// conceptBaseVO.setLibType(LexiconTypeEnum.CORE_INDICATORS.getKey());
|
|
|
+// Concept medConcept = conceptFacade.getConcept(conceptBaseVO);
|
|
|
+// if (medConcept != null) {
|
|
|
+// medicalIndication.setConceptId(medConcept.getId());
|
|
|
+// }
|
|
|
+// if (ListUtil.isNotEmpty(medicalIndication.getDetails())) {
|
|
|
+// for (MedicalIndicationDetail detail : medicalIndication.getDetails()) {
|
|
|
+// //量表,增加概念id;其他类型保留图谱返回结果
|
|
|
+// if (detail.getType().equals(1)) {
|
|
|
+// JSONObject scaleJson = detail.getContent();
|
|
|
+// if (null != scaleJson.get("name")) {
|
|
|
+// String scaleName = scaleJson.get("name").toString();
|
|
|
+// conceptBaseVO.setName(scaleName);
|
|
|
+// conceptBaseVO.setLibType(LexiconTypeEnum.GAUGE.getKey());
|
|
|
+// Concept scaleConcept = conceptFacade.getConcept(conceptBaseVO);
|
|
|
+// scaleJson.put("libType", LexiconTypeEnum.GAUGE.getKey());
|
|
|
+// scaleJson.put("type", ConceptTypeEnum.Scale.getKey());
|
|
|
+// if (scaleConcept != null) {
|
|
|
+// scaleJson.put("conceptId", scaleConcept.getId());
|
|
|
+// } else {
|
|
|
+// scaleJson.put("conceptId", null);
|
|
|
+// }
|
|
|
+// detail.setContent(scaleJson);
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
+// pushDTO.setMedicalIndications(medicalIndicationList);
|
|
|
+// }
|
|
|
+// }
|
|
|
return pushDTO;
|
|
|
}
|
|
|
|
|
@@ -314,30 +331,30 @@ public class PushFacade {
|
|
|
return treatmentMap;
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * 推理返回概念
|
|
|
- *
|
|
|
- * @param nameList
|
|
|
- * @param libType
|
|
|
- * @return
|
|
|
- */
|
|
|
- public List<ConceptPushDTO> getConceptDTOList(List<String> nameList, Integer libType) {
|
|
|
- List<Concept> concepts = conceptFacade.getListByNamesAndType(nameList, libType);
|
|
|
- Map<String, Concept> conceptMap = EntityUtil.makeEntityMap(concepts, "libName");
|
|
|
- List<ConceptPushDTO> conceptDTOS = Lists.newLinkedList();
|
|
|
- for (String name : nameList) {
|
|
|
- ConceptPushDTO conceptDTO = new ConceptPushDTO();
|
|
|
- conceptDTO.setName(name);
|
|
|
- conceptDTO.setLibType(libType);
|
|
|
- conceptDTO.setType(ParamConvertUtil.libConvert2Concept(libType));
|
|
|
- if (conceptMap.containsKey(name) && conceptMap.get(name) != null) {
|
|
|
- Concept concept = conceptMap.get(name);
|
|
|
- conceptDTO.setConceptId(concept.getId());
|
|
|
- }
|
|
|
- conceptDTOS.add(conceptDTO);
|
|
|
- }
|
|
|
- return conceptDTOS;
|
|
|
- }
|
|
|
+// /**
|
|
|
+// * 推理返回概念
|
|
|
+// *
|
|
|
+// * @param nameList
|
|
|
+// * @param libType
|
|
|
+// * @return
|
|
|
+// */
|
|
|
+// public List<ConceptPushDTO> getConceptDTOList(List<String> nameList, Integer libType) {
|
|
|
+// List<Concept> concepts = conceptFacade.getListByNamesAndType(nameList, libType);
|
|
|
+// Map<String, Concept> conceptMap = EntityUtil.makeEntityMap(concepts, "libName");
|
|
|
+// List<ConceptPushDTO> conceptDTOS = Lists.newLinkedList();
|
|
|
+// for (String name : nameList) {
|
|
|
+// ConceptPushDTO conceptDTO = new ConceptPushDTO();
|
|
|
+// conceptDTO.setName(name);
|
|
|
+// conceptDTO.setLibType(libType);
|
|
|
+// conceptDTO.setType(ParamConvertUtil.libConvert2Concept(libType));
|
|
|
+// if (conceptMap.containsKey(name) && conceptMap.get(name) != null) {
|
|
|
+// Concept concept = conceptMap.get(name);
|
|
|
+// conceptDTO.setConceptId(concept.getId());
|
|
|
+// }
|
|
|
+// conceptDTOS.add(conceptDTO);
|
|
|
+// }
|
|
|
+// return conceptDTOS;
|
|
|
+// }
|
|
|
|
|
|
/**
|
|
|
* 根据诊断推送确定科室
|
|
@@ -414,64 +431,64 @@ public class PushFacade {
|
|
|
return lisResults;
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * 添加外部名称(调用方)
|
|
|
- *
|
|
|
- * @param concepts
|
|
|
- * @param hosCode
|
|
|
- * @param type
|
|
|
- * @return
|
|
|
- */
|
|
|
- public List<ConceptPushDTO> addClientName(List<ConceptPushDTO> concepts, String hosCode, Integer type) {
|
|
|
- HosCodeVO hosCodeVO = new HosCodeVO();
|
|
|
- hosCodeVO.setHosCode(hosCode);
|
|
|
- LisConfigVO lisConfigVO = new LisConfigVO();
|
|
|
- lisConfigVO.setHosCode(hosCode);
|
|
|
- List<String> uniqueNameList = concepts
|
|
|
- .stream()
|
|
|
- .map(concept -> concept.getName())
|
|
|
- .collect(Collectors.toList());
|
|
|
- lisConfigVO.setUniqueNameList(uniqueNameList);
|
|
|
- if (type.equals(ConceptTypeEnum.Lis.getKey())) {
|
|
|
- RespDTO<Map<String, List<String>>> lisRes
|
|
|
- = tranServiceClient.getLisConfigByUniqueNameAndHosCode(lisConfigVO);
|
|
|
- if (RespDTOUtil.respIsOK(lisRes)) {
|
|
|
- Map<String, List<String>> lisMappingByUniqueName = lisRes.data;
|
|
|
- for (ConceptPushDTO concept : concepts) {
|
|
|
- List<String> clientNames = lisMappingByUniqueName.get(concept.getName());
|
|
|
- if (ListUtil.isNotEmpty(clientNames)) {
|
|
|
- concept.setClientNames(clientNames);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- } else if (type.equals(ConceptTypeEnum.Pacs.getKey())) {
|
|
|
- RespDTO<Map<String, List<String>>> pacsRes
|
|
|
- = tranServiceClient.getPacsConfigByUniqueNameAndHosCode(hosCodeVO);
|
|
|
- if (RespDTOUtil.respIsOK(pacsRes)) {
|
|
|
- Map<String, List<String>> pacsConfigMapByUniqueName = pacsRes.data;
|
|
|
- for (ConceptPushDTO concept : concepts) {
|
|
|
- List<String> clientNames = pacsConfigMapByUniqueName.get(concept.getName());
|
|
|
- if (ListUtil.isNotEmpty(clientNames)) {
|
|
|
- concept.setClientNames(clientNames);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- } else if (type.equals(ConceptTypeEnum.Disease.getKey())) {
|
|
|
- RespDTO<Map<String, String>> disRes = tranServiceClient.getDiseaseIcdByHosCode(hosCodeVO);
|
|
|
- if (RespDTOUtil.respIsOK(disRes)) {
|
|
|
- Map<String, String> disMap = disRes.data;
|
|
|
- for (ConceptPushDTO concept : concepts) {
|
|
|
- String clientName = disMap.get(concept.getName());
|
|
|
- if (StringUtil.isNotBlank(clientName)) {
|
|
|
- List<String> clientNames = Lists.newLinkedList();
|
|
|
- clientNames.add(clientName);
|
|
|
- concept.setClientNames(clientNames);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- return concepts;
|
|
|
- }
|
|
|
+// /**
|
|
|
+// * 添加外部名称(调用方)
|
|
|
+// *
|
|
|
+// * @param concepts
|
|
|
+// * @param hosCode
|
|
|
+// * @param type
|
|
|
+// * @return
|
|
|
+// */
|
|
|
+// public List<ConceptPushDTO> addClientName(List<ConceptPushDTO> concepts, String hosCode, Integer type) {
|
|
|
+// HosCodeVO hosCodeVO = new HosCodeVO();
|
|
|
+// hosCodeVO.setHosCode(hosCode);
|
|
|
+// LisConfigVO lisConfigVO = new LisConfigVO();
|
|
|
+// lisConfigVO.setHosCode(hosCode);
|
|
|
+// List<String> uniqueNameList = concepts
|
|
|
+// .stream()
|
|
|
+// .map(concept -> concept.getName())
|
|
|
+// .collect(Collectors.toList());
|
|
|
+// lisConfigVO.setUniqueNameList(uniqueNameList);
|
|
|
+// if (type.equals(ConceptTypeEnum.Lis.getKey())) {
|
|
|
+// RespDTO<Map<String, List<String>>> lisRes
|
|
|
+// = tranServiceClient.getLisConfigByUniqueNameAndHosCode(lisConfigVO);
|
|
|
+// if (RespDTOUtil.respIsOK(lisRes)) {
|
|
|
+// Map<String, List<String>> lisMappingByUniqueName = lisRes.data;
|
|
|
+// for (ConceptPushDTO concept : concepts) {
|
|
|
+// List<String> clientNames = lisMappingByUniqueName.get(concept.getName());
|
|
|
+// if (ListUtil.isNotEmpty(clientNames)) {
|
|
|
+// concept.setClientNames(clientNames);
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
+// } else if (type.equals(ConceptTypeEnum.Pacs.getKey())) {
|
|
|
+// RespDTO<Map<String, List<String>>> pacsRes
|
|
|
+// = tranServiceClient.getPacsConfigByUniqueNameAndHosCode(hosCodeVO);
|
|
|
+// if (RespDTOUtil.respIsOK(pacsRes)) {
|
|
|
+// Map<String, List<String>> pacsConfigMapByUniqueName = pacsRes.data;
|
|
|
+// for (ConceptPushDTO concept : concepts) {
|
|
|
+// List<String> clientNames = pacsConfigMapByUniqueName.get(concept.getName());
|
|
|
+// if (ListUtil.isNotEmpty(clientNames)) {
|
|
|
+// concept.setClientNames(clientNames);
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
+// } else if (type.equals(ConceptTypeEnum.Disease.getKey())) {
|
|
|
+// RespDTO<Map<String, String>> disRes = tranServiceClient.getDiseaseIcdByHosCode(hosCodeVO);
|
|
|
+// if (RespDTOUtil.respIsOK(disRes)) {
|
|
|
+// Map<String, String> disMap = disRes.data;
|
|
|
+// for (ConceptPushDTO concept : concepts) {
|
|
|
+// String clientName = disMap.get(concept.getName());
|
|
|
+// if (StringUtil.isNotBlank(clientName)) {
|
|
|
+// List<String> clientNames = Lists.newLinkedList();
|
|
|
+// clientNames.add(clientName);
|
|
|
+// concept.setClientNames(clientNames);
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
+// return concepts;
|
|
|
+// }
|
|
|
|
|
|
/**
|
|
|
* 外部化验返回时,公表匹配出套餐,保留套餐,删除细项;否则保留公表
|