@extends('layouts.app') @section('title', 'ANC Profile | ' . ($registration->patient->full_name ?? '')) @section('content') @include('partials._encounter-styles') @php $r = $registration; $p = $r->patient; $pkg = $coverage['package'] ?? null; $isPkg = ($coverage['mode'] ?? 'per_visit') === 'package'; $packagePrice = (float) ($pkg['price'] ?? ($r->package_amount ?? 0)); $paid = (float) ($coverage['paid'] ?? 0); $balance = (float) ($coverage['balance'] ?? max(0, $packagePrice - $paid)); $paidPct = $packagePrice > 0 ? min(100, round(($paid / $packagePrice) * 100)) : 0; $visitsCount = $r->visits->count(); $lastVisit = $r->visits->first(); // ordered DESC by visit_date $finalizedCount = $r->visits->whereNotNull('risk_level')->count(); @endphp
No ANC package is attached to this registration. Charges are billed per visit. Attach a package →
@else {{-- Financial summary: Price / Paid / Balance. The "Minimum to Start" tile that lived here previously is gone — the round 10 single-invoice model uses a dynamic per-visit 50%-of-current-balance gate enforced at Close Visit, not a static minimum at registration. --}}No ANC visits recorded yet. Click Start ANC Visit above to begin.
@else| Visit # | Date | GA | BP | Weight | FHR | Seen By | Risk |
|---|---|---|---|---|---|---|---|
| #{{ $v->visit_number ?? '?' }} | {{ $v->visit_date?->format('d M Y') ?? '—' }} | {{ $v->gestational_age_weeks ?? '—' }}w | {{ $v->bp_systolic ? $v->bp_systolic.'/'.($v->bp_diastolic ?? '?') : ($v->blood_pressure ?? '—') }} | {{ $v->weight ? $v->weight.' kg' : '—' }} | {{ $v->fetal_heart_rate ?? '—' }} | {{ $v->seenBy->name ?? '—' }} | @if($v->risk_level) {{ ucfirst(str_replace('_',' ', $v->risk_level)) }} @else In progress @endif |