1
0
Fork 0

patient_record.patient_id

master
panliang 2023-10-27 10:25:37 +08:00
parent 3ce99c0d32
commit 90e76b0400
2 changed files with 5 additions and 2 deletions

View File

@ -206,7 +206,10 @@ class PatientRecordController extends AdminController
public function getPatientOptions() public function getPatientOptions()
{ {
if (!$this->patientOptions) { if (!$this->patientOptions) {
$this->patientOptions = Patient::select(['id as value', 'name as label'])->sort()->get(); $this->patientOptions = Patient::with(['type'])->orderBy('type_id')->sort()->get()->map(fn ($item) => [
'label' => $item->type?->name.'--'.$item->name,
'value' => $item->id,
]);
} }
return $this->patientOptions; return $this->patientOptions;

View File

@ -2,7 +2,7 @@
return [ return [
'id' => 'ID', 'id' => 'ID',
'patient_id' => '姓名', 'patient_id' => '病人',
'type_id' => '类别', 'type_id' => '类别',
'treat_at' => '诊疗时间', 'treat_at' => '诊疗时间',
'admin_user_id' => '相关人员', 'admin_user_id' => '相关人员',