@php $healthFormLocked = isset($existingVitalSigns) && $existingVitalSigns && ($existingVitalSigns->status ?? null) === 'verified'; @endphp
@if ($latestHealth)
Data riwayat kesehatan sudah tersedia
@if ($healthFormLocked) Data riwayat kesehatan sudah tersedia dan hasil pemeriksaan fisik telah di verifikasi @else Diperbarui: {{ \App\Helpers\DateHelper::formatShort($latestHealth->updated_at) }} {{ $latestHealth->updated_at->format('H:i') }} @endif
@endif @php $healthConditions = [ 'column1' => [ 'has_head_injury' => 'Cedera Kepala', 'has_seizure' => 'Ayan', 'has_vision_disorder' => 'Gangguan Penglihatan', 'has_hearing_disorder' => 'Gangguan Pendengaran', 'has_ear_nose_throat_problem' => 'Masalah Pada Telinga, Hidung', 'has_ear_problem_4weeks' => 'Masalah Telinga > 4 Minggu', 'has_womens_health_issue' => 'Masalah Kewanitaan', 'has_chronic_skin_problem' => 'Penyakit Kulit Menahun', 'has_chronic_diarrhea_issue' => 'Diare Kronis', 'has_appetite_loss_4weeks' => 'Nafsu Makan Menurun > 4 mgg', 'has_gastritis_ulcer' => 'Gastritis / Radang Lambung', ], 'column2' => [ 'has_yellow_fever_hepatitis' => 'Sakit Kuning / Hepatitis', 'has_chronic_cough_issue' => 'Batuk Kronis', 'has_hemorrhoids_issue' => 'Ambeien / Hemoroid', 'has_chronic_abdominal_pain' => 'Nyeri Perut Kronis', 'has_sexual_transmitted_disease' => 'Penyakit Kelamin', 'has_diabetes_mellitus' => 'Kencing Manis / Diabetes', 'has_asthma_shortness' => 'Asma / Sesak Napas', 'has_allergy_issue' => 'Alergi', 'has_tuberculosis' => 'TB Paru', 'has_mental_health_problem' => 'Masalah Kejiwaan', 'has_hypertension_issue' => 'Tekanan Darah Tinggi', ], 'column3' => [ 'has_heart_chest_pain' => 'Nyeri Dada / Jantung', 'has_malaria_disease' => 'Malaria', 'has_surgical_operation' => 'Operasi Pembedahan', 'has_abnormal_weight_change' => 'Perubahan BB tdk normal', 'has_back_pain_4weeks' => 'Nyeri Pinggang > 4 mgg', 'has_typhoid_fever' => 'Demam Thyfoid', 'has_joint_swelling_pain' => 'Bengkak / Nyeri pd sendi', 'has_kidney_stone_disease' => 'Kencing Batu / Ginjal', ], ]; @endphp
@php // Pad arrays to ensure they have the same length $column1Items = array_keys($healthConditions['column1']); $column2Items = array_keys($healthConditions['column2']); $column3Items = array_keys($healthConditions['column3']); $maxRows = max(count($column1Items), count($column2Items), count($column3Items)); // Pad arrays with null values to make them same length $column1Items = array_pad($column1Items, $maxRows, null); $column2Items = array_pad($column2Items, $maxRows, null); $column3Items = array_pad($column3Items, $maxRows, null); @endphp @for ($i = 0; $i < $maxRows; $i++) @endfor
Apakah Anda Pernah Menderita YA Apakah Anda Pernah Menderita YA Apakah Anda Pernah Menderita YA
@if ($column1Items[$i]) {{ $healthConditions['column1'][$column1Items[$i]] }} @endif @if ($column1Items[$i])
{$column1Items[$i]} ? 'checked' : '' }} @if ($healthFormLocked) disabled @endif >
@endif
@if ($column2Items[$i]) {{ $healthConditions['column2'][$column2Items[$i]] }} @endif @if ($column2Items[$i])
{$column2Items[$i]} ? 'checked' : '' }} @if ($healthFormLocked) disabled @endif >
@endif
@if ($column3Items[$i]) {{ $healthConditions['column3'][$column3Items[$i]] }} @endif @if ($column3Items[$i])
{$column3Items[$i]} ? 'checked' : '' }} @if ($healthFormLocked) disabled @endif >
@endif