@extends('layouts.mother') @section('content')

My Health Records

View your maternal health records from all appointments

Please be informed that your health record will be available for viewing within up to two (2) weeks after your appointment. This is because some medical tests require time for results to be processed. The health record can only be viewed once it has been marked as completed by the assigned nurse. Mothers are advised to check the health record periodically for updates.
@if($records->isEmpty())

No Health Records Yet

Your health records will appear here after your appointments with the nurse.

@else
@foreach($records as $record)
@if($record->status === 'completed') Completed @elseif($record->status === 'reviewed') Reviewed @else Draft @endif @if($record->appointment && $record->appointment->appointment_date) Appointment: {{ $record->appointment->appointment_date->format('d M Y, h:i A') }} @endif

Health Record - Visit #{{ $record->visit_number }}

Visit Date
{{ $record->record_date ? $record->record_date->format('d M Y') : 'N/A' }}
Gestational Week
{{ $record->gestational_week ?? 'N/A' }} weeks
Tests Performed
{{ $record->testResults->count() }} tests
Clinic
{{ $record->appointment?->clinic?->name ?? $record->expectantMother?->clinic?->name ?? $record->nurse?->clinic?->name ?? 'N/A' }}
@if($record->testResults->isNotEmpty())
Tests Included:
@foreach($record->testResults as $test) {{ $test->test_name }} @endforeach
@endif
Recorded by: {{ $record->recordedByNurse->name }}
View Details @if($record->status === 'completed' || $record->status === 'reviewed') Download PDF @endif
@endforeach
@if($records->hasPages())
{{ $records->links() }}
@endif @endif
@endsection