Stream: ibm
Topic: Sorting on quantity
Lee Surprenant (Nov 07 2019 at 14:59):
While working on https://github.com/IBM/FHIR/issues/359 I noticed something pretty interesting...our current sort logic (in jdbc persistence layer) actually sorts on the system first, and then the value.
Lee Surprenant (Nov 07 2019 at 15:00):
Whats especially interesting to me is that it doesn't actually sort on the system name but instead on the identifier in the code systems table
Lee Surprenant (Nov 07 2019 at 15:00):
which I think just happens to be whatever order we saw the systems in
Lee Surprenant (Nov 07 2019 at 15:07):
For quantity values with ucum units, I think a really intelligent server could sort all the quantities that are comparable (i.e. of the same 'dimension' in ucum). However, since we don't do anything special with UCUM unit conversions at this time,
I think that grouping the values by their unit code systems seems reasonable.
Lee Surprenant (Nov 07 2019 at 15:08):
Further, I guess sorting by system id is "as logical" as doing a lexical sort of the system name, since neither would really give you any meaningful sort
Last updated: Apr 12 2022 at 19:14 UTC