@if ($canManageQueue) Walk-in @endif
@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 ($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, ]) @endif {{ $appointment->patient->fullName() }}

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

@if ($appointment->consultation) Open @endif
@empty

No active consultations.

@endforelse