Новые таблицы миса
This commit is contained in:
@@ -19,6 +19,12 @@ class FormattedPatientResource extends JsonResource
|
||||
return [
|
||||
'id' => $this->MedicalHistoryID,
|
||||
'num' => $this->num,
|
||||
'mkb' => $this->whenLoaded('migrations', function () {
|
||||
return [
|
||||
'ds' => $this->migrations()->first()->diagnosis()->first()->mkb()->first()->DS ?? null,
|
||||
'name' => $this->migrations()->first()->diagnosis()->first()->mkb()->first()->NAME ?? null,
|
||||
];
|
||||
}),
|
||||
'fullname' => Str::ucwords(Str::lower("$this->FAMILY $this->Name $this->OT")),
|
||||
'age' => Carbon::parse($this->BD)->diff(Carbon::now())->format('%y'),
|
||||
'birth_date' => Carbon::parse($this->BD)->format('d.m.Y'),
|
||||
|
||||
Reference in New Issue
Block a user