Skip to content

Commit

Permalink
Merge pull request #208 from FHIR/column-ordering
Browse files Browse the repository at this point in the history
Qualify column ordering requirement
  • Loading branch information
johngrimes authored Feb 27, 2024
2 parents df40ee5 + fe6cb5c commit 83a5bf0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions input/pagecontent/StructureDefinition-ViewDefinition-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -353,9 +353,12 @@ And, the equivalent with nested structure:
Note the former example is preferred due to its simplicity and the latter is included purely for illustrative purposes.

### Column Ordering
*View runners* MUST produce output in the order that the columns appear in the ViewDefinition.

`select`s that have nested `select`s will place the columns of the parent `select` before the columns of the nested `select`, and the columns from a `unionAll` list are placed last. To change the column ordering, it is possible to place the columns or the `unionAll` in a nested `select`, which can be ordered relative to other nested `select`s as desired.
*View runners* that support column ordering in their output format MUST order the columns of the result according to the rules defined in this section.

`select`s that have nested `select`s will place the columns of the parent `select` before the columns of the nested `select`, and the columns from a `unionAll` list are placed last.

To change the column ordering, it is possible to place the columns or the `unionAll` in a nested `select`, which can be ordered relative to other nested `select`s as desired.

For example, the `column`s in this ViewDefinition will appear in alphabetical order:

Expand Down

0 comments on commit 83a5bf0

Please sign in to comment.