Socket
Socket
Sign inDemoInstall

@medplum/mock

Package Overview
Dependencies
Maintainers
3
Versions
163
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@medplum/mock

Medplum Mock Client


Version published
Weekly downloads
2.7K
decreased by-34.8%
Maintainers
3
Weekly downloads
 
Created
Source

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:

  • @medplum/core
  • @medplum/fhir-router
  • If you want to use JSONPatch:
  • If you want to use GraphQL:

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

Keywords

FAQs

Package last updated on 07 Jan 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc