-
Notifications
You must be signed in to change notification settings - Fork 184
FML resolve() in Bundle #1944
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
base: master
Are you sure you want to change the base?
FML resolve() in Bundle #1944
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1944 +/- ##
============================================
+ Coverage 12.89% 12.90% +0.01%
- Complexity 34650 34694 +44
============================================
Files 2300 2300
Lines 699797 699807 +10
Branches 206239 206240 +1
============================================
+ Hits 90231 90345 +114
+ Misses 577681 577553 -128
- Partials 31885 31909 +24 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
I simplified the PR further by just lazy caching the references in TransformSupportServices, no longer requiring modifictions in ValidationEngine. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm suspicious of this change for two reasons - the bundle resolution code is more complicated than this, I think (more ways to resolve than the simple one I see here)
But more importantly, this is just inside bundles? I think we need to agree what the spec should say should happen with resolve(), because in some use cases for FML, resolve() is a very significant problem - I think?
9b69628
to
d0cd55e
Compare
I agree. @oliveregger suggested to use the mechanism from the InstanceValidator.resolveReference() instead. It's now implemented in matchbox and I have changed this PR accordingly. FML would then use the same logic as validate.
Indeed the spec does not say much about resolve() except referring to FHIRPath. The example in the tutorial seems incoherent, see related zulip discussion. Now that we use InstanceValidator.resolveReference() it should be more generic. Additionally, if we would initialize it with: validator.setFetcher(new StandAloneValidatorFetcher(pcm, context, this)); It even resolves external resource (I have successfully tested it locally). |
so how does this PR compare to the discussion that we had on Zulip about this issue? |
This PR enables resolve() on the target variable using FHIRPath which can then be used in dependent rules:
Participants of the discussion agreed this syntax is valid and should work. The Zulip discussion was also whether resolve() should be possible on the source element (like |
Proof-of-concept to support resolve() in FML to resolve references within a Bundle.
Related zulip discussion: https://chat.fhir.org/#narrow/channel/379173-FHIR-Mapping-Language/topic/resolve.28.29.20references.20within.20a.20Bundle/with/508251737