|
@@ -1,6 +1,5 @@
|
|
|
package com.diagbot.facade;
|
|
|
|
|
|
-import com.diagbot.biz.push.entity.Item;
|
|
|
import com.diagbot.client.CdssCoreClient;
|
|
|
import com.diagbot.dto.BillMsg;
|
|
|
import com.diagbot.dto.ConceptDetailDTO;
|
|
@@ -9,6 +8,7 @@ import com.diagbot.dto.DictionaryInfoDTO;
|
|
|
import com.diagbot.dto.IndicationDTO;
|
|
|
import com.diagbot.dto.PushBaseDTO;
|
|
|
import com.diagbot.dto.PushDTO;
|
|
|
+import com.diagbot.dto.PushExtDTO;
|
|
|
import com.diagbot.dto.PushPlanDTO;
|
|
|
import com.diagbot.dto.RespDTO;
|
|
|
import com.diagbot.dto.TreatDTO;
|
|
@@ -30,10 +30,8 @@ import org.springframework.stereotype.Component;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.Arrays;
|
|
|
import java.util.HashMap;
|
|
|
-import java.util.HashSet;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
-import java.util.Set;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
@@ -122,7 +120,7 @@ public class PushFacade {
|
|
|
if (indicationDTO != null) {
|
|
|
if (ListUtil.isNotEmpty(indicationDTO.getBillMsgList()) || ListUtil.isNotEmpty(indicationDTO.getHighRiskList())
|
|
|
|| ListUtil.isNotEmpty(indicationDTO.getCriticalValList()) || ListUtil.isNotEmpty(indicationDTO.getOtherList()))
|
|
|
- return mrFacade.createIndicationMr(indicationDTO);
|
|
|
+ return mrFacade.createIndicationMr(indicationDTO);
|
|
|
}
|
|
|
return "";
|
|
|
}
|
|
@@ -145,6 +143,50 @@ public class PushFacade {
|
|
|
return pushPlanDTO;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 点击诊断推送
|
|
|
+ *
|
|
|
+ * @param pushVO
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public PushExtDTO pushByDisease(PushVO pushVO) {
|
|
|
+ List<String> featureTypes = StringUtil.isNotBlank(pushVO.getFeatureType())
|
|
|
+ ? Arrays.asList(pushVO.getFeatureType().split(","))
|
|
|
+ : Lists.newArrayList();
|
|
|
+
|
|
|
+ if (pushVO.getDiseaseName() != null
|
|
|
+ && StringUtil.isBlank(pushVO.getDiseaseName().getName())
|
|
|
+ && StringUtil.isBlank(pushVO.getDiseaseName().getUniqueName())) {
|
|
|
+ pushVO.setDiseaseName(null);
|
|
|
+ }
|
|
|
+ SearchData searchData = new SearchData();
|
|
|
+ BeanUtil.copyProperties(pushVO, searchData);
|
|
|
+ //入参映射
|
|
|
+ searchData = assembleFacade.assembleData(searchData);
|
|
|
+ BeanUtil.copyProperties(searchData, pushVO);
|
|
|
+ RespDTO<PushExtDTO> resp = cdssCoreClient.pushByDisease(pushVO);
|
|
|
+ RespDTOUtil.respNGDeal(resp, "远程调用推理接口失败");
|
|
|
+ PushExtDTO data = resp.data;
|
|
|
+ PushDTO pushDTO = new PushDTO();
|
|
|
+ BeanUtil.copyProperties(data, pushDTO);
|
|
|
+
|
|
|
+ //出参映射
|
|
|
+ pushDTO = assembleFacade.assemblePushDTO(pushDTO, pushVO.getHospitalId());
|
|
|
+ //是否有静态信息
|
|
|
+ if (pushVO.getGetStaticKnowledge() != null
|
|
|
+ && pushVO.getGetStaticKnowledge().equals(1)) {
|
|
|
+ pushDTO = getStaticKnoledge(pushDTO);
|
|
|
+ }
|
|
|
+ //一般治疗
|
|
|
+ if (data != null) {
|
|
|
+ if (ListUtil.isNotEmpty(featureTypes) && featureTypes.contains("10")) {
|
|
|
+ data.setTreat(retGeneraTreat(data, pushVO.getHospitalId()));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ BeanUtil.copyProperties(pushDTO, data);
|
|
|
+ return data;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 推理结果标志是否包含静态知识
|
|
|
*
|