@php
$appointment = $appointment ?? null;
@endphp
@if ($appointment && ($appointment->mcuPackage->includes_dass21 ?? false) && $appointment->dass21Result)
DASS-21
:
@php
$depressionScore = $appointment->dass21Result->depression_score ?? 0;
$anxietyScore = $appointment->dass21Result->anxiety_score ?? 0;
$stressScore = $appointment->dass21Result->stress_score ?? 0;
$depressionRating = $appointment->dass21Result->depression_rating ?? 'Normal';
$anxietyRating = $appointment->dass21Result->anxiety_rating ?? 'Normal';
$stressRating = $appointment->dass21Result->stress_rating ?? 'Normal';
$isAllNormal = $depressionRating === 'Normal' && $anxietyRating === 'Normal' && $stressRating === 'Normal';
@endphp
@if ($isAllNormal)
Dalam batas normal
@else
@php
$results = [];
if ($depressionRating !== 'Normal') {
$results[] = "Depresi: {$depressionRating} ({$depressionScore})";
}
if ($anxietyRating !== 'Normal') {
$results[] = "Kecemasan: {$anxietyRating} ({$anxietyScore})";
}
if ($stressRating !== 'Normal') {
$results[] = "Stres: {$stressRating} ({$stressScore})";
}
@endphp
@foreach ($results as $index => $result)
@if ($index > 0)
,
@endif
{{ $result }}
@endforeach
@endif
@endif