Vim Connect Backend SDK

Open in Claude

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 SDKBackend SDK
Runs inthe provider's browser, in the Vim Hubyour server (Node 20+)
Authenticates asthe signed-in useryour app (clientId / clientSecret)
Reachesthe EHR session: events, context, writebackthe records an account shared with your app; the account's EHR, Live and Replica
App typepoint-of-careservice

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.lookup answers { records: [{ entityTypeId, vimEntityId }] }, empty when nothing matched: an id, never the patient. Read the match as data.records[0]?.vimEntityId; reading the patient is a patient.get with that id, under its own grant.
  • patient.getInsights takes that id and answers { records }, every insight the account holds for that patient, each with its sections. 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.

On this page