@props([ 'patient', 'visit' => null, 'appointment' => null, 'outstandingMinor' => 0, 'allergies' => [], 'insuranceSummary' => null, 'emergency' => false, 'clinicalAlerts' => [], 'currency' => 'GHS', ]) @php $age = $patient->date_of_birth?->age; $gender = $patient->gender ? ucfirst((string) $patient->gender) : null; @endphp
{{ strtoupper(substr($patient->first_name ?? 'P', 0, 1).substr($patient->last_name ?? '', 0, 1)) }}

{{ $patient->fullName() }}

@if ($emergency) Emergency contact on file @endif

{{ $patient->patient_number }} @if ($gender) · {{ $gender }} @endif @if ($age !== null) · {{ $age }} yrs @endif @if ($visit) · Visit {{ \Illuminate\Support\Str::limit($visit->uuid, 8, '') }} @endif

@if ($appointment?->practitioner) {{ $appointment->practitioner->name }} @if ($appointment->queue_ticket_number) · Ticket {{ $appointment->queue_ticket_number }} @if ($appointment->queue_ticket_status) ({{ $appointment->queue_ticket_status }}) @endif @endif @else No assigned clinician @endif

Outstanding

{{ $currency }} {{ number_format($outstandingMinor / 100, 2) }}

@if ($insuranceSummary)

Insurance

{{ $insuranceSummary }}

@endif
@if (! empty($allergies))
Allergies @foreach ($allergies as $allergy) {{ $allergy }} @endforeach
@endif @if (! empty($clinicalAlerts))
Alerts @foreach ($clinicalAlerts as $alert)

($alert['severity'] ?? '') === 'critical', 'text-amber-800' => ($alert['severity'] ?? '') !== 'critical', ])>{{ $alert['message'] ?? '' }}

@endforeach
@endif