Stream: subscriptions
Topic: boolean logic in criteria
Tom de Jong (Nov 20 2018 at 07:41):
I guess this question applies to any FHIR query, but I'm running into it while defining the criteria for a Subscription. I have a situation where I'm maintaining subscriptions on Consent registrations by patients. I won't get into the details of the use case, but I need to use boolean logic to specify the criteria for the Subscription. I need to be able to say: patient=X AND (class=A OR class=B OR provider=Y). I've read at http://hl7.org/fhir/search.html how the "&" operator is used to apply a logical AND and how the "," separator is used to apply a logical OR, but it seems & can only be used if the subcriteria apply to the same search parameter and , can only be used to separate a list of values for the same search parameter.
The example I see in the text is "Patient?language=FR,NL&language=EN" for patient speaks English and at least one of French or Dutch. In my example, I'm dealing with three different search parameters that need to be combined in a logical expression. Any advice on how to do that?
Jenni Syed (Nov 20 2018 at 17:53):
@Tom de Jong Use _filter for more complex queries: http://hl7.org/fhir/stu3/search.html#filter
Grahame Grieve (Nov 21 2018 at 04:56):
if the server supports it ;-)
Last updated: Apr 12 2022 at 19:14 UTC