修复就诊人健康信息默认值,优化医生列表查询速度
This commit is contained in:
@@ -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 => [
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user