Files
kartoteka/app/Http/Resources/SI/SttMedicalHistoryResource.php
brusnitsyn 2dfa45707c * связка таблицы архива с пациентами
* добавил разграничение карт по типам баз
* модель для хранения изменений статуса карт
* добавил окно с просмотром выдачи карты
* добавил фильтрацию вывода карт
2025-12-02 17:15:28 +09:00

32 lines
959 B
PHP

<?php
namespace App\Http\Resources\SI;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;
use Illuminate\Support\Carbon;
class SttMedicalHistoryResource extends JsonResource
{
/**
* Transform the resource into an array.
*
* @return array<string, mixed>
*/
public function toArray(Request $request): array
{
return [
'id' => $this->id,
'fullname' => $this->getFullNameAttribute(),
'daterecipient' => Carbon::parse($this->daterecipient)->format('d.m.Y'),
'dateextract' => Carbon::parse($this->dateextract)->format('d.m.Y'),
'narhiv' => $this->narhiv,
'datearhiv' => Carbon::parse($this->datearhiv)->format('d.m.Y'),
'statgod' => $this->statgod,
'enp' => $this->enp,
'medcardnum' => $this->medcardnum,
'dr' => Carbon::parse($this->dr)->format('d.m.Y'),
];
}
}