PHI and the vault

Open in Claude

How the SDK keeps protected health information out of the API

Vim never stores plaintext PHI. Protected fields (names, date of birth, MRN, contact details, member ids) are stored as vault references, and the SDK does the swap for you in both directions:

  • On a write (create, update), the SDK writes the protected values to the vault in your process first, then sends the record with references in their place. If the vault write fails, the record is not written.
  • On a read, the SDK resolves the references and hands you plaintext.
  • On a lookup, the identity you search with is tokenized the same way, so it never reaches the API as plaintext.

You always pass and receive plaintext; you never handle a reference yourself. The entity types list which fields of each record are protected, and each operation in the Operations reference shows which of its inputs are tokenized.

A write that carries protected fields needs the record's identifier (for a patient, identifiers.sourcePatientId): it addresses the vault row. Without it the SDK refuses the write before anything is sent.

To store or read PHI and files that are not part of a record, use client.vault directly; see Using the vault.