@if (session()->has('error')) @endif @if ($user && $patient)
img
@if ($patient->profile_image) {{ $user->name }} @else
{{ $this->getInitials($user->name) }}
@endif

#PT{{ str_pad($patient->id, 4, '0', STR_PAD_LEFT) }}

{{ $user->name }}

{{ $patient->address ?: 'Address not provided' }}

Phone : {{ $patient->phone ?: 'Not provided' }}

|

Last Visited : {{ $user->updated_at->format('d M Y') }}

About
DOB

{{ $patient->date_of_birth ? $patient->date_of_birth->format('d M Y') : 'Not provided' }}

Blood Group

{{ $patient->blood_group ?? 'Not provided' }}

Gender

{{ $patient->gender ? ucfirst($patient->gender) : 'Not specified' }}

Email

{{ $user->email }}

Patient Information
Age

{{ $this->getAge() ? $this->getAge() . ' years' : 'N/A' }}

Status

{{ ucfirst($user->status) }}

Clinics

{{ $patientClinics->count() }}

City

{{ $patient->city ?: 'N/A' }}

Registered

{{ $user->created_at->format('M Y') }}

Patient ID

#PT{{ str_pad($patient->id, 4, '0', STR_PAD_LEFT) }}

@if ($patientClinics->count() > 0)
@foreach ($patientClinics as $association) {{-- --}} @endforeach
Clinic Name Doctor Status Approval Added Date
{{ $association->clinic->name ?? 'Unknown Clinic' }}

{{ $association->clinic->address ?? '' }}

@if ($association->doctor && $association->doctor->doctor && $association->doctor->doctor->profile_image)
{{ $association->doctor->name }}
@elseif($association->doctor)
{{ $this->getInitials($association->doctor->name) }}
@else
@endif
{{ $association->doctor->name ?? 'Unknown Doctor' }}

Doctor

{{ ucfirst($association->status) }} {{ ucfirst($association->approval_status) }} {{ $association->created_at->format('d M Y') }}
@else
This patient is not associated with any clinics yet.
@endif
@if ($patient->medical_history)
Medical History

{{ $patient->medical_history }}

@else
No medical history available for this patient.
@endif
@else
Patient data could not be loaded.
@endif