sortClause
The sort clause orders the results of a query. It can specify a direction (asc/desc) or a list of sort items, each with an optional direction.
Examples
Sort descending
from [Observation] O sort desc
Sort by a property ascending
from [Encounter] E sort by E.period.start asc
Sort by multiple properties
from [Observation] O sort by O.effective desc, O.id asc
EBNF
sortClause
: 'sort' ( sortDirection | ('by' sortByItem (',' sortByItem)*) )
;