Skip to content

Fhirpath iif function context... #2625

Closed

Description

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:

  1. Using the below test fhirpath expression (and test engine)
name.iif((trace('iif').use = 'official').trace('tr'), family, given.join(''))

🧪 Test with FHIRPath-Lab

  1. 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
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions