diff --git a/app/Services/PatientOrderService.php b/app/Services/PatientOrderService.php index cd12b8c..ecab684 100644 --- a/app/Services/PatientOrderService.php +++ b/app/Services/PatientOrderService.php @@ -1999,7 +1999,10 @@ class PatientOrderService extends BaseService $order_prescription = OrderPrescription::getWithPage($params, ['*'], $page, $per_page); if (!empty($order_prescription['data'])) { foreach ($order_prescription['data'] as &$item) { - + + Log::getInstance("PatientOrderService-getPatientPrescriptionOrderList")->info("item 原来", [ + 'item["UserDoctor"]' => $item['UserDoctor']->toArray(), + ]); //处理抄方情况 $params = array(); @@ -2015,6 +2018,11 @@ class PatientOrderService extends BaseService $UserDoctor = UserDoctor::getOne($params, $fields); if (!empty($UserDoctor)) { + Log::getInstance("PatientOrderService-getPatientPrescriptionOrderList")->info("成功设置UserDoctor", [ + 'doctor_id' => $UserDoctor['doctor_id'] ?? null, + 'user_name' => $UserDoctor['user_name'] ?? null, + 'doctor_title' => $UserDoctor['doctor_title'] ?? null, + ]); $item['UserDoctor'] = $UserDoctor; } } @@ -2023,6 +2031,10 @@ class PatientOrderService extends BaseService if (!empty($item['UserDoctor'])) { $item['UserDoctor']['doctor_title'] = DoctorTitleCode::getMessage($item['UserDoctor']['doctor_title']); } + + Log::getInstance("PatientOrderService-getPatientPrescriptionOrderList")->info("item 最终", [ + 'item["UserDoctor"]' => $item['UserDoctor']->toArray(), + ]); } }