@php $patient = $patient ?? null; $appointment = $appointment ?? null; $matches = $matches ?? collect(); $patientQuery = $patientQuery ?? ''; $channels = $channels ?? []; $load = $load ?? null; $submitLabel = $submitLabel ?? 'Book appointment'; $action = $action ?? route('appointments.store'); $method = $method ?? 'POST'; $backRoute = $backRoute ?? route('appointments.index'); @endphp @push('scripts') @endpush @if (! $patient)

Search the master patient index first. A booking is always made against an existing record — if the patient is new, register them before booking.

@if ($patientQuery !== '')
@if ($matches->isEmpty())
Nothing on file matches “{{ $patientQuery }}”. @can('patients.create') Register patient @endcan
@else @endif
@endif
@else
@csrf @if ($method !== 'POST') @method($method) @endif @if (isset($errors) && $errors->has('patient_id'))

{{ $errors->first('patient_id') }}

@endif
List: / ( left) No ceiling set for this clinic.
Checking the diary…
Pick a date to see the consultant's slots.

No clinic session runs on that date — the patient will be booked into the day's list without a clock slot.

Set one up under Clinic schedules to offer timed slots.

Selected .

@if (isset($errors) && $errors->has('slot_time'))

{{ $errors->first('slot_time') }}

@endif
@if (isset($errors) && $errors->any() && ! $errors->hasAny(['patient_id', 'slot_time']))
{{ $errors->first() }}
@endif
Cancel
{{ Str::of($patient->first_name)->substr(0, 1)->upper() }}{{ Str::of($patient->last_name)->substr(0, 1)->upper() }}
{{ $patient->full_name }}
{{ $patient->medical_record_number }}
{{ $patient->age_display }} · {{ $patient->gender_label }} @if ($patient->phone) · {{ $patient->phone }} @endif
@if ($patient->primaryInsurance)
{{ $patient->primaryInsurance->payer?->name }}
{{ $patient->primaryInsurance->member_number }}
@endif
@if ($patient->isRestricted())
This record is access-controlled. Handle the booking details confidentially.
@endif @unless ($appointment) @endunless
@if ($appointment)
From {{ $appointment->appointment_no }}
Was {{ $appointment->appointment_date?->format('D, d M Y') }} {{ $appointment->slot_time ? substr((string) $appointment->slot_time, 0, 5) : '' }}
@if ($appointment->token_number)
Old token {{ $appointment->token_number }}
@endif

The original booking is closed as rescheduled and keeps its history. The patient is given a fresh token on the new list, so tell them the new number.

@else
  • A token is reserved in the consultant's sequence for that clinic day — the number the patient is called by.
  • If the list is full, the booking goes to the waitlist or is deliberately overbooked, depending on your rights.
  • Check-in on the day opens the visit and drops the patient onto the queue board.
@endif
@endif