How does quantity search param with range value work?

Hi there,

In the Condition resource, abatement-age search parameter is a quantity type, but the expression Condition.abatement.as(Age) | Condition.abatement.as(Range) | Condition.abatement.as(Age) indicates that the value could be a range.

I couldn’t find any information about how the search should be handled in the quantity search param section (http://hl7.org/fhir/search.html#quantity) so I want to confirm the behavior to make.

If there is a document with abatement that has Range with low = 5 and high = 10, then if a search comes in with ?abatement-age=8 (for the sake of simplicity, assuming that the system and code would match), what would be the result? Since prefix is not specified, it’s implicitly set to EQ but I am not sure if it should match because 8 is within the range or it shouldn’t match because technically 8 does not equal to range of 5 to 10. What about other prefixes such as less than and greater than and what not?

Also, is the expression correct that it repeats the as(Age) twice?

Thanks!

The search should return resources where the region allowed by the search parameter overlaps in any way with the range specified on the resource. So =8 should return the resource. That said, most searches will likely make use of the “le” and “ge” comparisons rather than exact values.

Repeating as twice seems odd. Please submit a change request for us to look at that and hopefully fix it.

Thanks Lloyd. I opened issue https://gforge.hl7.org/gf/project/fhir/tracker/?action=TrackerItemEdit&tracker_item_id=14500&start=725.