Browse Source

1、术语关联映射

zhaops 3 years ago
parent
commit
f239daff9e

+ 13 - 3
cdssman-service/src/main/java/com/diagbot/facade/MappingConfigFacade.java

@@ -510,9 +510,10 @@ public class MappingConfigFacade extends MappingConfigServiceImpl {
      * @param hisNames
      * @param hisNames
      * @param type
      * @param type
      * @param hospitalId
      * @param hospitalId
+     * @param status     标准术语启用禁用标志
      * @return
      * @return
      */
      */
-    public Map<String, Map<String, Map<String, List<String>>>> groupByHisNameWithName(List<String> hisNames, Integer type, Long hospitalId) {
+    public Map<String, Map<String, Map<String, List<String>>>> groupByHisNameWithName(List<String> hisNames, Integer type, Long hospitalId, Integer status) {
         Map<String, Map<String, Map<String, List<String>>>> retMap = new HashMap<>();
         Map<String, Map<String, Map<String, List<String>>>> retMap = new HashMap<>();
         Map<String, Map<String, Map<Long, List<Long>>>> idMap = groupByHisNameWithId(hisNames, type, hospitalId);
         Map<String, Map<String, Map<Long, List<Long>>>> idMap = groupByHisNameWithId(hisNames, type, hospitalId);
 
 
@@ -540,6 +541,7 @@ public class MappingConfigFacade extends MappingConfigServiceImpl {
         conceptVO.setSource(-1);
         conceptVO.setSource(-1);
         conceptVO.setType(type);
         conceptVO.setType(type);
         conceptVO.setIds(ids);
         conceptVO.setIds(ids);
+        conceptVO.setStatus(status);
         RespDTO<List<IndexBatchDTO>> respDTO = cdssCoreClient.getConceptNames(conceptVO);
         RespDTO<List<IndexBatchDTO>> respDTO = cdssCoreClient.getConceptNames(conceptVO);
         RespDTOUtil.respNGDealCover(respDTO, "标准术语校验失败");
         RespDTOUtil.respNGDealCover(respDTO, "标准术语校验失败");
         List<IndexBatchDTO> indexList = respDTO.data;
         List<IndexBatchDTO> indexList = respDTO.data;
@@ -558,11 +560,19 @@ public class MappingConfigFacade extends MappingConfigServiceImpl {
                                 if (formConceptId == null) {
                                 if (formConceptId == null) {
                                     forms.add("");
                                     forms.add("");
                                 } else {
                                 } else {
-                                    forms.add(idNameMap.get(formConceptId));
+                                    if (idNameMap.containsKey(formConceptId)) {
+                                        forms.add(idNameMap.get(formConceptId));
+                                    } else {
+                                        forms.add("");
+                                    }
                                 }
                                 }
                             }
                             }
                             forms = forms.stream().distinct().collect(Collectors.toList());
                             forms = forms.stream().distinct().collect(Collectors.toList());
-                            thirdMap.put(idNameMap.get(thirdEntry.getKey()), forms);
+                            if (idNameMap.containsKey(thirdEntry.getKey())) {
+                                thirdMap.put(idNameMap.get(thirdEntry.getKey()), forms);
+                            } /*else {
+                                thirdMap.put("", Lists.newLinkedList());
+                            }*/
                         }
                         }
                     }
                     }
                     subMap.put(subEntry.getKey(), thirdMap);
                     subMap.put(subEntry.getKey(), thirdMap);