@extends('layouts.master') @section('title', $title) @php // one surgery: details and notes (edited here), biometry, print — EyeSurgicalProcedureController@profile $p = $procedure; $canEdit = auth()->user()->can($access . '-update'); $statusCls = ['planned' => 'bg-warning', 'completed' => 'bg-success', 'cancelled' => 'bg-secondary'][$p->status] ?? 'bg-secondary'; $eyeName = ['OD' => 'OD (right)', 'OS' => 'OS (left)', 'both' => 'Both eyes'][$p->eye] ?? $p->eye; $patientUrl = $patient && auth()->user()->can('patient-profile-view') ? route('patient_management.patient.profile', $patient->id) : null; $visitUrl = $p->appointment_id && auth()->user()->can('appointment-profile') ? \App\Services\RecordLinks::appointment($p->appointment_id, 'eye_surgical') : null; $biometryRoute = 'patient_management.patient.eye_surgical.biometry'; @endphp @section('page_css') @endsection @section('content')
Surgical list
@if ($patient) All surgeries of this patient @endif
{{-- who, which eye, what, when --}}

{{ ucwords(str_replace('_', ' ', $p->procedure_type)) }} {{ ucfirst($p->status) }}

@if ($patientUrl){{ $patient?->name }}@else{{ $patient?->name }}@endif · ID {{ $patient?->patient_id }} @if ($patient?->gender) · {{ ucfirst($patient->gender) }} @endif @if ($patient?->dob) · {{ \Carbon\Carbon::parse($patient->dob)->age }} years @endif @if ($patient?->phone) · {{ $patient->phone }} @endif
Eye
{{ $eyeName }}
Scheduled
{{ $p->scheduled_date ? \Carbon\Carbon::parse($p->scheduled_date)->format('d M, Y') : '—' }}
From visit
@if ($p->appointment_id) @if ($visitUrl)App_{{ $p->Appointment?->appointment_no ?? $p->appointment_id }}@else App_{{ $p->Appointment?->appointment_no ?? $p->appointment_id }} @endif @else — @endif
Recorded
{{ $createdBy ?? '—' }} · {{ $p->created_at?->format('d M, Y') }}
{{-- details and notes --}}
Details & notes
@if ($canEdit)
@else @foreach (['Pre-op notes' => $p->pre_op_notes, 'Operative note' => $p->operative_note, 'Post-op plan' => $p->post_op_plan] as $label => $text)
{{ $label }}
{{ $text ?: '—' }}
@endforeach @endif
{{-- biometry (the same records as the Biometry page) --}}
Biometry
@can($access . '-create') @include('patient_mangement.patient.eye_surgical.biometry.modal', ['route' => $biometryRoute, 'title' => 'Biometry']) Add measurement @endcan
#EyeAxial length (mm)K1K2IOL powerFormulaTarget refraction{{ __('messages.action') }}
@endsection @section('page_js') @endsection