@props([ 'title', 'record', 'test', 'mode' => 'view', // 'edit' for nurse, 'view' for mother 'backRoute' => null, 'formAction' => null ]) @php $isNurse = $mode === 'edit'; $isMother = $mode === 'view'; if (!$backRoute) { $backRoute = $isNurse ? route('nurse.health-records.show', $record) : route('mother.health-records.show', $record); } if (!$formAction && $isNurse) { $formAction = route('nurse.health-records.test-store', ['record' => $record, 'test' => $test]); } $patientName = $record->mother->name; $fullName = $record->mother->expectantMother->mother_full_name ?? $patientName; $icNumber = $record->mother->expectantMother->ic_number ?? 'Not provided'; $recordDate = $record->getFormattedCreatedAtAttribute(); @endphp

{{ $title }}

@if($isNurse)

Please complete all required fields before saving.

@endif

Patient Name

{{ $fullName }}

IC Number

{{ $icNumber }}

Record Date

{{ $recordDate }}

@if($isNurse && $formAction)
@csrf {{ $slot }}
@else
{{ $slot }}
@endif