Stream: committers
Topic: Invariant expressions
Brian Postlethwaite (Oct 27 2018 at 02:54):
Are we still populating the XPath expression definition?
Brian Postlethwaite (Oct 27 2018 at 02:56):
If so, need a little help with the fhirpath expression appointment.cancelationReason.exists() implies (Appointment.status='no-show' or Appointment.status='cancelled')
as XPath
Brian Postlethwaite (Oct 27 2018 at 03:04):
I came up with this, hope its right - tested ok with an online tester
not(exists(Appointment/cancellationReason)) or (exists(Appointment/cancellationReason) and (Appointment/status/@value='no-show' or Appointment/status/@value='cancelled'))
Lloyd McKenzie (Oct 27 2018 at 04:06):
Why is appointment part of the invariant? Isn't that the context?
Brian Postlethwaite (Oct 27 2018 at 05:15):
This invariant is on the appointment resource, in the fhirpath expression its not required, but others have it and is more illustrative
Brian Postlethwaite (Oct 27 2018 at 05:16):
And in the XPath, isn't the top level the context, so has to be applied there?
Lloyd McKenzie (Oct 27 2018 at 05:46):
In XPath the context would be the Appointment resource, so the invariant refers to nodes that exist beneath that
Lloyd McKenzie (Oct 27 2018 at 05:47):
not(exists(f:cancellationReason)) or f:status/@value=('no-show', 'cancelled')
Brian Postlethwaite (Oct 27 2018 at 05:54):
Thanks, I'll update it
Last updated: Apr 12 2022 at 19:14 UTC