Initial commit - Physiotherapy Clinic Management System
This commit is contained in:
commit
dbb326f2cc
300 files changed
+144285
No files matched your search
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Resources;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
class PatientResource extends JsonResource
|
||||
{
|
||||
public function toArray(Request $request): array
|
||||
{
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'patient_code' => $this->patient_code,
|
||||
'first_name' => $this->first_name,
|
||||
'last_name' => $this->last_name,
|
||||
'full_name' => $this->fullName(),
|
||||
'email' => $this->email,
|
||||
'phone' => $this->phone,
|
||||
'whatsapp' => $this->whatsapp,
|
||||
'national_id' => $this->national_id,
|
||||
'date_of_birth' => $this->date_of_birth?->format('Y-m-d'),
|
||||
'gender' => $this->gender,
|
||||
'address' => $this->address,
|
||||
'referral_source' => $this->referral_source,
|
||||
'status' => $this->status,
|
||||
'emergency_contact' => [
|
||||
'name' => $this->emergency_contact_name,
|
||||
'phone' => $this->emergency_contact_phone,
|
||||
],
|
||||
'medical_history' => $this->medical_history,
|
||||
'allergies' => $this->allergies,
|
||||
'notes' => $this->notes,
|
||||
'created_at' => $this->created_at?->format('Y-m-d H:i:s'),
|
||||
'updated_at' => $this->updated_at?->format('Y-m-d H:i:s'),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user