{{-- Recursively renders one lab type's result rows for the "+" expand row on the appointment Laboratory tab. A "grouped" type is a section made of further sub-panels — print a bold header for it and recurse into each of its own bridge routines; anything else is a plain test whose own routine rows are the actual leaves to show a value for. Nesting can go arbitrarily deep (e.g. panel → URINE ANALYSIS → Chemical Examination → its own leaves), so this includes itself rather than hardcoding a fixed depth. --}} @if ($labType->result_format === 'grouped') @foreach ($labType->routine as $bridge) @continue(empty($bridge->result_component)) @php $target = \App\Models\LabLabType::with('routine.measurement')->find($bridge->result_component); @endphp @continue(! $target)