Skip to content

Installation

  • Node.js 22 or later
  • Package manager: npm, pnpm, or yarn

Install the CLI globally to use fhir-test-data as a command anywhere:

Terminal window
pnpm add -g fhir-test-data

Verify the install:

Terminal window
fhir-test-data --version

Add as a development dependency when using the TypeScript API in test suites or build scripts:

Terminal window
pnpm add -D fhir-test-data

The package exposes two entry points:

Import pathContents
fhir-test-dataCore types, all builder factories, locale utilities
fhir-test-data/faultsinjectFaults, FAULT_TYPES, fault type definitions
import { createPatientBuilder } from "fhir-test-data";
import { injectFaults, FAULT_TYPES } from "fhir-test-data/faults";