Stream: implementers
Topic: Declaring support for sort options
Nathan Loyer (Nov 23 2021 at 17:39):
Hi,
My team was just looking at adding support for client-defined search sorting to our FHIR server. Is there a recommended way to declare in the capability statement what search parameters we allow clients to sort by? We only intend to support a very limited set of parameters to be sorted by on one or two resources. We would like to document what we support so our clients can read about it before trying to use the sort options. We were hoping for something programmatic in the capability statement rather than just prose in the markdown, our implementation guide, or our public consumer documentation. Any ideas?
Lloyd McKenzie (Nov 23 2021 at 19:03):
I don't think we have a standard way to do that right now. You could define an extension. Typically, if there's a supported SearchParameter, that means it's indexed. And if it's indexed, it's straightforward enough to sort by it (whether sensible or not is generally not the server's place to judge).
Nathan Loyer (Dec 14 2021 at 17:58):
I'm not sure if all of ours are indexed or not. I think your statement makes more sense for pure fhir implementations, but it's not always that straightforward to support search/sort when building FHIR APIs on top of existing monolithic EHR servers.
We went with defining an extension on the search parameter backbone element for now.
Lloyd McKenzie (Dec 14 2021 at 17:59):
Feel free to submit a change request to ask for a standard mechanism.
Last updated: Apr 12 2022 at 19:14 UTC