修复就诊人健康信息默认值,优化医生列表查询速度

This commit is contained in:
2024-11-15 13:35:35 +08:00
parent 78e71a3b92
commit c149e34d3c
2 changed files with 3 additions and 27 deletions

View File

@@ -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 => [

View File

@@ -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;
}
}