| Jenis Pemeriksaan: | DASS-21 (Depression, Anxiety, Stress Scale) |
| Tanggal Pemeriksaan: | {{ $appointment->dass21Result->examination_time ? \App\Helpers\DateHelper::formatDate($appointment->dass21Result->examination_time) : ($appointment->dass21Result->created_at ? \App\Helpers\DateHelper::formatDate($appointment->dass21Result->created_at) : '-') }} |
| Psikolog: | {{ $appointment->dass21Result->psychologistStaff->name }} |
Skor Pemeriksaan
:
@if ($appointment->dass21Result->notes)
{{ $appointment->dass21Result->depression_score ?? '-' }}
{{
$appointment->dass21Result->depression_rating ??
'Normal'
}}
Depresi
{{ $appointment->dass21Result->anxiety_score ?? '-' }}
{{ $appointment->dass21Result->anxiety_rating ?? 'Normal' }}
Kecemasan
{{ $appointment->dass21Result->stress_score ?? '-' }}
{{ $appointment->dass21Result->stress_rating ?? 'Normal' }}
Stres
CATATAN PEMERIKSAAN
{{ $appointment->dass21Result->notes }}
KESIMPULAN 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
@php
$results = [];
if ($depressionRating !== 'Normal') {
$results[] = "Depresi: {$depressionRating} ({$depressionScore})";
}
if ($anxietyRating !== 'Normal') {
$results[] = "Kecemasan: {$anxietyRating} ({$anxietyScore})";
}
if ($stressRating !== 'Normal') {
$results[] = "Stres: {$stressRating} ({$stressScore})";
}
if (count($results) > 0) {
$dassConclusion = implode(";\n", $results) . '.';
} else {
$dassConclusion = 'Dalam batas normal.';
}
@endphp
{{ $dassConclusion }}
Dokter Pemeriksa
@php
$signatureImageData = null;
$signatureMimeType = 'png';
$doctorName = 'Dokter Pemeriksa';
$doctorPosition = 'Dokter Umum';
if (!$isGeneralAccount && $examinerDoctor && $examinerDoctor->signature_image) {
$signaturePath = storage_path('app/public/' . $examinerDoctor->signature_image);
if (file_exists($signaturePath)) {
try {
$signatureImageData = base64_encode(file_get_contents($signaturePath));
$imageType = pathinfo($signaturePath, PATHINFO_EXTENSION);
$signatureMimeType = $imageType === 'jpg' ? 'jpeg' : strtolower($imageType);
$doctorName = $examinerDoctor->employee->full_name ?? 'Dokter Pemeriksa';
$doctorPosition = $examinerDoctor->employee->position->name ?? 'Dokter Umum';
} catch (Exception $e) {
$signatureImageData = null;
}
}
}
if (!$isGeneralAccount && !$signatureImageData && $examinerUser && stripos($examinerUser->name, 'Said') !== false) {
$signaturePath = public_path('assets/images/ttd/dr.said.jpg');
if (file_exists($signaturePath)) {
try {
$signatureImageData = base64_encode(file_get_contents($signaturePath));
$signatureMimeType = 'jpeg';
$doctorName = 'dr. Said. M. Bin. Smith. MAP';
$doctorPosition = 'Dokter Umum';
} catch (Exception $e) {
$signatureImageData = null;
}
}
}
if (!$isGeneralAccount && !$signatureImageData && $examinerUser && stripos($examinerUser->name, 'Zakia') !== false) {
$signaturePath = public_path('assets/images/ttd/dr.zakia.jpg');
if (file_exists($signaturePath)) {
try {
$signatureImageData = base64_encode(file_get_contents($signaturePath));
$signatureMimeType = 'jpeg';
$doctorName = 'dr. Zakia Alaydrus';
$doctorPosition = 'Dokter Umum';
} catch (Exception $e) {
$signatureImageData = null;
}
}
}
if (!$isGeneralAccount && !$signatureImageData) {
$signaturePath = public_path('assets/images/ttd/dr.said.jpg');
if (file_exists($signaturePath)) {
try {
$signatureImageData = base64_encode(file_get_contents($signaturePath));
$signatureMimeType = 'jpeg';
$doctorName = 'dr. Said. M. Bin. Smith. MAP';
$doctorPosition = 'Dokter Umum';
} catch (Exception $e) {
$signatureImageData = null;
}
}
}
@endphp
@if (isset($qr_image) && $qr_image)
@endif
{{ $doctorName }}
@elseif ($signatureImageData)