@include('pdf.partials.styles')
@php $appointment = $result->appointment; @endphp @include('pdf.partials.header')

INFORMASI PASIEN

No. Registrasi : {{ $result->appointment->registration_number ?? '-' }}
No. Rekam Medis : {{ $result->appointment->patient->medical_record_number ?? '-' }}
Nama Lengkap : {{ $result->appointment->patient->full_name ?? ($result->appointment->patient->name ?? '-') }}
Tgl. Lahir / Umur : @if ($result->appointment->patient->birth_date) {{ $result->appointment->patient->birth_date instanceof \Carbon\Carbon ? \App\Helpers\DateHelper::formatDate($result->appointment->patient->birth_date) : \App\Helpers\DateHelper::formatDate( \Carbon\Carbon::parse($result->appointment->patient->birth_date), ) }} ({{ $result->appointment->patient->detailed_age ?: \Carbon\Carbon::parse($result->appointment->patient->birth_date)->age . ' tahun' }}) @else - @endif
Jenis Kelamin : @if (($result->appointment->patient->gender ?? '') == 'male') Laki-laki @elseif (($result->appointment->patient->gender ?? '') == 'female') Perempuan @else - @endif
Perusahaan : @php $dispComp = $result->appointment?->company ?? ($result->appointment->patient->company ?? ($result->appointment->mcuResult->company ?? null)); @endphp @if ($dispComp) {{ $dispComp->name }} @else Individual @endif
Jabatan : {{ $result->appointment->patient->job_position ?? ($result->appointment->patient->occupation ?? '-') }}
Tanggal MCU : {{ $result->appointment->appointment_date ? \App\Helpers\DateHelper::formatDate($result->appointment->appointment_date) : '-' }}
Tanggal Pemeriksaan EKG : {{ $result->created_at ? \App\Helpers\DateHelper::formatDate($result->created_at) : '-' }}
HASIL PEMERIKSAAN ELEKTROKARDIOGRAM (EKG)
Jenis Pemeriksaan: Elektrokardiogram (EKG)
Tanggal Pemeriksaan: {{ $result->created_at ? \App\Helpers\DateHelper::formatDate($result->created_at) : '-' }}
@if ($result->rhythm || $result->frequency || $result->axis || $result->transition_zone || $result->p_wave_morphology || $result->pr_interval || $result->qrs || $result->qt_interval || $result->st_segment || $result->t_wave || $result->others)

Interpretasi EKG:

@if ($result->rhythm) @endif @if ($result->frequency) @endif @if ($result->axis) @endif @if ($result->transition_zone) @endif @if ($result->p_wave_morphology || $result->p_wave_not_evaluable) @endif @if ($result->pr_interval || $result->pr_interval_not_evaluable) @endif @if ($result->qrs) @endif @if ($result->qt_interval) @endif @if ($result->st_segment) @endif @if ($result->t_wave) @endif @if ($result->others) @endif
Irama: {{ $result->rhythm }}
Frekuensi: {{ $result->frequency }} x/m
Axis: {{ $result->axis }}
Zona Transisi: {{ $result->transition_zone }}
Morfologi Gelombang P: @if ($result->p_wave_not_evaluable) Tidak dapat dievaluasi @else {{ $result->p_wave_morphology }} ms @endif
Interval PR: @if ($result->pr_interval_not_evaluable) Tidak dapat dievaluasi @else {{ number_format((float) $result->pr_interval, 2) }} ms @endif
QRS: {{ $result->qrs }}
Interval QT: {{ $result->qt_interval }} ms
Segmen ST: {{ $result->st_segment }}
Gelombang T: {{ $result->t_wave }}
Lain-lain: {{ $result->others }}
@endif @if ($result->ekg_images && count(json_decode($result->ekg_images, true)) > 0)

Hasil Rekaman EKG:

@php $ekgImages = json_decode($result->ekg_images, true); @endphp @if (!empty($ekgImages)) @foreach ($ekgImages as $index => $imageName) @php $fullPath = storage_path('app/public/ekg_results/' . $imageName); $alternativePath = public_path('storage/ekg_results/' . $imageName); @endphp @php $imageUri = \App\Helpers\PdfImageHelper::dataUri($fullPath) ?? \App\Helpers\PdfImageHelper::dataUri($alternativePath); @endphp @if ($imageUri)
Gambar EKG {{ $index + 1 }}
@else

Gambar EKG {{ $index + 1 }} tidak dapat ditampilkan. Periksa berkas hasil pemeriksaan.

@endif @endforeach @else

Tidak ada gambar EKG yang tersedia

@endif
@endif @if ($result->conclusion)
KESIMPULAN PEMERIKSAAN ELEKTROKARDIOGRAM (EKG):

{{ $result->conclusion == 'Dalam batas normal' ? 'Normal Sinus Rhythm' : $result->conclusion }}

@endif @if ($result->doctor_notes)
CATATAN DOKTER:

{{ $result->doctor_notes }}

@endif
Dokter Pemeriksa
@if (isset($doctor_signature) && $doctor_signature) QR Code Verifikasi @endif
@if (isset($defaultDoctor) && $defaultDoctor && $defaultDoctor->employee) {{ $defaultDoctor->employee->full_name }} @else Dokter Penanggung Jawab @endif
@if (isset($showPrintMode) && $showPrintMode) @endif