@extends('layouts.app') @section('title', 'Edit Verifikasi Hasil EKG - MCU Klinik Mustika') @section('breadcrumb')

Edit Verifikasi Hasil EKG - {{ $result->appointment->patient->full_name }}

@endsection @section('content') @include('ekg.partials.ekg_viewer_assets')
{{-- Include verification patient information partial --}} @php $appointment = $result->appointment; @endphp @include('partials.verification_patient_info', ['layout' => 'sidebar', 'showPhysicalData' => false])
@if (isset($physicalExamResult) && $physicalExamResult)
Informasi Pasien
Tanda Vital
@if (!( $physicalExamResult->blood_pressure_systolic || $physicalExamResult->blood_pressure_diastolic || $physicalExamResult->heart_rate || $physicalExamResult->body_temperature || $physicalExamResult->respiratory_rate ))
Data tanda vital belum tersedia
Silakan lakukan registrasi terlebih dahulu untuk mengisi data tanda vital.
@else @if ($physicalExamResult->blood_pressure_systolic || $physicalExamResult->blood_pressure_diastolic)
{{ $physicalExamResult->blood_pressure_systolic ?? '-' }}/{{ $physicalExamResult->blood_pressure_diastolic ?? '-' }} mmHg @php $systolic = $physicalExamResult->blood_pressure_systolic ?? 0; $diastolic = $physicalExamResult->blood_pressure_diastolic ?? 0; if ($systolic >= 140 || $diastolic >= 90) { $bp_status = 'Hipertensi'; $bp_class = 'text-danger'; } else { $bp_status = 'Normal'; $bp_class = 'text-success'; } @endphp
{{ $bp_status }}
@endif @if ($physicalExamResult->heart_rate)
{{ $physicalExamResult->heart_rate }} bpm @php $hr = $physicalExamResult->heart_rate; if ($hr < 60) { $hr_status = 'Bradikardi'; $hr_class = 'text-warning'; } elseif ($hr > 100) { $hr_status = 'Takikardi'; $hr_class = 'text-danger'; } else { $hr_status = 'Normal'; $hr_class = 'text-success'; } @endphp
{{ $hr_status }}
@endif @if ($physicalExamResult->respiratory_rate)
{{ $physicalExamResult->respiratory_rate }}/menit @php $rr = $physicalExamResult->respiratory_rate; if ($rr < 12) { $rr_status = 'Bradipnea'; $rr_class = 'text-warning'; } elseif ($rr > 24) { $rr_status = 'Takipnea'; $rr_class = 'text-danger'; } else { $rr_status = 'Normal'; $rr_class = 'text-success'; } @endphp
{{ $rr_status }}
@endif @if ($physicalExamResult->body_temperature)
{{ number_format($physicalExamResult->body_temperature, 1) }}°C @php $temp = $physicalExamResult->body_temperature; if ($temp > 42.0) { $temp_status = 'Hipertermi'; $temp_class = 'text-danger'; } elseif ($temp >= 40.0 && $temp <= 42.0) { $temp_status = 'Hiperpireksis'; $temp_class = 'text-danger'; } elseif ($temp >= 38.0 && $temp < 40.0) { $temp_status = 'Febris'; $temp_class = 'text-warning'; } elseif ($temp >= 37.0 && $temp < 38.0) { $temp_status = 'Sub Febris'; $temp_class = 'text-info'; } elseif ($temp >= 36.6 && $temp <= 37.2) { $temp_status = 'Normal'; $temp_class = 'text-success'; } elseif ($temp < 36.0) { $temp_status = 'Hipotermi'; $temp_class = 'text-primary'; } else { $temp_status = 'Normal'; $temp_class = 'text-success'; } @endphp
{{ $temp_status }}
@endif
@endif
Antropometri
@if (!( $physicalExamResult->height || $physicalExamResult->weight || $physicalExamResult->waist_circumference ))
Data antropometri belum tersedia
Silakan lakukan registrasi terlebih dahulu untuk mengisi data antropometri.
@else @if ($physicalExamResult->height)
{{ number_format($physicalExamResult->height, 0) }} cm
Range normal: 150-200 cm
@endif @if ($physicalExamResult->weight)
{{ number_format($physicalExamResult->weight, 1) }} kg
Range normal: 40-150 kg
@endif @if ($physicalExamResult->height && $physicalExamResult->weight)
@php $bmi = $physicalExamResult->bmi ?? $physicalExamResult->weight / ($physicalExamResult->height / 100) ** 2; if ($bmi < 18.5) { $bmi_status = 'Underweight'; $bmi_class = 'text-info'; } elseif ($bmi < 23) { $bmi_status = 'Normal'; $bmi_class = 'text-success'; } elseif ($bmi < 25) { $bmi_status = 'Overweight'; $bmi_class = 'text-warning'; } elseif ($bmi < 30) { $bmi_status = 'Obesitas I'; $bmi_class = 'text-danger'; } else { $bmi_status = 'Obesitas II'; $bmi_class = 'text-danger'; } @endphp
{{ number_format($bmi, 1) }} kg/m²
{{ $bmi_status }}
@endif @if ($physicalExamResult->waist_circumference)
@php $waist = $physicalExamResult->waist_circumference; $gender = $result->appointment->patient->gender; if ($gender === 'male') { $waist_normal = $waist < 90; $waist_status = $waist_normal ? 'Normal' : 'Beresiko'; } else { $waist_normal = $waist < 80; $waist_status = $waist_normal ? 'Normal' : 'Beresiko'; } $waist_class = $waist_normal ? 'text-success' : 'text-warning'; @endphp
{{ number_format($waist, 1) }} cm
{{ $waist_status }} ({{ $gender === 'male' ? "Pria\n <90cm" : 'Wanita <80cm' }})
@endif @endif
@endif
Hasil Pemeriksaan EKG dan Interpretasi
@if ($result->ekg_images)
{{ count(json_decode($result->ekg_images, true)) }} File EKG
Gambar & PDF • @php $totalSize = 0; foreach (json_decode($result->ekg_images, true) as $image) { $filePath = storage_path('app/public/ekg_results/' . $image); if (file_exists($filePath)) { $totalSize += filesize($filePath); } } @endphp {{ number_format($totalSize / 1024, 2) }} KB
@endif @if ($result->ekg_images)
Hasil EKG
@php $ekgImages = json_decode($result->ekg_images, true); $firstImage = $ekgImages[0]; $fileExtension = strtolower(pathinfo($firstImage, PATHINFO_EXTENSION)); $fileUrl = asset('storage/ekg_results/' . $firstImage); @endphp @if (in_array($fileExtension, ['jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp']))
Hasil EKG
Download
@elseif ($fileExtension == 'pdf')
Tab Baru Download
@else
{{ basename($firstImage) }}
{{ strtoupper($fileExtension) }} File
@endif @if (count($ekgImages) > 1)
Semua Gambar EKG ({{ count($ekgImages) }} gambar)
@foreach ($ekgImages as $index => $image) @php $fileUrl = asset('storage/ekg_results/' . $image); $lower = strtolower($image); $isPdf = \Illuminate\Support\Str::endsWith($lower, '.pdf'); $fileExt = strtolower(pathinfo($image, PATHINFO_EXTENSION)); @endphp
@if (!$isPdf) EKG Image {{ $index + 1 }} @else
PDF EKG {{ $index + 1 }}
@endif
{{ $index + 1 }}
Klik untuk preview
EKG {{ $index + 1 }}
@endforeach
@endif @if ($result->technician_notes)
Catatan Petugas:
{{ $result->technician_notes }}
@endif
@else
Belum ada gambar EKG
Petugas belum mengupload gambar hasil EKG untuk pasien ini.
@endif
@canRoute ('ekg.verify')
@csrf
Form Edit Verifikasi Hasil EKG
@if ($result->status == 'verified')
Hasil sudah diverifikasi
Diverifikasi oleh: {{ $result->verifiedBy->name ?? 'Admin' }} pada {{ $result->verified_at ? \Carbon\Carbon::parse($result->verified_at)->format('d/m/Y H:i') : '-' }}
@elseif ($result->cancelled_at)
Verifikasi Sebelumnya Dibatalkan
Hasil pemeriksaan EKG ini sebelumnya dibatalkan verifikasinya dan telah diperbaiki oleh staff.
Alasan Pembatalan Sebelumnya:

{{ $result->cancellation_reason }}

Dibatalkan Oleh:

{{ $result->cancelledBy->name ?? 'Tidak diketahui' }}

@if ($result->cancellation_notes)
Catatan Pembatalan Sebelumnya:

{{ $result->cancellation_notes }}

@endif
Data telah diperbaiki oleh staff dan siap untuk diverifikasi kembali. @if ($result->cancelled_at)
Dibatalkan pada: {{ $result->cancelled_at->format('d/m/Y H:i') }} @endif
@elseif ($result->status == 'rejected')
Hasil ditolak
Ditolak oleh: {{ $result->verifiedBy->name ?? 'Admin' }} pada {{ $result->verified_at ? \Carbon\Carbon::parse($result->verified_at)->format('d/m/Y H:i') : '-' }} @if ($result->rejection_reason)
Alasan: {{ $result->rejection_reason }} @endif
@endif
Edit Hasil Pemeriksaan
Dokter dapat mengedit hasil pemeriksaan yang sudah diverifikasi atau completed untuk perbaikan atau penyesuaian interpretasi.
Interpretasi Dokter
Petunjuk: Berdasarkan gambar EKG di atas, masukkan interpretasi dan hasil pembacaan EKG.
Parameter Dasar
Morfologi Gelombang dan Interval
p_wave_not_evaluable ?? false) ? 'checked' : '' }} >
pr_interval_not_evaluable ?? false) ? 'checked' : '' }} >
Segmen ST dan Gelombang T
Temuan Tambahan
Kesimpulan
@php $conclusionType = old('conclusion_type'); if (!$conclusionType) { $conclusionType = $result->conclusion == 'Normal Sinus Rhythm' ? 'normal' : 'custom'; } @endphp
Catatan Dokter
Status Verifikasi & Pemilihan Staff
@php $verificationStatus = old('verification_status'); if (!$verificationStatus) { $verificationStatus = $result->status == 'verified' ? 'verified' : 'rejected'; } @endphp Hasil pemeriksaan disetujui dan dapat digunakan
Hasil dikembalikan ke staff untuk diperbaiki
@error ('verification_status')
{{ $message }}
@enderror
@error ('rejection_reason')
{{ $message }}
@enderror Alasan penolakan akan dikirim ke pemeriksa untuk perbaikan (Maksimal 1000 karakter)
0/1000 karakter

Pemilihan Dokter dan Staff
@endcanRoute
@canRoute ('ekg.verification.list') Kembali ke Antrian @endcanRoute
@php $examinationHistoryVariant = 'process'; @endphp @include('ekg.partials.examination_history_tab_pane')
@push('scripts') @endpush @push('styles') @endpush @endsection