@php $selectedAppointment = $selectedAppointment ?? null; $recentCheckIns = $recentCheckIns ?? []; @endphp Check-In Desk

Check-In Desk

{{ !empty($today) ? date('D, d M Y', strtotime($today)) : now()->format('D, d M Y') }}

Patient Check-In

Verify and check-in arriving patients

@if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif

Search Patient

@if($selectedAppointment) @php $patient = $selectedAppointment['patient'] ?? []; $room = $selectedAppointment['room'] ?? []; $queue = $selectedAppointment['queue'] ?? []; $queueNumber = $queue['queue_number'] ?? ($selectedAppointment['queue_number'] ?? 'Not generated'); $status = strtolower($selectedAppointment['status'] ?? 'pending'); $initial = strtoupper(substr($patient['full_name'] ?? 'P', 0, 1)); @endphp
{{ $selectedAppointment['reference_no'] ?? 'PKU-' . substr($selectedAppointment['id'], 0, 8) }} {{ ucwords(str_replace('_', ' ', $status)) }}
{{ $initial }}

{{ $patient['full_name'] ?? 'Unknown Patient' }}

{{ strtoupper($patient['role'] ?? '-') }} ID: {{ $patient['upsi_id'] ?? '-' }}

Treatment {{ $selectedAppointment['reason'] ?? 'Dental Check-Up' }}
Room {{ $room['room_name'] ?? '-' }}
Scheduled Time {{ !empty($selectedAppointment['appointment_time']) ? date('g:i A', strtotime($selectedAppointment['appointment_time'])) : '-' }}
Queue Number {{ $queueNumber }}
@else
No appointment found for {{ !empty($today) ? date('d M Y', strtotime($today)) : 'today' }}.
@endif

Recent Check-Ins

@forelse($recentCheckIns as $item) @php $p = $item['patient'] ?? []; $q = $item['queue'] ?? []; $r = $item['room'] ?? []; $queueNumber = $q['queue_number'] ?? ($item['queue_number'] ?? '-'); @endphp
{{ strtoupper(substr($p['full_name'] ?? 'P', 0, 1)) }}
{{ $p['full_name'] ?? 'Unknown' }} {{ !empty($item['appointment_time']) ? date('g:i A', strtotime($item['appointment_time'])) : '-' }} · {{ $r['room_name'] ?? '-' }}
{{ $queueNumber }}
@empty
No recent check-ins yet.
@endforelse