TECH_DEBT: Wire federated terminology into Measure evaluation with bundle-first semantics - #1844
Open
c-schuler wants to merge 3 commits into
Open
TECH_DEBT: Wire federated terminology into Measure evaluation with bundle-first semantics#1844c-schuler wants to merge 3 commits into
c-schuler wants to merge 3 commits into
Conversation
Contributor
|
Important Review available on request
Reviews should be triggered manually for repositories with fewer than 10 stars. Select Trigger review above or comment ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🛠️ Description of Changes
Adds optional federated terminology support to measure evaluation. When a remote FHIR terminology service URL is configured via link.fhirTerminologyServiceUrl, CQL evaluation federates ValueSet and CodeSystem lookups between the measure bundle and the remote server; when unset, behavior is unchanged (plain in-memory bundle repository, exactly as before).
Federation semantics: bundle-first, fall-through-on-empty. The measure bundle is always consulted first for terminology resources; the remote is called only when the bundle doesn't have what CQL is asking for. Remote failures degrade gracefully. The local (empty) result is returned instead of propagating an exception. This preserves measure reproducibility: bundle-embedded ValueSet expansions the measure author validated with take precedence over whatever the remote TS currently holds.
Scope of federation. Only ValueSet and CodeSystem reads/searches consult the remote. Patient data, Measure, Library, and everything else stay strictly local - no patient data is ever fetched from a terminology server.
🧪 Testing Performed
Automated tests run and verified in IntelliJ (four scenarios):
Manual verifier (FederatedTerminologyVerifier) built for running against real NHSN measure bundles per the procedure documented in FEDERATION-VERIFICATION.md - not yet exercised against production-shape input, recommended before merge but not required.
🧑🔬 Unit Testing
📓 Documentation Updated