@extends('layouts.branch') @section('title', 'Patient Case History') @section('header', 'Clinical Timeline') @section('content')
@include('partials.branch._breadcrumbs', [ 'breadcrumbs' => [ ['name' => 'Patient Directory', 'url' => route('branch.patients.index')], ['name' => 'Case History', 'url' => '#'] ] ])

Global Case History

Unified timeline of OPD and IPD registrations across hospital network

@php $isSearching = $uhid || $opd_no || $ipd_no || $mobile; @endphp @if(!$patient && $isSearching)

No Records Found

Cannot find any patient matching the provided identifiers

Clear All Filters
@elseif(!$patient)

Clinical Case Search

Enter patient ID to unlock their full medical history

@else
@if($patient->photo_path) @else
@endif
{{ $patient->gender }}

{{ $patient->name }}

{{ $patient->age }} Years Old

Universal ID (UHID) {{ $patient->uhid }}
Contact Number {{ $patient->contact_number }}
Primary Address {{ $patient->address ?? 'No Address Provided' }}
Total Clinical Events
{{ $timeline->count() }}

Across {{ $patient->opd_registrations_count ?? $patient->opdRegistrations->count() }} OPD Visits & {{ $patient->ipd_registrations_count ?? $patient->ipdRegistrations->count() }} IPD Admissions

@foreach($timeline as $event)
{{ $event['type'] }}
{{ $event['visit_nature'] }} {{ $event['number'] }}
{{ $event['doctor'] }}

{{ $event['department'] }}

{{ \Carbon\Carbon::parse($event['date'])->format('d M, Y') }}
{{ \Carbon\Carbon::parse($event['time'])->format('h:i A') }}
@foreach($event['details'] as $label => $value) @if($value)
{{ $label }} {{ $value }}
@endif @endforeach
@endforeach
@endif
@endsection