Codelist
Codelist Ordering
Users can define how items in a codelist should be ordered through a flexible annotation-based approach.
The behavior depends on the annotation specified at the codelist level:
- Codelist-Level Annotation
To enable ordering, an annotation must be added at the codelist level with the following properties:
Type: ORDER_BY
ID: @SXS
Text value: one of:
ORDER: Items will be sorted based on custom order values.
ALPHA: Items will be sorted alphabetically.
NONE: No specific ordering will be applied.
- Item-Level Annotation (only required for ORDER)
If the ORDER_BY value is set to ORDER, then an additional step is required:
Only items that need to be positioned explicitly require an annotation specifying their order value; other items that do not include an annotation will be placed according to default logic.
Type: ORDER
Text: A numeric value representing the item's order value.
Example:
For a codelist named CODELIST1, here’s how the items might be annotated:
This configuration results in the following order: item2, item1, item4, item3
🔹 Note: When ALPHA or NONE is used, no item-level annotation is required. The sorting is automatically applied based on the selected strategy.
