{{-- Safety check before treatment + the result per treatment. Needs $assessment, $safety (ClinicSafety::evaluate), $appointment, $access. --}} @php $answers = $assessment?->safety ?? []; $canEdit = auth()->user()->can($access . '-create'); @endphp {{-- result per treatment --}}
@foreach ($safety['treatments'] as $key => $t) @php [$statusLabel, $color] = \App\Services\ClinicSafety::STATUS_LABELS[$t['status']]; @endphp
{{ $t['label'] }} {{ $statusLabel }}
@if ($t['reasons'])
    @foreach ($t['reasons'] as $r)
  • {{ $r }}
  • @endforeach
@endif
@endforeach
@if (!$safety['checked'])
Safety check not done yet — do it before massage, cupping or a vitamin injection.
@elseif (!$safety['consent'])
Patient consent is not recorded.
@endif @if ($safety['vitals'])
From today's vital signs: {{ implode(' · ', $safety['vitals']) }}
@endif
@csrf
Ask the patient each question. @if ($canEdit) @endif
@foreach (\App\Services\ClinicSafety::ITEMS as $key => [$question, $effects]) @php $stops = collect($effects)->filter(fn ($e) => $e === 'stop')->keys()->map(fn ($k) => \App\Services\ClinicSafety::TREATMENTS[$k]); @endphp @endforeach
{{ $question }} @if ($stops->isNotEmpty())
If yes: no {{ strtolower($stops->implode(', ')) }}
@endif
consent)>
@if ($assessment?->safety_at) Checked {{ $assessment->safety_at->format('d M, Y h:i A') }} by {{ $assessment->safetyUser?->name }} @endif @if ($canEdit) @endif