@iehr/mock v4.3.178
iEHR Mock Library
Provides the MockClient
class and a large number of mocked endpoints and resources.
For example:
GET fhir/R4/Patient/123
returns Homer SimpsonGET fhir/R4/Practitioner/123
returns Dr. Alice SmithGET fhir/R4/Organization/123
returns Test Organization
Installation
Add as a dependency:
npm install @iehr/mock
Note the following peer dependencies:
- @iehr/core
- @iehr/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 IEHRClient
in @iehr/core. Please refer to IEHRClient
for full documentation on client capabilities.
About iEHR
iEHR is a healthcare platform that helps you quickly develop high-quality compliant applications. iEHR includes a FHIR server, React component library, and developer app.
License
Apache 2.0.
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
10 months ago
9 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
11 months ago
11 months ago
11 months ago
10 months ago
10 months ago
12 months ago
1 year ago
1 year ago
1 year ago
11 months ago
11 months ago
1 year ago
11 months ago
11 months ago
11 months ago
12 months ago
12 months ago
11 months ago
12 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago