{{-- Clinic assessment content (safety check, physiotherapy assessment, sessions) for prints: its own print and the appointment's patient record. Needs $assessment, $safety, $sessions. --}} @php $a = $assessment; $answers = $a?->safety ?? []; @endphp
@if ($safety['checked'])

Safety check before treatment

@foreach ($safety['treatments'] as $t) @php [$label, $color] = \App\Services\ClinicSafety::STATUS_LABELS[$t['status']]; @endphp @endforeach
{{ $t['label'] }}
{{ $label }} @if ($t['reasons'])
{{ implode('; ', $t['reasons']) }}
@endif
@foreach (array_chunk(\App\Services\ClinicSafety::ITEMS, 2, true) as $pair) @foreach ($pair as $key => [$question]) @endforeach @endforeach
{{ $question }} {{ ucfirst($answers[$key] ?? '-') }}
@if ($safety['vitals'])
Vital signs: {{ implode(' · ', $safety['vitals']) }}
@endif @if ($a->safety_notes)
Notes: {{ $a->safety_notes }}
@endif
Consent: {{ $a->consent ? 'Yes — explained and agreed' : 'Not recorded' }} · checked {{ $a->safety_at->format('d M, Y h:i A') }} by {{ $a->safetyUser?->name }}
@endif @if ($a?->physio_at)

Physiotherapy assessment

Chief complaint{{ $a->chief_complaint }} @if ($a->complaint_since)Since{{ $a->complaint_since }}@endif Pain {{ $a->pain_score !== null ? $a->pain_score . '/10' : '-' }} {{ collect([$a->pain_area, $a->pain_side, $a->pain_type])->filter()->implode(' · ') }} {{ $a->pain_worse ? '· worse with ' . $a->pain_worse : '' }}
@if ($a->joint_exam) @foreach ($a->joint_exam as $j) @endforeach
Joint & movementROM leftROM rightStrength leftStrength right
{{ $j['joint'] }}{{ $j['rom_l'] }}{{ $j['rom_r'] }}{{ $j['str_l'] }}{{ $j['str_r'] }}
@endif
@foreach (['posture' => 'Posture', 'gait' => 'Gait', 'special_tests' => 'Special tests', 'functional_limits' => 'Function', 'goals' => 'Goals'] as $f => $label) @if ($a->$f){{ $label }}{{ $a->$f }}@endif @endforeach Plan {{ collect($a->plan_treatments ?? [])->map(fn ($k) => \App\Services\ClinicSafety::TREATMENTS[$k] ?? $k)->implode(', ') ?: '-' }} {{ $a->plan_sessions ? '· ' . $a->plan_sessions . ' sessions' : '' }} {{ $a->plan_per_week ? '· ' . $a->plan_per_week . ' per week' : '' }} @if ($a->plan_notes)
{{ $a->plan_notes }}@endif
Assessed {{ $a->physio_at->format('d M, Y h:i A') }} by {{ $a->physioUser?->name }}
@endif @if ($sessions->isNotEmpty())

Treatment sessions

@foreach ($sessions->sortBy('date') as $s) @endforeach
DateTreatmentPain beforePain afterNotesBy
{{ $s->date?->format('d M, Y') }}{{ $s->treatment }} {{ $s->pain_before ?? '-' }}{{ $s->pain_after ?? '-' }} {{ $s->notes }}{{ $s->user?->name }}
@endif