Closed
Description
openedon Nov 15, 2023
Describe the bug
The fhirpath function iif
does not consider contexts correctly, and appears to always want to be executed at the root.
To Reproduce
Steps to reproduce the behavior:
- Using the below test fhirpath expression (and test engine)
name.iif((trace('iif').use = 'official').trace('tr'), family, given.join(''))
- When selecting the Firely Engine see that there is no result returned, as the context (as shown in the trace window) is the resource still, the focus wasn't moved to the name collection.
Expected behavior
As demonstrated in the tool, the focus should be set to the name before evaluating the arguments to the function.
Version used:
- FHIR Version: R4B (but really version agnostic)
- Version: 5.3.0
Additional context
http://hl7.org/fhirpath/N1/#iifcriterion-expression-true-result-collection-otherwise-result-collection-collection
Discussion on Zulip with Grahame
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Metadata
Assignees
Labels
No labels