@php $headerColor = $headerColor ?? 'bg-danger'; $showPhysicalData = $showPhysicalData ?? true; $additionalInfo = $additionalInfo ?? []; @endphp
Informasi Pasien
No. Registrasi : {{ $appointment->registration_number ?? '-' }}
No. Rekam Medis : {{ $appointment->patient->medical_record_number ?? '-' }}
Nama : {{ $appointment->patient ? $appointment->patient->name ?? ($appointment->patient->full_name ?? 'Pasien Tidak Ditemukan') : 'Pasien Tidak Ditemukan' }}
Tanggal Lahir : {{ $appointment->patient->birth_date_short ?: '-' }}
Usia : {{ $appointment->patient->detailed_age ?: ($appointment->patient->age ? $appointment->patient->age . ' tahun' : '-') }}
Jenis Kelamin : {{ $appointment->patient->gender == 'male' ? 'Laki-laki' : 'Perempuan' }}
@if (!empty($additionalInfo)) @foreach ($additionalInfo as $label => $value) @endforeach @endif
Tanggal MCU : {{ $appointment->appointment_date ? \App\Helpers\DateHelper::formatFull($appointment->appointment_date) : '-' }}
Perusahaan : {{ $appointment->company->name ?? ($appointment->patient->company->name ?? 'Pribadi') }}
Jabatan : {{ $appointment->getJobPosition() }}
Tahun Mulai Bekerja : @php $infoWorkStartYear = $appointment->workActivity?->work_start_year ?? ($appointment->patient?->workActivities()?->where('appointment_id', $appointment->id)->first()?->work_start_year ?? ($appointment->patient?->workActivities()?->first()?->work_start_year ?? '-')); @endphp {{ $infoWorkStartYear }}
Paket MCU : {{ $appointment->mcuPackage->name ?? '-' }}
MCU Ke : @php $mcuOrder = $appointment->patient ->appointments() ->where('status', '!=', 'cancelled') ->where(function ($q) use ($appointment) { $q->where('appointment_date', '<', $appointment->appointment_date)->orWhere(function ($q2) use ($appointment) { $q2->where('appointment_date', $appointment->appointment_date)->where('id', '<=', $appointment->id); }); }) ->count(); $previousMcu = $appointment->patient ->appointments() ->where('status', '!=', 'cancelled') ->where(function ($q) use ($appointment) { $q->where('appointment_date', '<', $appointment->appointment_date)->orWhere(function ($q2) use ($appointment) { $q2->where('appointment_date', $appointment->appointment_date)->where('id', '<', $appointment->id); }); }) ->orderByDesc('appointment_date') ->first(); @endphp MCU ke-{{ $mcuOrder }} @if ($previousMcu)
MCU Terakhir: {{ \App\Helpers\DateHelper::formatFull($previousMcu->appointment_date) }} @else
Pertama kali @endif
{{ $label }} : {!! $value !!}
@if ($showPhysicalData)
Tinggi Badan : @if (isset($physicalExamResult) && $physicalExamResult && $physicalExamResult->height) {{ $physicalExamResult->height }} cm @elseif ($appointment->patient->height) {{ $appointment->patient->height }} cm @else Belum diperiksa @endif
Berat Badan : @if (isset($physicalExamResult) && $physicalExamResult && $physicalExamResult->weight) {{ $physicalExamResult->weight }} kg @elseif ($appointment->patient->weight) {{ $appointment->patient->weight }} kg @else Belum diperiksa @endif
BMI : @if (isset($physicalExamResult) && $physicalExamResult && $physicalExamResult->height && $physicalExamResult->weight) @php $heightInMeters = $physicalExamResult->height / 100; $bmi = round($physicalExamResult->weight / ($heightInMeters * $heightInMeters), 1); $bmiClass = ''; $bmiStatus = ''; if ($bmi < 18.5) { $bmiClass = 'text-info'; $bmiStatus = 'Underweight'; } elseif ($bmi < 23) { $bmiClass = 'text-success'; $bmiStatus = 'Normal'; } elseif ($bmi < 25) { $bmiClass = 'text-warning'; $bmiStatus = 'Overweight'; } elseif ($bmi < 30) { $bmiClass = 'text-danger'; $bmiStatus = 'Obesitas I'; } else { $bmiClass = 'text-danger'; $bmiStatus = 'Obesitas II'; } @endphp {{ $bmi }} {{ $bmiStatus }} @elseif ($appointment->patient->height && $appointment->patient->weight) @php $heightInMeters = $appointment->patient->height / 100; $bmi = round($appointment->patient->weight / ($heightInMeters * $heightInMeters), 1); $bmiClass = ''; $bmiStatus = ''; if ($bmi < 18.5) { $bmiClass = 'text-info'; $bmiStatus = 'Underweight'; } elseif ($bmi < 23) { $bmiClass = 'text-success'; $bmiStatus = 'Normal'; } elseif ($bmi < 25) { $bmiClass = 'text-warning'; $bmiStatus = 'Overweight'; } elseif ($bmi < 30) { $bmiClass = 'text-danger'; $bmiStatus = 'Obesitas I'; } else { $bmiClass = 'text-danger'; $bmiStatus = 'Obesitas II'; } @endphp {{ $bmi }} {{ $bmiStatus }} @else Belum diperiksa @endif
Tekanan Darah : @if (isset($physicalExamResult) && $physicalExamResult && $physicalExamResult->blood_pressure_systolic && $physicalExamResult->blood_pressure_diastolic) @php $systolic = $physicalExamResult->blood_pressure_systolic; $diastolic = $physicalExamResult->blood_pressure_diastolic; $bpClass = ''; $bpStatus = ''; // Disamakan dengan vital_signs.blade.php (88-109) if ($systolic >= 140 || $diastolic >= 90) { $bpClass = 'text-danger'; $bpStatus = 'Hipertensi'; } else { $bpClass = 'text-success'; $bpStatus = 'Normal'; } @endphp {{ $systolic }}/{{ $diastolic }} mmHg {{ $bpStatus }} @else Belum diperiksa @endif
@endif