|
@ -10,6 +10,7 @@ import com.yihu.jw.entity.base.im.ConsultTeamDo;
|
|
|
import com.yihu.jw.entity.base.patient.BasePatientDO;
|
|
|
import com.yihu.jw.entity.hospital.message.SystemMessageDO;
|
|
|
import com.yihu.jw.entity.hospital.prescription.WlyyOutpatientDO;
|
|
|
import com.yihu.jw.entity.hospital.prescription.WlyyPrescriptionDiagnosisDO;
|
|
|
import com.yihu.jw.hospital.prescription.dao.OutpatientDao;
|
|
|
import com.yihu.jw.hospital.prescription.service.PrescriptionService;
|
|
|
import com.yihu.jw.hospital.prescription.service.XzyyPrescriptionService;
|
|
@ -716,5 +717,38 @@ public class DoctorConsultEndpoint extends EnvelopRestEndpoint {
|
|
|
wxTemplateService.sendWeTempMesMiniProgram(sender_id,sender_name,reciver_id,reciver_name,session_id);
|
|
|
return success("操作成功");
|
|
|
}
|
|
|
|
|
|
@PostMapping(value = BaseHospitalRequestMapping.DodtorIM.sendOutPatientSuggestMsg)
|
|
|
@ApiOperation(value = "医生端:发送咨询建议消息", notes = "医生端:发送咨询建议消息")
|
|
|
public Envelop sendOutPatientSuggestMsg(@ApiParam(name = "outPatientId", value = "门诊编号")
|
|
|
@RequestParam(value = "outPatientId", required = true)String outPatientId,
|
|
|
@ApiParam(name = "diagnosticAdvice", value = "诊断建议")
|
|
|
@RequestParam(value = "diagnosticAdvice", required = true)String diagnosticAdvice,
|
|
|
@ApiParam(name = "treatmentAdvice", value = "治疗建议")
|
|
|
@RequestParam(value = "treatmentAdvice", required = true)String treatmentAdvice,
|
|
|
@ApiParam(name = "adjust", value = "0调整 1已调整,非必填,默认为0")
|
|
|
@RequestParam(value = "treatmentAdvice", required = false)String adjust
|
|
|
)throws Exception {
|
|
|
try {
|
|
|
com.alibaba.fastjson.JSONObject msgObj = new com.alibaba.fastjson.JSONObject();
|
|
|
WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findOne(outPatientId);
|
|
|
|
|
|
if(StringUtils.isBlank(adjust)){
|
|
|
adjust = "0";
|
|
|
}
|
|
|
|
|
|
msgObj.put("adjust",adjust);//0调整 1已调整,非必填,默认为0
|
|
|
msgObj.put("diagnosticAdvice",diagnosticAdvice);//诊断建议
|
|
|
msgObj.put("treatmentAdvice",treatmentAdvice);//治疗建议
|
|
|
msgObj.put("outPatientId",outPatientId);
|
|
|
|
|
|
String immsg = imService.sendOutPatientSuggestMsg(msgObj,wlyyOutpatientDO.getDoctor(),wlyyOutpatientDO.getDoctorName(),outPatientId,wlyyOutpatientDO.getPatient(),wlyyOutpatientDO.getOutpatientType());
|
|
|
System.out.println("发送咨询建议消息成功:"+immsg);
|
|
|
}catch (Exception e){
|
|
|
System.out.println("发送咨询建议消息失败:"+e.getMessage());
|
|
|
// e.printStackTrace();
|
|
|
}
|
|
|
return success("操作成功");
|
|
|
}
|
|
|
|
|
|
}
|