FHIR Chat · Using locally defined sort orders for observation codes · Orders and Observation WG

Stream: Orders and Observation WG

Topic: Using locally defined sort orders for observation codes


view this post on Zulip Alexander Röck (Nov 22 2019 at 10:00):

We have the following usecase: lab results are stored as observations including a category and code. A request for observations for a given patient should return observations sorted by category and code.
However, sorting should not be done alphabetically on displayNames or on code-values, but rather based on a specific catalog that dictates the order of categories and order of codes (within those categories).

We already thought about including the sorting key as a separate code-value (with a specific local code-system) in the observations. But as much as we understand it is not possible to sort by code-values of a specific code-system if there are codes multiple code-systems given in an observation. Secondly, the catalog may change over time which would mean that observations would have to be updated. This is definitely not not what we want to do. Moreover, it does not feel right to include the sort order information into the resource.

Is there any "way to go" in FHIR for using such a kind of sort order for resources?

view this post on Zulip Lloyd McKenzie (Nov 22 2019 at 10:04):

I would define a custom search parameter that allows searching on the 'sort value' of a given Observation and then sort based on that custom search parameter.


Last updated: Apr 12 2022 at 19:14 UTC