@extends('layouts.app') @section('title', 'Discharge Summary | ' . ($admission->patient->full_name ?? '')) @section('styles') @endsection @section('content') @php $patient = $admission->patient; $visit = $admission->visit; $los = $admission->length_of_stay ?? '-'; $cond = $admission->condition_on_discharge ?? ''; // Only dispensed meds explicitly marked as take-home appear on the summary. // One-off inpatient items (IV fluids, STAT injections, gloves, syringes) // are excluded so the patient's take-home list is accurate. $dispDrugs = $visit?->prescriptions ->where('status', 'dispensed') ->where('is_take_home', true) ?? collect(); $condLabel = [ 'improved' => 'Improved', 'stable' => 'Stable', 'deteriorated' => 'Deteriorated', 'absconded' => 'Absconded', 'deceased' => 'Deceased', ][$cond] ?? '-'; @endphp
Back

Discharge Summary | {{ $patient->full_name ?? '' }}

{{-- PRINTABLE DISCHARGE SUMMARY --}}
{{-- LETTERHEAD --}} @include('partials._document-header') {{-- PATIENT DEMOGRAPHICS STRIP — row 1 --}}
Name:{{ $patient->full_name ?? '' }} Patient ID:{{ $patient->mrn ?? '' }} Gender:{{ ucfirst($patient->gender ?? '') }} Age:{{ $patient->age ?? '—' }}
{{-- PATIENT DEMOGRAPHICS STRIP — row 2: admission facts --}}
Ward / Bed:{{ ($admission->ward?->name ?? '-') }} / {{ ($admission->bed?->bed_number ?? '-') }} Admitted:{{ $admission->admission_date?->format('d M Y H:i') ?? '-' }} Discharged:{{ $admission->discharge_date?->format('d M Y H:i') ?? 'Pending' }}
{{-- PATIENT DEMOGRAPHICS STRIP — row 3: clinical facts --}}
Length of Stay:{{ $los }} {{ $los == 1 ? 'day' : 'days' }} Condition on Discharge:{{ $condLabel }} Attending Clinician:{{ $admission->clinician?->name ?? '-' }}
{{-- SEPARATOR --}}
{{-- REPORT TITLE --}}

Discharge Summary

{{-- REPORT SECTIONS --}}

{{ $admission->diagnosis_on_admission ?? '-' }}

{{ $admission->discharge_diagnosis ?? '-' }}

{{ $admission->reason_for_admission ?? '-' }}

{{ $admission->discharge_summary ?? '-' }}

@if($dispDrugs->count())
@foreach($dispDrugs as $rx) @if($rx->instructions) @endif @endforeach
Medication Dose Route Frequency Duration Qty
{{ $rx->drug_name }} {{ $rx->dosage ?? '-' }} {{ $rx->route ?? '-' }} {{ $rx->frequency ?? '-' }} {{ $rx->duration ?? '-' }} {{ $rx->quantity ?? '-' }}
Instructions: {{ $rx->instructions }}
@endif

{{ $admission->discharge_instructions ?? '-' }}

{{ $admission->follow_up_plan ?? '-' }}

{{-- SIGNATURES --}}

Discharged By:

{{ $admission->clinician?->name ?? auth()->user()->name ?? '-' }}

{{ $admission->discharge_date?->format('d M Y H:i') ?? '' }}

Patient / Guardian Signature:

Acknowledged receipt of discharge summary & medications

@include('partials._document-footer')
@endsection