Stream: implementers
Topic: OR in fhirpath expressions in SearchParameters
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 or
in search terms i.e. "find me organization by name or alias", but or
in extract expression i.e. fhirpath('name or alias') like '%searchterm%'
and looks wrong (at lest indeterministic).
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.
Grahame Grieve (Feb 09 2017 at 19:02):
there's a task for me to fix this
Grahame Grieve (Feb 09 2017 at 19:02):
I think it happens on composite search parameters
Brian Postlethwaite (Feb 10 2017 at 04:22):
I already fixed that one, it was for org, location, practitioner and related person search definitions.
Brian Postlethwaite (Feb 10 2017 at 04:22):
I have a unit test that finds these now too.
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