Verifikasi Hasil MCU
@canRoute ('monitoring.detail')
Kembali ke Detail
@endcanRoute
@php
$isEditMode = request()->query('mode') === 'edit';
$existingHealthStatus = optional($appointment->mcuResult)->health_status;
$existingSuggestions = [];
if ($appointment->mcuResult && $appointment->mcuResult->mcu_suggestions) {
$existingSuggestions = is_array($appointment->mcuResult->mcu_suggestions)
? $appointment->mcuResult->mcu_suggestions
: json_decode($appointment->mcuResult->mcu_suggestions, true) ?? [];
}
@endphp
@if ($appointment->status === 'completed' && !$isEditMode)
MCU Telah Diverifikasi
Hasil MCU untuk pasien ini sudah diverifikasi pada {{
$appointment->final_signed_at
? \App\Helpers\DateHelper::formatShort($appointment->final_signed_at) .
' ' .
$appointment->final_signed_at->format('H:i')
: '-'
}}
@if ($appointment->mcuResult && $appointment->mcuResult->status === 'finalized')
@canRoute ('monitoring.print-pdf')
Cetak PDF
@endcanRoute
@endif
@if ($appointment->mcuResult)
Status Kesehatan
@php
$statusLabels = [
'fit' => 'Fit',
'fit_with_treatment' => 'Fit With Treatment',
'temporary_unfit' => 'Temporary Unfit',
'unfit' => 'Unfit',
'fit_for_the_job' => 'Fit For The Job',
'fit_for_the_job_with_treatment' => 'Fit For The Job With Treatment',
'fit_with_note' => 'Fit With Note',
'fit_for_the_job_with_note' => 'Fit For The Job With Note',
];
$statusColors = [
'fit' => 'success',
'fit_with_treatment' => 'success',
'temporary_unfit' => 'warning',
'unfit' => 'danger',
'fit_for_the_job' => 'success',
'fit_for_the_job_with_treatment' => 'success',
'fit_with_note' => 'info',
'fit_for_the_job_with_note' => 'info',
];
$status = $appointment->mcuResult->health_status;
$statusLabel = $statusLabels[$status] ?? ucfirst(str_replace('_', ' ', $status));
$statusColor = $statusColors[$status] ?? 'secondary';
@endphp
{{ $statusLabel }}
Saran MCU
@php
$hasSuggestions = false;
$suggestions = [];
if ($appointment->mcuResult->mcu_suggestions) {
$suggestions = is_array($appointment->mcuResult->mcu_suggestions)
? $appointment->mcuResult->mcu_suggestions
: json_decode($appointment->mcuResult->mcu_suggestions, true) ?? [];
$hasSuggestions = count($suggestions) > 0;
}
@endphp
@if ($hasSuggestions)
@foreach ($suggestions as $suggestion)
{{ $suggestion }}
@endforeach
@elseif ($appointment->mcuResult->examination_summary)
Catatan Verifikasi:
{!! nl2br(e($appointment->mcuResult->examination_summary)) !!}
@else
Tidak ada saran khusus
@endif
@endif
@else
@if ($isEditMode)
Mode Edit: Anda dapat memperbarui status
kesehatan dan saran MCU.
@endif
@canRoute ('monitoring.verify')
@endcanRoute
@endif