获取家庭成员病情记录列表-分页

This commit is contained in:
wucongxing 2023-12-14 11:37:32 +08:00
parent ab9d30ce26
commit a8cef4ebd5

View File

@ -7,6 +7,7 @@ use App\Model\OrderPrescription;
use App\Model\OrderPrescriptionIcd; use App\Model\OrderPrescriptionIcd;
use App\Model\OrderPrescriptionProduct; use App\Model\OrderPrescriptionProduct;
use App\Model\OrderProduct; use App\Model\OrderProduct;
use App\Model\PatientFamily;
use App\Model\PatientPathography; use App\Model\PatientPathography;
use App\Model\PatientPathographyProduct; use App\Model\PatientPathographyProduct;
use App\Model\Product; use App\Model\Product;
@ -50,11 +51,18 @@ class PatientPathographyService extends BaseService
*/ */
public function getFamilyPathographyPage(): array public function getFamilyPathographyPage(): array
{ {
$user_info = $this->request->getAttribute("userInfo") ?? [];
$family_id = $this->request->input('family_id'); $family_id = $this->request->input('family_id');
$page = $this->request->input('page', 1); $page = $this->request->input('page', 1);
$per_page = $this->request->input('per_page', 10); $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 = [ $fields = [
"pathography_id", "pathography_id",
@ -67,8 +75,7 @@ class PatientPathographyService extends BaseService
]; ];
$params = array(); $params = array();
$params['user_id'] = $user_info['user_id']; $params['patient_id'] = $patient_family['patient_id'];
$params['patient_id'] = $user_info['client_user_id'];
$params['family_id'] = $family_id; $params['family_id'] = $family_id;
$params['status'] = 1; $params['status'] = 1;
$patient_pathographys = PatientPathography::getPatientPathographyPage($params, $fields, $page, $per_page); $patient_pathographys = PatientPathography::getPatientPathographyPage($params, $fields, $page, $per_page);