|
@@ -7,6 +7,7 @@ import com.diagbot.facade.DrugConfigFacade;
|
|
|
import com.diagbot.facade.LisConfigFacade;
|
|
|
import com.diagbot.facade.OperationConfigFacade;
|
|
|
import com.diagbot.facade.PacsConfigFacade;
|
|
|
+import com.diagbot.facade.ScaleConfigFacade;
|
|
|
import com.diagbot.util.ListUtil;
|
|
|
import com.google.common.collect.Lists;
|
|
|
import io.github.lvyahui8.spring.annotation.DataConsumer;
|
|
@@ -40,6 +41,8 @@ public class AssemblePushAggregate {
|
|
|
private DrugConfigFacade drugConfigFacade;
|
|
|
@Autowired
|
|
|
private OperationConfigFacade operationConfigFacade;
|
|
|
+ @Autowired
|
|
|
+ private ScaleConfigFacade scaleConfigFacade;
|
|
|
|
|
|
@DataProvider("assemblePushAll")
|
|
|
public PushDTO assemblePushAll(
|
|
@@ -49,7 +52,8 @@ public class AssemblePushAggregate {
|
|
|
@DataConsumer("retPacs") List<PushBaseDTO> retPacs,
|
|
|
@DataConsumer("retDiagMap") Map<String, List<PushBaseDTO>> retDiagMap,
|
|
|
@DataConsumer("retOperation") List<PushBaseDTO> retOperation,
|
|
|
- @DataConsumer("retDrug") List<PushBaseDTO> retDrug) {
|
|
|
+ @DataConsumer("retDrug") List<PushBaseDTO> retDrug,
|
|
|
+ @DataConsumer("retScale") List<PushBaseDTO> retScale) {
|
|
|
//检验
|
|
|
if (ListUtil.isNotEmpty(retLis)) {
|
|
|
data.setLis(retLis);
|
|
@@ -70,6 +74,10 @@ public class AssemblePushAggregate {
|
|
|
if (ListUtil.isNotEmpty(retDrug)) {
|
|
|
data.setMedicines(retDrug);
|
|
|
}
|
|
|
+ //量表
|
|
|
+ if (ListUtil.isNotEmpty(retScale)) {
|
|
|
+ data.setScale(retScale);
|
|
|
+ }
|
|
|
return data;
|
|
|
}
|
|
|
|
|
@@ -196,4 +204,27 @@ public class AssemblePushAggregate {
|
|
|
}
|
|
|
return retDrug;
|
|
|
}
|
|
|
+
|
|
|
+ @DataProvider("retScale")
|
|
|
+ public List<PushBaseDTO> retScale(@InvokeParameter("pushDTO") PushDTO data,
|
|
|
+ @InvokeParameter("hospitalId") Long hospitalId) {
|
|
|
+ //量表
|
|
|
+ List<PushBaseDTO> retScale = new ArrayList<>();
|
|
|
+ if (ListUtil.isNotEmpty(data.getScale())) {
|
|
|
+ retScale = data.getScale();
|
|
|
+ List<String> uniqueNameList = retScale.stream()
|
|
|
+ .map(i -> i.getName())
|
|
|
+ .collect(Collectors.toList());
|
|
|
+ Map<String, Map<String, Long>> uniqueNameMap
|
|
|
+ = scaleConfigFacade.getUniqueNameConfigMap(hospitalId, null, uniqueNameList);
|
|
|
+ if (uniqueNameMap != null && uniqueNameMap.size() > 0) {
|
|
|
+ retScale.forEach(item -> {
|
|
|
+ if (uniqueNameMap.get(item.getName()) != null) {
|
|
|
+ item.setHisNameList(new ArrayList<>(uniqueNameMap.get(item.getName()).keySet()));
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return retScale;
|
|
|
+ }
|
|
|
}
|