|
@@ -98,31 +98,43 @@ public class MappingConfigFacade extends MappingConfigServiceImpl {
|
|
|
RespDTO<List<IndexBatchDTO>> respDTO = null;
|
|
|
|
|
|
//todo 标准词转conceptId
|
|
|
+ List<Long> conceptIds = Lists.newLinkedList();
|
|
|
if (StringUtil.isNotBlank(mappingConfigPageVO.getUniqueName())) {
|
|
|
filterVO.setInputStr(mappingConfigPageVO.getUniqueName());
|
|
|
respDTO = cdssCoreClient.filter(filterVO);
|
|
|
- if (RespDTOUtil.respIsOK(respDTO) && ListUtil.isNotEmpty(respDTO.data)) {
|
|
|
- mappingConfigPageVO.setConceptIds(respDTO.data
|
|
|
- .stream()
|
|
|
- .map(IndexBatchDTO::getId)
|
|
|
- .distinct()
|
|
|
- .collect(Collectors.toList()));
|
|
|
+ if (RespDTOUtil.respIsOK(respDTO)) {
|
|
|
+ if (ListUtil.isNotEmpty(respDTO.data)) {
|
|
|
+ conceptIds.addAll(respDTO.data
|
|
|
+ .stream()
|
|
|
+ .map(IndexBatchDTO::getId)
|
|
|
+ .distinct()
|
|
|
+ .collect(Collectors.toList()));
|
|
|
+ } else {
|
|
|
+ conceptIds.add(-1L);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
+ mappingConfigPageVO.setConceptIds(conceptIds);
|
|
|
|
|
|
//todo 药品剂型转 conceptId
|
|
|
+ List<Long> formConceptIds = Lists.newLinkedList();
|
|
|
if (StringUtil.isNotBlank(mappingConfigPageVO.getForm())) {
|
|
|
filterVO.setInputStr(mappingConfigPageVO.getForm());
|
|
|
respDTO = cdssCoreClient.filter(filterVO);
|
|
|
- if (RespDTOUtil.respIsOK(respDTO) && ListUtil.isNotEmpty(respDTO.data)) {
|
|
|
- mappingConfigPageVO.setFormConceptIds(respDTO.data
|
|
|
- .stream()
|
|
|
- .filter(i -> i.getType().equals(ConceptTypeEnum.Form.getKey()))
|
|
|
- .map(IndexBatchDTO::getId)
|
|
|
- .distinct()
|
|
|
- .collect(Collectors.toList()));
|
|
|
+ if (RespDTOUtil.respIsOK(respDTO)) {
|
|
|
+ if (ListUtil.isNotEmpty(respDTO.data)) {
|
|
|
+ formConceptIds.addAll(respDTO.data
|
|
|
+ .stream()
|
|
|
+ .filter(i -> i.getType().equals(ConceptTypeEnum.Form.getKey()))
|
|
|
+ .map(IndexBatchDTO::getId)
|
|
|
+ .distinct()
|
|
|
+ .collect(Collectors.toList()));
|
|
|
+ } else {
|
|
|
+ formConceptIds.add(-1L);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
+ mappingConfigPageVO.setFormConceptIds(formConceptIds);
|
|
|
|
|
|
//todo 多条匹配
|
|
|
if (mappingConfigPageVO.getIsMatch() != null && mappingConfigPageVO.getIsMatch().equals(2)) {
|
|
@@ -769,6 +781,7 @@ public class MappingConfigFacade extends MappingConfigServiceImpl {
|
|
|
|
|
|
//添加编码
|
|
|
retList = addCodes(retList, type);
|
|
|
+ retList = retList.stream().distinct().collect(Collectors.toList());
|
|
|
return retList;
|
|
|
}
|
|
|
|