|
@@ -234,61 +234,76 @@ public class ConceptDetailFacade extends ConceptDetailServiceImpl {
|
|
|
List<ConceptIntroduceVO> retList = Lists.newLinkedList();
|
|
|
List<String> nameList = Lists.newLinkedList();
|
|
|
nameList.add(connectIntroduceVO.getName());
|
|
|
+ if (!connectIntroduceVO.getSysType().equals(SysTypeEnum.LTAPI_SERVICE.getKey())) {
|
|
|
+ ConceptIntroduceVO conceptIntroduceVO = new ConceptIntroduceVO();
|
|
|
+ BeanUtil.copyProperties(connectIntroduceVO, conceptIntroduceVO);
|
|
|
+ conceptIntroduceVO.setLibType(ParamConvertUtil.conceptConvert2Lib(conceptIntroduceVO.getType()));
|
|
|
+ retList.add(conceptIntroduceVO);
|
|
|
+ return retList;
|
|
|
+ }
|
|
|
+
|
|
|
//是否对接
|
|
|
Boolean isConnect = transferFacade.isConnect(connectIntroduceVO.getHosCode(), connectIntroduceVO.getSysType());
|
|
|
- if (isConnect && connectIntroduceVO.getSysType().equals(SysTypeEnum.LTAPI_SERVICE.getKey())) {
|
|
|
- if (connectIntroduceVO.getType() != null) {
|
|
|
- if (connectIntroduceVO.getType().equals(ConceptTypeEnum.Lis.getKey())) {
|
|
|
- Map<String, Map<String, String>> lisConfigMap = transferFacade.getLisConfigByMealNameAndHosCode(nameList, connectIntroduceVO.getHosCode());
|
|
|
- if (lisConfigMap.get(connectIntroduceVO.getName()) != null) {
|
|
|
- Map<String, String> itemMap = lisConfigMap.get(connectIntroduceVO.getName());
|
|
|
- if (StringUtil.isBlank(connectIntroduceVO.getDetailName())) {
|
|
|
- connectIntroduceVO.setDetailName("");
|
|
|
- }
|
|
|
- if (itemMap.get(connectIntroduceVO.getDetailName()) != null) {
|
|
|
+ if (isConnect) {
|
|
|
+ if (connectIntroduceVO.getType().equals(ConceptTypeEnum.Lis.getKey())) {
|
|
|
+ Map<String, Map<String, List<String>>> lisConfigMap
|
|
|
+ = transferFacade.getLisConfigByMealNameAndHosCode(nameList, connectIntroduceVO.getHosCode());
|
|
|
+ if (lisConfigMap.get(connectIntroduceVO.getName()) != null) {
|
|
|
+ Map<String, List<String>> itemMap = lisConfigMap.get(connectIntroduceVO.getName());
|
|
|
+ if (StringUtil.isBlank(connectIntroduceVO.getDetailName())) {
|
|
|
+ connectIntroduceVO.setDetailName("");
|
|
|
+ }
|
|
|
+ List<String> uniqueNameList = itemMap.get(connectIntroduceVO.getDetailName());
|
|
|
+ if (ListUtil.isNotEmpty(uniqueNameList)) {
|
|
|
+ for (String uniqueName : uniqueNameList) {
|
|
|
ConceptIntroduceVO conceptIntroduceVO = new ConceptIntroduceVO();
|
|
|
BeanUtil.copyProperties(connectIntroduceVO, conceptIntroduceVO);
|
|
|
- conceptIntroduceVO.setName(itemMap.get(connectIntroduceVO.getDetailName()));
|
|
|
+ conceptIntroduceVO.setName(uniqueName);
|
|
|
conceptIntroduceVO.setType(ConceptTypeEnum.LIS_TABLES.getKey());
|
|
|
conceptIntroduceVO.setLibType(LexiconTypeEnum.LIS_TABLES.getKey());
|
|
|
retList.add(conceptIntroduceVO);
|
|
|
}
|
|
|
}
|
|
|
- } else if (connectIntroduceVO.getType().equals(ConceptTypeEnum.Pacs.getKey())) {
|
|
|
- PacsConfigVO pacsConfigVO = new PacsConfigVO();
|
|
|
- pacsConfigVO.setHosCode(connectIntroduceVO.getHosCode());
|
|
|
- pacsConfigVO.setMealNameList(nameList);
|
|
|
- RespDTO<Map<String, List<String>>> pacsRespDTO = tranServiceClient.getPacsConfig(pacsConfigVO);
|
|
|
- if (RespDTOUtil.respIsOK(pacsRespDTO)) {
|
|
|
- Map<String, List<String>> pacsMap = pacsRespDTO.data;
|
|
|
- for (String pacsStr : pacsMap.get(connectIntroduceVO.getName())) {
|
|
|
- ConceptIntroduceVO conceptIntroduceVO = new ConceptIntroduceVO();
|
|
|
- BeanUtil.copyProperties(connectIntroduceVO, conceptIntroduceVO);
|
|
|
- conceptIntroduceVO.setName(pacsStr);
|
|
|
- conceptIntroduceVO.setType(ConceptTypeEnum.Pacs.getKey());
|
|
|
- conceptIntroduceVO.setLibType(LexiconTypeEnum.PACS_ITEMS.getKey());
|
|
|
- retList.add(conceptIntroduceVO);
|
|
|
- }
|
|
|
+ }
|
|
|
+ } else if (connectIntroduceVO.getType().equals(ConceptTypeEnum.Pacs.getKey())) {
|
|
|
+ PacsConfigVO pacsConfigVO = new PacsConfigVO();
|
|
|
+ pacsConfigVO.setHosCode(connectIntroduceVO.getHosCode());
|
|
|
+ pacsConfigVO.setMealNameList(nameList);
|
|
|
+ RespDTO<Map<String, List<String>>> pacsRespDTO = tranServiceClient.getPacsConfig(pacsConfigVO);
|
|
|
+ if (RespDTOUtil.respIsOK(pacsRespDTO)) {
|
|
|
+ Map<String, List<String>> pacsMap = pacsRespDTO.data;
|
|
|
+ for (String pacsStr : pacsMap.get(connectIntroduceVO.getName())) {
|
|
|
+ ConceptIntroduceVO conceptIntroduceVO = new ConceptIntroduceVO();
|
|
|
+ BeanUtil.copyProperties(connectIntroduceVO, conceptIntroduceVO);
|
|
|
+ conceptIntroduceVO.setName(pacsStr);
|
|
|
+ conceptIntroduceVO.setType(ConceptTypeEnum.Pacs.getKey());
|
|
|
+ conceptIntroduceVO.setLibType(LexiconTypeEnum.PACS_ITEMS.getKey());
|
|
|
+ retList.add(conceptIntroduceVO);
|
|
|
}
|
|
|
- } else if (connectIntroduceVO.getType().equals(ConceptTypeEnum.Disease.getKey())) {
|
|
|
- DiseaseIcdVO diseaseIcdVO = new DiseaseIcdVO();
|
|
|
- diseaseIcdVO.setHosCode(connectIntroduceVO.getHosCode());
|
|
|
- diseaseIcdVO.setDiseaseNameList(nameList);
|
|
|
+ }
|
|
|
+ } else if (connectIntroduceVO.getType().equals(ConceptTypeEnum.Disease.getKey())) {
|
|
|
+ DiseaseIcdVO diseaseIcdVO = new DiseaseIcdVO();
|
|
|
+ diseaseIcdVO.setHosCode(connectIntroduceVO.getHosCode());
|
|
|
+ diseaseIcdVO.setDiseaseNameList(nameList);
|
|
|
|
|
|
- Map<String, String> disMap = new LinkedHashMap<>();
|
|
|
- RespDTO<Map<String, String>> disRespDTO = tranServiceClient.getDiseaseIcdMap(diseaseIcdVO);
|
|
|
- if (RespDTOUtil.respIsOK(disRespDTO)) {
|
|
|
- disMap = disRespDTO.data;
|
|
|
- if (disMap.get(connectIntroduceVO.getName()) != null) {
|
|
|
- ConceptIntroduceVO conceptIntroduceVO = new ConceptIntroduceVO();
|
|
|
- BeanUtil.copyProperties(connectIntroduceVO, conceptIntroduceVO);
|
|
|
- conceptIntroduceVO.setName(disMap.get(connectIntroduceVO.getName()));
|
|
|
- conceptIntroduceVO.setType(ConceptTypeEnum.Disease.getKey());
|
|
|
- conceptIntroduceVO.setLibType(LexiconTypeEnum.DIAGNOSIS.getKey());
|
|
|
- retList.add(conceptIntroduceVO);
|
|
|
- }
|
|
|
+ Map<String, String> disMap = new LinkedHashMap<>();
|
|
|
+ RespDTO<Map<String, String>> disRespDTO = tranServiceClient.getDiseaseIcdMap(diseaseIcdVO);
|
|
|
+ if (RespDTOUtil.respIsOK(disRespDTO)) {
|
|
|
+ disMap = disRespDTO.data;
|
|
|
+ if (disMap.get(connectIntroduceVO.getName()) != null) {
|
|
|
+ ConceptIntroduceVO conceptIntroduceVO = new ConceptIntroduceVO();
|
|
|
+ BeanUtil.copyProperties(connectIntroduceVO, conceptIntroduceVO);
|
|
|
+ conceptIntroduceVO.setName(disMap.get(connectIntroduceVO.getName()));
|
|
|
+ conceptIntroduceVO.setType(ConceptTypeEnum.Disease.getKey());
|
|
|
+ conceptIntroduceVO.setLibType(LexiconTypeEnum.DIAGNOSIS.getKey());
|
|
|
+ retList.add(conceptIntroduceVO);
|
|
|
}
|
|
|
}
|
|
|
+ } else {
|
|
|
+ ConceptIntroduceVO conceptIntroduceVO = new ConceptIntroduceVO();
|
|
|
+ BeanUtil.copyProperties(connectIntroduceVO, conceptIntroduceVO);
|
|
|
+ conceptIntroduceVO.setLibType(ParamConvertUtil.conceptConvert2Lib(conceptIntroduceVO.getType()));
|
|
|
+ retList.add(conceptIntroduceVO);
|
|
|
}
|
|
|
}
|
|
|
return retList;
|