|
@@ -2,11 +2,11 @@ package com.diagbot.service.impl;
|
|
|
|
|
|
import com.diagbot.biz.push.entity.Item;
|
|
|
import com.diagbot.dto.TcmDTO;
|
|
|
+import com.diagbot.enums.ConceptTypeEnum;
|
|
|
import com.diagbot.enums.OtherIndexEnum;
|
|
|
import com.diagbot.exception.CommonErrorCode;
|
|
|
import com.diagbot.exception.CommonException;
|
|
|
-import com.diagbot.facade.TcmdiseaseConfigFacade;
|
|
|
-import com.diagbot.facade.TcmsyndromeConfigFacade;
|
|
|
+import com.diagbot.facade.MappingConfigFacade;
|
|
|
import com.diagbot.idc.VisibleIdCreater;
|
|
|
import com.diagbot.service.MrService;
|
|
|
import com.diagbot.util.DateUtil;
|
|
@@ -23,6 +23,7 @@ import org.springframework.stereotype.Service;
|
|
|
|
|
|
import java.util.Arrays;
|
|
|
import java.util.Date;
|
|
|
+import java.util.List;
|
|
|
import java.util.Map;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
@@ -38,9 +39,7 @@ public class MrServiceImpl implements MrService {
|
|
|
@Qualifier("redisTemplateForMr")
|
|
|
private RedisTemplate redisForMr;
|
|
|
@Autowired
|
|
|
- private TcmdiseaseConfigFacade tcmdiseaseConfigFacade;
|
|
|
- @Autowired
|
|
|
- private TcmsyndromeConfigFacade tcmsyndromeConfigFacade;
|
|
|
+ private MappingConfigFacade mappingConfigFacade;
|
|
|
|
|
|
@Autowired
|
|
|
private VisibleIdCreater visibleIdCreater;
|
|
@@ -142,11 +141,16 @@ public class MrServiceImpl implements MrService {
|
|
|
Item tcmdisease = new Item();
|
|
|
if (otherIndex.containsKey(OtherIndexEnum.getName(OtherIndexEnum.TcmDiag.getKey()))) {
|
|
|
tcmdisease.setName(otherIndex.get(OtherIndexEnum.getName(OtherIndexEnum.TcmDiag.getKey())));
|
|
|
- Map<String, Map<String, Long>> configMap
|
|
|
- = tcmdiseaseConfigFacade.getConfigMap(hospitalId,
|
|
|
- Arrays.asList(new String[] { tcmdisease.getName() }), null);
|
|
|
+ Map<String, Map<String, Map<String, List<String>>>> configMap
|
|
|
+ = mappingConfigFacade.groupByHisNameWithName(Arrays.asList(new String[] { tcmdisease.getName() }),
|
|
|
+ ConceptTypeEnum.Tcmdisease.getKey(), hospitalId);
|
|
|
if (configMap != null && configMap.get(tcmdisease.getName()) != null) {
|
|
|
- tcmdisease.setUniqueName(configMap.get(tcmdisease.getName()).keySet().stream().collect(Collectors.toList()).get(0));
|
|
|
+ tcmdisease.setUniqueName(configMap.get(tcmdisease.getName())
|
|
|
+ .get("")
|
|
|
+ .keySet()
|
|
|
+ .stream()
|
|
|
+ .collect(Collectors.toList())
|
|
|
+ .get(0));
|
|
|
} else {
|
|
|
tcmdisease.setUniqueName(tcmdisease.getName());
|
|
|
}
|
|
@@ -156,11 +160,16 @@ public class MrServiceImpl implements MrService {
|
|
|
Item tcmsyndrome = new Item();
|
|
|
if (otherIndex.containsKey(OtherIndexEnum.getName(OtherIndexEnum.TcmSyndrome.getKey()))) {
|
|
|
tcmsyndrome.setName(otherIndex.get(OtherIndexEnum.getName(OtherIndexEnum.TcmSyndrome.getKey())));
|
|
|
- Map<String, Map<String, Long>> configMap
|
|
|
- = tcmsyndromeConfigFacade.getConfigMap(hospitalId,
|
|
|
- Arrays.asList(new String[] { tcmsyndrome.getName() }), null);
|
|
|
+ Map<String, Map<String, Map<String, List<String>>>> configMap
|
|
|
+ = mappingConfigFacade.groupByHisNameWithName(Arrays.asList(new String[] { tcmsyndrome.getName() }),
|
|
|
+ ConceptTypeEnum.Tcmsyndrome.getKey(), hospitalId);
|
|
|
if (configMap != null && configMap.get(tcmsyndrome.getName()) != null) {
|
|
|
- tcmsyndrome.setUniqueName(configMap.get(tcmsyndrome.getName()).keySet().stream().collect(Collectors.toList()).get(0));
|
|
|
+ tcmsyndrome.setUniqueName(configMap.get(tcmsyndrome.getName())
|
|
|
+ .get("")
|
|
|
+ .keySet()
|
|
|
+ .stream()
|
|
|
+ .collect(Collectors.toList())
|
|
|
+ .get(0));
|
|
|
} else {
|
|
|
tcmsyndrome.setUniqueName(tcmsyndrome.getName());
|
|
|
}
|
|
@@ -187,4 +196,4 @@ public class MrServiceImpl implements MrService {
|
|
|
});
|
|
|
return l > 0;
|
|
|
}
|
|
|
-}
|
|
|
+}
|