@extends('layouts.app') @section('title', 'Maternity Case Summary | ' . ($maternityAdmission->patient->full_name ?? '')) @section('styles') {{-- ── Round 16: Maternity-specific case summary. Visually mirrors the outpatient case-summary (same letterhead partial, same demographic strip, same .cs-* class names) so the document family feels consistent. Key differences from OPD case summary: • Reads from MaternityAdmission, not Visit->consultation • Diagnosis comes from $ma->diagnosis (settable from Overview tab) • Adds Delivery + Newborn + Complications sections when present • Drops the "follow-up" block that's OPD-specific ── --}} @endsection @section('content') @php $ma = $maternityAdmission; $patient = $ma->patient; $visit = $ma->visit; $invoice = $visit?->invoice; $delivery = $ma->resolvedDelivery; $newborns = $delivery?->newborns ?? collect(); $labs = $visit?->labOrders ?? collect(); $imaging = $visit?->imagingRequests ?? collect(); $rxs = $visit?->prescriptions ?? collect(); $los = $ma->length_of_stay ?? '-'; // Payer label for the claim-reconciliation footer (matches OPD case summary) $payerLabel = match($invoice?->payment_mode) { 'insurance' => $invoice?->insuranceCompany?->name ?? 'Insurance', 'corporate' => 'Corporate', 'cash' => 'Cash', 'mpesa' => 'M-Pesa', 'bank_transfer'=> 'Bank Transfer', 'waiver' => 'Waiver', default => ucfirst($invoice?->payment_mode ?? '—'), }; @endphp
| Name: | {{ $patient->full_name ?? '' }} | MRN: | {{ $patient->mrn ?? '' }} | Age: | {{ $patient->age ?? '—' }} | Phone: | {{ $patient->phone ?? '—' }} |
| G/A on Adm: | {{ $ma->gestational_age_weeks ? $ma->gestational_age_weeks.' wk' : '—' }} | Admitted: | {{ $ma->admission_date?->format('d M Y H:i') ?? '-' }} | @if($ma->discharge_date)Discharged: | {{ $ma->discharge_date->format('d M Y H:i') }} | @elseStatus: | {{ ucfirst(str_replace('_',' ', $ma->status)) }} | @endifLOS: | {{ $los }} day{{ $los == 1 ? '' : 's' }} |
| Attending Provider: | {{ $ma->attendingProvider->name ?? '-' }} | @if($ma->ancRegistration)ANC No: | {{ $ma->ancRegistration->anc_number ?? $ma->ancRegistration->id }} | G/P: | G{{ $ma->ancRegistration->gravida ?? '-' }}P{{ $ma->ancRegistration->parity ?? '-' }} | @endif
Reason for Admission
{{ $ma->reason_for_admission ?: '—' }}
Diagnosis
{{ $ma->discharge_diagnosis ?: $ma->diagnosis }}
Obstetric History
{{ $ma->obstetric_history }}
Delivery Details
| Date / Time | {{ $delivery->delivery_date?->format('d M Y') ?? '-' }} {{ $delivery->delivery_time ?? '' }} | Mode | {{ ucfirst(str_replace('_',' ', $delivery->mode_of_delivery ?? '-')) }} |
| G/A at Delivery | {{ $delivery->gestational_age_at_delivery ? $delivery->gestational_age_at_delivery.' wk' : '-' }} | Blood Loss | {{ $delivery->blood_loss ? $delivery->blood_loss.' ml' : '-' }} |
| Perineum | {{ $delivery->perineum ?? '-' }} | Delivered By | {{ $delivery->deliveredBy->name ?? '-' }} |
| Mother Outcome | {{ ucfirst(str_replace('_',' ', $delivery->mother_outcome ?? '-')) }} | Baby Outcome | {{ ucfirst(str_replace('_',' ', $delivery->baby_outcome ?? '-')) }} |
Newborn(s)
| Baby | Gender | Weight | APGAR (1/5/10) | Notes |
|---|---|---|---|---|
| Baby {{ $i + 1 }} | {{ ucfirst($nb->gender ?? 'unknown') }} | {{ $nb->birth_weight ? $nb->birth_weight.' kg' : '—' }} | {{ $nb->apgar_1min ?? '-' }} / {{ $nb->apgar_5min ?? '-' }} / {{ $nb->apgar_10min ?? '-' }} |
{{ $nb->resuscitation ? 'Resus. given' : '' }}
{{ $nb->vitamin_k ? '· Vit K' : '' }}
{{ $nb->bcg ? '· BCG' : '' }}
{{ $nb->opv ? '· OPV' : '' }}
@if($nb->abnormalities) {{ $nb->abnormalities }}@endif |
Maternal Complications
| Type | Severity | Management | Outcome |
|---|---|---|---|
| {{ ucwords(str_replace('_',' ', $c->complication_type)) }} | {{ ucfirst($c->severity ?? '-') }} | {{ $c->management ?: '-' }} | {{ ucfirst($c->outcome ?: '-') }}{{ $c->referred_out ? ' (Referred)' : '' }} |
Investigations & Results
| Type | Test / Study | Result / Findings |
|---|---|---|
| Lab | {{ $lab->test_name }} | {{ $lab->status === 'validated' ? 'Result attached' : ucfirst($lab->status) }} |
| Imaging |
{{ $img->imaging_type }}
@if($img->body_part) {{ $img->body_part }} @endif
|
{{ $img->report?->impression ?? 'Report attached' }} |
Treatment Given
| Medication | Dose | Route | Frequency | Duration |
|---|---|---|---|---|
| {{ $rx->drug_name }} | {{ $rx->dosage ?? '—' }} | {{ $rx->route ?? '—' }} | {{ $rx->frequency ?? '—' }} | {{ $rx->duration ?? '—' }} |
Hospital Course
{{ $ma->discharge_summary }}