@if ($appointment->visusResult && in_array($appointment->visusResult->status, ['verified', 'completed']))
HASIL PEMERIKSAAN PENGLIHATAN
@if ($appointment->visusResult->left_eye_uncorrected || $appointment->visusResult->right_eye_uncorrected) @endif @php $rightUncorrected = $appointment->visusResult->right_eye_uncorrected ?? ''; $leftUncorrected = $appointment->visusResult->left_eye_uncorrected ?? ''; $rightCorrected = $appointment->visusResult->right_eye_corrected ?? ''; $leftCorrected = $appointment->visusResult->left_eye_corrected ?? ''; // Show corrected vision if: // 1. Either corrected value exists AND // 2. Either uncorrected vision is not 6/6 (needs correction) OR corrected values are explicitly provided $shouldShowCorrected = ($rightCorrected || $leftCorrected) && ($rightUncorrected !== '6/6' || $leftUncorrected !== '6/6' || $rightCorrected || $leftCorrected); @endphp @if ($shouldShowCorrected) @endif @if ($appointment->visusResult->near_vision_left_uncorrected || $appointment->visusResult->near_vision_right_uncorrected || $appointment->visusResult->near_vision_left_corrected || $appointment->visusResult->near_vision_right_corrected) @if ($appointment->visusResult->near_vision_left_corrected || $appointment->visusResult->near_vision_right_corrected) @endif @endif @if ($appointment->visusResult->interpretation) @endif @if ($appointment->visusResult->notes) @endif
Parameter Mata Kanan Mata Kiri
Tanpa Koreksi {{ $appointment->visusResult->right_eye_uncorrected ?? '-' }} {{ $appointment->visusResult->left_eye_uncorrected ?? '-' }}
Dengan Koreksi {{ $appointment->visusResult->right_eye_corrected ?? '-' }} {{ $appointment->visusResult->left_eye_corrected ?? '-' }}
Visus Dekat (Tanpa Koreksi) {{ $appointment->visusResult->near_vision_right_uncorrected ?? '-' }} {{ $appointment->visusResult->near_vision_left_uncorrected ?? '-' }}
Visus Dekat (Dengan Koreksi) {{ $appointment->visusResult->near_vision_right_corrected ?? '-' }} {{ $appointment->visusResult->near_vision_left_corrected ?? '-' }}
Lapang Pandang {{ $appointment->visusResult->visual_field_right ?? 'Normal' }} {{ $appointment->visusResult->visual_field_left ?? 'Normal' }}
Tes Buta Warna {{ $appointment->visusResult->color_vision ?? 'Normal' }}
Interpretasi {{ $appointment->visusResult->interpretation }}
Catatan {{ $appointment->visusResult->notes }}
Dokter Penanggung Jawab
@if (isset($defaultVisusDoctor) && $defaultVisusDoctor && $visus_doctor_signature_path) @php $docSigFullPath = storage_path('app/public/' . $visus_doctor_signature_path); $docSigAltPath = public_path('storage/' . $visus_doctor_signature_path); $docSigImageData = null; $docSigMimeType = 'png'; if (file_exists($docSigFullPath)) { try { $docSigImageData = base64_encode(file_get_contents($docSigFullPath)); $docSigImageType = pathinfo($docSigFullPath, PATHINFO_EXTENSION); $docSigMimeType = $docSigImageType === 'jpg' ? 'jpeg' : strtolower($docSigImageType); } catch (Exception $e) { $docSigImageData = null; } } elseif (file_exists($docSigAltPath)) { try { $docSigImageData = base64_encode(file_get_contents($docSigAltPath)); $docSigImageType = pathinfo($docSigAltPath, PATHINFO_EXTENSION); $docSigMimeType = $docSigImageType === 'jpg' ? 'jpeg' : strtolower($docSigImageType); } catch (Exception $e) { $docSigImageData = null; } } @endphp @if ($docSigImageData) Tanda tangan {{ $defaultVisusDoctor->employee->full_name ?? 'Dokter' }} @else
Tanda tangan tidak tersedia
@endif @if (isset($visus_doctor_stamp_path) && $visus_doctor_stamp_path) @php $docStampFullPath = storage_path('app/public/' . $visus_doctor_stamp_path); $docStampAltPath = public_path('storage/' . $visus_doctor_stamp_path); $docStampImageData = null; $docStampMimeType = 'png'; if (file_exists($docStampFullPath)) { try { $docStampImageData = base64_encode(file_get_contents($docStampFullPath)); $docStampImageType = pathinfo($docStampFullPath, PATHINFO_EXTENSION); $docStampMimeType = $docStampImageType === 'jpg' ? 'jpeg' : strtolower($docStampImageType); } catch (Exception $e) { $docStampImageData = null; } } elseif (file_exists($docStampAltPath)) { try { $docStampImageData = base64_encode(file_get_contents($docStampAltPath)); $docStampImageType = pathinfo($docStampAltPath, PATHINFO_EXTENSION); $docStampMimeType = $docStampImageType === 'jpg' ? 'jpeg' : strtolower($docStampImageType); } catch (Exception $e) { $docStampImageData = null; } } @endphp @if ($docStampImageData) Stempel {{ $defaultVisusDoctor->employee->full_name ?? 'Dokter' }} @endif @endif @else
Tanda tangan tidak tersedia
@endif
{{ $defaultVisusDoctor->employee->full_name ?? 'Nama Dokter' }}
@endif