{{ $branch->name }}

Live Queue Management System

00:00:00
FRIDAY, APRIL 17 2026
@forelse($doctors as $doctor) @php $calling = $doctor->opdRegistrations->where('is_calling', true)->first(); $queue = $doctor->opdRegistrations->where('is_calling', false); @endphp
@if($doctor->photo_path) @else @endif

{{ $doctor->name }}

{{ $doctor->department?->name }} • RM {{ $doctor->id + 100 }}

@if($doctor->avg_duration)

Avg: {{ round($doctor->avg_duration / 60) }}m

@endif
@if($calling)
Now Calling
{{ str_pad($calling->token_number, 2, '0', STR_PAD_LEFT) }}
{{ $calling->token_prefix }}
@else
No Active Call
--
Awaiting Next Patient
@endif
Upcoming Queue {{ str_pad($queue->count(), 2, '0', STR_PAD_LEFT) }} WAITING
@php $pos = 1; @endphp @forelse($queue->take(4) as $qToken) @php $avgSecs = $doctor->avg_duration ?: 600; $waitTimeSecs = $pos * $avgSecs; $waitTimeMins = ceil($waitTimeSecs / 60); $pos++; @endphp
{{ $qToken->token_prefix }} {{ str_pad($qToken->token_number, 2, '0', STR_PAD_LEFT) }}
{{ $waitTimeMins }}m wait
@empty
Queue is empty
@endforelse
Consultation Live
{{ now()->format('H:i') }}
@empty

No Active Clinics

Specialist consultation hours have not started yet.

@endforelse