parent
438b5293cd
commit
80909e0ea2
@ -1999,10 +1999,7 @@ class PatientOrderService extends BaseService
|
|||||||
$order_prescription = OrderPrescription::getWithPage($params, ['*'], $page, $per_page);
|
$order_prescription = OrderPrescription::getWithPage($params, ['*'], $page, $per_page);
|
||||||
if (!empty($order_prescription['data'])) {
|
if (!empty($order_prescription['data'])) {
|
||||||
foreach ($order_prescription['data'] as &$item) {
|
foreach ($order_prescription['data'] as &$item) {
|
||||||
// 将模型对象转换为数组,避免间接修改重载元素错误
|
|
||||||
if (is_object($item)) {
|
|
||||||
$item = $item->toArray();
|
|
||||||
}
|
|
||||||
|
|
||||||
//处理抄方情况
|
//处理抄方情况
|
||||||
$params = array();
|
$params = array();
|
||||||
@ -2012,23 +2009,19 @@ class PatientOrderService extends BaseService
|
|||||||
//为抄方订单
|
//为抄方订单
|
||||||
if (!empty($OrderInquiry['transfer_doctor_id'])) {
|
if (!empty($OrderInquiry['transfer_doctor_id'])) {
|
||||||
$params = array();
|
$params = array();
|
||||||
//若为抄方订单则显示原订单医生信息
|
//若为抄方订单则显示原订单
|
||||||
$params['doctor_id'] = $OrderInquiry['doctor_id'];
|
$params['doctor_id'] = $OrderInquiry['doctor_id'];
|
||||||
$fields = ['doctor_id','user_name','doctor_title'];
|
$fields = ['doctor_id','user_name','doctor_title'];
|
||||||
|
|
||||||
$UserDoctor = UserDoctor::getOne($params, $fields);
|
$UserDoctor = UserDoctor::getOne($params, $fields);
|
||||||
if (!empty($UserDoctor)) {
|
if (!empty($UserDoctor)) {
|
||||||
$item['UserDoctor'] = $UserDoctor->toArray();
|
$item['UserDoctor'] = $UserDoctor;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($item['UserDoctor'])) {
|
if (!empty($item['UserDoctor'])) {
|
||||||
// 确保 UserDoctor 也是数组格式
|
$item['UserDoctor']->doctor_title = DoctorTitleCode::getMessage($item['UserDoctor']->doctor_title);
|
||||||
if (is_object($item['UserDoctor'])) {
|
|
||||||
$item['UserDoctor'] = $item['UserDoctor']->toArray();
|
|
||||||
}
|
|
||||||
$item['UserDoctor']['doctor_title'] = DoctorTitleCode::getMessage($item['UserDoctor']['doctor_title']);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user