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

3.1.5 • Public • Published

Medplum Mock Library

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

For example:

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

Installation

Add as a dependency:

npm install @medplum/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 MedplumClient in @medplum/core. Please refer to MedplumClient for full documentation on client capabilities.

About Medplum

Medplum is a healthcare platform that helps you quickly develop high-quality compliant applications. Medplum includes a FHIR server, React component library, and developer app.

License

Apache 2.0. Copyright © Medplum 2023

Package Sidebar

Install

npm i @medplum/mock

Weekly Downloads

3,676

Version

3.1.5

License

Apache-2.0

Unpacked Size

3.93 MB

Total Files

10

Last publish

Collaborators

  • rahul1
  • reshmakh
  • codyebberson