FHIR Chat · Observation FHIRPath expressions? · implementers

Stream: implementers

Topic: Observation FHIRPath expressions?


view this post on Zulip Alex Brown (Oct 30 2020 at 13:27):

Hi! Hopefully quick question:

Observation has a few search parameters which use the 'as' type specifier, such as: (Observation.component.value as CodeableConcept). The 'as' documentation (http://hl7.org/fhirpath/#as-type-specifier) says the left hand operator, in this case Observation.component.value, must only have one entry, otherwise an error should be returned.

I'm aware that each component is only going to have a single value[x], but Observation.component is used if multiple results are included, so the left hand operator is basically always going to have more than one entry. We're seeing lots of errors being thrown on blood pressure Observations, which have two components, each with a single valueQuantity.

I'm not sure if this is an issue with the Observation search parameter FHIRPath expressions, the FHIRPath documentation, or our interpretation of it. Any help would be much appreciated!

view this post on Zulip Lloyd McKenzie (Oct 30 2020 at 15:28):

@Grahame Grieve

view this post on Zulip Arny Epstein (Oct 30 2020 at 18:49):

I would agree that this is an error (bug) in the FHIR SearchParameters. The proper expression would be
Observation.component.value.ofType(CodeableConcept)
instead of
Observation.component.value as CodeableConcept
in cases where the left side could be a multivalue collection.
(And it could be used everywhere that 'as' is used in search parameters )

view this post on Zulip Grahame Grieve (Nov 02 2020 at 20:47):

yes I agree that's an issue - can you make a task to fix please

view this post on Zulip Alex Brown (Nov 04 2020 at 15:20):

Thanks! Opened an issue: https://jira.hl7.org/browse/FHIR-29653


Last updated: Apr 12 2022 at 19:14 UTC