From a8cef4ebd5dc56d6effdfd34b36e41c3a1fb327c Mon Sep 17 00:00:00 2001 From: wucongxing <815046773@qq.com> Date: Thu, 14 Dec 2023 11:37:32 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E5=AE=B6=E5=BA=AD=E6=88=90?= =?UTF-8?q?=E5=91=98=E7=97=85=E6=83=85=E8=AE=B0=E5=BD=95=E5=88=97=E8=A1=A8?= =?UTF-8?q?-=E5=88=86=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Services/PatientPathographyService.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/app/Services/PatientPathographyService.php b/app/Services/PatientPathographyService.php index 80c6358..8b5c46f 100644 --- a/app/Services/PatientPathographyService.php +++ b/app/Services/PatientPathographyService.php @@ -7,6 +7,7 @@ use App\Model\OrderPrescription; use App\Model\OrderPrescriptionIcd; use App\Model\OrderPrescriptionProduct; use App\Model\OrderProduct; +use App\Model\PatientFamily; use App\Model\PatientPathography; use App\Model\PatientPathographyProduct; use App\Model\Product; @@ -50,11 +51,18 @@ class PatientPathographyService extends BaseService */ public function getFamilyPathographyPage(): array { - $user_info = $this->request->getAttribute("userInfo") ?? []; $family_id = $this->request->input('family_id'); $page = $this->request->input('page', 1); $per_page = $this->request->input('per_page', 10); + // 获取家庭成员数据 + $params = array(); + $params['family_id'] = $family_id; + $patient_family = PatientFamily::getOne($params); + if (empty($patient_family)){ + return fail(); + } + // 获取病情记录列表 $fields = [ "pathography_id", @@ -67,8 +75,7 @@ class PatientPathographyService extends BaseService ]; $params = array(); - $params['user_id'] = $user_info['user_id']; - $params['patient_id'] = $user_info['client_user_id']; + $params['patient_id'] = $patient_family['patient_id']; $params['family_id'] = $family_id; $params['status'] = 1; $patient_pathographys = PatientPathography::getPatientPathographyPage($params, $fields, $page, $per_page);