|
@@ -2,17 +2,12 @@ package com.diagbot.aggregate;
|
|
|
|
|
|
import com.diagbot.dto.PushBaseDTO;
|
|
import com.diagbot.dto.PushBaseDTO;
|
|
import com.diagbot.dto.PushDTO;
|
|
import com.diagbot.dto.PushDTO;
|
|
-import com.diagbot.dto.TreatDTO;
|
|
|
|
-import com.diagbot.entity.ConceptDetail;
|
|
|
|
-import com.diagbot.enums.ConceptTypeEnum;
|
|
|
|
-import com.diagbot.facade.ConceptInfoFacade;
|
|
|
|
import com.diagbot.facade.DiseaseConfigFacade;
|
|
import com.diagbot.facade.DiseaseConfigFacade;
|
|
import com.diagbot.facade.DrugConfigFacade;
|
|
import com.diagbot.facade.DrugConfigFacade;
|
|
import com.diagbot.facade.LisConfigFacade;
|
|
import com.diagbot.facade.LisConfigFacade;
|
|
import com.diagbot.facade.OperationConfigFacade;
|
|
import com.diagbot.facade.OperationConfigFacade;
|
|
import com.diagbot.facade.PacsConfigFacade;
|
|
import com.diagbot.facade.PacsConfigFacade;
|
|
import com.diagbot.util.ListUtil;
|
|
import com.diagbot.util.ListUtil;
|
|
-import com.diagbot.util.StringUtil;
|
|
|
|
import com.google.common.collect.Lists;
|
|
import com.google.common.collect.Lists;
|
|
import io.github.lvyahui8.spring.annotation.DataConsumer;
|
|
import io.github.lvyahui8.spring.annotation.DataConsumer;
|
|
import io.github.lvyahui8.spring.annotation.DataProvider;
|
|
import io.github.lvyahui8.spring.annotation.DataProvider;
|
|
@@ -22,7 +17,6 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Component;
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
-import java.util.Arrays;
|
|
|
|
import java.util.HashMap;
|
|
import java.util.HashMap;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
@@ -46,8 +40,6 @@ public class AssemblePushAggregate {
|
|
private DrugConfigFacade drugConfigFacade;
|
|
private DrugConfigFacade drugConfigFacade;
|
|
@Autowired
|
|
@Autowired
|
|
private OperationConfigFacade operationConfigFacade;
|
|
private OperationConfigFacade operationConfigFacade;
|
|
- @Autowired
|
|
|
|
- private ConceptInfoFacade conceptInfoFacade;
|
|
|
|
|
|
|
|
@DataProvider("assemblePushAll")
|
|
@DataProvider("assemblePushAll")
|
|
public PushDTO assemblePushAll(
|
|
public PushDTO assemblePushAll(
|
|
@@ -57,8 +49,7 @@ public class AssemblePushAggregate {
|
|
@DataConsumer("retPacs") List<PushBaseDTO> retPacs,
|
|
@DataConsumer("retPacs") List<PushBaseDTO> retPacs,
|
|
@DataConsumer("retDiagMap") Map<String, List<PushBaseDTO>> retDiagMap,
|
|
@DataConsumer("retDiagMap") Map<String, List<PushBaseDTO>> retDiagMap,
|
|
@DataConsumer("retOperation") List<PushBaseDTO> retOperation,
|
|
@DataConsumer("retOperation") List<PushBaseDTO> retOperation,
|
|
- @DataConsumer("retDrug") List<PushBaseDTO> retDrug,
|
|
|
|
- @DataConsumer("retGeneraTreat") List<TreatDTO> retGeneraTreat) {
|
|
|
|
|
|
+ @DataConsumer("retDrug") List<PushBaseDTO> retDrug) {
|
|
//检验
|
|
//检验
|
|
if (ListUtil.isNotEmpty(retLis)) {
|
|
if (ListUtil.isNotEmpty(retLis)) {
|
|
data.setLis(retLis);
|
|
data.setLis(retLis);
|
|
@@ -79,11 +70,6 @@ public class AssemblePushAggregate {
|
|
if (ListUtil.isNotEmpty(retDrug)) {
|
|
if (ListUtil.isNotEmpty(retDrug)) {
|
|
data.setMedicines(retDrug);
|
|
data.setMedicines(retDrug);
|
|
}
|
|
}
|
|
- //一般治疗
|
|
|
|
- if (ListUtil.isNotEmpty(retGeneraTreat)) {
|
|
|
|
- data.setTreat(retGeneraTreat);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
return data;
|
|
return data;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -210,37 +196,4 @@ public class AssemblePushAggregate {
|
|
}
|
|
}
|
|
return retDrug;
|
|
return retDrug;
|
|
}
|
|
}
|
|
-
|
|
|
|
- @DataProvider("retGeneraTreat")
|
|
|
|
- public List<TreatDTO> retGeneraTreat(@InvokeParameter("pushDTO") PushDTO pushDTO,
|
|
|
|
- @InvokeParameter("hospitalId") Long hospitalId) {
|
|
|
|
- List<TreatDTO> retGeneraTreat = pushDTO.getTreat();
|
|
|
|
- /*TreatDTO record = new TreatDTO();
|
|
|
|
- record.setUniqueName("无晶状体眼");
|
|
|
|
- retGeneraTreat.add(record);*/
|
|
|
|
- if (ListUtil.isNotEmpty(retGeneraTreat)) {
|
|
|
|
- List<String> conceptNameList = retGeneraTreat.stream()
|
|
|
|
- .filter(i -> StringUtil.isNotBlank(i.getUniqueName()))
|
|
|
|
- .map(i -> i.getUniqueName())
|
|
|
|
- .collect(Collectors.toList());
|
|
|
|
- Map<String, List<ConceptDetail>> conceptDetailMap = conceptInfoFacade.getDetailByConcept(conceptNameList);
|
|
|
|
- if (conceptDetailMap == null || conceptDetailMap.size() == 0) {
|
|
|
|
- return retGeneraTreat;
|
|
|
|
- }
|
|
|
|
- for (TreatDTO treatDTO : retGeneraTreat) {
|
|
|
|
- if (StringUtil.isNotBlank(treatDTO.getUniqueName())) {
|
|
|
|
- String key = treatDTO.getUniqueName() + "_" + ConceptTypeEnum.getName(1);
|
|
|
|
- if (conceptDetailMap.containsKey(key)) {
|
|
|
|
- List<ConceptDetail> conceptDetailList = conceptDetailMap.get(key);
|
|
|
|
- treatDTO.setGeneraTreat(conceptDetailList
|
|
|
|
- .stream()
|
|
|
|
- .filter(i -> Arrays.asList(i.getContentType().split(",")).contains("4"))
|
|
|
|
- .collect(Collectors.toList())
|
|
|
|
- .get(0).getContent());
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- return retGeneraTreat;
|
|
|
|
- }
|
|
|
|
}
|
|
}
|