@php
$latestAppointment = $patient
->appointments()
->whereIn('status', ['completed', 'verified'])
->latest()
->first();
// Check if patient has any health data (indicating previous MCU)
$hasHealthData =
$patient->healthQuestionnaires->count() > 0 ||
$patient->lifestyleData->count() > 0 ||
$patient->workActivities->count() > 0;
@endphp
@if ($latestAppointment)
Hasil MCU Terakhir: {{
\App\Helpers\DateHelper::formatShort(
$latestAppointment->appointment_date,
)
}}
Perlu melakukan pemeriksaan ulang untuk update data kesehatan
@elseif ($hasHealthData)
Riwayat MCU Sebelumnya: Data kesehatan tersedia
Perlu melakukan pemeriksaan ulang untuk update data kesehatan
@else
Belum ada riwayat MCU
Data kesehatan akan diisi saat pemeriksaan pertama
@endif
@php
$latestHealth = $patient->healthQuestionnaires->first();
$healthConditions = [];
if ($latestHealth) {
// Collect all health conditions that are true (complete list)
$conditions = [
'has_head_injury' => 'Cedera Kepala',
'has_seizure' => 'Ayan',
'has_vision_disorder' => 'Gangguan Penglihatan',
'has_hearing_disorder' => 'Gangguan Pendengaran',
'has_ear_nose_throat_problem' => 'Masalah 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',
'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',
'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',
];
foreach ($conditions as $field => $label) {
if ($latestHealth->$field) {
$healthConditions[] = $label;
}
}
}
@endphp
@if (count($healthConditions) > 0)
Kondisi Kesehatan yang Perlu Diperhatikan:
@foreach ($healthConditions as $condition)
- {{ $condition }}
@endforeach
@else
Tidak ada kondisi kesehatan khusus yang dilaporkan
@endif
@if ($latestHealth && $latestHealth->other_chronic_diseases)
Penyakit Kronis Lainnya:
{{ $latestHealth->other_chronic_diseases }}
@endif