FHIR Chat · OR in fhirpath expressions in SearchParameters · implementers

Stream: implementers

Topic: OR in fhirpath expressions in SearchParameters


view this post on Zulip nicola (RIO/SS) (Feb 09 2017 at 13:32):

Here is some OR expression in search parameters:

Location.name or Location.alias
Organization.name or Organization.alias
PractitionerRole.telecom.where(system='email') | RelatedPerson.telecom.where(system='email') | Practitioner.telecom.where(system='email') or Practitioner.role.telecom.where(system='email') | Person.telecom.where(system='email') | Patient.telecom.where(system='email')
PractitionerRole.telecom.where(system='phone') | RelatedPerson.telecom.where(system='phone') | Practitioner.telecom.where(system='phone') or Practitioner.role.telecom.where(system='phone') | Person.telecom.where(system='phone') | Patient.telecom.where(system='phone')

I think this is logical mistake to use OR in such expressions, because this is not orin search terms i.e. "find me organization by name or alias", but orin extract expression i.e. fhirpath('name or alias') like '%searchterm%' and looks wrong (at lest indeterministic).

view this post on Zulip Bryn Rhodes (Feb 09 2017 at 15:54):

Looking at the definitions of Location search parameters I see unions being used, not ors, can you tell me where you found that expression for the Location search parameter? For example, on the search parameter registry page, I see Location.name | Location.alias.

view this post on Zulip Grahame Grieve (Feb 09 2017 at 19:02):

there's a task for me to fix this

view this post on Zulip Grahame Grieve (Feb 09 2017 at 19:02):

I think it happens on composite search parameters

view this post on Zulip Brian Postlethwaite (Feb 10 2017 at 04:22):

I already fixed that one, it was for org, location, practitioner and related person search definitions.

view this post on Zulip Brian Postlethwaite (Feb 10 2017 at 04:22):

I have a unit test that finds these now too.

view this post on Zulip Brian Postlethwaite (Feb 10 2017 at 04:26):

This was in the STU3 (jan), but has been fixed in the main build
(in fact I fixed it in the .net FHIR client for STU3 as a correction ;) Though not truely correct)


Last updated: Apr 12 2022 at 19:14 UTC