Build the subtype-labeled injury sections for the Trauma tab's injuries list.
Every subtype in order is emitted — including empty ones — so the
template can decide (via {{#if section.injuries.length}}) which to show and
so each populated subtype carries a stable per-subtype "+ Add" control.
Subtypes present on items but absent from order are appended after the
ordered ones, in first-seen order, so nothing is silently dropped.
Grouping happens upstream of buildTraumaRows (mirroring
buildAfflictionGroups), so each section's rows are formatted exactly
as the flat list once was.
Build the subtype-labeled injury sections for the Trauma tab's injuries list. Every subtype in
orderis emitted — including empty ones — so the template can decide (via{{#if section.injuries.length}}) which to show and so each populated subtype carries a stable per-subtype "+ Add" control. Subtypes present on items but absent fromorderare appended after the ordered ones, in first-seen order, so nothing is silently dropped.Grouping happens upstream of buildTraumaRows (mirroring buildAfflictionGroups), so each section's rows are formatted exactly as the flat list once was.