Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read variables from context only when they are used in expression #162

Merged
merged 6 commits into from
Jan 13, 2025

Conversation

axelv
Copy link
Contributor

@axelv axelv commented Jan 2, 2025

This PR is a potential solution for #161 and ensures that variables in the context object can be evaluated lazily. This helps integrate fhirpath.js with libraries like Jotai, Angular Signals, or Solid.js.

See also examples here tiro-health.github.io/fhirpath-jotai/

@axelv
Copy link
Contributor Author

axelv commented Jan 2, 2025

❗The changes in this PR introduce a new assumption for the context object: variables are only read when consumed. This enables lazy evaluation of variables, which is crucial for integration with reactivity libraries.

@yuriy-sedinkin yuriy-sedinkin merged commit fa654e6 into HL7:master Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants