修改ca签章
This commit is contained in:
@@ -24,6 +24,7 @@ use App\Model\OrderEvaluation;
|
||||
use App\Model\OrderInquiry;
|
||||
use App\Model\OrderInquiryCase;
|
||||
use App\Model\OrderPrescription;
|
||||
use App\Model\OrderPrescriptionFile;
|
||||
use App\Model\OrderPrescriptionIcd;
|
||||
use App\Model\OrderPrescriptionProduct;
|
||||
use App\Model\OrderProductItem;
|
||||
@@ -1363,53 +1364,45 @@ class UserDoctorService extends BaseService
|
||||
return fail();
|
||||
}
|
||||
|
||||
$product_name = $product_name . ";" . $product['product_name'];
|
||||
if (empty($product_name)){
|
||||
$product_name = $product['product_name'];
|
||||
}else{
|
||||
$product_name = $product_name . ";" . $product['product_name'];
|
||||
}
|
||||
|
||||
unset($product);
|
||||
}
|
||||
|
||||
// 开具处方
|
||||
$OrderPrescriptionService = new OrderPrescriptionService();
|
||||
$prescription_open_result = $OrderPrescriptionService->openPrescription($order_prescription->order_prescription_id,$user_info['user_id']);
|
||||
if (empty($prescription_open_result['prescription_img_url'])){
|
||||
if (empty($prescription_open_result['prescription_img_url']) || empty($prescription_open_result['file_id'])){
|
||||
Db::rollBack();
|
||||
return fail(HttpEnumCode::SERVER_ERROR, "处方开具失败");
|
||||
}
|
||||
|
||||
// 修改处方表
|
||||
$data = array();
|
||||
$data['prescription_img'] = $prescription_open_result['prescription_img_url'];
|
||||
$data['doctor_created_time'] = date('Y-m-d H:i:s',time());
|
||||
|
||||
$params = array();
|
||||
$params['order_prescription_id'] = $order_prescription->order_prescription_id;
|
||||
OrderPrescription::edit($params,$data);
|
||||
|
||||
// 发送消息
|
||||
// 保存至ca处方文件表
|
||||
$data = array();
|
||||
$data['order_prescription_id'] = $order_prescription->order_prescription_id;
|
||||
$data['doctor_ca_file_id'] = $prescription_open_result['file_id'];
|
||||
$data['doctor_img_oss_path'] = $prescription_open_result['prescription_img_url'];
|
||||
$order_prescription_file = OrderPrescriptionFile::addOrderPrescriptionFile($data);
|
||||
if (empty($order_prescription_file)){
|
||||
Db::rollBack();
|
||||
return fail(HttpEnumCode::SERVER_ERROR, "处方开具失败");
|
||||
}
|
||||
|
||||
// 发送消息-药师审核中
|
||||
$ImService = new ImService();
|
||||
|
||||
$cloud_custom_data = array();
|
||||
$cloud_custom_data['order_inquiry_id'] = $order_prescription['order_inquiry_id'];
|
||||
$cloud_custom_data['is_system'] = 1;
|
||||
$cloud_custom_data['inquiry_type'] = $order_inquiry['inquiry_type'];
|
||||
$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'];
|
||||
|
||||
// 消息内容
|
||||
$message_content_data = array();
|
||||
$message_content_data['message_type'] = 6;
|
||||
$message_content_data['title'] = "药师审核中";
|
||||
$message_content_data['desc'] = "";
|
||||
$message_content_data['data']['order_inquiry_id'] = (string)$order_inquiry['order_inquiry_id'];
|
||||
$message_content_data['data']['order_prescription_id'] = (string)$order_prescription['order_prescription_id'];
|
||||
$message_content_data['data']['product_name'] = $product_name ?: "药品";
|
||||
$message_content_data['data']['pharmacist_verify_time'] = date('Y-m-d H:i:s',time());;
|
||||
$message_content = [
|
||||
'Data' => json_encode($message_content_data,JSON_UNESCAPED_UNICODE),
|
||||
];
|
||||
|
||||
$ImService->sendMessage($user_doctor['user_id'], $order_inquiry['user_id'], $message_content, "TIMCustomElem", $cloud_custom_data);
|
||||
$ImService->pharmacistVerify($order_inquiry,(string)$order_prescription->order_prescription_id,$product_name,$user_doctor['user_id'],$order_inquiry['user_id']);
|
||||
|
||||
// 加入分配药师队列
|
||||
$data = array();
|
||||
|
||||
Reference in New Issue
Block a user