@php $filtered = $term !== '' || $status !== '' || $type !== ''; $statusOptions = ['' => 'Any status'] + \App\Support\Lookup::options('discharge_summary_status'); $typeOptions = ['' => 'Any type'] + \App\Support\Lookup::options('discharge_type'); @endphp {{ $stats['inProgress'] }} in progress · {{ $stats['issued'] }} issued
@if ($filtered) Clear @endif
@if ($summaries->count() === 0) @if ($filtered) Nothing matches the current filters. @else Summaries are drafted from an admission's page once the treating clinician starts the discharge. @endif @else
@foreach ($summaries as $summary) @endforeach
Summary Patient Admission Type Status Prepared by Actions
{{ $summary->summary_no }} {{ $summary->admission_date?->format('d M Y') }} → {{ $summary->discharge_date?->format('d M Y') ?? 'not yet discharged' }} {{ $summary->patient->full_name }} {{ $summary->patient->medical_record_number }} {{ $summary->admission->admission_no ?? '—' }} {{ $summary->admission->ward?->name ?? '—' }} {{ $summary->preparedBy?->name ?? '—' }}
{{ $summaries->onEachSide(1)->links() }}
@endif