|
@@ -1,15 +1,15 @@
|
|
|
package com.diagbot.facade;
|
|
|
|
|
|
import com.diagbot.dto.DictionaryInfoDTO;
|
|
|
-import com.diagbot.entity.node.Indication;
|
|
|
-import com.diagbot.entity.node.IndicationConcept;
|
|
|
-import com.diagbot.entity.node.IndicationCondition;
|
|
|
-import com.diagbot.repository.IndicationRepository;
|
|
|
+import com.diagbot.entity.node.BillItem;
|
|
|
+import com.diagbot.entity.node.BillConcept;
|
|
|
+import com.diagbot.entity.node.BillCondition;
|
|
|
+import com.diagbot.repository.BillManRepository;
|
|
|
import com.diagbot.util.EntityUtil;
|
|
|
import com.diagbot.util.ListUtil;
|
|
|
import com.diagbot.vo.ConceptIndexVO;
|
|
|
import com.diagbot.vo.ConditionIndexVO;
|
|
|
-import com.diagbot.vo.IndicationPageVO;
|
|
|
+import com.diagbot.vo.BillPageVO;
|
|
|
import com.google.common.collect.Lists;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.data.domain.Page;
|
|
@@ -27,19 +27,19 @@ import java.util.stream.Collectors;
|
|
|
* @time: 2020/11/17 13:53
|
|
|
*/
|
|
|
@Component
|
|
|
-public class IndicationManFacade {
|
|
|
+public class BillManFacade {
|
|
|
@Autowired
|
|
|
- IndicationRepository indicationRepository;
|
|
|
+ BillManRepository billManRepository;
|
|
|
@Autowired
|
|
|
DictionaryFacade dictionaryFacade;
|
|
|
|
|
|
/**
|
|
|
* 获取开单合理项列表
|
|
|
*
|
|
|
- * @param indicationPageVO
|
|
|
+ * @param billPageVO
|
|
|
* @return
|
|
|
*/
|
|
|
- public Page<Indication> getPage(IndicationPageVO indicationPageVO) {
|
|
|
+ public Page<BillItem> getPage(BillPageVO billPageVO) {
|
|
|
List<DictionaryInfoDTO> dicTypeConvert = dictionaryFacade.getListByGroupType(8);
|
|
|
List<DictionaryInfoDTO> dicIndicationManType = dictionaryFacade.getListByGroupType(11);
|
|
|
Map<String, String> dicTypeConvertMap
|
|
@@ -47,20 +47,20 @@ public class IndicationManFacade {
|
|
|
Map<String, String> dicIndicationManTypeMap
|
|
|
= EntityUtil.makeMapWithKeyValue(dicIndicationManType, "val", "name");
|
|
|
List<String> labels = Lists.newArrayList();
|
|
|
- if (ListUtil.isNotEmpty(indicationPageVO.getTypes())) {
|
|
|
- for (Integer type : indicationPageVO.getTypes()) {
|
|
|
+ if (ListUtil.isNotEmpty(billPageVO.getTypes())) {
|
|
|
+ for (Integer type : billPageVO.getTypes()) {
|
|
|
if (dicIndicationManTypeMap.containsKey(type.toString())
|
|
|
&& dicTypeConvertMap.containsKey(dicIndicationManTypeMap.get(type.toString()))) {
|
|
|
labels.add(dicTypeConvertMap.get(dicIndicationManTypeMap.get(type.toString())));
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- indicationPageVO.setLabels(labels);
|
|
|
- Pageable pageable = PageRequest.of(indicationPageVO.getNumber(), indicationPageVO.getSize());
|
|
|
- Page<Indication> page = indicationRepository.getPage(indicationPageVO.getLabels(),
|
|
|
- indicationPageVO.getConceptName(),
|
|
|
- indicationPageVO.getConditionName(),
|
|
|
- indicationPageVO.getRelationStatus(),
|
|
|
+ billPageVO.setLabels(labels);
|
|
|
+ Pageable pageable = PageRequest.of(billPageVO.getNumber(), billPageVO.getSize());
|
|
|
+ Page<BillItem> page = billManRepository.getPage(billPageVO.getLabels(),
|
|
|
+ billPageVO.getConceptName(),
|
|
|
+ billPageVO.getConditionName(),
|
|
|
+ billPageVO.getRelationStatus(),
|
|
|
pageable);
|
|
|
return page;
|
|
|
}
|
|
@@ -71,7 +71,7 @@ public class IndicationManFacade {
|
|
|
* @param conditionIndexVO
|
|
|
* @return
|
|
|
*/
|
|
|
- public List<IndicationCondition> conditionIndex(ConditionIndexVO conditionIndexVO) {
|
|
|
+ public List<BillCondition> conditionIndex(ConditionIndexVO conditionIndexVO) {
|
|
|
List<DictionaryInfoDTO> dicTypeConvert = dictionaryFacade.getListByGroupType(8);
|
|
|
List<DictionaryInfoDTO> dicIndicationManType = dictionaryFacade.getListByGroupType(11);
|
|
|
Map<String, String> dicTypeConvertMap
|
|
@@ -82,7 +82,7 @@ public class IndicationManFacade {
|
|
|
&& dicTypeConvertMap.containsKey(dicIndicationManTypeMap.get(conditionIndexVO.getType().toString()))) {
|
|
|
conditionIndexVO.setConceptLabel(dicTypeConvertMap.get(dicIndicationManTypeMap.get(conditionIndexVO.getType().toString())));
|
|
|
}
|
|
|
- List<String> relationTypes = indicationRepository.getRelationTypes(conditionIndexVO.getConceptLabel());
|
|
|
+ List<String> relationTypes = billManRepository.getRelationTypes(conditionIndexVO.getConceptLabel());
|
|
|
List<String> conditionLabels = Lists.newArrayList();
|
|
|
//条件明细筛选范围
|
|
|
if (ListUtil.isNotEmpty(relationTypes)) {
|
|
@@ -94,13 +94,13 @@ public class IndicationManFacade {
|
|
|
}
|
|
|
}
|
|
|
//排除项
|
|
|
- List<IndicationCondition> notInConditions
|
|
|
- = indicationRepository.getNotInConditions(conditionIndexVO.getConceptName(), conditionIndexVO.getConceptLabel());
|
|
|
+ List<BillCondition> notInConditions
|
|
|
+ = billManRepository.getNotInConditions(conditionIndexVO.getConceptName(), conditionIndexVO.getConceptLabel());
|
|
|
List<Long> notInIds = Lists.newArrayList();
|
|
|
if (ListUtil.isNotEmpty(notInConditions) && conditionIndexVO.getRuleType().equals("文本类型")) {
|
|
|
notInIds = notInConditions.stream().map(i -> i.getId()).distinct().collect(Collectors.toList());
|
|
|
}
|
|
|
- List<IndicationCondition> conditions = indicationRepository.conditionIndex(conditionLabels,
|
|
|
+ List<BillCondition> conditions = billManRepository.conditionIndex(conditionLabels,
|
|
|
notInIds,
|
|
|
conditionIndexVO.getConditionName(),
|
|
|
conditionIndexVO.getConditionName(),
|
|
@@ -115,7 +115,7 @@ public class IndicationManFacade {
|
|
|
* @param conceptIndexVO
|
|
|
* @return
|
|
|
*/
|
|
|
- public List<IndicationConcept> conceptIndex(ConceptIndexVO conceptIndexVO) {
|
|
|
+ public List<BillConcept> conceptIndex(ConceptIndexVO conceptIndexVO) {
|
|
|
List<String> conceptLabels = Lists.newArrayList();
|
|
|
List<DictionaryInfoDTO> dicTypeConvert = dictionaryFacade.getListByGroupType(8);
|
|
|
List<DictionaryInfoDTO> dicIndicationManType = dictionaryFacade.getListByGroupType(11);
|
|
@@ -128,7 +128,7 @@ public class IndicationManFacade {
|
|
|
conceptIndexVO.setConceptLabel(dicTypeConvertMap.get(dicIndicationManTypeMap.get(conceptIndexVO.getType().toString())));
|
|
|
conceptLabels.add(conceptIndexVO.getConceptLabel());
|
|
|
}
|
|
|
- List<IndicationConcept> concepts = indicationRepository.conceptIndex(conceptLabels,
|
|
|
+ List<BillConcept> concepts = billManRepository.conceptIndex(conceptLabels,
|
|
|
conceptIndexVO.getConceptName(),
|
|
|
conceptIndexVO.getConceptName(),
|
|
|
100);
|