@php $closed = in_array($appointment->status, ['completed', 'cancelled', 'no_show'], true); $canAmend = auth()->user()->can('appointments.edit') && ! $closed; @endphp @if ($appointment->priority !== 'routine') @endif @if ($appointment->is_waitlisted) @endif @if ($appointment->is_overbooked) @endif @if ($appointment->patient?->isRestricted()) Restricted record @endif @can('appointments.check-in') @if (in_array($appointment->status, ['booked', 'confirmed'], true) && ! $appointment->is_waitlisted)
@csrf @method('PATCH')
@endif @endcan @can('appointments.edit') @if ($appointment->status === 'booked')
@csrf @method('PATCH')
@endif @endcan @if ($canAmend) Edit Reschedule @endif
Clinic date
{{ $appointment->appointment_date?->format('l, d M Y') }}
Slot
{{ $appointment->slot_time ? substr((string) $appointment->slot_time, 0, 5) : 'No fixed time — walk-in order' }} @if ($appointment->clinicSchedule?->room) · {{ $appointment->clinicSchedule->room }} @endif
Token
@if ($appointment->token_number) {{ $appointment->token_number }} @elseif ($appointment->is_waitlisted) Not issued — on the waitlist @else — @endif
Consultant
{{ $appointment->doctor?->name ?? 'Department pool' }} @if ($appointment->doctor?->specialization)
{{ $appointment->doctor->specialization }}
@endif
Department
{{ $appointment->department?->name ?? '—' }}
Type
{{ $appointment->appointment_type_label }} · {{ $appointment->visit_type_label }}
Booked
{{ $appointment->booked_at?->format('d M Y H:i') ?? '—' }}
{{ $appointment->bookedBy?->name ?? 'Unknown' }} · {{ $appointment->booking_channel_label }}
Priority
{{ $appointment->priority_label }}
@if ($appointment->reason)
Reason for visit
{{ $appointment->reason }}
@endif @if ($appointment->notes)
Desk notes
{{ $appointment->notes }}
@endif @if ($appointment->cancellation_reason)
Cancellation reason
{{ $appointment->cancellation_reason }} @if ($appointment->cancelledBy) · {{ $appointment->cancelledBy->name }} @endif
@endif
@if ($appointment->visit) @can('queue.view') Queue board @endcan
Visit
{{ $appointment->visit->visit_no }}
Visit status
@if ($queueEntry)
Queue
Calls
{{ $queueEntry->recall_count }} recall(s)
@if ($queueEntry->called_at)
Called at
{{ $queueEntry->called_at->format('H:i') }}
@endif @endif
@endif @if ($appointment->rescheduledFrom || $appointment->rescheduledAppointments->isNotEmpty()) @if ($appointment->rescheduledFrom)

This booking replaces {{ $appointment->rescheduledFrom->appointment_no }} ({{ $appointment->rescheduledFrom->appointment_date?->format('d M Y') }}).

@endif @foreach ($appointment->rescheduledAppointments as $replacement)

Moved on to {{ $replacement->appointment_no }} ({{ $replacement->appointment_date?->format('d M Y') }})

@endforeach
@endif @if ($appointment->statusLogs->isEmpty())

No status changes recorded yet.

@else
    @foreach ($appointment->statusLogs->sortByDesc('id') as $log)
  1. @if ($log->from_status) {{ \App\Support\Lookup::label('appointment_status', $log->from_status) }} @endif
    {{ $log->created_at?->format('d M Y H:i') }} · {{ $log->changedBy?->name ?? 'System' }}
    @if ($log->remarks)
    {{ $log->remarks }}
    @endif
  2. @endforeach
@endif
@if ($appointment->patient)
{{ Str::of($appointment->patient->first_name)->substr(0, 1)->upper() }}{{ Str::of($appointment->patient->last_name)->substr(0, 1)->upper() }}
@can('patients.view') {{ $appointment->patient->full_name }} @else {{ $appointment->patient->full_name }} @endcan
{{ $appointment->patient->medical_record_number }}
{{ $appointment->patient->age_display }} @if ($appointment->patient->gender) · {{ $appointment->patient->gender_label }} @endif @if ($appointment->patient->phone) · {{ $appointment->patient->phone }} @endif
@can('patients.view')
@can('appointments.create') Book another visit @endcan
@endcan @else

The patient record is no longer available.

@endif
@if (! $closed || $appointment->is_waitlisted)
@can('appointments.manage-waitlist')
@csrf @method('PATCH')
@endcan @can('appointments.mark-no-show') @if (in_array($appointment->status, ['booked', 'confirmed'], true)) @endif @endcan @can('appointments.cancel') @if (! $closed) @endif @endcan @can('appointments.edit') @if (in_array($appointment->status, ['cancelled', 'rescheduled'], true) && ! $appointment->visit_id) @endif @endcan
@endif @if ($callList->isEmpty())

No other tokens issued for this list.

@else
    @foreach ($callList as $entry)
  • {{ $entry->token_number }} {{ $entry->patient?->full_name }}
    {{ $entry->slot_time ? substr((string) $entry->slot_time, 0, 5) : '' }}
  • @endforeach
@endif
@can('appointments.cancel')
@csrf @method('PATCH')

Cancel {{ $appointment->appointment_no }}?

The booking is closed as cancelled and its place on the list is freed for another patient. The row stays on file as part of the patient's attendance history.

@endcan @can('appointments.mark-no-show')
@csrf @method('PATCH')

Mark as a no-show?

The patient did not attend and kept their place on the list. This is recorded against the booking.

@endcan @can('appointments.edit')
@csrf @method('DELETE')

Remove {{ $appointment->appointment_no }}?

Only a row cancelled or rescheduled in error should be removed. It disappears from the books entirely.

@endcan