{{-- Antenatal Blood Screening Test Data for PDF --}}
@php // Helper function to format date $formatDate = function($date) { if (!$date) return '-'; try { return \Carbon\Carbon::parse($date)->format('d/m/Y'); } catch (\Exception $e) { return '-'; } }; @endphp @php $tests = [ ['key' => 'rhesus_blood_group', 'name' => 'Kumpulan darah Rhesus'], ['key' => 'vdrl_tpha', 'name' => 'VDRL +/- TPHA'], ['key' => 'syphilis_rapid_ibu', 'name' => 'Syphilis / Rapid Test (Ibu)'], ['key' => 'syphilis_rapid_pasangan', 'name' => 'Syphilis / Rapid Test (Pasangan)'], ['key' => 'hiv_rapid_ibu', 'name' => 'HIV / Rapid Test (Ibu)'], ['key' => 'hiv_rapid_pasangan', 'name' => 'HIV / Rapid Test (Pasangan)'], ['key' => 'hepatitis_b', 'name' => 'Hepatitis B'], ['key' => 'malaria_bfmp', 'name' => 'Malaria (BFMP)'], ]; @endphp @foreach($tests as $index => $test) @endforeach
Bil. Jenis Ujian Test I Test II
Tarikh Keputusan Tarikh Keputusan
{{ $index + 1 }} {{ $test['name'] }} {{ $formatDate(data_get($testData, $test['key'] . '.taken_at_1')) }} {{ data_get($testData, $test['key'] . '.result_1', '-') }} {{ $formatDate(data_get($testData, $test['key'] . '.taken_at_2')) }} {{ data_get($testData, $test['key'] . '.result_2', '-') }}
@if(data_get($testData, 'notes'))

Notes: {{ data_get($testData, 'notes') }}

@endif @if(data_get($testData, 'name') || data_get($testData, 'signature'))

Responsible Person: {{ data_get($testData, 'name', 'N/A') }}

@if(data_get($testData, 'signature'))
Signature
@endif
@endif