LAMPIRAN GAMBAR:
@php
$imagePath = $letter->spirometry_file_path;
$normalizedPath = ltrim(preg_replace('/^storage\//', '', $imagePath), '/');
$fullPath = storage_path('app/public/' . $normalizedPath);
$alternativePath = public_path('storage/' . $normalizedPath);
$resolvedPath = null;
if (file_exists($fullPath)) {
$resolvedPath = $fullPath;
} elseif (file_exists($alternativePath)) {
$resolvedPath = $alternativePath;
}
$imageUri = \App\Helpers\PdfImageHelper::dataUri($resolvedPath);
@endphp
@if ($imageUri)
Gambar spirometri tidak dapat ditampilkan. Periksa berkas hasil pemeriksaan.
@endifINTERPRETASI:
@if ($letter->usesFormattedInterpretation())
{!! $letter->formattedInterpretation() !!}
@else
{{ $letter->interpretation }}
@endifKESIMPULAN:
@if ($letter->usesFormattedConclusion())
{!! $letter->formattedConclusion() !!}
@else
{{ $letter->conclusion }}
@endifANJURAN:
@if ($letter->usesFormattedRecommendation())
{!! $letter->formattedRecommendation() !!}
@else
{{ $letter->recommendation }}
@endif