@can('appointments.manage-waitlist') Waitlist ({{ $stats['waitlisted'] }}) @endcan @can('appointments.manage-schedules') Clinic schedules @endcan @can('appointments.create') Book appointment @endcan
@if (request()->hasAny(['q', 'date', 'doctor', 'department', 'status', 'type', 'sort'])) Clear @endif
@if ($appointments->isEmpty()) @if (request('q')) Nothing on the books matches “{{ request('q') }}”. @else No bookings on file for this filter. Book one, or send a walk-in straight to the queue. @endif @can('appointments.create') Book appointment @endcan @can('queue.manage') Queue board @endcan @else
@foreach ($appointments as $appointment) @endforeach
When Token Patient Consultant Type Status Booked by
{{ $appointment->appointment_date?->format('D, d M Y') }}
{{ $appointment->slot_time ? substr((string) $appointment->slot_time, 0, 5) : 'Walk-in order' }} @if ($appointment->is_overbooked) over ceiling @endif
@if ($appointment->is_waitlisted) @elseif ($appointment->token_number) {{ $appointment->token_number }} @else — @endif
{{ $appointment->patient?->full_name ?? 'Unknown patient' }}
{{ $appointment->patient?->medical_record_number }} · {{ $appointment->appointment_no }}
@if ($appointment->patient?->isRestricted()) @endif
{{ $appointment->doctor?->name ?? 'Unassigned' }}
{{ $appointment->department?->name ?? '—' }}
{{ $appointment->appointment_type_label }}
@if ($appointment->priority !== 'routine') @endif
{{ $appointment->bookedBy?->name ?? '—' }}
@if (in_array($appointment->status, ['booked', 'confirmed'], true) && ! $appointment->is_waitlisted) @can('appointments.check-in')
@csrf @method('PATCH')
@endcan @endif Open

Showing {{ $appointments->firstItem() }}–{{ $appointments->lastItem() }} of {{ number_format($appointments->total()) }}

{{ $appointments->links() }}
@endif