@iehr/mock
TypeScript icon, indicating that this package has built-in type declarations

5.1.6 • Public • Published

iEHR Mock Library

Provides the MockClient class and a large number of mocked endpoints and resources.

For example:

  • GET fhir/R4/ai/iehr/Patient/123 returns Homer Simpson
  • GET fhir/R4/ai/iehr/Practitioner/123 returns Dr. Alice Smith
  • GET fhir/R4/ai/iehr/Organization/123 returns Test Organization

Installation

Add as a dependency:

npm install @iehr/mock

Note the following peer dependencies:

Usage

Create a new mock client:

const client = new MockClient();

Read a Patient resource:

const patient = await client.readResource('Patient', '123');

MockClient is API compatible with IEHRClient in @iehr/core. Please refer to IEHRClient for full documentation on client capabilities.

About iEHR

iEHR is a FHIR®-native, AI-infused, API-first, interoperable EHR. iEHR makes it easy to build healthcare apps quickly with less code.

License

Apache 2.0.

Copyright © Medplum 2025 (HL7® FHIR® US)

Copyright © iEHR.ai 2025 (HL7® FHIR® International, AI & Data platform)

Readme

Keywords

Package Sidebar

Install

npm i @iehr/mock

Homepage

www.iehr.ai/

Weekly Downloads

24

Version

5.1.6

License

Apache-2.0

Unpacked Size

3.97 MB

Total Files

10

Last publish

Collaborators

  • hamidrj
  • lmgc-bot
  • iehr-bot