@extends('layouts.app') @section('title', 'Maternity Dashboard') @section('content') {{-- Stats cards --}}

Active ANC

{{ $stats['total_active'] }}

1st ANC Today

{{ $stats['first_anc_today'] }}

Week: {{ $stats['first_anc_week'] }} · Month: {{ $stats['first_anc_month'] }}

Follow-ups Today

{{ $stats['followup_today'] }}

High Risk

{{ $stats['high_risk'] }}

Delivered (Month)

{{ $stats['deliveries_month'] }}

Missed Follow-ups

{{ $missedFollowups->count() }}

+ Register ANC
{{-- Missed Follow-ups --}}

Missed ANC Follow-ups

{{-- Recent Deliveries --}}

Recent Deliveries

@forelse($recentDeliveries as $d)

{{ $d->patient->full_name ?? '' }}

{{ $d->mode_of_delivery }} · {{ $d->delivery_date?->format('d M Y') }}

{{ ucfirst(str_replace('_',' ',$d->baby_outcome ?? 'live_birth')) }} @if($d->newborns && $d->newborns->count())

{{ $d->newborns->first()?->birth_weight }}kg · {{ ucfirst($d->newborns->first()?->gender ?? '') }}

@endif
@empty

No recent deliveries.

@endforelse
{{-- Active ANC Clients Table --}}

Active ANC Clients

@forelse($activeClients as $r) @empty@endforelse
PatientGAEDDGravidaVisitsRiskPackageNext VisitActions
{{ $r->patient->full_name ?? '' }}
{{ $r->patient->mrn ?? '' }}
{{ $r->gestational_age ?? '-' }}wks {{ $r->edd?->format('d M Y') ?? '-' }} G{{ $r->gravida }}P{{ $r->parity }} {{ $r->visits_count }} {{ ucfirst($r->risk_status ?? 'normal') }} {{ \App\Services\AncPackage::forType($r->package_type)['label'] ?? ($r->package_type ?? '-') }} {{ $r->next_visit_date?->format('d M') ?? '-' }} View
No active ANC clients.
{{ $activeClients->links() }}
@endsection