{{-- Patient record (print_all): examinations entered in this visit — vital sign readings, eye examination, spectacle prescription, clinic assessment. Each section prints only when it has data. --}} @php $eyeAny = collect($eye ?? [])->contains(fn ($rows) => $rows->isNotEmpty()); $fmt = fn ($d, $f = 'd M, Y') => $d ? \Carbon\Carbon::parse($d)->format($f) : '-'; @endphp @if (($all_vitals ?? collect())->count() > 1)
All vital signs readings @foreach ($all_vitals as $v) @endforeach
DateTempBPPulseRRSpO2HeightWeightBMI
{{ $fmt($v->date) }} {{ $v->body_temperature }} {{ $v->blood_pressure_systolic || $v->blood_pressure_diastolic ? $v->blood_pressure_systolic . '/' . $v->blood_pressure_diastolic : '' }} {{ $v->heart_rate }} {{ $v->respiratory_rate }} {{ $v->oxygen_concentration }} {{ $v->height }} {{ $v->weight }} {{ $v->bmi }}
@endif @if ($eyeAny)
Eye examination @if ($eye['visual_acuity']->isNotEmpty())
Visual acuity
@foreach ($eye['visual_acuity'] as $row) @endforeach
EyeTypeSnellen valueRecorded at
{{ $row->eye }}{{ $row->va_type }}{{ $row->snellen_value }}{{ $fmt($row->recorded_at, 'd M, Y H:i') }}
@endif @if ($eye['iop']->isNotEmpty())
Intraocular pressure (IOP)
@foreach ($eye['iop'] as $row) @endforeach
EyeValue (mmHg)MethodTime of dayNotes
{{ $row->eye }}{{ $row->value_mmhg }}{{ $row->method }}{{ $row->time_of_day }}{{ $row->notes }}
@endif @if ($eye['pupil']->isNotEmpty())
Pupil examination
@foreach ($eye['pupil'] as $row) @endforeach
EyeSize (mm)ReactivityRAPD
{{ $row->eye }}{{ $row->size_mm }}{{ $row->reactivity }}{{ $row->rapd }}
@endif @if ($eye['findings']->isNotEmpty())
Findings
@foreach ($eye['findings'] as $row) @endforeach
EyeSegmentStructureFindingGradeNotes
{{ $row->eye }}{{ $row->segment }}{{ $row->structure }}{{ $row->finding }}{{ $row->grade }}{{ $row->notes }}
@endif @if ($eye['tests']->isNotEmpty())
Diagnostic tests
@foreach ($eye['tests'] as $row) @endforeach
TestEyeResult
{{ $row->test_type }}{{ $row->eye }}{{ $row->result_summary }}
@endif @if ($eye['contact_lens']->isNotEmpty())
Contact lens fitting
@foreach ($eye['contact_lens'] as $row) @endforeach
EyeBase curveDiameter (mm)BrandWear scheduleNotes
{{ $row->eye }}{{ $row->base_curve }}{{ $row->diameter_mm }}{{ $row->brand }}{{ $row->wear_schedule }}{{ $row->notes }}
@endif @if ($eye['surgery']->isNotEmpty())
Surgical procedures
@foreach ($eye['surgery'] as $row) @if ($row->pre_op_notes)@endif @if ($row->operative_note)@endif @if ($row->post_op_plan)@endif @foreach ($row->biometry as $b) @endforeach
Procedure{{ $row->procedure_type }} — {{ $row->eye }} Date{{ $fmt($row->scheduled_date) }}Status{{ $row->status }}
Pre-op notes{{ $row->pre_op_notes }}
Operative note{{ $row->operative_note }}
Post-op plan{{ $row->post_op_plan }}
Biometry ({{ $b->eye }}) AL {{ $b->axial_length_mm }} mm · K1 {{ $b->k1 }} · K2 {{ $b->k2 }} · IOL {{ $b->iol_power_calculated }} {{ $b->iol_formula_used ? '(' . $b->iol_formula_used . ')' : '' }} · target {{ $b->target_refraction }}
@endforeach @endif @if ($eye['images']->isNotEmpty())
Images
@foreach ($eye['images'] as $img)
{{ $img->eye_side }} · {{ $img->image_type }}{{ $img->name ? ' · ' . $img->name : '' }}
@endforeach
@endif
@endif @if (($spectacles ?? collect())->isNotEmpty())
Spectacle prescription @foreach ($spectacles as $sp)
Date: {{ $fmt($sp->date) }}
@foreach (['right' => 'Right (OD)', 'left' => 'Left (OS)'] as $side => $label) @foreach (['ucva', 'sph', 'cyl', 'axis', 'add', 'prisma', 'cva'] as $f) @endforeach @endforeach
EyeUCVASPHCYLAXISADDPRISMCVA
{{ $label }}{{ $sp->{$side . '_' . $f} }}
@php $spMore = collect([ 'Distance PD' => $sp->distance_pd, 'Near PD' => $sp->near_pd, 'Lenses advised' => $sp->lenses_advised, 'Lens material' => $sp->lense_material, 'Specification' => $sp->lenses_specification, 'Tinted' => $sp->tinted, 'Diameter' => $sp->diameter, 'Notes' => $sp->notes, ])->filter(fn ($v) => $v !== null && $v !== ''); @endphp @if ($spMore->isNotEmpty())
@foreach ($spMore as $label => $value) {{ $label }}: {{ $value }} @endforeach
@endif @endforeach
@endif @if ($clinic_assessment ?? null)
Clinic assessment @include('patient_mangement.appointment.clinic_assessment._record', $clinic_assessment)
@endif