@extends('layouts.app') @section('title', isset($registration) ? 'Edit ANC Profile' : 'Register ANC') @section('content') @include('partials._encounter-styles') @php $isEdit = isset($registration) && $registration; $r = $isEdit ? $registration : null; // Values used in prefills (every field handles null gracefully) $v = fn($field, $default = '') => old($field, $r?->{$field} ?? $default); @endphp

{{ $isEdit ? 'Edit ANC Profile' : 'ANC Enrollment' }}

@if($isEdit)

{{ $prefillPatient->full_name ?? '—' }} · MRN {{ $prefillPatient->mrn ?? '—' }}

@endif
@csrf @if($isEdit)@method('PUT')@endif {{-- ═══ 1. Patient ═══ --}}

1 Patient

@if($isEdit) {{-- In edit mode the patient is locked — you can't re-assign an existing registration to a different patient. Show a read-only summary. --}}
{{ $prefillPatient->full_name }}
MRN {{ $prefillPatient->mrn }}{{ $prefillPatient->phone ? ' · ' . $prefillPatient->phone : '' }}
Patient locked in edit mode
@else

@if(isset($prefillPatient) && $prefillPatient) ✓ Patient selected — ready to enroll. Modify details below then submit. @endif

@endif
{{-- ═══ 2. Obstetric History ═══ --}}

2 Obstetric History

{{-- ═══ 3. Medical ═══ --}}

3 Medical

@php $selBg = $v('blood_group'); $selRh = $v('rhesus'); $selHiv = $v('hiv_status'); $selRisk = $v('risk_status', 'normal'); $rfactors = is_array($r?->risk_factors) ? implode(', ', $r->risk_factors) : ''; @endphp
{{-- ═══ 4. Package & Clinician ═══ --}}

4 Package & Care Team

@php $selPkg = $v('package_type'); $selPkgAmount = $v('package_amount'); $selClinId = $v('attending_clinician_id'); @endphp
{{-- Round 10 single-invoice model: insurance patients CANNOT use packages. Their consultation bills at insurance rate (1,200) instead of cash rate (500). Other modules continue working as before — this carve-out is ANC-only. --}}
{{-- IMPORTANT: option value is the catalog KEY ('premium'), NOT the human label ('Premium ANC Package'). The label is what the user reads; the key is what AncPackage::coverage() expects. --}}
{{-- ═══ 5. Delivery Planning ═══ --}}

5 Delivery Planning

Cancel
{{-- /.enc-page --}} @endsection @push('scripts') @endpush