• 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.

    Parameters

    • traumas: readonly TraumaLike[]

      The pre-extracted trauma values.

    • order: readonly string[]

      The subtype keys in their canonical display order.

    • subTypeLabel: (subType: string) => string

      Resolves a subtype key to its display label.

    • aspectLabel: (aspect: string) => string

      Localizer mapping an aspect enum value to its label.

    Returns InjurySection[]

    The injury sections, ordered subtypes first (including empty ones).