FHIR Chat · fhir evaluation · questionnaire

Stream: questionnaire

Topic: fhir evaluation


view this post on Zulip Sravanti Cherukuri (May 26 2021 at 15:43):

How to write expression to check if list with multiple values contains another list of values

view this post on Zulip Brian Postlethwaite (May 26 2021 at 15:44):

As in checking are all values in something?

view this post on Zulip Brian Postlethwaite (May 26 2021 at 15:52):

Is this what you're looking for?
image.png
image.png

view this post on Zulip Sravanti Cherukuri (May 26 2021 at 15:53):

["Peter","James"] in ["Peter","John"] should evaluate to true
["Peter","James"] in ["Peter","John","James"] should evaluate to true
["Peter","James"] not in ["Peter","John"] should evaluate to false
["Peter","James"] not in ["John"] should evaluate to true

these scenarios Brian

view this post on Zulip Brian Postlethwaite (May 26 2021 at 15:57):

https://build.fhir.org/ig/HL7/FHIRPath/#symbols
the [ isn't a part of the fhirpath syntax (it is the array indexer only - not set/collection definition characters).
('a' | 'b' | 'c') is a list of strings

view this post on Zulip Brian Postlethwaite (May 26 2021 at 16:04):

('a' | 'b' | 'c').any($this in ('a' | 'b' | 'c')).not()

view this post on Zulip Sravanti Cherukuri (May 26 2021 at 17:11):

thanks much Brian

view this post on Zulip Sravanti Cherukuri (May 31 2021 at 16:54):

('a' | 'b' | 'c').any($this in ('a' | 'b' | 'c')).not()
image.png

view this post on Zulip Lloyd McKenzie (May 31 2021 at 21:51):

@Paul Lynch

view this post on Zulip Paul Lynch (Jun 01 2021 at 14:19):

I don't see a definition of "any" in the FHIRPath specification. Maybe you want "where"?

view this post on Zulip Brian Postlethwaite (Jun 01 2021 at 22:22):

Looks like I made a mistake on the function name there. Check the fhirpath spec there are a few set based operators too


Last updated: Apr 12 2022 at 19:14 UTC