{{-- OPD-style RE/LE grid (opd-details-print); shell template provides the “Examination” column heading. --}} @php $ci = $consult_data['items'] ?? []; $oi = $opto_data['items'] ?? []; $ocularCellFilled = function (?string $value): bool { if ($value === null) { return false; } $s = preg_replace('/[\x{200B}-\x{200D}\x{FEFF}\x{00A0}\x{180E}]/u', '', (string) $value); return trim($s) !== ''; }; $ocularShowReLeRow = function (?string $re, ?string $le) use ($ocularCellFilled): bool { return $ocularCellFilled($re) || $ocularCellFilled($le); }; @endphp
@if($ocularShowReLeRow($ci['ReOcMov'] ?? '', $ci['LeOcMov'] ?? '')) @endif @if($ocularShowReLeRow($ci['ReLids'] ?? '', $ci['LeLids'] ?? '')) @endif @if($ocularShowReLeRow($ci['ReConj'] ?? '', $ci['LeConj'] ?? '')) @endif @if($ocularShowReLeRow($ci['ReCornea'] ?? '', $ci['LeCornea'] ?? '')) @endif @if($ocularShowReLeRow($ci['ReAntChamber'] ?? '', $ci['LeAntChamber'] ?? '')) @endif @if($ocularShowReLeRow($ci['ReIris'] ?? '', $ci['LeIris'] ?? '')) @endif @if($ocularShowReLeRow($ci['RePupil'] ?? '', $ci['LePupil'] ?? '')) @endif @php $iopRe = trim(($oi['IopAtRe2'] ?? '') ?: ($ci['ReIop'] ?? '')); $iopLe = trim(($oi['IopAtLe2'] ?? '') ?: ($ci['LeIop'] ?? '')); @endphp @if($ocularShowReLeRow($iopRe, $iopLe)) @endif @php $lensReCombined = ($ci['ReLens'] ?? '').($ci['ReLens2'] ?? ''); $lensLeCombined = ($ci['LeLens'] ?? '').($ci['LeLens2'] ?? ''); @endphp @if($ocularShowReLeRow($lensReCombined, $lensLeCombined)) @endif @if($ocularShowReLeRow($ci['ReNlp'] ?? '', $ci['LeNlp'] ?? '')) @endif
 
RE
LE
Oc. Movement {{ $ci['ReOcMov'] ?? '' }} {{ $ci['LeOcMov'] ?? '' }}
Lids {{ $ci['ReLids'] ?? '' }} {{ $ci['LeLids'] ?? '' }}
Conjuntiva {{ $ci['ReConj'] ?? '' }} {{ $ci['LeConj'] ?? '' }}
Cornea {{ $ci['ReCornea'] ?? '' }} {{ $ci['LeCornea'] ?? '' }}
Ant Chamber {{ $ci['ReAntChamber'] ?? '' }} {{ $ci['LeAntChamber'] ?? '' }}
Iris {{ $ci['ReIris'] ?? '' }} {{ $ci['LeIris'] ?? '' }}
Pupil {{ $ci['RePupil'] ?? '' }} {{ $ci['LePupil'] ?? '' }}
IOP {{ $iopRe }} {{ $iopLe }}
Lens {{ $ci['ReLens'] ?? '' }}@if(($ci['ReLens2'] ?? '') !== '')
{{ $ci['ReLens2'] ?? '' }}@endif
{{ $ci['LeLens'] ?? '' }}@if(($ci['LeLens2'] ?? '') !== '')
{{ $ci['LeLens2'] ?? '' }}@endif
NLP {{ $ci['ReNlp'] ?? '' }} {{ $ci['LeNlp'] ?? '' }}