FHIR Chat · Searching doubts · implementers

Stream: implementers

Topic: Searching doubts


view this post on Zulip Aditya Joshi (Apr 19 2019 at 13:12):

Why FHIR does not provide search parameter for Observation.valueInteger, valueBoolean, valueRatio valueRange? It is because it does not want to have search parameter for all fhir elements, but in case of Observation, it makes sense to have search capability if value is integer or ratio.
It does have search parameter if it is valueQuantity, valueString, valueSampledData,
valueTime, valueDateTime, valuePeriod.

view this post on Zulip Lloyd McKenzie (Apr 19 2019 at 14:10):

I believe valueQuantity is intended to work with integer and range and boolean is intended to work with code. @Eric Haas @Grahame Grieve ?

view this post on Zulip Aditya Joshi (Apr 19 2019 at 14:39):

HI @Lloyd McKenzie I just tried the same. I created a Observation resource
http://fhir.hl7fundamentals.org/r4/Observation/17635

It has "valueInteger": 50

Now I tried searching this record- http://fhir.hl7fundamentals.org/r4/Observation?value-quantity=50
but above Observation does not appear in search result. Though, there are many records I got which matches to valueQuantity.value decimal values (any value between 49.5 to 50.5). So, it is not matching or searching valueInteger values.

view this post on Zulip Lloyd McKenzie (Apr 19 2019 at 14:54):

Ok. That seems like something we need to fix. Can you submit a change request?

view this post on Zulip Aditya Joshi (Apr 19 2019 at 15:03):

quoting from spec- http://hl7.org/fhir/search.html#number
"When a number search is used against a resource element that stores a simple integer (e.g. ImmunizationRecommendation.recommendation.doseNumber), and the search parameter is not expressed using the exponential forms, and does not include any non-zero digits after a decimal point, the significance issues cancel out and searching is based on exact matches. Note that if there are non-zero digits after a decimal point, there cannot be any matches."

as per above rule, resource element is indeed integer and search parameter is not expressed using exponential form or no decimal in search parameter value. So, ideally query should have worked.

My understanding from this is, value-quantity is not searching for valueInteger in Observation resource. So, there is probably no search parameter for valueInteger. Either FHIR can make value-quantity parameter search for valueInteger when it search query meets above criteria (no exponential and no decimal value in search parameter value). Is that what should go as change request?

view this post on Zulip Grahame Grieve (Apr 19 2019 at 20:35):

I think so

view this post on Zulip Eric Haas (Apr 19 2019 at 23:51):

  • First of all you can create your own SP too.

  • Second the fact that FHIR publishes SP does not guarantee a server will support them.

view this post on Zulip Aditya Joshi (Apr 20 2019 at 10:39):

Yes can create SP. That was the initial thought. but just wanted to check if FHIR supports searching valueInteger in some way then no need of creating local SP. The server where I tested is providing results when searching using value-quantity for valueInteger data, but not searching for integer, still behaving as intended (searching for decimal value excluding integer value).

So, if FHIR does not provide search parameter as of now for Observation.valueInteger then it is fine and solution is to create our own SP. But as @Lloyd McKenzie mentioned value-quantity should have worked for Observation.valueInteger then it becomes a case of change request.

view this post on Zulip Lloyd McKenzie (Apr 20 2019 at 15:37):

@Eric Haas I presume the intention of the existing search parameters is to support searching on boolean and integer/decimal answers too though, no? So that means the search parameters need to be defined such that that can happen.

view this post on Zulip Eric Haas (Apr 21 2019 at 04:18):

nope the search parameter list does list all valueTypes . I think there an open tracker to add some more, but i'd like to discuss sp policy more internally first.


Last updated: Apr 12 2022 at 19:14 UTC