{{-- ICTHospital - printable consultation summary for the patient. Copyright (c) DEVtrust Part of ICTHospital Licensed under the GNU General Public License v3.0. --}} Consultation {{ optional($patient)->patient_id }} {{ $c->date }} @php($institute = \Illuminate\Support\Facades\Schema::hasTable('institute') && \Illuminate\Support\Facades\Schema::hasColumn('institute', 'name') ? \Illuminate\Support\Facades\DB::table('institute')->value('name') : null)

{{ $institute ?: 'Outpatient consultation' }}

@if ($visit)@endif
Patient{{ optional($patient)->name }} (MR {{ optional($patient)->patient_id }})Date{{ $c->date }}
Doctor{{ optional($doctor)->name }}Age / sex{{ optional($patient)->age }} {{ optional($patient)->sex }}
VitalsBP {{ $visit->b_p ?: '-' }}, pulse {{ $visit->pulse ?: '-' }}, temp {{ $visit->temprature ?: '-' }}, weight {{ $visit->weight ?: '-' }}
@foreach (['presenting_complaint' => 'Presenting complaint', 'history' => 'History', 'allergies' => 'Allergies'] as $k => $label) @if ($c->$k)

{{ $label }}

{{ $c->$k }}

@endif @endforeach @php($exam = collect((array) $c->examination)->filter(fn ($e) => ($e['status'] ?? '') !== 'not_examined' || ! empty($e['note']))) @if ($exam->isNotEmpty())

Examination

@foreach ($exam as $k => $e)

{{ \App\Models\Consultation::SYSTEMS[$k] ?? $k }}: {{ ucfirst(str_replace('_', ' ', $e['status'] ?? '')) }}{{ ! empty($e['note']) ? ', ' . $e['note'] : '' }}

@endforeach @endif @foreach (['provisional_diagnosis' => 'Provisional diagnosis', 'diagnosis' => 'Diagnosis', 'plan' => 'Plan', 'treatment' => 'Treatment and advice'] as $k => $label) @if ($c->$k)

{{ $label }}

{{ $c->$k }}

@endif @endforeach @php($gy = (array) (($c->specialty ?? [])['gynae'] ?? [])) @if ($gy)

Obstetric

@foreach ($gy as $k => $v){{ strtoupper(str_replace('_', ' ', $k)) }}: {{ $v }}; @endforeach

@endif @php($eye = (array) (($c->specialty ?? [])['eye'] ?? [])) @if ($eye)

Eye

@foreach ($eye as $k => $v){{ strtoupper(str_replace('_', ' ', $k)) }}: {{ $v }}; @endforeach

@endif @if ($c->follow_up_date)

Follow-up

{{ \Carbon\Carbon::parse($c->follow_up_date)->format('D d M Y') }}{{ $c->follow_up_notes ? ': ' . $c->follow_up_notes : '' }}

@endif

Signature ______________________