|
@@ -1,8 +1,42 @@
|
|
|
package com.diagbot.facade;
|
|
|
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
+import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
+import com.diagbot.client.CdssCoreClient;
|
|
|
+import com.diagbot.dto.ConceptInfoDTO;
|
|
|
+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.ConceptInfoPageVO;
|
|
|
+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 +44,414 @@ 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> staticKnowledgeIndexWithInfo(StaticKnowledgeIndexVO staticKnowledgeIndexVO) {
|
|
|
+ List<StaticKnowledgeIndexDTO> staticKnowledgeIndexDTOList = staticKnowledgeIndex(staticKnowledgeIndexVO);
|
|
|
+ //过滤没有静态知识的检索结果
|
|
|
+ staticKnowledgeIndexDTOList = staticKnowledgeIndexDTOList
|
|
|
+ .stream()
|
|
|
+ .filter(i -> i.getHasInfomation().equals(1)
|
|
|
+ || i.getHasNotice().equals(1)
|
|
|
+ || i.getHasClinicalPathway().equals(1))
|
|
|
+ .collect(Collectors.toList());
|
|
|
+ return staticKnowledgeIndexDTOList;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 返回不带静态知识的检索结果
|
|
|
+ *
|
|
|
+ * @param staticKnowledgeIndexVO
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public List<StaticKnowledgeIndexDTO> staticKnowledgeIndexWithoutInfo(StaticKnowledgeIndexVO staticKnowledgeIndexVO) {
|
|
|
+ List<StaticKnowledgeIndexDTO> staticKnowledgeIndexDTOList = staticKnowledgeIndex(staticKnowledgeIndexVO);
|
|
|
+ //过滤没有静态知识的检索结果
|
|
|
+ staticKnowledgeIndexDTOList = staticKnowledgeIndexDTOList
|
|
|
+ .stream()
|
|
|
+ .filter(i -> i.getHasInfomation().equals(0)
|
|
|
+ && i.getHasNotice().equals(0)
|
|
|
+ && i.getHasClinicalPathway().equals(0))
|
|
|
+ .collect(Collectors.toList());
|
|
|
+ return staticKnowledgeIndexDTOList;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 医学知识(静态信息)检索
|
|
|
+ *
|
|
|
+ * @param staticKnowledgeIndexVO
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public List<StaticKnowledgeIndexDTO> staticKnowledgeIndex(StaticKnowledgeIndexVO staticKnowledgeIndexVO) {
|
|
|
+ List<StaticKnowledgeIndexDTO> retList = Lists.newLinkedList();
|
|
|
+ //静态知识检索顺序
|
|
|
+ List<DictionaryInfoDTO> dicStaticIndexList = dictionaryFacade.getListByGroupType(7);
|
|
|
+ //页面术语类型和图谱映射
|
|
|
+ List<DictionaryInfoDTO> dicTypeMappingList = dictionaryFacade.getListByGroupType(8);
|
|
|
+
|
|
|
+ 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(), 2, dicTypeMappingList));
|
|
|
+ });
|
|
|
+ //是否有静态知识
|
|
|
+ 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);
|
|
|
+ if(ListUtil.isNotEmpty(conceptInfoList)) {
|
|
|
+ //typeName转换
|
|
|
+ conceptInfoList.forEach(item -> {
|
|
|
+ item.setType(convertTypeName(item.getType(), 2, dicTypeMappingList));
|
|
|
+ });
|
|
|
+ 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.getContentType().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 (dic.getName().equals("检验")) {
|
|
|
+ if (map.containsKey("检验套餐")) {
|
|
|
+ retList.addAll(map.get("检验套餐"));
|
|
|
+ }
|
|
|
+ if (map.containsKey("检验明细")) {
|
|
|
+ retList.addAll(map.get("检验明细"));
|
|
|
+ }
|
|
|
+ } else 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());
|
|
|
+ List<DictionaryInfoDTO> dicList = dictionaryFacade.getListByGroupType(8);
|
|
|
+ typeName = convertTypeName(typeName, 1, dicList);
|
|
|
+
|
|
|
+ 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 + ",content_type)";
|
|
|
+ }
|
|
|
+ sql = "(" + sql + ")";
|
|
|
+ conceptDetailQueryWrapper.apply(sql);
|
|
|
+ }
|
|
|
+ conceptDetailQueryWrapper.orderByAsc("order_no");
|
|
|
+ List<ConceptDetail> conceptDetailList = conceptDetailFacade.list(conceptDetailQueryWrapper);
|
|
|
+ List<StaticKnowledgeDetailDTO> detailList
|
|
|
+ = BeanUtil.listCopyTo(conceptDetailList, StaticKnowledgeDetailDTO.class);
|
|
|
+ List<StaticKnowledgeDetailDTO> introduceList = detailList
|
|
|
+ .stream()
|
|
|
+ .filter(i -> Arrays.asList(i.getContentType().split(",")).contains("1"))
|
|
|
+ .collect(Collectors.toList());
|
|
|
+ List<StaticKnowledgeDetailDTO> noticeList = detailList
|
|
|
+ .stream()
|
|
|
+ .filter(i -> Arrays.asList(i.getContentType().split(",")).contains("2"))
|
|
|
+ .collect(Collectors.toList());
|
|
|
+ List<StaticKnowledgeDetailDTO> clinicalPathwayList = detailList
|
|
|
+ .stream()
|
|
|
+ .filter(i -> Arrays.asList(i.getContentType().split(",")).contains("3"))
|
|
|
+ .collect(Collectors.toList());
|
|
|
+ Map<String, List<StaticKnowledgeDetailDTO>> detailMap = new HashMap<>();
|
|
|
+ if (ListUtil.isNotEmpty(introduceList) && staticKnowledgeVO.getContentTypes().contains(1)) {
|
|
|
+ detailMap.put("静态知识", introduceList);
|
|
|
+ }
|
|
|
+ if (ListUtil.isNotEmpty(noticeList) && staticKnowledgeVO.getContentTypes().contains(2)) {
|
|
|
+ detailMap.put("注意事项", noticeList);
|
|
|
+ }
|
|
|
+ if (ListUtil.isNotEmpty(clinicalPathwayList) && staticKnowledgeVO.getContentTypes().contains(3)) {
|
|
|
+ detailMap.put("临床路径", clinicalPathwayList);
|
|
|
+ }
|
|
|
+ staticKnowledgeDTO.setDetails(detailMap);
|
|
|
+ return staticKnowledgeDTO;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 医院端获取静态知识(对接)
|
|
|
+ *
|
|
|
+ * @param staticKnowledgeHISVO
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public List<StaticKnowledgeDTO> getStaticKnowledgeForHIS(StaticKnowledgeHISVO staticKnowledgeHISVO) {
|
|
|
+
|
|
|
+ List<StaticKnowledgeDTO> retList = Lists.newArrayList();
|
|
|
+ String typeName = ConceptTypeEnum.getName(staticKnowledgeHISVO.getType());
|
|
|
+ List<DictionaryInfoDTO> dicList = dictionaryFacade.getListByGroupType(8);
|
|
|
+ typeName = convertTypeName(typeName, 1, dicList);
|
|
|
+
|
|
|
+ //术语映射
|
|
|
+ List<String> uniqueNameList = getUniqueNames(staticKnowledgeHISVO);
|
|
|
+ if (ListUtil.isEmpty(uniqueNameList)) {
|
|
|
+ return retList;
|
|
|
+ }
|
|
|
+
|
|
|
+ QueryWrapper<ConceptInfo> conceptInfoQueryWrapper = new QueryWrapper<>();
|
|
|
+ conceptInfoQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ .in("name", uniqueNameList)
|
|
|
+ .eq("type", typeName);
|
|
|
+ List<ConceptInfo> conceptInfoList = this.list(conceptInfoQueryWrapper);
|
|
|
+
|
|
|
+ if (ListUtil.isEmpty(conceptInfoList)) {
|
|
|
+ return retList;
|
|
|
+ }
|
|
|
+
|
|
|
+ retList = BeanUtil.listCopyTo(conceptInfoList, StaticKnowledgeDTO.class);
|
|
|
+ List<Long> conceptIdList = conceptInfoList.stream().map(i -> i.getId()).collect(Collectors.toList());
|
|
|
+ QueryWrapper<ConceptDetail> conceptDetailQueryWrapper = new QueryWrapper<>();
|
|
|
+ conceptDetailQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ .in("concept_id", conceptIdList);
|
|
|
+ if (ListUtil.isNotEmpty(staticKnowledgeHISVO.getContentTypes())) {
|
|
|
+ String sql = "";
|
|
|
+ for (Integer contentType : staticKnowledgeHISVO.getContentTypes()) {
|
|
|
+ if (StringUtil.isNotBlank(sql)) {
|
|
|
+ sql += " or ";
|
|
|
+ }
|
|
|
+ sql += "find_in_set(" + contentType + ",content_type)";
|
|
|
+ }
|
|
|
+ sql = "(" + sql + ")";
|
|
|
+ conceptDetailQueryWrapper.apply(sql);
|
|
|
+ }
|
|
|
+ conceptDetailQueryWrapper.orderByAsc("concept_id", "order_no");
|
|
|
+ List<ConceptDetail> conceptDetailList = conceptDetailFacade.list(conceptDetailQueryWrapper);
|
|
|
+ List<StaticKnowledgeDetailDTO> detailList
|
|
|
+ = BeanUtil.listCopyTo(conceptDetailList, StaticKnowledgeDetailDTO.class);
|
|
|
+ Map<Long, List<StaticKnowledgeDetailDTO>> conceptMap
|
|
|
+ = EntityUtil.makeEntityListMap(detailList, "conceptId");
|
|
|
+ for (StaticKnowledgeDTO staticKnowledgeDTO : retList) {
|
|
|
+ List<StaticKnowledgeDetailDTO> subDetailList = conceptMap.get(staticKnowledgeDTO.getId());
|
|
|
+ if (ListUtil.isNotEmpty(subDetailList)) {
|
|
|
+ List<StaticKnowledgeDetailDTO> introduceList = subDetailList
|
|
|
+ .stream()
|
|
|
+ .filter(i -> Arrays.asList(i.getContentType().split(",")).contains("1"))
|
|
|
+ .collect(Collectors.toList());
|
|
|
+ List<StaticKnowledgeDetailDTO> noticeList = subDetailList
|
|
|
+ .stream()
|
|
|
+ .filter(i -> Arrays.asList(i.getContentType().split(",")).contains("2"))
|
|
|
+ .collect(Collectors.toList());
|
|
|
+ List<StaticKnowledgeDetailDTO> clinicalPathwayList = subDetailList
|
|
|
+ .stream()
|
|
|
+ .filter(i -> Arrays.asList(i.getContentType().split(",")).contains("3"))
|
|
|
+ .collect(Collectors.toList());
|
|
|
+ Map<String, List<StaticKnowledgeDetailDTO>> subDetailMap = new HashMap<>();
|
|
|
+ if (ListUtil.isNotEmpty(introduceList) && staticKnowledgeHISVO.getContentTypes().contains(1)) {
|
|
|
+ subDetailMap.put("静态知识", introduceList);
|
|
|
+ }
|
|
|
+ if (ListUtil.isNotEmpty(noticeList) && staticKnowledgeHISVO.getContentTypes().contains(2)) {
|
|
|
+ subDetailMap.put("注意事项", noticeList);
|
|
|
+ }
|
|
|
+ if (ListUtil.isNotEmpty(clinicalPathwayList) && staticKnowledgeHISVO.getContentTypes().contains(3)) {
|
|
|
+ subDetailMap.put("临床路径", clinicalPathwayList);
|
|
|
+ }
|
|
|
+ staticKnowledgeDTO.setDetails(subDetailMap);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return retList;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 页面术语类型和图谱标签名称相互转换
|
|
|
+ *
|
|
|
+ * @param typeName
|
|
|
+ * @param flag 1-页面术语类型转图谱标签名称,2- 图谱标签名称转页面术语类型
|
|
|
+ * @param dicList
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public String convertTypeName(String typeName, Integer flag, List<DictionaryInfoDTO> dicList) {
|
|
|
+ if (ListUtil.isNotEmpty(dicList)) {
|
|
|
+ Map<String, String> nameValMap = new HashMap<>();
|
|
|
+ if (flag.equals(1)) {
|
|
|
+ nameValMap = EntityUtil.makeMapWithKeyValue(dicList, "name", "val");
|
|
|
+ } else if (flag.equals(2)) {
|
|
|
+ nameValMap = EntityUtil.makeMapWithKeyValue(dicList, "val", "name");
|
|
|
+ }
|
|
|
+ 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.getHisName())) {
|
|
|
+ if (lisConfigMap.get(staticKnowledgeHISVO.getHisName()).containsKey(staticKnowledgeHISVO.getHisDetailName())) {
|
|
|
+ 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;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 列表
|
|
|
+ *
|
|
|
+ * @param conceptInfoPageVO
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public IPage<ConceptInfoDTO> getPage(ConceptInfoPageVO conceptInfoPageVO) {
|
|
|
+ List<DictionaryInfoDTO> dicList = dictionaryFacade.getListByGroupType(8);
|
|
|
+ if (StringUtil.isNotBlank(conceptInfoPageVO.getType())) {
|
|
|
+ String typeName
|
|
|
+ = convertTypeName(ConceptTypeEnum.getName(Integer.valueOf(conceptInfoPageVO.getType())), 1, dicList);
|
|
|
+ conceptInfoPageVO.setTypeName(typeName);
|
|
|
+ }
|
|
|
+ IPage<ConceptInfoDTO> page = super.getPage(conceptInfoPageVO);
|
|
|
+ List<ConceptInfoDTO> records = page.getRecords();
|
|
|
+ if (ListUtil.isNotEmpty(records)) {
|
|
|
+ records.forEach(record -> {
|
|
|
+ record.setTypeName(convertTypeName(record.getTypeName(), 2, dicList));
|
|
|
+ });
|
|
|
+ }
|
|
|
+ page.setRecords(records);
|
|
|
+ return page;
|
|
|
+ }
|
|
|
+}
|