@php $user = auth()->user(); $filtered = request()->hasAny(['q', 'status', 'type', 'doctor', 'patient_id', 'scope']); @endphp My worklist @can('encounters.create') Open encounter @endcan
@if ($filtered) Clear @endif
@if ($encounters->isEmpty()) @if (request('q')) Nothing in the clinical record matches “{{ request('q') }}”. @else No clinical records on file for this filter. Open one from the queue board or a patient's chart. @endif @can('encounters.create') Open encounter @endcan @can('queue.view') Queue board @endcan @else
@foreach ($encounters as $encounter) @endforeach
Encounter Patient Type Clinician Recorded Status Started
{{ $encounter->encounter_no }} @if ($encounter->visit)
Visit {{ $encounter->visit->visit_no }}
@endif
{{ $encounter->patient?->full_name ?? 'Unknown patient' }}
{{ $encounter->patient?->medical_record_number }} @if ($encounter->visit?->token_number) · token {{ $encounter->visit->token_number }} @endif
@if ($encounter->patient?->isRestricted()) @endif
@if ($encounter->visit?->priority && $encounter->visit->priority !== 'routine')
@endif
{{ $encounter->doctor?->name ?? 'Unassigned' }}
{{ $encounter->department?->name ?? '—' }}
{{ $encounter->diagnoses_count }} dx {{ $encounter->vitals_count }} vit {{ $encounter->notes_count }} notes
{{ $encounter->started_at?->format('d M Y H:i') }}
@if ($encounter->closed_at)
closed {{ $encounter->closed_at->format('d M Y H:i') }}
@endif

Showing {{ $encounters->firstItem() }}–{{ $encounters->lastItem() }} of {{ number_format($encounters->total()) }}

{{ $encounters->links() }}
@endif