@if ($canManageQueue) Walk-in @endif
@if ($canSwitchBranch ?? false) @elseif (($lockToPractitioner ?? false) === false && isset($branches) && $branches->isNotEmpty()) {{ $branches->first()->name }} @endif @unless ($lockToPractitioner ?? false) @else Showing patients assigned to you @endunless
@include('care.partials.queue-ops', [ 'queueIntegration' => $queueIntegration ?? null, 'queueCallNextRoute' => 'care.queue.call-next', 'queueCallNextParams' => array_filter(['practitioner_id' => $practitionerId]), 'branchId' => $branchId, ])

Waiting ({{ $queue->count() }})

@forelse ($queue as $appointment)
($appointment->queue_ticket_status ?? null) === 'called', 'border-emerald-200 bg-emerald-50' => ($appointment->queue_ticket_status ?? null) === 'serving', 'border-slate-100 bg-slate-50' => ! in_array($appointment->queue_ticket_status ?? null, ['called', 'serving'], true), ])>
@if (! empty($queueIntegration['enabled']) && $appointment->queue_ticket_number) @include('care.partials.queue-ticket', [ 'ticketNumber' => $appointment->queue_ticket_number, 'ticketStatus' => $appointment->queue_ticket_status, 'destination' => $appointment->queue_destination, 'staffDisplayName' => $appointment->queue_staff_display_name, ]) @elseif (! empty($queueIntegration['enabled']) && ($appointment->queue_routing_status ?? '') === 'unresolved') Unassigned @elseif ($appointment->queue_position) {{ $appointment->queue_position }} @endif

{{ $appointment->patient->fullName() }}

{{ $appointment->patient->patient_number }} · {{ $appointment->reason ?? '—' }}

@if (! empty($queueIntegration['enabled']) && $appointment->queue_ticket_uuid && in_array($appointment->queue_ticket_status ?? '', ['called', 'serving'], true) && $canConsult)
@csrf
@endif @if ($canConsult)
@csrf
@endif
@empty

No patients waiting.

@endforelse

In consultation ({{ $inConsultation->count() }})

@forelse ($inConsultation as $appointment)
@if (! empty($queueIntegration['enabled']) && $appointment->queue_ticket_number) @include('care.partials.queue-ticket', [ 'ticketNumber' => $appointment->queue_ticket_number, 'ticketStatus' => $appointment->queue_ticket_status, 'showAssignment' => false, ]) @endif

{{ $appointment->patient->fullName() }}

{{ $appointment->practitioner?->name ?? 'Unassigned' }}

@if (! empty($queueIntegration['enabled']) && $appointment->queue_ticket_uuid && in_array($appointment->queue_ticket_status ?? '', ['called', 'serving'], true) && $canConsult)
@csrf
@endif @if ($appointment->consultation) Open @endif
@empty

No active consultations.

@endforelse