diff --git a/admin/controllers/doctor/DoctorController.php b/admin/controllers/doctor/DoctorController.php index 01a78d5..12c9169 100644 --- a/admin/controllers/doctor/DoctorController.php +++ b/admin/controllers/doctor/DoctorController.php @@ -162,7 +162,9 @@ class DoctorController extends BaseAdminController return StoreDoctor::find()->select(['store_id'])->where([ 'su_id' => $m->id, 'is_delete' => 0 - ])->with(['store'])->asArray()->all(); + ])->with(['store' => function ($query) { + return $query->select(['name', 'id']); + }])->asArray()->all(); } ], DoctorService::class => [ diff --git a/member/modules/v1/controllers/PatientController.php b/member/modules/v1/controllers/PatientController.php index a260bb3..ab0e2ae 100644 --- a/member/modules/v1/controllers/PatientController.php +++ b/member/modules/v1/controllers/PatientController.php @@ -188,32 +188,6 @@ class PatientController extends BaseAppController $info['person_history'] = !empty($info['person_history']) ? explode(',', $info['person_history']) : []; $info['allergic_history'] = !empty($info['allergic_history']) ? explode(',', $info['allergic_history']) : []; - return $info; - if (!empty($info['family_history'])) { - foreach (explode(',', $info['family_history']) as $v) { - $info['family_history'][] = [ - 'name' => $v, - 'checked' => true - ]; - } - } - if (!empty($info['person_history'])) { - foreach (explode(',', $info['person_history']) as $v) { - $info['person_history'][] = [ - 'name' => $v, - 'checked' => true - ]; - } - } - if (!empty($info['allergic_history'])) { - foreach (explode(',', $info['allergic_history']) as $v) { - $info['allergic_history'][] = [ - 'name' => $v, - 'checked' => true - ]; - } - } - return $info; } } \ No newline at end of file