• Build the subtype-labeled affliction groups for the Trauma tab's afflictions list. Only non-empty groups are emitted (afflictions are created from a single section control, so empty subtype groups would be noise): ordered groups first — in order — then any remaining populated subtypes in first-seen order, so nothing is silently dropped.

    Parameters

    • afflictions: readonly AfflictionLike[]

      The pre-extracted affliction values.

    • order: readonly string[]

      The subtype keys in their canonical display order.

    • subTypeLabel: (subType: string) => string

      Resolves a subtype key to its display label.

    Returns AfflictionGroup[]

    The populated affliction groups.