@extends('layouts.app') @section('title', 'Patient History | ' . $patient->full_name) @section('content') {{-- ════════════════════════════════════════════════════════════ PATIENT HISTORY — unified timeline across OPD/IPD/ANC/Maternity ════════════════════════════════════════════════════════════ - Cross-encounter summary at top (allergies, chronic conditions, active meds, encounter counts) - Filter chips by encounter type - Date range + free-text search - Paginated timeline (20 per page) - Expand/collapse per row, details lazy-loaded via AJAX - Billing-only mode for Receptionist/Finance roles --}} @php $typeChips = [ '' => ['label' => 'All', 'count' => array_sum($summary['totals'])], 'opd' => ['label' => 'OPD', 'count' => $summary['totals']['opd']], 'dental' => ['label' => 'Dental', 'count' => $summary['totals']['dental']], 'ipd' => ['label' => 'IPD', 'count' => $summary['totals']['ipd']], 'anc' => ['label' => 'ANC', 'count' => $summary['totals']['anc']], 'maternity' => ['label' => 'Maternity', 'count' => $summary['totals']['maternity']], ]; $activeType = $filters['type'] ?? ''; @endphp {{-- ── PATIENT HEADER STRIP ────────────────────────────────────── --}}
{{ $patient->full_name }}
{{ $patient->mrn }} · {{ ucfirst($patient->gender ?? '') }} · {{ $patient->age ?? '' }}
Allergies
@if(count($summary['allergies']))None on record
@endifChronic Conditions
@if(count($summary['chronic_conditions']))None on record
@endifActive Medications ({{ count($summary['active_medications']) }})
@if(count($summary['active_medications']))None active
@endif