|
@@ -32,6 +32,7 @@ import com.diagbot.util.RespDTOUtil;
|
|
|
import com.diagbot.util.StringUtil;
|
|
|
import com.diagbot.util.SysUserUtils;
|
|
|
import com.diagbot.vo.ConceptVO;
|
|
|
+import com.diagbot.vo.FilterVO;
|
|
|
import com.diagbot.vo.MappingConfigPageVO;
|
|
|
import com.google.common.collect.Lists;
|
|
|
import org.apache.ibatis.annotations.Param;
|
|
@@ -65,14 +66,40 @@ public class MappingConfigFacade extends MappingConfigServiceImpl {
|
|
|
* @return
|
|
|
*/
|
|
|
@Override
|
|
|
- public IPage<MappingConfig> getPage(@Param("mappingConfigPageVO") MappingConfigPageVO mappingConfigPageVO) {
|
|
|
+ public IPage<MappingConfigWrapper> getPage(@Param("mappingConfigPageVO") MappingConfigPageVO mappingConfigPageVO) {
|
|
|
if (mappingConfigPageVO.getHospitalId() == null) {
|
|
|
mappingConfigPageVO.setHospitalId(Long.valueOf(SysUserUtils.getCurrentHospitalID()));
|
|
|
}
|
|
|
|
|
|
+ FilterVO filterVO = new FilterVO();
|
|
|
+ RespDTO<List<IndexBatchDTO>> respDTO = null;
|
|
|
+
|
|
|
//todo 标准词转conceptId
|
|
|
+ if (StringUtil.isNotBlank(mappingConfigPageVO.getUniqueName())) {
|
|
|
+ filterVO.setInputStr(mappingConfigPageVO.getUniqueName());
|
|
|
+ respDTO = cdssCoreClient.filter(filterVO);
|
|
|
+ if (RespDTOUtil.respIsOK(respDTO) && ListUtil.isNotEmpty(respDTO.data)) {
|
|
|
+ mappingConfigPageVO.setConceptIds(respDTO.data
|
|
|
+ .stream()
|
|
|
+ .map(IndexBatchDTO::getId)
|
|
|
+ .distinct()
|
|
|
+ .collect(Collectors.toList()));
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
//todo 药品剂型转 conceptId
|
|
|
+ if (StringUtil.isNotBlank(mappingConfigPageVO.getForm())) {
|
|
|
+ filterVO.setInputStr(mappingConfigPageVO.getForm());
|
|
|
+ respDTO = cdssCoreClient.filter(filterVO);
|
|
|
+ if (RespDTOUtil.respIsOK(respDTO) && ListUtil.isNotEmpty(respDTO.data)) {
|
|
|
+ mappingConfigPageVO.setFormConceptIds(respDTO.data
|
|
|
+ .stream()
|
|
|
+ .filter(i -> i.getType().equals(ConceptTypeEnum.Form.getKey()))
|
|
|
+ .map(IndexBatchDTO::getId)
|
|
|
+ .distinct()
|
|
|
+ .collect(Collectors.toList()));
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
//todo 多条匹配
|
|
|
if (mappingConfigPageVO.getIsMatch() != null && mappingConfigPageVO.getIsMatch().equals(2)) {
|
|
@@ -80,9 +107,30 @@ public class MappingConfigFacade extends MappingConfigServiceImpl {
|
|
|
mappingConfigPageVO.setIsMultiple(1);
|
|
|
}
|
|
|
|
|
|
- IPage<MappingConfig> page = super.getPage(mappingConfigPageVO);
|
|
|
+ IPage<MappingConfigWrapper> page = super.getPage(mappingConfigPageVO);
|
|
|
|
|
|
//todo conceptId转标准词
|
|
|
+ List<MappingConfigWrapper> records = page.getRecords();
|
|
|
+ ConceptVO conceptVO = new ConceptVO();
|
|
|
+ List<Long> ids = Lists.newArrayList();
|
|
|
+ ids.addAll(records.stream().map(MappingConfigWrapper::getConceptId).collect(Collectors.toList()));
|
|
|
+ ids.addAll(records.stream().filter(i -> i.getFormConceptId() != null)
|
|
|
+ .map(MappingConfigWrapper::getFormConceptId).collect(Collectors.toList()));
|
|
|
+ conceptVO.setIds(ids);
|
|
|
+ RespDTO<List<IndexBatchDTO>> resultRespDTO = cdssCoreClient.getConceptNames(conceptVO);
|
|
|
+ if (RespDTOUtil.respIsOK(resultRespDTO) && ListUtil.isNotEmpty(resultRespDTO.data)) {
|
|
|
+ Map<Long, String> conceptMap
|
|
|
+ = resultRespDTO.data.stream().collect(Collectors.toMap(IndexBatchDTO::getId, IndexBatchDTO::getName));
|
|
|
+ for (MappingConfigWrapper record : records) {
|
|
|
+ if (conceptMap.containsKey(record.getConceptId())) {
|
|
|
+ record.setUniqueName(conceptMap.get(record.getConceptId()));
|
|
|
+ }
|
|
|
+ if (record.getFormConceptId() != null && conceptMap.containsKey(record.getFormConceptId())) {
|
|
|
+ record.setForm(conceptMap.get(record.getFormConceptId()));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ page.setRecords(records);
|
|
|
+ }
|
|
|
|
|
|
return page;
|
|
|
}
|
|
@@ -210,7 +258,7 @@ public class MappingConfigFacade extends MappingConfigServiceImpl {
|
|
|
originList = BeanUtil.listCopyTo(diseaseConfigList, MappingConfigWrapper.class);
|
|
|
break;
|
|
|
case 5:
|
|
|
- List<DrugConfig> drugConfigList = ExcelUtils.importExcel(file, 0, 1, DrugConfig.class);
|
|
|
+ List<DrugConfig> drugConfigList = ExcelUtils.importExcel(file, 1, 1, DrugConfig.class);
|
|
|
originList = BeanUtil.listCopyTo(drugConfigList, MappingConfigWrapper.class);
|
|
|
break;
|
|
|
case 6:
|
|
@@ -259,6 +307,7 @@ public class MappingConfigFacade extends MappingConfigServiceImpl {
|
|
|
*/
|
|
|
public List<MappingConfigWrapper> dataProcess(List<MappingConfigWrapper> originList, Integer type) {
|
|
|
List<MappingConfigWrapper> retList = Lists.newLinkedList();
|
|
|
+ List<MappingConfigWrapper> dataList = Lists.newLinkedList();
|
|
|
List<MappingConfigWrapper> standardList = Lists.newLinkedList();
|
|
|
List<MappingConfigWrapper> synonymsList = Lists.newLinkedList();
|
|
|
List<MappingConfigWrapper> codeList = Lists.newLinkedList();
|
|
@@ -266,6 +315,7 @@ public class MappingConfigFacade extends MappingConfigServiceImpl {
|
|
|
|
|
|
//数据完整性校验
|
|
|
for (MappingConfigWrapper item : originList) {
|
|
|
+ //过滤医院术语名称为空的条目
|
|
|
if (StringUtil.isNotBlank(item.getHisName())) {
|
|
|
item.setHisName(item.getHisName().trim());
|
|
|
} else {
|
|
@@ -278,20 +328,20 @@ public class MappingConfigFacade extends MappingConfigServiceImpl {
|
|
|
item.setHisCode(item.getHisCode().trim());
|
|
|
}
|
|
|
item.setUniqueName("");
|
|
|
- standardList.add(item);
|
|
|
+ dataList.add(item);
|
|
|
}
|
|
|
|
|
|
- if (ListUtil.isEmpty(standardList)) {
|
|
|
+ if (ListUtil.isEmpty(dataList)) {
|
|
|
return retList;
|
|
|
}
|
|
|
|
|
|
//标准词匹配
|
|
|
- List<String> nameList = standardList.stream()
|
|
|
+ List<String> nameList = dataList.stream()
|
|
|
.filter(i -> StringUtil.isBlank(i.getHisDetailName()))
|
|
|
.map(MappingConfigWrapper::getHisName)
|
|
|
.distinct()
|
|
|
.collect(Collectors.toList());
|
|
|
- List<String> subNameList = standardList.stream()
|
|
|
+ List<String> subNameList = dataList.stream()
|
|
|
.filter(i -> StringUtil.isNotBlank(i.getHisDetailName()))
|
|
|
.map(MappingConfigWrapper::getHisDetailName)
|
|
|
.distinct()
|
|
@@ -307,44 +357,51 @@ public class MappingConfigFacade extends MappingConfigServiceImpl {
|
|
|
conceptVO.setNames(subNameList);
|
|
|
RespDTO<List<IndexBatchDTO>> subRespDTO = cdssCoreClient.getConceptNames(conceptVO);
|
|
|
RespDTOUtil.respNGDealCover(subRespDTO, "标准术语校验失败");
|
|
|
- Map<String, IndexBatchDTO> nameMap = new HashMap<>();
|
|
|
- Map<String, IndexBatchDTO> subNameMap = new HashMap<>();
|
|
|
+ Map<String, List<IndexBatchDTO>> nameMap = new HashMap<>();
|
|
|
+ Map<String, List<IndexBatchDTO>> subNameMap = new HashMap<>();
|
|
|
if (ListUtil.isNotEmpty(respDTO.data)) {
|
|
|
- nameMap = respDTO.data.stream().collect(Collectors.toMap(IndexBatchDTO::getName, v -> v));
|
|
|
+ nameMap = respDTO.data.stream().collect(Collectors.groupingBy(IndexBatchDTO::getName));
|
|
|
}
|
|
|
if (ListUtil.isNotEmpty(subRespDTO.data)) {
|
|
|
- subNameMap = subRespDTO.data.stream().collect(Collectors.toMap(IndexBatchDTO::getName, v -> v));
|
|
|
+ subNameMap = subRespDTO.data.stream().collect(Collectors.groupingBy(IndexBatchDTO::getName));
|
|
|
}
|
|
|
- for (MappingConfigWrapper item : standardList) {
|
|
|
- IndexBatchDTO index = null;
|
|
|
+ for (MappingConfigWrapper item : dataList) {
|
|
|
+ List<IndexBatchDTO> indexList = Lists.newArrayList();
|
|
|
if (type.equals(ConceptTypeEnum.LisPack.getKey()) && StringUtil.isNotBlank(item.getHisDetailName())) {
|
|
|
if (subNameMap.containsKey(item.getHisDetailName())) {
|
|
|
- index = subNameMap.get(item.getHisDetailName());
|
|
|
+ indexList = subNameMap.get(item.getHisDetailName());
|
|
|
}
|
|
|
} else {
|
|
|
if (nameMap.containsKey(item.getHisName())) {
|
|
|
- index = nameMap.get(item.getHisName());
|
|
|
+ indexList = nameMap.get(item.getHisName());
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if (index == null) {
|
|
|
+ if (ListUtil.isEmpty(indexList)) {
|
|
|
+ standardList.add(item);
|
|
|
continue;
|
|
|
}
|
|
|
- item.setUniqueName(index.getName());
|
|
|
- item.setConceptId(index.getId());
|
|
|
- item.setCode(index.getCode());
|
|
|
- item.setIsMatch(1);
|
|
|
- item.setSource(MatchSourceEnum.StandWord.getKey());
|
|
|
+ //标准词默认取第一个
|
|
|
+ MappingConfigWrapper standardItem = new MappingConfigWrapper();
|
|
|
+ BeanUtil.copyProperties(item, standardItem);
|
|
|
+ standardItem.setUniqueName(indexList.get(0).getName());
|
|
|
+ standardItem.setConceptId(indexList.get(0).getId());
|
|
|
+ standardItem.setCode(indexList.get(0).getCode());
|
|
|
+ standardItem.setIsMatch(1);
|
|
|
+ standardItem.setSource(MatchSourceEnum.StandWord.getKey());
|
|
|
+ standardList.add(standardItem);
|
|
|
}
|
|
|
|
|
|
//同义词匹配
|
|
|
List<String> synonymsNameList = standardList.stream()
|
|
|
- .filter(i -> i.getConceptId() == null && StringUtil.isBlank(i.getHisDetailName()))
|
|
|
+ .filter(i -> (i.getIsMatch() == null || i.getIsMatch().equals(0))
|
|
|
+ && StringUtil.isBlank(i.getHisDetailName()))
|
|
|
.map(MappingConfigWrapper::getHisName)
|
|
|
.distinct()
|
|
|
.collect(Collectors.toList());
|
|
|
List<String> synonymsSubNameList = standardList.stream()
|
|
|
- .filter(i -> i.getConceptId() == null && StringUtil.isNotBlank(i.getHisDetailName()))
|
|
|
+ .filter(i -> (i.getIsMatch() == null || i.getIsMatch().equals(0))
|
|
|
+ && StringUtil.isNotBlank(i.getHisDetailName()))
|
|
|
.map(MappingConfigWrapper::getHisDetailName)
|
|
|
.distinct()
|
|
|
.collect(Collectors.toList());
|
|
@@ -380,6 +437,12 @@ public class MappingConfigFacade extends MappingConfigServiceImpl {
|
|
|
indexList = synonymsNameMap.get(item.getHisName());
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ if (ListUtil.isEmpty(indexList)) {
|
|
|
+ synonymsList.add(item);
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+
|
|
|
for (IndexBatchDTO index : indexList) {
|
|
|
MappingConfigWrapper synonymsItem = new MappingConfigWrapper();
|
|
|
BeanUtils.copyProperties(item, synonymsItem);
|
|
@@ -398,7 +461,8 @@ public class MappingConfigFacade extends MappingConfigServiceImpl {
|
|
|
|| type.equals(ConceptTypeEnum.Tcmdisease.getKey())
|
|
|
|| type.equals(ConceptTypeEnum.Tcmsyndrome.getKey())) {
|
|
|
List<String> codes = synonymsList.stream()
|
|
|
- .filter(i -> StringUtil.isNotBlank(i.getCode()))
|
|
|
+ .filter(i -> (i.getIsMatch() == null || i.getIsMatch().equals(0))
|
|
|
+ && StringUtil.isNotBlank(i.getCode()))
|
|
|
.map(MappingConfigWrapper::getCode)
|
|
|
.distinct()
|
|
|
.collect(Collectors.toList());
|
|
@@ -437,32 +501,48 @@ public class MappingConfigFacade extends MappingConfigServiceImpl {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ } else {
|
|
|
+ codeList = BeanUtil.listCopyTo(synonymsList, MappingConfigWrapper.class);
|
|
|
}
|
|
|
|
|
|
//todo 历史匹配
|
|
|
List<String> hisNames = codeList.stream()
|
|
|
- .filter(i -> i.getIsMatch() == null)
|
|
|
+ .filter(i -> i.getIsMatch() == null || i.getIsMatch().equals(0))
|
|
|
.map(MappingConfigWrapper::getHisName)
|
|
|
.distinct()
|
|
|
.collect(Collectors.toList());
|
|
|
if (ListUtil.isNotEmpty(hisNames)) {
|
|
|
- Map<String, Map<String, List<String>>> configMap = groupByHisNameWithName(hisNames, type, null);
|
|
|
+ Map<String, Map<String, Map<String, List<String>>>> configMap = groupByHisNameWithName(hisNames, type, null);
|
|
|
|
|
|
for (MappingConfigWrapper item : codeList) {
|
|
|
if (item.getIsMatch() != null && item.getIsMatch().equals(1)) {
|
|
|
retList.add(item);
|
|
|
}
|
|
|
if (configMap.containsKey(item.getHisName())) {
|
|
|
- Map<String, List<String>> subMap = configMap.get(item.getHisName());
|
|
|
- for (Map.Entry<String, List<String>> subEntry : subMap.entrySet()) {
|
|
|
- for (String name : subEntry.getValue()) {
|
|
|
+ Map<String, Map<String, List<String>>> subMap = configMap.get(item.getHisName());
|
|
|
+ for (Map.Entry<String, Map<String, List<String>>> subEntry : subMap.entrySet()) {
|
|
|
+ for (String name : subEntry.getValue().keySet()) {
|
|
|
MappingConfigWrapper historyItem = new MappingConfigWrapper();
|
|
|
BeanUtils.copyProperties(item, historyItem);
|
|
|
historyItem.setHisDetailName(subEntry.getKey());
|
|
|
historyItem.setUniqueName(name);
|
|
|
historyItem.setIsMatch(1);
|
|
|
historyItem.setSource(MatchSourceEnum.History.getKey());
|
|
|
- retList.add(historyItem);
|
|
|
+ if (type.equals(ConceptTypeEnum.Drug.getKey())) {
|
|
|
+ List<String> forms = subEntry.getValue().get(name);
|
|
|
+ if (ListUtil.isEmpty(forms)) {
|
|
|
+ retList.add(historyItem);
|
|
|
+ } else {
|
|
|
+ for (String form : forms) {
|
|
|
+ MappingConfigWrapper formItem = new MappingConfigWrapper();
|
|
|
+ BeanUtil.copyProperties(historyItem, formItem);
|
|
|
+ formItem.setForm(form);
|
|
|
+ retList.add(formItem);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ retList.add(historyItem);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -470,7 +550,6 @@ public class MappingConfigFacade extends MappingConfigServiceImpl {
|
|
|
} else {
|
|
|
retList = BeanUtil.listCopyTo(codeList, MappingConfigWrapper.class);
|
|
|
}
|
|
|
-
|
|
|
return retList;
|
|
|
}
|
|
|
|
|
@@ -481,10 +560,11 @@ public class MappingConfigFacade extends MappingConfigServiceImpl {
|
|
|
* @param type
|
|
|
* @return
|
|
|
*/
|
|
|
- public Map<String, Map<String, List<Long>>> groupByHisNameWithId(List<String> hisNames, Integer type, Long hospitalId) {
|
|
|
- Map<String, Map<String, List<Long>>> retMap = new HashMap<>();
|
|
|
+ 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);
|
|
@@ -506,14 +586,15 @@ public class MappingConfigFacade extends MappingConfigServiceImpl {
|
|
|
|
|
|
Map<String, List<MappingConfig>> hisMap = list.stream().collect(Collectors.groupingBy(MappingConfig::getHisName));
|
|
|
for (Map.Entry<String, List<MappingConfig>> entry : hisMap.entrySet()) {
|
|
|
- retMap.put(entry.getKey(), entry.getValue().stream().collect(Collectors.toMap(MappingConfig::getHisDetailName,
|
|
|
- v -> {
|
|
|
- List<Long> ids = Lists.newArrayList();
|
|
|
- ids.add(v.getConceptId());
|
|
|
- return ids;
|
|
|
- })));
|
|
|
+ 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;
|
|
|
}
|
|
|
|
|
@@ -525,16 +606,30 @@ public class MappingConfigFacade extends MappingConfigServiceImpl {
|
|
|
* @param hospitalId
|
|
|
* @return
|
|
|
*/
|
|
|
- public Map<String, Map<String, List<String>>> groupByHisNameWithName(List<String> hisNames, Integer type, Long hospitalId) {
|
|
|
- Map<String, Map<String, List<String>>> retMap = new HashMap<>();
|
|
|
- Map<String, Map<String, List<Long>>> idMap = groupByHisNameWithId(hisNames, type, hospitalId);
|
|
|
-
|
|
|
- List<Long> ids = idMap.values().stream()
|
|
|
+ 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)
|
|
|
- .map(Long::valueOf)
|
|
|
+ .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);
|
|
@@ -545,14 +640,33 @@ public class MappingConfigFacade extends MappingConfigServiceImpl {
|
|
|
if (ListUtil.isNotEmpty(indexList)) {
|
|
|
Map<Long, List<IndexBatchDTO>> indexMap
|
|
|
= indexList.stream().collect(Collectors.groupingBy(IndexBatchDTO::getId));
|
|
|
- for (Map.Entry<String, Map<String, List<Long>>> entry : idMap.entrySet()) {
|
|
|
- Map<String, List<String>> subMap = new HashMap<>();
|
|
|
- for (Map.Entry<String, List<Long>> subEntry : entry.getValue().entrySet()) {
|
|
|
- List<String> nameList = Lists.newArrayList();
|
|
|
- subEntry.getValue().forEach(id -> {
|
|
|
- nameList.addAll(indexMap.get(id).stream().map(IndexBatchDTO::getName).collect(Collectors.toList()));
|
|
|
- });
|
|
|
- subMap.put(subEntry.getKey(), nameList);
|
|
|
+ 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);
|
|
|
}
|