瀏覽代碼

术语映射预匹配

zhaops 4 年之前
父節點
當前提交
8e4527d6ea

+ 11 - 4
cdssman-service/src/main/java/com/diagbot/facade/DeptConfigFacade.java

@@ -474,7 +474,8 @@ public class DeptConfigFacade {
      */
     public List<DeptConfig> dataProcess(List<DeptConfig> originList) {
         List<DeptConfig> retList = Lists.newLinkedList();
-        Map<String, List<DeptConfig>> allMap = getAll();
+        List<String> hisNameList = originList.stream().map(i -> i.getHisName()).distinct().collect(Collectors.toList());
+        Map<String, List<DeptConfig>> allMap = getAll(hisNameList);
 
         //去除空格
         originList.forEach(item -> {
@@ -487,10 +488,11 @@ public class DeptConfigFacade {
             for (Map.Entry<String, List<DeptConfig>> entry : allMap.entrySet()) {
                 if (ListUtil.isNotEmpty(entry.getValue())) {
                     precUniqueName.addAll(entry.getValue().stream().map(i -> i.getUniqueName()).collect(Collectors.toList()));
-
                 }
             }
         }
+        precUniqueName = precUniqueName.stream().distinct().collect(Collectors.toList());
+
         ConceptVO conceptVO = new ConceptVO();
         conceptVO.setNames(precUniqueName);
         conceptVO.setType(ConceptTypeEnum.Dept.getKey());
@@ -529,9 +531,14 @@ public class DeptConfigFacade {
      *
      * @return
      */
-    public Map<String, List<DeptConfig>> getAll() {
+    public Map<String, List<DeptConfig>> getAll(List<String> hisNameList) {
         Map<String, List<DeptConfig>> retMap = new HashMap<>();
-        List<DeptConfig> records = deptConfigService.list();
+        QueryWrapper<DeptConfig> queryWrapper = new QueryWrapper<>();
+        if (ListUtil.isNotEmpty(hisNameList)) {
+            queryWrapper.eq("his_name", hisNameList);
+        }
+        List<DeptConfig> records = deptConfigService.list(queryWrapper);
+
         if (ListUtil.isEmpty(records)) {
             return retMap;
         }

+ 13 - 5
cdssman-service/src/main/java/com/diagbot/facade/DiseaseConfigFacade.java

@@ -417,10 +417,11 @@ public class DiseaseConfigFacade {
 
     /**
      * 导入数据预匹配
+     *
      * @param file
      * @param response
      */
-    public void precDataMatch(MultipartFile file,HttpServletResponse response) {
+    public void precDataMatch(MultipartFile file, HttpServletResponse response) {
         List<DiseaseConfig> originList = ExcelUtils.importExcel(file, 0, 1, DiseaseConfig.class);
         List<DiseaseConfig> retList = dataProcess(originList);
 
@@ -448,7 +449,8 @@ public class DiseaseConfigFacade {
      */
     public List<DiseaseConfig> dataProcess(List<DiseaseConfig> originList) {
         List<DiseaseConfig> retList = Lists.newLinkedList();
-        Map<String, List<DiseaseConfig>> allMap = getAll();
+        List<String> hisNameList = originList.stream().map(i -> i.getHisName()).distinct().collect(Collectors.toList());
+        Map<String, List<DiseaseConfig>> allMap = getAll(hisNameList);
 
         //去除空格
         originList.forEach(item -> {
@@ -461,10 +463,11 @@ public class DiseaseConfigFacade {
             for (Map.Entry<String, List<DiseaseConfig>> entry : allMap.entrySet()) {
                 if (ListUtil.isNotEmpty(entry.getValue())) {
                     precUniqueName.addAll(entry.getValue().stream().map(i -> i.getUniqueName()).collect(Collectors.toList()));
-
                 }
             }
         }
+        precUniqueName = precUniqueName.stream().distinct().collect(Collectors.toList());
+
         ConceptVO conceptVO = new ConceptVO();
         conceptVO.setNames(precUniqueName);
         conceptVO.setType(ConceptTypeEnum.Disease.getKey());
@@ -499,11 +502,16 @@ public class DiseaseConfigFacade {
 
     /**
      * 获取所有医院映射数据
+     *
      * @return
      */
-    public Map<String,List<DiseaseConfig>> getAll() {
+    public Map<String, List<DiseaseConfig>> getAll(List<String> hisNameList) {
         Map<String, List<DiseaseConfig>> retMap = new HashMap<>();
-        List<DiseaseConfig> records = diseaseConfigService.list();
+        QueryWrapper<DiseaseConfig> queryWrapper = new QueryWrapper<>();
+        if (ListUtil.isNotEmpty(hisNameList)) {
+            queryWrapper.eq("his_name", hisNameList);
+        }
+        List<DiseaseConfig> records = diseaseConfigService.list(queryWrapper);
         if (ListUtil.isEmpty(records)) {
             return retMap;
         }

+ 10 - 4
cdssman-service/src/main/java/com/diagbot/facade/DrugConfigFacade.java

@@ -673,7 +673,8 @@ public class DrugConfigFacade {
      */
     public List<DrugConfig> dataProcess(List<DrugConfig> originList) {
         List<DrugConfig> retList = Lists.newLinkedList();
-        Map<String, List<DrugConfig>> allMap = getAll();
+        List<String> hisNameList = originList.stream().map(i -> i.getHisName()).distinct().collect(Collectors.toList());
+        Map<String, List<DrugConfig>> allMap = getAll(hisNameList);
 
         //药品剂型
         List<DictionaryInfoDTO> dicTypeMappingList = dictionaryFacade.getListByGroupType(9);
@@ -694,10 +695,11 @@ public class DrugConfigFacade {
             for (Map.Entry<String, List<DrugConfig>> entry : allMap.entrySet()) {
                 if (ListUtil.isNotEmpty(entry.getValue())) {
                     precUniqueName.addAll(entry.getValue().stream().map(i -> i.getUniqueName()).collect(Collectors.toList()));
-
                 }
             }
         }
+        precUniqueName = precUniqueName.stream().distinct().collect(Collectors.toList());
+
         ConceptVO conceptVO = new ConceptVO();
         conceptVO.setNames(precUniqueName);
         conceptVO.setType(ConceptTypeEnum.Drug.getKey());
@@ -741,9 +743,13 @@ public class DrugConfigFacade {
      * 获取所有医院映射数据
      * @return
      */
-    public Map<String,List<DrugConfig>> getAll() {
+    public Map<String,List<DrugConfig>> getAll(List<String> hisNameList) {
         Map<String, List<DrugConfig>> retMap = new HashMap<>();
-        List<DrugConfig> records = drugConfigService.list();
+        QueryWrapper<DrugConfig> queryWrapper = new QueryWrapper<>();
+        if (ListUtil.isNotEmpty(hisNameList)) {
+            queryWrapper.eq("his_name", hisNameList);
+        }
+        List<DrugConfig> records = drugConfigService.list(queryWrapper);
         if (ListUtil.isEmpty(records)) {
             return retMap;
         }

+ 10 - 4
cdssman-service/src/main/java/com/diagbot/facade/LisConfigFacade.java

@@ -522,7 +522,8 @@ public class LisConfigFacade{
      */
     public List<LisConfig> dataProcess(List<LisConfig> originList) {
         List<LisConfig> retList = Lists.newLinkedList();
-        Map<String, Map<String, List<LisConfig>>> allMap = getAll();
+        List<String> hisNameList = originList.stream().map(i -> i.getHisName()).distinct().collect(Collectors.toList());
+        Map<String, Map<String, List<LisConfig>>> allMap = getAll(hisNameList);
 
         //去除空格
         originList.forEach(item -> {
@@ -539,11 +540,12 @@ public class LisConfigFacade{
                 for (Map.Entry<String, List<LisConfig>> subEntry : entry.getValue().entrySet()) {
                     if (ListUtil.isNotEmpty(subEntry.getValue())) {
                         precUniqueName.addAll(subEntry.getValue().stream().map(i -> i.getUniqueName()).collect(Collectors.toList()));
-
                     }
                 }
             }
         }
+        precUniqueName = precUniqueName.stream().distinct().collect(Collectors.toList());
+
         ConceptVO conceptVO = new ConceptVO();
         conceptVO.setNames(precUniqueName);
         conceptVO.setType(ConceptTypeEnum.LisPack.getKey());
@@ -590,9 +592,13 @@ public class LisConfigFacade{
      * 获取所有医院映射数据
      * @return
      */
-    public Map<String,Map<String,List<LisConfig>>>  getAll() {
+    public Map<String,Map<String,List<LisConfig>>>  getAll(List<String> hisNameList) {
         Map<String, Map<String, List<LisConfig>>> retMap = new HashMap<>();
-        List<LisConfig> records = lisConfigService.list();
+        QueryWrapper<LisConfig> queryWrapper = new QueryWrapper<>();
+        if (ListUtil.isNotEmpty(hisNameList)) {
+            queryWrapper.eq("his_name", hisNameList);
+        }
+        List<LisConfig> records = lisConfigService.list(queryWrapper);
         if (ListUtil.isEmpty(records)) {
             return retMap;
         }

+ 10 - 4
cdssman-service/src/main/java/com/diagbot/facade/OperationConfigFacade.java

@@ -457,7 +457,8 @@ public class OperationConfigFacade {
      */
     public List<OperationConfig> dataProcess(List<OperationConfig> originList) {
         List<OperationConfig> retList = Lists.newLinkedList();
-        Map<String, List<OperationConfig>> allMap = getAll();
+        List<String> hisNameList = originList.stream().map(i -> i.getHisName()).distinct().collect(Collectors.toList());
+        Map<String, List<OperationConfig>> allMap = getAll(hisNameList);
 
         //去除空格
         originList.forEach(item -> {
@@ -470,10 +471,11 @@ public class OperationConfigFacade {
             for (Map.Entry<String, List<OperationConfig>> entry : allMap.entrySet()) {
                 if (ListUtil.isNotEmpty(entry.getValue())) {
                     precUniqueName.addAll(entry.getValue().stream().map(i -> i.getUniqueName()).collect(Collectors.toList()));
-
                 }
             }
         }
+        precUniqueName = precUniqueName.stream().distinct().collect(Collectors.toList());
+
         ConceptVO conceptVO = new ConceptVO();
         conceptVO.setNames(precUniqueName);
         conceptVO.setType(ConceptTypeEnum.Opeartion.getKey());
@@ -510,9 +512,13 @@ public class OperationConfigFacade {
      * 获取所有医院映射数据
      * @return
      */
-    public Map<String,List<OperationConfig>> getAll() {
+    public Map<String,List<OperationConfig>> getAll(List<String> hisNameList) {
         Map<String, List<OperationConfig>> retMap = new HashMap<>();
-        List<OperationConfig> records = operationConfigService.list();
+        QueryWrapper<OperationConfig> queryWrapper = new QueryWrapper<>();
+        if (ListUtil.isNotEmpty(hisNameList)) {
+            queryWrapper.eq("his_name", hisNameList);
+        }
+        List<OperationConfig> records = operationConfigService.list(queryWrapper);
         if (ListUtil.isEmpty(records)) {
             return retMap;
         }

+ 13 - 5
cdssman-service/src/main/java/com/diagbot/facade/PacsConfigFacade.java

@@ -424,10 +424,11 @@ public class PacsConfigFacade {
 
     /**
      * 导入数据预匹配
+     *
      * @param file
      * @param response
      */
-    public void precDataMatch(MultipartFile file,HttpServletResponse response) {
+    public void precDataMatch(MultipartFile file, HttpServletResponse response) {
         List<PacsConfig> originList = ExcelUtils.importExcel(file, 0, 1, PacsConfig.class);
         List<PacsConfig> retList = dataProcess(originList);
 
@@ -455,7 +456,8 @@ public class PacsConfigFacade {
      */
     public List<PacsConfig> dataProcess(List<PacsConfig> originList) {
         List<PacsConfig> retList = Lists.newLinkedList();
-        Map<String, List<PacsConfig>> allMap = getAll();
+        List<String> hisNameList = originList.stream().map(i -> i.getHisName()).distinct().collect(Collectors.toList());
+        Map<String, List<PacsConfig>> allMap = getAll(hisNameList);
 
         //去除空格
         originList.forEach(item -> {
@@ -468,10 +470,11 @@ public class PacsConfigFacade {
             for (Map.Entry<String, List<PacsConfig>> entry : allMap.entrySet()) {
                 if (ListUtil.isNotEmpty(entry.getValue())) {
                     precUniqueName.addAll(entry.getValue().stream().map(i -> i.getUniqueName()).collect(Collectors.toList()));
-
                 }
             }
         }
+        precUniqueName = precUniqueName.stream().distinct().collect(Collectors.toList());
+
         ConceptVO conceptVO = new ConceptVO();
         conceptVO.setNames(precUniqueName);
         conceptVO.setType(ConceptTypeEnum.Pacs.getKey());
@@ -506,11 +509,16 @@ public class PacsConfigFacade {
 
     /**
      * 获取所有医院映射数据
+     *
      * @return
      */
-    public Map<String,List<PacsConfig>> getAll() {
+    public Map<String, List<PacsConfig>> getAll(List<String> hisNameList) {
         Map<String, List<PacsConfig>> retMap = new HashMap<>();
-        List<PacsConfig> records = pacsConfigService.list();
+        QueryWrapper<PacsConfig> queryWrapper = new QueryWrapper<>();
+        if (ListUtil.isNotEmpty(hisNameList)) {
+            queryWrapper.eq("his_name", hisNameList);
+        }
+        List<PacsConfig> records = pacsConfigService.list(queryWrapper);
         if (ListUtil.isEmpty(records)) {
             return retMap;
         }

+ 13 - 5
cdssman-service/src/main/java/com/diagbot/facade/TransfusionConfigFacade.java

@@ -424,10 +424,11 @@ public class TransfusionConfigFacade {
 
     /**
      * 导入数据预匹配
+     *
      * @param file
      * @param response
      */
-    public void precDataMatch(MultipartFile file,HttpServletResponse response) {
+    public void precDataMatch(MultipartFile file, HttpServletResponse response) {
         List<TransfusionConfig> originList = ExcelUtils.importExcel(file, 0, 1, TransfusionConfig.class);
         List<TransfusionConfig> retList = dataProcess(originList);
 
@@ -455,7 +456,8 @@ public class TransfusionConfigFacade {
      */
     public List<TransfusionConfig> dataProcess(List<TransfusionConfig> originList) {
         List<TransfusionConfig> retList = Lists.newLinkedList();
-        Map<String, List<TransfusionConfig>> allMap = getAll();
+        List<String> hisNameList = originList.stream().map(i -> i.getHisName()).distinct().collect(Collectors.toList());
+        Map<String, List<TransfusionConfig>> allMap = getAll(hisNameList);
 
         //去除空格
         originList.forEach(item -> {
@@ -468,10 +470,11 @@ public class TransfusionConfigFacade {
             for (Map.Entry<String, List<TransfusionConfig>> entry : allMap.entrySet()) {
                 if (ListUtil.isNotEmpty(entry.getValue())) {
                     precUniqueName.addAll(entry.getValue().stream().map(i -> i.getUniqueName()).collect(Collectors.toList()));
-
                 }
             }
         }
+        precUniqueName = precUniqueName.stream().distinct().collect(Collectors.toList());
+
         ConceptVO conceptVO = new ConceptVO();
         conceptVO.setNames(precUniqueName);
         conceptVO.setType(ConceptTypeEnum.Transfusion.getKey());
@@ -498,11 +501,16 @@ public class TransfusionConfigFacade {
 
     /**
      * 获取所有医院映射数据
+     *
      * @return
      */
-    public Map<String,List<TransfusionConfig>> getAll() {
+    public Map<String, List<TransfusionConfig>> getAll(List<String> hisNameList) {
         Map<String, List<TransfusionConfig>> retMap = new HashMap<>();
-        List<TransfusionConfig> records = transfusionConfigService.list();
+        QueryWrapper<TransfusionConfig> queryWrapper = new QueryWrapper<>();
+        if (ListUtil.isNotEmpty(hisNameList)) {
+            queryWrapper.eq("his_name", hisNameList);
+        }
+        List<TransfusionConfig> records = transfusionConfigService.list(queryWrapper);
         if (ListUtil.isEmpty(records)) {
             return retMap;
         }