|
@@ -11,6 +11,7 @@ import com.diagbot.dto.DictionaryInfoDTO;
|
|
|
import com.diagbot.dto.KlConceptDetailDTO;
|
|
|
import com.diagbot.dto.KlConceptStaticDTO;
|
|
|
import com.diagbot.dto.KlScaleByIdDTO;
|
|
|
+import com.diagbot.dto.ScaleDTO;
|
|
|
import com.diagbot.dto.StaticKnowledgeDTO;
|
|
|
import com.diagbot.dto.StaticKnowledgeDetailDTO;
|
|
|
import com.diagbot.dto.StaticKnowledgeIndexPageDTO;
|
|
@@ -37,6 +38,7 @@ import com.diagbot.vo.IdVO;
|
|
|
import com.diagbot.vo.KlConceptStaticPageVO;
|
|
|
import com.diagbot.vo.KlConceptStaticVO;
|
|
|
import com.diagbot.vo.KlScaleByIdVO;
|
|
|
+import com.diagbot.vo.ScaleVO;
|
|
|
import com.diagbot.vo.StaticKnowledgeIndexPageVO;
|
|
|
import com.diagbot.vo.StaticKnowledgeVO;
|
|
|
import com.google.common.collect.Lists;
|
|
@@ -79,6 +81,8 @@ public class KlConceptStaticFacade extends KlConceptStaticServiceImpl {
|
|
|
private DictionaryFacade dictionaryFacade;
|
|
|
@Autowired
|
|
|
private MedRetrievalFacade medRetrievalFacade;
|
|
|
+ @Autowired
|
|
|
+ KlRegulationBaseFacade klRegulationBaseFacade;
|
|
|
|
|
|
/**
|
|
|
* 获取静态知识
|
|
@@ -267,7 +271,9 @@ public class KlConceptStaticFacade extends KlConceptStaticServiceImpl {
|
|
|
}
|
|
|
if (type.equals(LexiconEnum.Scale.getKey())) {
|
|
|
//量表详情
|
|
|
- staticKnowledgeDTO.setScale(getScaleStructure(concept.getId()));
|
|
|
+ ScaleVO scaleVO = new ScaleVO();
|
|
|
+ BeanUtil.copyProperties(staticKnowledgeVO, scaleVO);
|
|
|
+ staticKnowledgeDTO.setScale(getScaleStructure(scaleVO, concept.getId()));
|
|
|
}
|
|
|
|
|
|
staticKnowledgeDTO.setClinicalPathwayName(staticInfo.getClinicalPathwayName());
|
|
@@ -781,6 +787,7 @@ public class KlConceptStaticFacade extends KlConceptStaticServiceImpl {
|
|
|
|
|
|
/**
|
|
|
* 获取量表结构map Map<name_type,List<KlConceptScale>>
|
|
|
+ *
|
|
|
* @param getDetailVO
|
|
|
* @return
|
|
|
*/
|
|
@@ -802,7 +809,7 @@ public class KlConceptStaticFacade extends KlConceptStaticServiceImpl {
|
|
|
if (ListUtil.isNotEmpty(conceptList)) {
|
|
|
for (KlConcept concept : conceptList) {
|
|
|
retMap.put(concept.getLibName() + "_" + dicTypeNameMap.get(LexiconEnum.Scale.getName()),
|
|
|
- getScaleStructure(concept.getId()));
|
|
|
+ getScaleStructure(new ScaleVO(), concept.getId()));
|
|
|
}
|
|
|
}
|
|
|
return retMap;
|
|
@@ -813,7 +820,7 @@ public class KlConceptStaticFacade extends KlConceptStaticServiceImpl {
|
|
|
* @param conceptId
|
|
|
* @return
|
|
|
*/
|
|
|
- public ConceptScaleDTO getScaleStructure(Long conceptId) {
|
|
|
+ public ConceptScaleDTO getScaleStructure(ScaleVO scaleVO, Long conceptId) {
|
|
|
ConceptScaleDTO retDTO = new ConceptScaleDTO();
|
|
|
List<KlConceptScale> scaleList = klConceptScaleFacade.list(new QueryWrapper<KlConceptScale>()
|
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
@@ -823,6 +830,40 @@ public class KlConceptStaticFacade extends KlConceptStaticServiceImpl {
|
|
|
return null;
|
|
|
}
|
|
|
List<ConceptScaleDetailDTO> scaleDetailList = BeanUtil.listCopyTo(scaleList, ConceptScaleDetailDTO.class);
|
|
|
+ if (null != scaleVO) {
|
|
|
+ List<String> codeList = new ArrayList<>();
|
|
|
+ codeList = scaleDetailList.stream().map(ac -> ac.getRuleCode()).collect(Collectors.toList());
|
|
|
+ scaleVO.setCodeList(codeList);
|
|
|
+ ScaleDTO scaleDTO = klRegulationBaseFacade.process(scaleVO);
|
|
|
+ List<String> codeListNew = scaleDTO.getCodeList(); //Arrays.asList("100001", "100013");
|
|
|
+ if (ListUtil.isNotEmpty(codeListNew)) {
|
|
|
+ for (String str : codeListNew) {
|
|
|
+ for (ConceptScaleDetailDTO data2 : scaleDetailList) {
|
|
|
+ if (null!=data2.getRuleCode()&&data2.getRuleCode().equals(str)) {
|
|
|
+ data2.setMatch(1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (null != scaleVO) {
|
|
|
+ List<String> codeList = new ArrayList<>();
|
|
|
+ codeList = scaleDetailList.stream().map(ac -> ac.getRuleCode()).collect(Collectors.toList());
|
|
|
+ scaleVO.setCodeList(codeList);
|
|
|
+ ScaleDTO scaleDTO = klRegulationBaseFacade.process(scaleVO);
|
|
|
+ List<String> codeListNew = scaleDTO.getCodeList(); //Arrays.asList("100001", "100013");
|
|
|
+ if (ListUtil.isNotEmpty(codeListNew)) {
|
|
|
+ for (String str : codeListNew) {
|
|
|
+ for (ConceptScaleDetailDTO data2 : scaleDetailList) {
|
|
|
+ if (null!=data2.getRuleCode()&&data2.getRuleCode().equals(str)) {
|
|
|
+ data2.setMatch(1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
Map<Long, List<ConceptScaleDetailDTO>> parentMap
|
|
|
= scaleDetailList.stream().collect(Collectors.groupingBy(ConceptScaleDetailDTO::getParentId));
|
|
|
List<ConceptScaleDetailDTO> retScacleDetailList = parentMap.get(-1L);
|
|
@@ -852,7 +893,7 @@ public class KlConceptStaticFacade extends KlConceptStaticServiceImpl {
|
|
|
* @param treeMap
|
|
|
*/
|
|
|
public ConceptScaleSubDTO scaleRecursion(ConceptScaleSubDTO item,
|
|
|
- Map<Long, List<ConceptScaleDetailDTO>> treeMap) {
|
|
|
+ Map<Long, List<ConceptScaleDetailDTO>> treeMap) {
|
|
|
List<ConceptScaleDetailDTO> list = item.getDetailList();
|
|
|
if (ListUtil.isNotEmpty(list)) {
|
|
|
for (ConceptScaleDetailDTO detail : list) {
|