zhaops преди 4 години
родител
ревизия
147eda3fe3

+ 1 - 0
src/main/java/com/diagbot/config/ResourceServerConfigurer.java

@@ -117,6 +117,7 @@ public class ResourceServerConfigurer extends ResourceServerConfigurerAdapter {
                 .antMatchers("/sys/plan/revStopPlans").permitAll()
                 .antMatchers("/sys/tokenHospital/getTokenHospital").permitAll()
                 .antMatchers("/demo/retrieval/index").permitAll()
+                .antMatchers("/graph/conceptInfo/staticKnowledgeIndex").permitAll()
                 .antMatchers("/sys/planDetail/getPlanDetailDatas").permitAll()
                 .antMatchers("/sys/planDetail/savePlanDetails").permitAll()
                 .antMatchers("/sys/planDetail/cancelPlanDetails").permitAll()

+ 1 - 0
src/main/java/com/diagbot/config/security/UrlAccessDecisionManager.java

@@ -159,6 +159,7 @@ public class UrlAccessDecisionManager implements AccessDecisionManager {
                 || matchers("/sys/plan/revStopPlans", request)
                 || matchers("/sys/tokenHospital/getTokenHospital", request)
                 || matchers("/demo/retrieval/index", request)
+                || matchers("/graph/conceptInfo/staticKnowledgeIndex", request)
                 || matchers("/sys/planDetail/getPlanDetailDatas", request)
                 || matchers("/sys/planDetail/savePlanDetails", request)
                 || matchers("/sys/planDetail/cancelPlanDetails", request)

+ 41 - 0
src/main/java/com/diagbot/dto/StaticKnowledgeDTO.java

@@ -0,0 +1,41 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/8/20 15:51
+ */
+@Getter
+@Setter
+public class StaticKnowledgeDTO {
+    /**
+     * 标准术语
+     */
+    private String name;
+
+    /**
+     * 词性
+     */
+    private String type;
+
+    /**
+     * 临床路径名称
+     */
+    private String clinicalPathwayName;
+
+    /**
+     * 注意事项名称
+     */
+    private String noticeName;
+
+    /**
+     * 静态知识明细
+     */
+    private Map<String,List<StaticKnowledgeDetailDTO>> details;
+}

+ 43 - 0
src/main/java/com/diagbot/dto/StaticKnowledgeDetailDTO.java

@@ -0,0 +1,43 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/8/20 15:52
+ */
+@Getter
+@Setter
+public class StaticKnowledgeDetailDTO {
+    /**
+     * 提示概念id
+     */
+    private Long conceptId;
+
+    /**
+     * 提示明细标题
+     */
+    private String title;
+
+    /**
+     * 提示明细内容
+     */
+    private String content;
+
+    /**
+     * 纯文本
+     */
+    private String text;
+
+    /**
+     * 提示明细序号
+     */
+    private Integer orderNo;
+
+    /**
+     * 内容类型(多选):1-化验、辅检、手术和操作、诊断、药品静态信息,2-注意事项,3-临床路径
+     */
+    private String concentType;
+}

+ 4 - 3
src/main/java/com/diagbot/enums/ConceptTypeEnum.java

@@ -12,9 +12,10 @@ public enum ConceptTypeEnum implements KeyedNamed {
     All(0, "全部"),
     Disease(1, "诊断"),
     Drug(2, "药品"),
-    Lis(3, "检验"),
-    Pacs(4, "检查"),
-    Opeartion(5, "手术和操作");
+    Lis(3, "检验套餐"),
+    LisPack(4, "检验明细"),
+    Pacs(5, "检查"),
+    Opeartion(6, "手术和操作");
 
     @Setter
     private int key;

+ 296 - 1
src/main/java/com/diagbot/facade/ConceptInfoFacade.java

@@ -1,8 +1,39 @@
 package com.diagbot.facade;
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.diagbot.client.CdssCoreClient;
+import com.diagbot.dto.DictionaryInfoDTO;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.dto.StaticKnowledgeDTO;
+import com.diagbot.dto.StaticKnowledgeDetailDTO;
+import com.diagbot.dto.StaticKnowledgeIndexDTO;
+import com.diagbot.entity.ConceptDetail;
+import com.diagbot.entity.ConceptInfo;
+import com.diagbot.enums.ConceptTypeEnum;
+import com.diagbot.enums.IsDeleteEnum;
+import com.diagbot.exception.CommonErrorCode;
+import com.diagbot.exception.CommonException;
 import com.diagbot.service.impl.ConceptInfoServiceImpl;
+import com.diagbot.util.BeanUtil;
+import com.diagbot.util.EntityUtil;
+import com.diagbot.util.ListUtil;
+import com.diagbot.util.RespDTOUtil;
+import com.diagbot.util.StringUtil;
+import com.diagbot.util.SysUserUtils;
+import com.diagbot.vo.StaticKnowledgeHISVO;
+import com.diagbot.vo.StaticKnowledgeIndexVO;
+import com.diagbot.vo.StaticKnowledgeVO;
+import com.google.common.collect.Lists;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
 /**
  * @Description:
  * @Author:zhaops
@@ -10,4 +41,268 @@ import org.springframework.stereotype.Component;
  */
 @Component
 public class ConceptInfoFacade extends ConceptInfoServiceImpl {
-}
+    @Autowired
+    private CdssCoreClient cdssCoreClient;
+    @Autowired
+    private DictionaryFacade dictionaryFacade;
+    @Autowired
+    private ConceptDetailFacade conceptDetailFacade;
+    @Autowired
+    private LisConfigFacade lisConfigFacade;
+    @Autowired
+    private PacsConfigFacade pacsConfigFacade;
+    @Autowired
+    private DrugConfigFacade drugConfigFacade;
+    @Autowired
+    private DiseaseConfigFacade diseaseConfigFacade;
+    @Autowired
+    private OperationConfigFacade operationConfigFacade;
+
+    /**
+     * 医学知识(静态信息)检索
+     *
+     * @param staticKnowledgeIndexVO
+     * @return
+     */
+    public List<StaticKnowledgeIndexDTO> staticKnowledgeIndex(StaticKnowledgeIndexVO staticKnowledgeIndexVO) {
+        List<StaticKnowledgeIndexDTO> retList = Lists.newLinkedList();
+        //静态知识检索顺序
+        List<DictionaryInfoDTO> dicStaticIndexList = dictionaryFacade.getListByGroupType(7);
+
+        List<StaticKnowledgeIndexDTO> staticKnowledgeIndexDTOList = Lists.newLinkedList();
+        RespDTO<List<StaticKnowledgeIndexDTO>> respDTO = cdssCoreClient.staticKnowledgeIndex(staticKnowledgeIndexVO);
+        RespDTOUtil.respNGDealCover(respDTO, "检索失败");
+        staticKnowledgeIndexDTOList = respDTO.data;
+        if (ListUtil.isNotEmpty(staticKnowledgeIndexDTOList)) {
+            //typeName转换
+            staticKnowledgeIndexDTOList.forEach(item -> {
+                item.setTypeName(convertTypeName(item.getTypeName()));
+            });
+            //是否有静态知识
+            List<String> conNameList = staticKnowledgeIndexDTOList
+                    .stream()
+                    .map(i -> i.getName())
+                    .collect(Collectors.toList());
+            QueryWrapper<ConceptInfo> conceptInfoQueryWrapper = new QueryWrapper<>();
+            conceptInfoQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
+                    .in("name", conNameList);
+            List<ConceptInfo> conceptInfoList = this.list(conceptInfoQueryWrapper);
+            Map<String, ConceptInfo> infoMap
+                    = EntityUtil.makeEntityMapByKeys(conceptInfoList, "_", "name", "type");
+            for (StaticKnowledgeIndexDTO item : staticKnowledgeIndexDTOList) {
+                if (infoMap.containsKey(item.getName() + "_" + item.getTypeName())) {
+                    item.setId(infoMap.get(item.getName() + "_" + item.getTypeName()).getId());
+                }
+            }
+            List<Long> conceptIdList = conceptInfoList.stream()
+                    .map(i -> i.getId())
+                    .collect(Collectors.toList());
+            if (ListUtil.isNotEmpty(conceptIdList)) {
+                QueryWrapper<ConceptDetail> conceptDetailQueryWrapper = new QueryWrapper<>();
+                conceptDetailQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
+                        .in("concept_id", conceptIdList);
+                List<ConceptDetail> conceptDetailList = conceptDetailFacade.list(conceptDetailQueryWrapper);
+                Map<Long, List<ConceptDetail>> detailMap
+                        = EntityUtil.makeEntityListMap(conceptDetailList, "conceptId");
+                for (StaticKnowledgeIndexDTO item : staticKnowledgeIndexDTOList) {
+                    if (item.getId() == null
+                            || !detailMap.containsKey(item.getId())) {
+                        item.setHasInfomation(0);
+                        item.setHasClinicalPathway(0);
+                        item.setHasNotice((0));
+                        continue;
+                    }
+                    for (ConceptDetail detail : detailMap.get(item.getId())) {
+                        List<String> contentTypeList = Arrays.asList(detail.getConcentType().split(","));
+                        if (contentTypeList.contains(1)) {
+                            item.setHasInfomation(1);
+                        }
+                        if (contentTypeList.contains(2)) {
+                            item.setHasNotice(1);
+                        }
+                        if (contentTypeList.contains(3)) {
+                            item.setHasClinicalPathway(1);
+                        }
+                    }
+                }
+            }
+
+            //排序
+            Map<String, List<StaticKnowledgeIndexDTO>> map
+                    = EntityUtil.makeEntityListMap(staticKnowledgeIndexDTOList, "typeName");
+            for (DictionaryInfoDTO dic : dicStaticIndexList) {
+                if (map.containsKey(dic.getName())) {
+                    retList.addAll(map.get(dic.getName()));
+                }
+            }
+        }
+        return retList;
+    }
+
+
+    /**
+     * 获取静态知识
+     *
+     * @param staticKnowledgeVO
+     * @return
+     */
+    public StaticKnowledgeDTO getStaticKnowledge(StaticKnowledgeVO staticKnowledgeVO) {
+        StaticKnowledgeDTO staticKnowledgeDTO = new StaticKnowledgeDTO();
+        String typeName = ConceptTypeEnum.getName(staticKnowledgeVO.getType());
+        typeName = convertTypeName(typeName);
+
+        QueryWrapper<ConceptInfo> conceptInfoQueryWrapper = new QueryWrapper<>();
+        conceptInfoQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("name", staticKnowledgeVO.getName())
+                .eq("type", typeName);
+        ConceptInfo conceptInfo = this.getOne(conceptInfoQueryWrapper);
+
+        if (conceptInfo == null) {
+            throw new CommonException(CommonErrorCode.IS_EXISTS, "缺少静态信息");
+        }
+
+        BeanUtil.copyProperties(conceptInfo, staticKnowledgeDTO);
+        Long conceptId = conceptInfo.getId();
+        QueryWrapper<ConceptDetail> conceptDetailQueryWrapper = new QueryWrapper<>();
+        conceptDetailQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("concept_id", conceptId);
+        if (ListUtil.isNotEmpty(staticKnowledgeVO.getContentTypes())) {
+            String sql = "";
+            for (Integer contentType : staticKnowledgeVO.getContentTypes()) {
+                if (StringUtil.isNotBlank(sql)) {
+                    sql += " or ";
+                }
+                sql = "find_in_set(" + contentType + ",position)";
+            }
+            sql = "(" + sql + ")";
+            conceptDetailQueryWrapper.apply(sql);
+        }
+        List<ConceptDetail> conceptDetailList = conceptDetailFacade.list(conceptDetailQueryWrapper);
+        List<StaticKnowledgeDetailDTO> detailList
+                = BeanUtil.listCopyTo(conceptDetailList, StaticKnowledgeDetailDTO.class);
+        List<StaticKnowledgeDetailDTO> introduceList = detailList
+                .stream()
+                .filter(i -> Arrays.asList(i.getConcentType().split(",")).contains(1))
+                .collect(Collectors.toList());
+        List<StaticKnowledgeDetailDTO> noticeList = detailList
+                .stream()
+                .filter(i -> Arrays.asList(i.getConcentType().split(",")).contains(2))
+                .collect(Collectors.toList());
+        List<StaticKnowledgeDetailDTO> clinicalPathwayList = detailList
+                .stream()
+                .filter(i -> Arrays.asList(i.getConcentType().split(",")).contains(3))
+                .collect(Collectors.toList());
+        Map<String, List<StaticKnowledgeDetailDTO>> detailMap = new HashMap<>();
+        if (ListUtil.isNotEmpty(introduceList)) {
+            detailMap.put("静态知识", introduceList);
+        }
+        if (ListUtil.isNotEmpty(noticeList)) {
+            detailMap.put("注意事项", noticeList);
+        }
+        if (ListUtil.isNotEmpty(clinicalPathwayList)) {
+            detailMap.put("临床路径", clinicalPathwayList);
+        }
+        staticKnowledgeDTO.setDetails(detailMap);
+        return staticKnowledgeDTO;
+    }
+
+    /**
+     * 医院端获取静态知识(对接)
+     *
+     * @param staticKnowledgeHISVO
+     * @return
+     */
+    public List<StaticKnowledgeDTO> getStaticKnowledgeForHIS(StaticKnowledgeHISVO staticKnowledgeHISVO) {
+
+        List<StaticKnowledgeDTO> retList = Lists.newArrayList();
+        StaticKnowledgeDTO staticKnowledgeDTO = new StaticKnowledgeDTO();
+        String typeName = ConceptTypeEnum.getName(staticKnowledgeHISVO.getType());
+        typeName = convertTypeName(typeName);
+
+        //术语映射
+        List<String> uniqueNameList = getUniqueNames(staticKnowledgeHISVO);
+
+
+        return null;
+    }
+
+    /**
+     * 页面术语类型转图谱标签名称
+     *
+     * @param typeName
+     * @return
+     */
+    public String convertTypeName(String typeName) {
+        List<DictionaryInfoDTO> dicList = dictionaryFacade.getListByGroupType(8);
+        if (ListUtil.isNotEmpty(dicList)) {
+            Map<String, String> nameValMap
+                    = EntityUtil.makeMapWithKeyValue(dicList, "name", "val");
+            if (nameValMap.containsKey(typeName)) {
+                return nameValMap.get(typeName);
+            }
+        }
+        return typeName;
+    }
+
+    /**
+     * @param staticKnowledgeHISVO
+     * @return
+     */
+    public List<String> getUniqueNames(StaticKnowledgeHISVO staticKnowledgeHISVO) {
+        String hospitalId = SysUserUtils.getCurrentHospitalID();
+        List<String> nameList = null;
+        switch (staticKnowledgeHISVO.getType()) {
+            case 1:
+                Map<String, Map<String, Long>> disConfigMap
+                        = diseaseConfigFacade.getConfigMap(Long.valueOf(hospitalId),
+                        ListUtil.arrayToList(new String[] { staticKnowledgeHISVO.getHisName() }), null);
+                if (disConfigMap != null) {
+                    nameList = new ArrayList<>(disConfigMap.get(staticKnowledgeHISVO.getHisName()).keySet());
+                }
+                break;
+            case 2:
+                Map<String, Map<String, Long>> drugConfigMap
+                        = drugConfigFacade.getConfigMap(Long.valueOf(hospitalId),
+                        ListUtil.arrayToList(new String[] { staticKnowledgeHISVO.getHisName() }), null);
+                if (drugConfigMap != null) {
+                    nameList = new ArrayList<>(drugConfigMap.get(staticKnowledgeHISVO.getHisName()).keySet());
+                }
+                break;
+            case 3:
+            case 4:
+                Map<String, Map<String, Map<String, Long>>> lisConfigMap
+                        = lisConfigFacade.getConfigMap(Long.valueOf(hospitalId),
+                        ListUtil.arrayToList(new String[] { staticKnowledgeHISVO.getHisName() }), null);
+                if (lisConfigMap != null) {
+                    if (StringUtil.isBlank(staticKnowledgeHISVO.getHisDetailName())) {
+                        staticKnowledgeHISVO.setHisDetailName("");
+                        if (lisConfigMap.containsKey(staticKnowledgeHISVO.getHospitalId())) {
+                            nameList = new ArrayList<>(lisConfigMap.get(staticKnowledgeHISVO.getHisName())
+                                    .get(staticKnowledgeHISVO.getHisDetailName()).keySet());
+                        }
+                    }
+                }
+                break;
+            case 5:
+                Map<String, Map<String, Long>> pacsConfigMap
+                        = pacsConfigFacade.getConfigMap(Long.valueOf(hospitalId),
+                        ListUtil.arrayToList(new String[] { staticKnowledgeHISVO.getHisName() }), null);
+                if (pacsConfigMap != null) {
+                    nameList = new ArrayList<>(pacsConfigMap.get(staticKnowledgeHISVO.getHisName()).keySet());
+                }
+                break;
+            case 6:
+                Map<String, Map<String, Long>> operationConfigMap
+                        = operationConfigFacade.getConfigMap(Long.valueOf(hospitalId),
+                        ListUtil.arrayToList(new String[] { staticKnowledgeHISVO.getHisName() }), null);
+                if (operationConfigMap != null) {
+                    nameList = new ArrayList<>(operationConfigMap.get(staticKnowledgeHISVO.getHisName()).keySet());
+                }
+                break;
+            default:
+                break;
+
+        }
+        return nameList;
+    }
+}

+ 16 - 1
src/main/java/com/diagbot/facade/DictionaryFacade.java

@@ -34,4 +34,19 @@ public class DictionaryFacade extends DictionaryInfoServiceImpl {
         List<DictionaryInfoDTO> listRes = BeanUtil.listCopyTo(list, DictionaryInfoDTO.class);
         return EntityUtil.makeEntityListMap(listRes, "groupType");
     }
-}
+
+    /**
+     * 返回指定字典信息
+     *
+     * @param groupType
+     * @return
+     */
+    public List<DictionaryInfoDTO> getListByGroupType(Integer groupType) {
+        List<DictionaryInfo> list = this.list(new QueryWrapper<DictionaryInfo>()
+                .eq("group_type", groupType)
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .orderByAsc("order_no"));
+        List<DictionaryInfoDTO> listRes = BeanUtil.listCopyTo(list, DictionaryInfoDTO.class);
+        return listRes;
+    }
+}

+ 0 - 103
src/main/java/com/diagbot/facade/RetrievalFacade.java

@@ -1,28 +1,13 @@
 package com.diagbot.facade;
 
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.diagbot.client.CdssCoreClient;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.dto.RetrievalDTO;
-import com.diagbot.dto.StaticKnowledgeIndexDTO;
-import com.diagbot.entity.ConceptDetail;
-import com.diagbot.entity.ConceptInfo;
-import com.diagbot.entity.DictionaryInfo;
-import com.diagbot.enums.IsDeleteEnum;
-import com.diagbot.util.EntityUtil;
-import com.diagbot.util.ListUtil;
 import com.diagbot.util.RespDTOUtil;
 import com.diagbot.vo.RetrievalVO;
-import com.diagbot.vo.StaticKnowledgeIndexVO;
-import com.google.common.collect.Lists;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-import java.util.stream.Collectors;
-
 /**
  * @Description:
  * @Author:zhaops
@@ -32,13 +17,6 @@ import java.util.stream.Collectors;
 public class RetrievalFacade {
     @Autowired
     private CdssCoreClient cdssCoreClient;
-    @Autowired
-    private DictionaryFacade dictionaryFacade;
-    @Autowired
-    private ConceptInfoFacade conceptInfoFacade;
-    @Autowired
-    private ConceptDetailFacade conceptDetailFacade;
-
 
     /**
      * 检索
@@ -53,85 +31,4 @@ public class RetrievalFacade {
         retrievalDTO = respDTO.data;
         return retrievalDTO;
     }
-
-    /**
-     * 医学知识(静态信息)检索
-     *
-     * @param staticKnowledgeIndexVO
-     * @return
-     */
-    public List<StaticKnowledgeIndexDTO> staticKnowledgeIndex(StaticKnowledgeIndexVO staticKnowledgeIndexVO) {
-        List<StaticKnowledgeIndexDTO> retList = Lists.newLinkedList();
-        QueryWrapper<DictionaryInfo> dictionaryInfoQueryWrapper = new QueryWrapper<>();
-        dictionaryInfoQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
-                .eq("group_type", 7)
-                .eq("return_type", 2)
-                .orderByAsc("order_no");
-        List<DictionaryInfo> dicList = dictionaryFacade.list(dictionaryInfoQueryWrapper);
-
-        List<StaticKnowledgeIndexDTO> staticKnowledgeIndexDTOList = Lists.newLinkedList();
-        RespDTO<List<StaticKnowledgeIndexDTO>> respDTO = cdssCoreClient.staticKnowledgeIndex(staticKnowledgeIndexVO);
-        RespDTOUtil.respNGDealCover(respDTO, "检索失败");
-        staticKnowledgeIndexDTOList = respDTO.data;
-        if (ListUtil.isNotEmpty(staticKnowledgeIndexDTOList)) {
-            //是否有静态知识
-            List<String> conNameList = staticKnowledgeIndexDTOList
-                    .stream()
-                    .map(i -> i.getName())
-                    .collect(Collectors.toList());
-            QueryWrapper<ConceptInfo> conceptInfoQueryWrapper = new QueryWrapper<>();
-            conceptInfoQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
-                    .in("name", conNameList);
-            List<ConceptInfo> conceptInfoList = conceptInfoFacade.list(conceptInfoQueryWrapper);
-            Map<String, ConceptInfo> infoMap
-                    = EntityUtil.makeEntityMapByKeys(conceptInfoList, "_", "name", "type");
-            for (StaticKnowledgeIndexDTO item : staticKnowledgeIndexDTOList) {
-                if (infoMap.containsKey(item.getName() + "_" + item.getTypeName())) {
-                    item.setId(infoMap.get(item.getName() + "_" + item.getTypeName()).getId());
-                }
-            }
-            List<Long> conceptIdList = conceptInfoList.stream()
-                    .map(i -> i.getId())
-                    .collect(Collectors.toList());
-            if (ListUtil.isNotEmpty(conceptIdList)) {
-                QueryWrapper<ConceptDetail> conceptDetailQueryWrapper = new QueryWrapper<>();
-                conceptDetailQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
-                        .in("concept_id", conceptIdList);
-                List<ConceptDetail> conceptDetailList = conceptDetailFacade.list(conceptDetailQueryWrapper);
-                Map<Long, List<ConceptDetail>> detailMap
-                        = EntityUtil.makeEntityListMap(conceptDetailList, "conceptId");
-                for (StaticKnowledgeIndexDTO item : staticKnowledgeIndexDTOList) {
-                    if (item.getId() == null
-                            || !detailMap.containsKey(item.getId())) {
-                        item.setHasInfomation(0);
-                        item.setHasClinicalPathway(0);
-                        item.setHasNotice((0));
-                        continue;
-                    }
-                    for (ConceptDetail detail : detailMap.get(item.getId())) {
-                        List<String> contentTypeList = Arrays.asList(detail.getConcentType().split(","));
-                        if (contentTypeList.contains(1)) {
-                            item.setHasInfomation(1);
-                        }
-                        if (contentTypeList.contains(2)) {
-                            item.setHasNotice(1);
-                        }
-                        if (contentTypeList.contains(3)) {
-                            item.setHasClinicalPathway(1);
-                        }
-                    }
-                }
-            }
-
-            //排序
-            Map<String, List<StaticKnowledgeIndexDTO>> map
-                    = EntityUtil.makeEntityListMap(staticKnowledgeIndexDTOList, "typeName");
-            for (DictionaryInfo dic : dicList) {
-                if (map.containsKey(dic.getName())) {
-                    retList.addAll(map.get(dic.getName()));
-                }
-            }
-        }
-        return retList;
-    }
 }

+ 28 - 0
src/main/java/com/diagbot/vo/StaticKnowledgeHISVO.java

@@ -0,0 +1,28 @@
+package com.diagbot.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/8/20 14:54
+ */
+@Getter
+@Setter
+public class StaticKnowledgeHISVO extends StaticKnowledgeVO {
+    /**
+     * his名称
+     */
+    private String hisName;
+    /**
+     * his明细名称
+     */
+    private String hisDetailName;
+    /**
+     * 医院id
+     */
+    @ApiModelProperty(hidden = true)
+    private Long hospitalId;
+}

+ 1 - 1
src/main/java/com/diagbot/vo/StaticKnowledgeIndexVO.java

@@ -19,7 +19,7 @@ public class StaticKnowledgeIndexVO {
      */
     private String inputStr;
     /**
-     * 检索类型(多选)
+     * 检索类型(多选):0-全部、1-诊断、2-药品、3-检验、5-检查、6-手术和操作
      */
     @NotNull(message = "请输入检索类型")
     private List<Integer> types;

+ 32 - 0
src/main/java/com/diagbot/vo/StaticKnowledgeVO.java

@@ -0,0 +1,32 @@
+package com.diagbot.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+import java.util.List;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/8/20 14:50
+ */
+@Getter
+@Setter
+public class StaticKnowledgeVO {
+    /**
+     * 标准术语名称
+     */
+    @NotBlank(message = "请输入术语名称")
+    private String name;
+    /**
+     * 术语类型
+     */
+    @NotNull(message = "请输入术语类型")
+    private Integer type;
+    /**
+     * 内容类型
+     */
+    private List<Integer> contentTypes;
+}

+ 4 - 1
src/main/java/com/diagbot/web/ConceptDetailController.java

@@ -1,9 +1,11 @@
 package com.diagbot.web;
 
 
+import io.swagger.annotations.Api;
 import org.springframework.web.bind.annotation.RequestMapping;
 
 import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RestController;
 
 /**
  * <p>
@@ -13,8 +15,9 @@ import org.springframework.stereotype.Controller;
  * @author zhaops
  * @since 2020-08-18
  */
-@Controller
+@RestController
 @RequestMapping("/conceptDetail")
+@Api(value = "静态知识内容相关API", tags = { "静态知识内容相关API" })
 public class ConceptDetailController {
 
 }

+ 26 - 3
src/main/java/com/diagbot/web/ConceptInfoController.java

@@ -1,9 +1,20 @@
 package com.diagbot.web;
 
 
+import com.diagbot.dto.RespDTO;
+import com.diagbot.dto.StaticKnowledgeIndexDTO;
+import com.diagbot.facade.ConceptInfoFacade;
+import com.diagbot.vo.StaticKnowledgeIndexVO;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
 
-import org.springframework.stereotype.Controller;
+import javax.validation.Valid;
+import java.util.List;
 
 /**
  * <p>
@@ -13,8 +24,20 @@ import org.springframework.stereotype.Controller;
  * @author zhaops
  * @since 2020-08-18
  */
-@Controller
-@RequestMapping("/conceptInfo")
+@RestController
+@RequestMapping("/graph/conceptInfo")
+@Api(value = "静态知识标准术语相关API", tags = { "静态知识标准术语相关API" })
 public class ConceptInfoController {
 
+    @Autowired
+    private ConceptInfoFacade conceptInfoFacade;
+
+    @ApiOperation(value = "医学知识(静态知识)检索[zhaops]",
+            notes = "types: 类型(多选):0-全部、1-诊断、2-药品、3-检验、5-检查、6-手术和操作 <br>" +
+                    "inputStr: 检索内容<br>")
+    @PostMapping("/staticKnowledgeIndex")
+    public RespDTO<List<StaticKnowledgeIndexDTO>> staticKnowledgeIndex(@Valid @RequestBody StaticKnowledgeIndexVO staticKnowledgeIndexVO) {
+        List<StaticKnowledgeIndexDTO> data = conceptInfoFacade.staticKnowledgeIndex(staticKnowledgeIndexVO);
+        return RespDTO.onSuc(data);
+    }
 }

+ 0 - 12
src/main/java/com/diagbot/web/RetrievalController.java

@@ -2,10 +2,8 @@ package com.diagbot.web;
 
 import com.diagbot.dto.RespDTO;
 import com.diagbot.dto.RetrievalDTO;
-import com.diagbot.dto.StaticKnowledgeIndexDTO;
 import com.diagbot.facade.RetrievalFacade;
 import com.diagbot.vo.RetrievalVO;
-import com.diagbot.vo.StaticKnowledgeIndexVO;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -15,7 +13,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
 import javax.validation.Valid;
-import java.util.List;
 
 /**
  * @Description:
@@ -40,13 +37,4 @@ public class RetrievalController {
         RetrievalDTO data = retrievalFacade.index(retrievalVO);
         return RespDTO.onSuc(data);
     }
-
-    @ApiOperation(value = "医学知识(静态知识)检索[zhaops]",
-            notes = "types: 类型(多选):0-全部、1-诊断、2-药品、3-检验、4-检查、5-手术和操作 <br>" +
-                    "inputStr: 检索内容<br>")
-    @PostMapping("/staticKnowledgeIndex")
-    public RespDTO<List<StaticKnowledgeIndexDTO>> staticKnowledgeIndex(@Valid @RequestBody StaticKnowledgeIndexVO staticKnowledgeIndexVO) {
-        List<StaticKnowledgeIndexDTO> data = retrievalFacade.staticKnowledgeIndex(staticKnowledgeIndexVO);
-        return RespDTO.onSuc(data);
-    }
 }