mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-08 04:32:42 +00:00
Resolve the per-user module map at report-build start and drop a disabled module's section/resources from the aggregated payload, so the PDF and the FHIR bundle reflect only the modules the user keeps. The module gate wins over the per-report section toggle: a module turned off cannot be shared even if its report toggle is on. Map report sections / FHIR resource groups to module keys: mood, sleep, cycle, labs via the existing section toggles; glucose panel + raw glucose series; recovery + stress wellness scores; workout activity series + strain score. Core clinical sections (weight, BP, pulse, medications) carry no module key and stay unconditional. FHIR resources inherit the exclusion because every builder derives from the gated aggregator output.