新增自动开具处方。修改ca对接

This commit is contained in:
2023-04-21 13:39:17 +08:00
parent 739286e54a
commit 298283b3fe
13 changed files with 682 additions and 121 deletions
+42
View File
@@ -450,6 +450,48 @@ class MessagePush extends BaseService
return true;
}
/**
* 患者-处方审核未通过
* 站内
* @return bool
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
public function patientPrescriptionVerifyFail(): bool
{
try {
// 获取医生数据
$params = array();
$params['doctor_id'] = $this->order_inquiry['doctor_id'];
$user_doctor = UserDoctor::getOne($params);
if (empty($user_doctor)){
throw new BusinessException("加入推送队列失败:医生数据为空");
}
// 站内
// 服务消息
$data = array();
$data['user_id'] = $this->user['user_id'];
$data['notice_type'] = 3;
$data['notice_system_type'] = 1;
$data['from_name'] = "肝胆小秘书";
$data['notice_brief_title'] = "{$user_doctor['user_name']}医生为您开具的电子处方未通过审核,点击查看详情。";
$data['notice_title'] = "{$user_doctor['user_name']}医生为您开具的电子处方未通过审核,点击查看详情。";
$data['notice_content'] = "{$user_doctor['user_name']}医生为您开具的电子处方未通过审核,您可以稍后重新发起问诊申请开具处方。";
$message = new SendStationMessageProducer($data);
$producer = ApplicationContext::getContainer()->get(Producer::class);
$result = $producer->produce($message);
if (!$result) {
throw new BusinessException("加入推送队列失败" . json_encode($data,JSON_UNESCAPED_UNICODE));
}
} catch (\Exception $e) {
throw new BusinessException("加入推送队列失败" . $e->getMessage());
}
return true;
}
/**
* 优惠劵发放
* 站内