Getting Started

Quick Start

Open in Claude

Construct a client and make your first call

import { VimConnectBackendClient } from '@vimconnect/backend-sdk';

const client = new VimConnectBackendClient({
  environment: 'production',
  app: {
    clientId: process.env.VIM_CLIENT_ID!,
    clientSecret: process.env.VIM_CLIENT_SECRET!,
  },
  accountId: '…', // the account whose data you are reading
});

const { data } = await client.api.patient.lookup({
  demographics: { firstName: 'Jane', lastName: 'Doe', dateOfBirth: '1980-01-02' },
});

// PHI that is not part of a record goes to the account's vault directly.
const { token } = await client.vault.patient.tokenize({
  systemId: 'my-app',
  systemPatientId: 'P-42',
  firstName: 'Jane',
  dob: '1980-01-02',
});
const phi = await client.vault.patient.detokenize(token);

There is no init() and no login step. client.api and client.vault are ready on construction; the token is minted on the first call and re-minted before it expires.

Next Steps

On this page