FHIR Chat · Number and Quantity Search · ibm

Stream: ibm

Topic: Number and Quantity Search


view this post on Zulip Lee Surprenant (Feb 20 2020 at 17:38):

I've always been confused about whether decimals (and quantities) should be handled as a ranges for purposes of search. IMHO the spec is clear about handling the "search value" as a range, but not nearly as clear about the target value.

view this post on Zulip Lee Surprenant (Feb 20 2020 at 17:39):

Currently, we only save the actual numeric value and not its implicit range (except for Range data types which have an explicit range), and in fact our Number Values tables don't even have columns for the range

view this post on Zulip Lee Surprenant (Feb 20 2020 at 17:40):

Recently, Graham chimed in with this answer and it matches my own opinion on what the specs wants from us: https://chat.fhir.org/#narrow/stream/179166-implementers/topic/Search.20for.20Decimals.20respecting.20Ranges/near/188599623

view this post on Zulip Lee Surprenant (Feb 20 2020 at 17:41):

Although I don't think there is consensus among implementers, I think we should update our schema and start capturing the implicit range of numbers and quantities going forward, and so I opened the following PR: https://github.com/IBM/FHIR/pull/710

view this post on Zulip Lee Surprenant (Feb 26 2020 at 17:31):

After reviewing this with the team, we decided to merge it. We still need to decide whether/how to do the schema migration. The current thought is that we will leave the existing numeric values in the X_NUMBER_VALUE and X_QUANTITY_VALUE columns and we will NOT populate the LOW and HIGH columns for these historic values. this should be ok because the queries were updated to use both the numeric value in the _VALUE column AND the _VALUE_LOW and _VALUE_HIGH columns (and the two subqueries are ORed together)

view this post on Zulip Lee Surprenant (Feb 26 2020 at 17:31):

If you are using our 4.0.0 or 4.0.1 releases and this is not suitable for you, please let us know


Last updated: Apr 12 2022 at 19:14 UTC