Filtering a Bundle by Resource.Effective #1924
-
Hello everyone! I have been trying to perform a resource filtering by the 'Effective' attribute, but I seem to be running around in circles for the past hours and I am wondering if someone could give me a hand with this. The filtering method we have been using is the 'Select('query'), as shown below. (res is of type Bundle) This works: This works: This doesn't work: (execute the below code on the QuickWatch) Attempt 2 Attempt 3 Does anyone have an idea on how to get this date comparison to work? Thanks in advance! Kind regards, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
DateTime literals begin with a So try to write te expression like this: res.Select("entry.resource.where(effective >= @2016-01-01)"); Happy coding! |
Beta Was this translation helpful? Give feedback.
Hi @AngeloMSFerreira,
DateTime literals begin with a
@
. See also the FhirPath specification: http://hl7.org/fhirpath/#datetimeSo try to write te expression like this:
Happy coding!