Vim Connect Backend SDK
The client your server uses to read and write the records a Vim Connect account shared with your app, and to run operations in the account's EHR
@vimconnect/backend-sdk runs in your backend. It authenticates as your app and acts for one
account that has installed it. It is not the browser SDK: @vimconnect/app-sdk runs inside a
provider's EHR session and acts as the signed-in user.
| App SDK | Backend SDK | |
|---|---|---|
| Runs in | the provider's browser, in the Vim Hub | your server (Node 20+) |
| Authenticates as | the signed-in user | your app (clientId / clientSecret) |
| Reaches | the EHR session: events, context, writeback | the records an account shared with your app; the account's EHR, Live and Replica |
| App type | point-of-care | service |
EHR access
client.ehr runs operations against an account's connected EHR, in two modes:
- Live: Vim runs the operation in the account's EHR, so the result is current.
- Replica: reads from the copy Vim keeps of the account's EHR data.
Each account approves what your app may run, per connected system and per mode. See EHR access.
Start with Installation & Setup, then the Quick Start.
What you can call
client.api is fully typed: an unknown namespace or method is a compile error. The
Operations reference lists every operation, from the
same release as the SDK's types.
Being able to name an operation is not permission to call it. Your app may call what the account
granted when it installed you; anything else is refused by the API with a 403.
patient.lookupanswers{ records: [{ entityTypeId, vimEntityId }] }, empty when nothing matched: an id, never the patient. Read the match asdata.records[0]?.vimEntityId; reading the patient is apatient.getwith that id, under its own grant.patient.getInsightstakes that id and answers{ records }, every insight the account holds for that patient, each with itssections. When the account's source is an external API, the first call for a patient fetches from that API first, so it is slower than the ones after it.
client.vault stores and reads PHI and files outside any record; see
Using the vault.