|
@@ -0,0 +1,485 @@
|
|
|
+package com.diagbot.facade;
|
|
|
+
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
+import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
+import com.diagbot.client.CdssClient;
|
|
|
+import com.diagbot.client.CdssCoreClient;
|
|
|
+import com.diagbot.dto.DictionaryInfoDTO;
|
|
|
+import com.diagbot.dto.IndexBatchDTO;
|
|
|
+import com.diagbot.dto.RespDTO;
|
|
|
+import com.diagbot.entity.MappingConfig;
|
|
|
+import com.diagbot.entity.wrapper.MappingConfigWrapper;
|
|
|
+import com.diagbot.enums.ConceptTypeEnum;
|
|
|
+import com.diagbot.enums.IsDeleteEnum;
|
|
|
+import com.diagbot.enums.MatchSourceEnum;
|
|
|
+import com.diagbot.service.impl.MappingConfigServiceImpl;
|
|
|
+import com.diagbot.util.BeanUtil;
|
|
|
+import com.diagbot.util.ListUtil;
|
|
|
+import com.diagbot.util.RespDTOUtil;
|
|
|
+import com.diagbot.util.StringUtil;
|
|
|
+import com.diagbot.util.UserUtils;
|
|
|
+import com.diagbot.vo.ConceptVO;
|
|
|
+import com.diagbot.vo.IdListVO;
|
|
|
+import com.diagbot.vo.IdVO;
|
|
|
+import com.diagbot.vo.MappingConfigPageVO;
|
|
|
+import com.diagbot.vo.MappingConfigVO;
|
|
|
+import com.google.common.collect.Lists;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.stereotype.Component;
|
|
|
+import org.springframework.web.multipart.MultipartFile;
|
|
|
+
|
|
|
+import javax.servlet.http.HttpServletResponse;
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.Collection;
|
|
|
+import java.util.HashMap;
|
|
|
+import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
+import java.util.stream.Collectors;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @Description:
|
|
|
+ * @Author:zhaops
|
|
|
+ * @time: 2021/6/9 14:19
|
|
|
+ */
|
|
|
+@Component
|
|
|
+public class MappingConfigFacade extends MappingConfigServiceImpl {
|
|
|
+ @Autowired
|
|
|
+ private CdssCoreClient cdssCoreClient;
|
|
|
+ @Autowired
|
|
|
+ private CdssClient cdssClient;
|
|
|
+ @Autowired
|
|
|
+ private DictionaryFacade dictionaryFacade;
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 剂型说明
|
|
|
+ *
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ private String getForm() {
|
|
|
+ String form = "药品模板——药品剂型填写说明[不填";
|
|
|
+ //药品剂型
|
|
|
+ List<DictionaryInfoDTO> dicTypeMappingList = dictionaryFacade.getListByGroupType(9);
|
|
|
+ if (ListUtil.isNotEmpty(dicTypeMappingList)) {
|
|
|
+ String formList = dicTypeMappingList.stream()
|
|
|
+ .filter(i -> StringUtil.isNotBlank(i.getName()))
|
|
|
+ .map(i -> i.getName())
|
|
|
+ .distinct()
|
|
|
+ .collect(Collectors.joining("、"));
|
|
|
+ if (StringUtil.isNotBlank(formList)) {
|
|
|
+ form += "、" + formList;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ form += "]";
|
|
|
+ return form;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 分页查询
|
|
|
+ *
|
|
|
+ * @param mappingConfigPageVO
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public IPage<MappingConfigWrapper> getPage(MappingConfigPageVO mappingConfigPageVO) {
|
|
|
+ Page<MappingConfigWrapper> page = null;
|
|
|
+ RespDTO<Page<MappingConfigWrapper>> respDTO = cdssClient.getPage(mappingConfigPageVO);
|
|
|
+ if (RespDTOUtil.respIsOK(respDTO)) {
|
|
|
+ page = respDTO.data;
|
|
|
+ }
|
|
|
+ return page;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 导入模板下载
|
|
|
+ *
|
|
|
+ * @param response
|
|
|
+ */
|
|
|
+ public void exportExcelModule(HttpServletResponse response, MappingConfigVO mappingConfigVO) {
|
|
|
+ cdssClient.exportExcelModule( mappingConfigVO);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 数据导出
|
|
|
+ *
|
|
|
+ * @param response
|
|
|
+ */
|
|
|
+ public void exportExcel(HttpServletResponse response, MappingConfigPageVO mappingConfigPageVO) {
|
|
|
+ RespDTO<List<MappingConfigWrapper>> respDTO = cdssClient.exportExcel_remote(mappingConfigPageVO);
|
|
|
+ if (RespDTOUtil.respIsOK(respDTO)) {
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 导入数据预匹配
|
|
|
+ *
|
|
|
+ * @param file
|
|
|
+ * @param type
|
|
|
+ * @param response
|
|
|
+ */
|
|
|
+ public void precDataMatch(MultipartFile file, Integer type, HttpServletResponse response) {
|
|
|
+
|
|
|
+ RespDTO<List<MappingConfigWrapper>> respDTO = cdssClient.precDataMatch_remote(file, type);
|
|
|
+ if (RespDTOUtil.respIsOK(respDTO)) {
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 数据导入
|
|
|
+ *
|
|
|
+ * @param file
|
|
|
+ * @param hospitalId
|
|
|
+ * @param type
|
|
|
+ */
|
|
|
+ public void importExcel(MultipartFile file, Long hospitalId, Integer type, String userId) {
|
|
|
+ if (StringUtil.isBlank(userId)) {
|
|
|
+ userId = UserUtils.getCurrentPrincipleID();
|
|
|
+ }
|
|
|
+ cdssClient.importExcel(file, hospitalId, type, userId);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 删除记录-单条
|
|
|
+ *
|
|
|
+ * @param idVO
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public Boolean deleteRecord(IdVO idVO) {
|
|
|
+ RespDTO<Boolean> respDTO = cdssClient.deleteRecord(idVO);
|
|
|
+ if (RespDTOUtil.respIsOK(respDTO)) {
|
|
|
+ return respDTO.data;
|
|
|
+ } else {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 删除记录-批量
|
|
|
+ *
|
|
|
+ * @param idListVO
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public Boolean deleteRecords(IdListVO idListVO) {
|
|
|
+ RespDTO<Boolean> respDTO = cdssClient.deleteRecords(idListVO);
|
|
|
+ if (RespDTOUtil.respIsOK(respDTO)) {
|
|
|
+ return respDTO.data;
|
|
|
+ } else {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取记录-单条
|
|
|
+ *
|
|
|
+ * @param idVO
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public MappingConfigWrapper getRecord(IdVO idVO) {
|
|
|
+ RespDTO<MappingConfigWrapper> respDTO = cdssClient.getRecord(idVO);
|
|
|
+ if (RespDTOUtil.respIsOK(respDTO)) {
|
|
|
+ return respDTO.data;
|
|
|
+ } else {
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询已关联关系
|
|
|
+ *
|
|
|
+ * @param mappingConfigVO
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public List<MappingConfigWrapper> getRelatedMapping(MappingConfigVO mappingConfigVO) {
|
|
|
+ RespDTO<List<MappingConfigWrapper>> respDTO = cdssClient.getRelatedMapping(mappingConfigVO);
|
|
|
+ if (RespDTOUtil.respIsOK(respDTO)) {
|
|
|
+ return respDTO.data;
|
|
|
+ } else {
|
|
|
+ return new ArrayList<>();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 判断是否已存在
|
|
|
+ *
|
|
|
+ * @param mappingConfig
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public Boolean isExistRecord(MappingConfig mappingConfig) {
|
|
|
+ RespDTO<Boolean> respDTO = cdssClient.isExistRecord(mappingConfig);
|
|
|
+ if (RespDTOUtil.respIsOK(respDTO)) {
|
|
|
+ return respDTO.data;
|
|
|
+ } else {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 保存记录-单条
|
|
|
+ *
|
|
|
+ * @param mappingConfig
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public Boolean saveOrUpdateRecord(MappingConfig mappingConfig) {
|
|
|
+ String userId = UserUtils.getCurrentPrincipleID();
|
|
|
+ mappingConfig.setModifier(userId);
|
|
|
+ mappingConfig.setCreator(userId);
|
|
|
+ RespDTO<Boolean> respDTO = cdssClient.saveOrUpdateRecord(mappingConfig);
|
|
|
+ if (RespDTOUtil.respIsOK(respDTO)) {
|
|
|
+ return respDTO.data;
|
|
|
+ } else {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 根据医院名称分组-返回id
|
|
|
+ *
|
|
|
+ * @param hisNames
|
|
|
+ * @param type
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public Map<String, Map<String, Map<Long, List<Long>>>> groupByHisNameWithId(List<String> hisNames, Integer type, Long hospitalId) {
|
|
|
+ Map<String, Map<String, Map<Long, List<Long>>>> retMap = new HashMap<>();
|
|
|
+ QueryWrapper<MappingConfig> queryWrapper = new QueryWrapper<>();
|
|
|
+ queryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ .eq("is_match", 1)
|
|
|
+ .eq("type", type);
|
|
|
+ if (hospitalId != null) {
|
|
|
+ queryWrapper.eq("hospital_id", hospitalId);
|
|
|
+ }
|
|
|
+ if (ListUtil.isNotEmpty(hisNames)) {
|
|
|
+ queryWrapper.in("his_name", hisNames);
|
|
|
+ }
|
|
|
+ List<MappingConfig> list = this.list(queryWrapper);
|
|
|
+
|
|
|
+ if (ListUtil.isEmpty(list)) {
|
|
|
+ return retMap;
|
|
|
+ }
|
|
|
+
|
|
|
+ for (MappingConfig item : list) {
|
|
|
+ if (StringUtil.isBlank(item.getHisDetailName())) {
|
|
|
+ item.setHisDetailName("");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String, List<MappingConfig>> hisMap = list.stream().collect(Collectors.groupingBy(MappingConfig::getHisName));
|
|
|
+ for (Map.Entry<String, List<MappingConfig>> entry : hisMap.entrySet()) {
|
|
|
+ Map<String, Map<Long, List<Long>>> subMap = new HashMap<>();
|
|
|
+ Map<String, List<MappingConfig>> detailMap = entry.getValue().stream()
|
|
|
+ .collect(Collectors.groupingBy(MappingConfig::getHisDetailName));
|
|
|
+ for (Map.Entry<String, List<MappingConfig>> subEntry : detailMap.entrySet()) {
|
|
|
+ subMap.put(subEntry.getKey(), subEntry.getValue().stream().collect(Collectors.groupingBy(MappingConfig::getConceptId,
|
|
|
+ Collectors.mapping(MappingConfig::getFormConceptId, Collectors.toList()))));
|
|
|
+ }
|
|
|
+ retMap.put(entry.getKey(), subMap);
|
|
|
+ }
|
|
|
+ return retMap;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 根据医院名称分组-返回名称
|
|
|
+ *
|
|
|
+ * @param hisNames
|
|
|
+ * @param type
|
|
|
+ * @param hospitalId
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public Map<String, Map<String, Map<String, List<String>>>> groupByHisNameWithName(List<String> hisNames, Integer type, Long hospitalId) {
|
|
|
+ Map<String, Map<String, Map<String, List<String>>>> retMap = new HashMap<>();
|
|
|
+ Map<String, Map<String, Map<Long, List<Long>>>> idMap = groupByHisNameWithId(hisNames, type, hospitalId);
|
|
|
+
|
|
|
+ //conceptIds
|
|
|
+ List<Long> ids = idMap.values()
|
|
|
+ .stream()
|
|
|
+ .flatMap(i -> i.values().stream())
|
|
|
+ .map(i -> i.keySet())
|
|
|
+ .flatMap(Collection::stream)
|
|
|
+ .filter(i -> i != null)
|
|
|
+ .distinct()
|
|
|
+ .collect(Collectors.toList());
|
|
|
+
|
|
|
+ //formConceptId
|
|
|
+ ids.addAll(idMap.values()
|
|
|
+ .stream()
|
|
|
+ .flatMap(i -> i.values().stream())
|
|
|
+ .flatMap(i -> i.values().stream())
|
|
|
+ .flatMap(Collection::stream)
|
|
|
+ .filter(i -> i != null)
|
|
|
+ .distinct()
|
|
|
+ .collect(Collectors.toList()));
|
|
|
+
|
|
|
+ ConceptVO conceptVO = new ConceptVO();
|
|
|
+ conceptVO.setSource(-1);
|
|
|
+ conceptVO.setType(type);
|
|
|
+ conceptVO.setIds(ids);
|
|
|
+ RespDTO<List<IndexBatchDTO>> respDTO = cdssCoreClient.getConceptNames(conceptVO);
|
|
|
+ RespDTOUtil.respNGDealCover(respDTO, "标准术语校验失败");
|
|
|
+ List<IndexBatchDTO> indexList = respDTO.data;
|
|
|
+ if (ListUtil.isNotEmpty(indexList)) {
|
|
|
+ Map<Long, List<IndexBatchDTO>> indexMap
|
|
|
+ = indexList.stream().collect(Collectors.groupingBy(IndexBatchDTO::getId));
|
|
|
+ for (Map.Entry<String, Map<String, Map<Long, List<Long>>>> entry : idMap.entrySet()) {
|
|
|
+ Map<String, Map<String, List<String>>> subMap = new HashMap<>();
|
|
|
+ for (Map.Entry<String, Map<Long, List<Long>>> subEntry : entry.getValue().entrySet()) {
|
|
|
+ Map<String, List<String>> thirdMap = new HashMap<>();
|
|
|
+ List<String> uniqueNames = Lists.newArrayList();
|
|
|
+ List<String> forms = Lists.newArrayList();
|
|
|
+ for (Long conceptId : subEntry.getValue().keySet()) {
|
|
|
+ uniqueNames.addAll(indexMap.get(conceptId).stream().map(IndexBatchDTO::getName).collect(Collectors.toList()));
|
|
|
+ }
|
|
|
+ List<Long> formConceptIds = subEntry.getValue().values()
|
|
|
+ .stream()
|
|
|
+ .flatMap(Collection::stream)
|
|
|
+ .distinct()
|
|
|
+ .collect(Collectors.toList());
|
|
|
+ for (Long formConceptId : formConceptIds) {
|
|
|
+ if (formConceptId == null) {
|
|
|
+ forms.add("");
|
|
|
+ } else {
|
|
|
+ forms.addAll(indexMap.get(formConceptId).stream().map(IndexBatchDTO::getName).collect(Collectors.toList()));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ forms = forms.stream().distinct().collect(Collectors.toList());
|
|
|
+ for (String uniqueName : uniqueNames) {
|
|
|
+ thirdMap.put(uniqueName, forms);
|
|
|
+ }
|
|
|
+
|
|
|
+ subMap.put(subEntry.getKey(), thirdMap);
|
|
|
+ }
|
|
|
+ retMap.put(entry.getKey(), subMap);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return retMap;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 根据标准名称分组-返回名称
|
|
|
+ *
|
|
|
+ * @param uniqueNames
|
|
|
+ * @param type
|
|
|
+ * @param hospitalId
|
|
|
+ * @return uniqueName, form, hisName, hisDetailName
|
|
|
+ */
|
|
|
+ public Map<String, Map<String, Map<String, List<String>>>> groupByUniqueNameWithName(List<String> uniqueNames, Integer type, Long hospitalId) {
|
|
|
+ Map<String, Map<String, Map<String, List<String>>>> retMap = new HashMap<>();
|
|
|
+
|
|
|
+ List<Long> conceptIds = Lists.newArrayList();
|
|
|
+
|
|
|
+ ConceptVO conceptVO = new ConceptVO();
|
|
|
+ RespDTO<List<IndexBatchDTO>> respDTO = null;
|
|
|
+ List<IndexBatchDTO> indexList = Lists.newArrayList();
|
|
|
+ if (ListUtil.isNotEmpty(uniqueNames)) {
|
|
|
+ conceptVO.setType(type);
|
|
|
+ conceptVO.setNames(uniqueNames);
|
|
|
+ conceptVO.setSource(MatchSourceEnum.StandWord.getKey());
|
|
|
+ respDTO = cdssCoreClient.getConceptNames(conceptVO);
|
|
|
+ if (RespDTOUtil.respIsOK(respDTO)) {
|
|
|
+ indexList.addAll(respDTO.data);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (type.equals(ConceptTypeEnum.LisPack.getKey())) {
|
|
|
+ conceptVO.setType(ConceptTypeEnum.Lis.getKey());
|
|
|
+ respDTO = cdssCoreClient.getConceptNames(conceptVO);
|
|
|
+ if (RespDTOUtil.respIsOK(respDTO)) {
|
|
|
+ indexList.addAll(respDTO.data);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (ListUtil.isNotEmpty(indexList)) {
|
|
|
+ conceptIds = indexList.stream().map(IndexBatchDTO::getId).distinct().collect(Collectors.toList());
|
|
|
+ }
|
|
|
+
|
|
|
+ QueryWrapper<MappingConfig> queryWrapper = new QueryWrapper<>();
|
|
|
+ queryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ .eq("is_match", 1)
|
|
|
+ .eq("type", type);
|
|
|
+ if (hospitalId != null) {
|
|
|
+ queryWrapper.eq("hospital_id", hospitalId);
|
|
|
+ }
|
|
|
+ if (ListUtil.isNotEmpty(conceptIds)) {
|
|
|
+ queryWrapper.in("concept_id", conceptIds);
|
|
|
+ }
|
|
|
+ List<MappingConfig> list = this.list(queryWrapper);
|
|
|
+
|
|
|
+ if (ListUtil.isEmpty(list)) {
|
|
|
+ return retMap;
|
|
|
+ }
|
|
|
+
|
|
|
+ List<MappingConfigWrapper> wrapperList = BeanUtil.listCopyTo(list, MappingConfigWrapper.class);
|
|
|
+ wrapperList = addNames(wrapperList);
|
|
|
+ wrapperList.forEach(item -> {
|
|
|
+ if (StringUtil.isBlank(item.getForm())) {
|
|
|
+ item.setForm("");
|
|
|
+ }
|
|
|
+ if (StringUtil.isBlank(item.getHisDetailName())) {
|
|
|
+ item.setHisDetailName("");
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
+ Map<String, List<MappingConfigWrapper>> map = wrapperList.stream().collect(Collectors.groupingBy(MappingConfigWrapper::getUniqueName));
|
|
|
+
|
|
|
+ for (Map.Entry<String, List<MappingConfigWrapper>> entry : map.entrySet()) {
|
|
|
+ Map<String, Map<String, List<String>>> subMap = new HashMap<>();
|
|
|
+ Map<String, List<MappingConfigWrapper>> formMap
|
|
|
+ = entry.getValue().stream().collect(Collectors.groupingBy(MappingConfigWrapper::getForm));
|
|
|
+ for (Map.Entry<String, List<MappingConfigWrapper>> subEntry : formMap.entrySet()) {
|
|
|
+ subMap.put(subEntry.getKey(), subEntry.getValue().stream().collect(Collectors.groupingBy(MappingConfigWrapper::getHisName,
|
|
|
+ Collectors.mapping(MappingConfigWrapper::getHisDetailName, Collectors.toList()))));
|
|
|
+ }
|
|
|
+ retMap.put(entry.getKey(), subMap);
|
|
|
+ }
|
|
|
+
|
|
|
+ return retMap;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 返回结果添加标准术语,药品剂型
|
|
|
+ *
|
|
|
+ * @param list
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public List<MappingConfigWrapper> addNames(List<MappingConfigWrapper> list) {
|
|
|
+ if (ListUtil.isEmpty(list)) {
|
|
|
+ return list;
|
|
|
+ }
|
|
|
+
|
|
|
+ List<Long> ids = Lists.newArrayList();
|
|
|
+ ids.addAll(list.stream()
|
|
|
+ .filter(i -> i.getConceptId() != null)
|
|
|
+ .map(MappingConfigWrapper::getConceptId)
|
|
|
+ .collect(Collectors.toList()));
|
|
|
+ ids.addAll(list.stream()
|
|
|
+ .filter(i -> i.getFormConceptId() != null)
|
|
|
+ .map(MappingConfigWrapper::getFormConceptId)
|
|
|
+ .collect(Collectors.toList()));
|
|
|
+
|
|
|
+ ConceptVO conceptVO = new ConceptVO();
|
|
|
+ conceptVO.setSource(-1);
|
|
|
+ conceptVO.setIds(ids);
|
|
|
+ RespDTO<List<IndexBatchDTO>> respDTO = cdssCoreClient.getConceptNames(conceptVO);
|
|
|
+ if (RespDTOUtil.respIsOK(respDTO)) {
|
|
|
+ Map<Long, IndexBatchDTO> conceptMap
|
|
|
+ = respDTO.data.stream().collect(Collectors.toMap(IndexBatchDTO::getId, v -> v));
|
|
|
+ for (MappingConfigWrapper record : list) {
|
|
|
+ if (record.getConceptId() != null && conceptMap.containsKey(record.getConceptId())) {
|
|
|
+ record.setUniqueName(conceptMap.get(record.getConceptId()).getName());
|
|
|
+ record.setCode(conceptMap.get(record.getConceptId()).getCode());
|
|
|
+ }
|
|
|
+ if (record.getFormConceptId() != null && conceptMap.containsKey(record.getFormConceptId())) {
|
|
|
+ record.setForm(conceptMap.get(record.getFormConceptId()).getName());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return list;
|
|
|
+ }
|
|
|
+}
|