Feat/multi server#75
Merged
mechanik-daniel merged 7 commits intoOutburn-IL:mainfrom Apr 25, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds multi-server support by introducing $useFhirServer(...) to switch the active FHIR client within a lexical scope via an optional connectionResolver.
Changes:
- Introduces
connectionResolverin compile-time and runtime options and routes FHIR client wrapper calls through the active connection override. - Adds
$useFhirServer(...)to set/clear the active connection per lexical frame, while keeping terminology helpers pinned toterminologyRuntime. - Adds a focused test suite for connection switching/scoping behavior and bumps package versions.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/fumifier.js |
Adds connectionResolver option plumbing and $useFhirServer binding; updates FHIR wrapper routing and clarifies terminology pinning. |
test/use-fhir-server.test.js |
New tests validating named/URL switching, scoping, reset behavior, resolver forwarding, and terminology isolation. |
package.json |
Version bump to 2.2.0 and dependency updates. |
package-lock.json |
Lockfile updated to match dependency/version changes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Multi-server support via
$useFhirServerSummary
This PR adds multi-server support by allowing an expression to switch the active FHIR client within the current lexical scope using
$useFhirServer(...).What changed
connectionResolverto compile-time and runtime options so Fumifier can resolve a named connection or inline server target to a FHIR client.$useFhirServer(...)is set, while falling back to the defaultfhirClientotherwise.$useFhirServer()is called with no arguments.$translateCode(...)pinned toterminologyRuntimeso server switching only affects FHIR client operations.Behavior notes
$useFhirServer('myConn')switches to a named connection for the current lexical frame.$useFhirServer('https://example.org/fhir', { ...config })passes both the target and config object toconnectionResolver.$useFhirServer()clears the override and restores the default client.Testing
connectionResolver.