{{-- Smart Report v2 - General template group. --}} {{-- Handles: BMI, BP, GRAMSA, NBSV2, CSFEP (new layouts here) plus --}} {{-- IGRA/QTGPT/PROEL/STONEA/NBS/BF/DFGT (delegate to pcr_card variants). --}} @php /** @var array $group Group view-model from WebController v2 dispatch */ /** @var object $Order */ /** @var object $Profile */ /** @var \App\Services\SmartReportV2Service $service */ $service = $service ?? app(\App\Services\SmartReportV2Service::class); $Package = $group['package'] ?? ($group['firstPackage'] ?? null); $code = strtoupper($group['code'] ?? ($Package->lABCATEGORYPACKAGE->CODE ?? '')); $model = $Package ? $service->buildGeneralModel($Package, $code) : ['variant' => 'general_stub', 'comment' => null]; $variant = $model['variant'] ?? 'general_stub'; // PCR-delegate codes: hand off to pcr_card which already handles these variants $pcrDelegates = ['IGRA','QTGPT','PROEL','STONEA','NBS','BF','DFGT']; @endphp {{-- ------------------------------------------------------------------ --}} {{-- PCR-delegate codes: reuse pcr_card layout. v1 renders all seven on --}} {{-- the PCR template (storage/pdf/pcr-test-smart-report.pdf), so they --}} {{-- keep the PCR background rather than the general one. --}} {{-- ------------------------------------------------------------------ --}} @if (in_array($code, $pcrDelegates)) @include('pdf.smart_report.components.pcr_card', [ 'group' => $group, 'Order' => $Order, 'Profile' => $Profile, 'bgTemplate' => 'pcr', ]) {{-- ------------------------------------------------------------------ --}} {{-- BMI --}} {{-- ------------------------------------------------------------------ --}} @elseif ($variant === 'bmi')