修改了订阅消息推送文字。增加了待接诊自动回复消息
This commit is contained in:
parent
0144f1196a
commit
51fa86fd4e
@ -1366,4 +1366,44 @@ class ImService extends BaseService
|
|||||||
throw new BusinessException($e->getMessage());
|
throw new BusinessException($e->getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 多点医生接诊后,自动回复消息
|
||||||
|
* @param array|object $order_inquiry 问诊订单数据
|
||||||
|
* @param string $doctor_user_id 医生用户id
|
||||||
|
* @param string $patient_user_id 患者用户id
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function multiPointDoctorInquiryAutoReply(array|object $order_inquiry, string $doctor_user_id, string $patient_user_id): void
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
// 发送消息
|
||||||
|
$cloud_custom_data = array();
|
||||||
|
$cloud_custom_data['order_inquiry_id'] = (string)$order_inquiry['order_inquiry_id'];
|
||||||
|
$cloud_custom_data['order_no'] = (string)$order_inquiry['inquiry_no'];
|
||||||
|
$cloud_custom_data['is_system'] = 1;
|
||||||
|
$cloud_custom_data['inquiry_type'] = $order_inquiry['inquiry_type'];
|
||||||
|
$cloud_custom_data['inquiry_mode'] = $order_inquiry['inquiry_mode'];
|
||||||
|
$cloud_custom_data['message_rounds'] = 0;
|
||||||
|
$cloud_custom_data['patient_family_data']['patient_name'] = $order_inquiry['patient_name'];
|
||||||
|
$cloud_custom_data['patient_family_data']['patient_sex'] = $order_inquiry['patient_sex'];
|
||||||
|
$cloud_custom_data['patient_family_data']['patient_age'] = $order_inquiry['patient_age'];
|
||||||
|
if ($order_inquiry['inquiry_mode'] == 8 || $order_inquiry['inquiry_mode'] == 9){
|
||||||
|
// 获取im消息推送中,服务包订单相关的自定义参数
|
||||||
|
$OrderServicePackageService = new OrderServicePackageService();
|
||||||
|
$result = $OrderServicePackageService->getImServicePackageCloudCustomData($order_inquiry['inquiry_no']);
|
||||||
|
if (!empty($result)){
|
||||||
|
$cloud_custom_data = array_merge($cloud_custom_data,$result);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$message_content = [
|
||||||
|
'Text' => "您好,已查看您提交的病情信息,您可以继续补充病情信息以便更好为您提供服务。如有购药需求,将按照病情及需要开具处方,需要您确认。",
|
||||||
|
];
|
||||||
|
|
||||||
|
$this->sendMessage($doctor_user_id, $patient_user_id, $message_content, "TIMTextElem", $cloud_custom_data);
|
||||||
|
} catch (\Throwable $e) {
|
||||||
|
throw new BusinessException($e->getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@ -2735,7 +2735,7 @@ class MessagePush extends BaseService
|
|||||||
"thing1" => "您有一个{$inquiry_mode}服务等待接诊",// 提醒内容
|
"thing1" => "您有一个{$inquiry_mode}服务等待接诊",// 提醒内容
|
||||||
"name2" => (string)$this->order_inquiry['patient_name'],// 患者姓名
|
"name2" => (string)$this->order_inquiry['patient_name'],// 患者姓名
|
||||||
"thing4" => (string)$disease_desc,// 病情描述
|
"thing4" => (string)$disease_desc,// 病情描述
|
||||||
"thing6" => "72小时内未接诊,平台将自送取消服务",// 提示说明
|
"thing6" => "72小时内未接诊,平台将自动取消服务",// 提示说明
|
||||||
"thing5" => "",// 咨询内容
|
"thing5" => "",// 咨询内容
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -2839,7 +2839,7 @@ class MessagePush extends BaseService
|
|||||||
"thing1" => "发起{$inquiry_mode}服务中一次问诊",// 提醒内容
|
"thing1" => "发起{$inquiry_mode}服务中一次问诊",// 提醒内容
|
||||||
"name2" => (string)$this->order_inquiry['patient_name'],// 患者姓名
|
"name2" => (string)$this->order_inquiry['patient_name'],// 患者姓名
|
||||||
"thing4" => (string)$disease_desc,// 病情描述
|
"thing4" => (string)$disease_desc,// 病情描述
|
||||||
"thing6" => "24小时内未接诊,平台将自送取消问诊",// 提示说明
|
"thing6" => "24小时内未接诊,平台将自动取消问诊",// 提示说明
|
||||||
"thing5" => "",// 咨询内容
|
"thing5" => "",// 咨询内容
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@ -1996,6 +1996,15 @@ class UserDoctorService extends BaseService
|
|||||||
// 发送IM消息-患者病例
|
// 发送IM消息-患者病例
|
||||||
$imService->patientCase($order_inquiry,$user_doctor['user_id'],$order_inquiry_case['disease_desc']);
|
$imService->patientCase($order_inquiry,$user_doctor['user_id'],$order_inquiry_case['disease_desc']);
|
||||||
|
|
||||||
|
// 处理可处方字段
|
||||||
|
$userDoctorService = new UserDoctorService();
|
||||||
|
$multi_point_enable = $userDoctorService->getDoctorMultiPointEnable($user_doctor["doctor_id"]);
|
||||||
|
|
||||||
|
// 多点医生接诊后,自动回复消息
|
||||||
|
if ($user_doctor['multi_point_status'] == 1 && $multi_point_enable == 1){
|
||||||
|
$imService->multiPointDoctorInquiryAutoReply($order_inquiry,$user_doctor['user_id'],$order_inquiry['user_id']);
|
||||||
|
}
|
||||||
|
|
||||||
// 处理服务包情况
|
// 处理服务包情况
|
||||||
if ($order_inquiry['inquiry_mode'] == 8 || $order_inquiry['inquiry_mode'] == 9){
|
if ($order_inquiry['inquiry_mode'] == 8 || $order_inquiry['inquiry_mode'] == 9){
|
||||||
$OrderServicePackageService = new OrderServicePackageService();
|
$OrderServicePackageService = new OrderServicePackageService();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user