|
@@ -7,10 +7,12 @@ import com.diagbot.dto.PushPlanDTO;
|
|
|
import com.diagbot.dto.RespDTO;
|
|
|
import com.diagbot.entity.TranDatadockingLog;
|
|
|
import com.diagbot.util.BeanUtil;
|
|
|
-import com.diagbot.util.HttpUtils;
|
|
|
+import com.diagbot.util.ListUtil;
|
|
|
+import com.diagbot.util.StringUtil;
|
|
|
import com.diagbot.vo.*;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
import java.util.Date;
|
|
@@ -33,6 +35,29 @@ public class DataPageDockFacade {
|
|
|
@Autowired
|
|
|
private DataDockingLogFacade dataDockingLogFacade;
|
|
|
|
|
|
+ @Value("${data-page.url}")
|
|
|
+ private String dataPageUrl;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @Description:静态知识开单合理性
|
|
|
+ * @Author:liuqq
|
|
|
+ * @time: ${DATE} ${TIME}
|
|
|
+ **/
|
|
|
+ public RespDTO<String> getStaticKnowledge(StaticKnowledgeHISVO staticKnowledgeHISVO){
|
|
|
+ String url=dataPageUrl+"/informationOut.html?hospitalId="+staticKnowledgeHISVO.getHospitalId()
|
|
|
+ +"&type="+staticKnowledgeHISVO.getType()
|
|
|
+ +"&hisName="+staticKnowledgeHISVO.getHisName();
|
|
|
+ if(StringUtil.isNotEmpty(staticKnowledgeHISVO.getHisDetailName())){
|
|
|
+ url+="&hisDetailName="+staticKnowledgeHISVO.getHisDetailName();
|
|
|
+ }
|
|
|
+ return RespDTO.onSuc(url);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @Description:页面推送模式
|
|
|
+ * @Author:liuqq
|
|
|
+ * @time: ${DATE} ${TIME}
|
|
|
+ **/
|
|
|
public RespDTO<String> getDataService(DataPageDockVO dataPageDockVO) {
|
|
|
//参数校验
|
|
|
if(dataPageDockVO.getHospitalId()==null){
|
|
@@ -44,14 +69,35 @@ public class DataPageDockFacade {
|
|
|
}
|
|
|
|
|
|
String url="";
|
|
|
+ String pushMrId="";
|
|
|
PushJoinVO pushJoinVO = new PushJoinVO();
|
|
|
BeanUtil.copyProperties(dataPageDockVO, pushJoinVO);
|
|
|
// 将基本参数保存到redis
|
|
|
String mrId = mrFacade.createMr(pushJoinVO);
|
|
|
+ //开单合理性推理时,验证下是否有推送,无推送时,不给url,code为“-1”
|
|
|
+ if(dataPageDockVO.getPlanCode().equals("order_rational") || dataPageDockVO.getPlanCode().equals("reference_pacs") || dataPageDockVO.getPlanCode().equals("reference_lis")){
|
|
|
+ IndicationPushVO indicationPushVO=new IndicationPushVO();
|
|
|
+ //初始化开单合理性入参
|
|
|
+ BeanUtil.copyProperties(dataPageDockVO,indicationPushVO);
|
|
|
+ indicationPushVO.setRuleType("1,2,3,4");
|
|
|
+ IndicationDTO indicationDTO = pushFacade.indicationPush(indicationPushVO);
|
|
|
+ if (indicationDTO != null) {
|
|
|
+ if (ListUtil.isNotEmpty(indicationDTO.getBillMsgList()) || ListUtil.isNotEmpty(indicationDTO.getHighRiskList())
|
|
|
+ || ListUtil.isNotEmpty(indicationDTO.getCriticalValList()) || ListUtil.isNotEmpty(indicationDTO.getOtherList()))
|
|
|
+ {
|
|
|
+ pushMrId= mrFacade.createIndicationMr(indicationDTO);
|
|
|
+ }else{
|
|
|
+ return RespDTO.onError("无开单合理性提醒!");
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ return RespDTO.onError("无开单合理性提醒!");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
if("hor".equals(dataPageDockVO.getShowType())){
|
|
|
- url="http:/"+HttpUtils.getIpAddress()+":5654/cdssHorizontal.html?mrId="+mrId+"&hospitalId="+dataPageDockVO.getHospitalId()+"&planCode="+dataPageDockVO.getPlanCode();
|
|
|
+ url=dataPageUrl+"/cdssHorizontal.html?pushMrId="+pushMrId+"&mrId="+mrId+"&hospitalId="+dataPageDockVO.getHospitalId()+"&planCode="+dataPageDockVO.getPlanCode();
|
|
|
}else{
|
|
|
- url="http:/"+HttpUtils.getIpAddress()+":5654/cdss.html?mrId="+mrId+"&hospitalId="+dataPageDockVO.getHospitalId()+"&planCode="+dataPageDockVO.getPlanCode();
|
|
|
+ url=dataPageUrl+"/cdss.html?pushMrId="+pushMrId+"&mrId="+mrId+"&hospitalId="+dataPageDockVO.getHospitalId()+"&planCode="+dataPageDockVO.getPlanCode();
|
|
|
}
|
|
|
|
|
|
try{
|
|
@@ -71,6 +117,11 @@ public class DataPageDockFacade {
|
|
|
return RespDTO.onSuc(url);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * @Description:病历推理
|
|
|
+ * @Author:liuqq
|
|
|
+ * @time: ${DATE} ${TIME}
|
|
|
+ **/
|
|
|
public PushDTO getEnginePush(DataEngineVO dataEngineVO) {
|
|
|
PushVO pushVO = new PushVO();
|
|
|
BeanUtil.copyProperties(dataEngineVO, pushVO);
|
|
@@ -100,32 +151,30 @@ public class DataPageDockFacade {
|
|
|
|
|
|
return pushDTO;
|
|
|
}
|
|
|
+
|
|
|
/**
|
|
|
- * @Description: 开单合理性
|
|
|
+ * @Description: 开单合理性及检查、检查报告检阅
|
|
|
* @Author:liuqq
|
|
|
* @time: ${DATE} ${TIME}
|
|
|
**/
|
|
|
- public IndicationDTO getEngineIndicationPush(DataEngineVO dataEngineVO) {
|
|
|
+ public RespDTO getEngineIndicationPush(DataEngineVO dataEngineVO) {
|
|
|
IndicationPushVO indicationPushVO=new IndicationPushVO();
|
|
|
BeanUtil.copyProperties(dataEngineVO, indicationPushVO);
|
|
|
-
|
|
|
+ indicationPushVO.setRuleType("1,2,3,4");
|
|
|
IndicationDTO indicationDTO=pushFacade.indicationPush(indicationPushVO);
|
|
|
indicationDTO.setDebug(null);
|
|
|
|
|
|
- try{
|
|
|
- TranDatadockingLog tranDatadockingLog=new TranDatadockingLog();
|
|
|
- tranDatadockingLog.setHospitalId(dataEngineVO.getHospitalId());
|
|
|
- tranDatadockingLog.setParamIn(JSON.toJSONString(dataEngineVO));
|
|
|
- tranDatadockingLog.setParamOut(JSON.toJSONString(indicationDTO));
|
|
|
- tranDatadockingLog.setRemark("数据引擎模式,"+dataEngineVO.getPlanCode());
|
|
|
-
|
|
|
- tranDatadockingLog.setTransTime(new Date());
|
|
|
-
|
|
|
- dataDockingLogFacade.save(tranDatadockingLog);
|
|
|
- }catch (Exception e){
|
|
|
- log.error("数据引擎模式,增加日志异常",e.getMessage());
|
|
|
+ if (indicationDTO != null) {
|
|
|
+ if (ListUtil.isNotEmpty(indicationDTO.getBillMsgList()) || ListUtil.isNotEmpty(indicationDTO.getHighRiskList())
|
|
|
+ || ListUtil.isNotEmpty(indicationDTO.getCriticalValList()) || ListUtil.isNotEmpty(indicationDTO.getOtherList()))
|
|
|
+ {
|
|
|
+ return RespDTO.onSuc(indicationDTO);
|
|
|
+ }else{
|
|
|
+ return RespDTO.onError("无开单合理性提醒!");
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ return RespDTO.onError("无开单合理性提醒!");
|
|
|
}
|
|
|
- return indicationDTO;
|
|
|
}
|
|
|
|
|
|
|