@extends('layouts.app') @section('title', 'Queue Board') @section('styles') @endsection @section('content')

Total Today

{{ $stats['total'] }}

Waiting

{{ $stats['waiting'] }}

In Consultation

{{ $stats['in_consultation'] }}

Completed

{{ $stats['completed'] }}

Avg. Wait

{{ $stats['avg_wait'] }}

Walk-in View Appointments
@if($pendingAppointments->count())

Pending Appointments Today ({{ $pendingAppointments->count() }})

@foreach($pendingAppointments as $apt)

{{ $apt->patient->full_name ?? '' }}

{{ $apt->appointment_time ?? 'Any' }} · {{ ucfirst($apt->type) }}

@csrf
@endforeach
@endif

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

@forelse($waiting as $v)

{{ $v->patient->full_name ?? '' }}

{{ $v->visit_number }} · {{ ucfirst(str_replace('_',' ',$v->visit_type)) }}

Checked in {{ $v->check_in_at ? $v->check_in_at->format('H:i') : '' }} · {{ $v->check_in_at ? $v->check_in_at->diffForHumans(null, true) : '' }} wait

@if($v->patient->allergies && count($v->patient->allergies))

⚠ {{ implode(', ', $v->patient->allergies) }}

@endif
@empty

No patients waiting

@endforelse

Triage ({{ $inTriage->count() }})

@forelse($inTriage as $v)

{{ $v->patient->full_name ?? '' }}

{{ $v->visit_number }}

@if($v->triage)

BP: {{ $v->triage->blood_pressure_systolic ?? '-' }}/{{ $v->triage->blood_pressure_diastolic ?? '-' }} · T: {{ $v->triage->temperature ?? '-' }}°C

{{ ucfirst($v->triage->priority) }} @endif
@empty

No patients in triage

@endforelse

Consultation ({{ $inConsultation->count() }})

@forelse($inConsultation as $v)

{{ $v->patient->full_name ?? '' }}

{{ $v->visit_number }} · Dr. {{ $v->clinician->name ?? 'TBD' }}

{{ $v->department->name ?? '' }}

@empty

No active consultations

@endforelse

Done ({{ $completed->count() }})

@forelse($completed as $v)

{{ $v->patient->full_name ?? '' }}

{{ $v->visit_number }} · {{ $v->check_out_at ? $v->check_out_at->format('H:i') : '' }}

@empty

No completed visits yet

@endforelse
@if($atPharmacy->count() || $atLab->count())
@if($atPharmacy->count())

At Pharmacy ({{ $atPharmacy->count() }})

@foreach($atPharmacy as $v)
{{ $v->patient->full_name ?? '' }} · {{ $v->visit_number }}
@endforeach
@endif @if($atLab->count())

At Lab ({{ $atLab->count() }})

@foreach($atLab as $v)
{{ $v->patient->full_name ?? '' }} · {{ $v->visit_number }}
@endforeach
@endif
@endif @endsection @section('scripts') @endsection