@medplum/mock 0.5.2 → 0.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -8,6 +8,38 @@ For example:
8
8
  - `GET fhir/R4/Practitioner/123` returns Dr. Alice Smith
9
9
  - `GET fhir/R4/Organization/123` returns Test Organization
10
10
 
11
+ ## Installation
12
+
13
+ Add as a dependency:
14
+
15
+ ```bash
16
+ npm install @medplum/mock
17
+ ```
18
+
19
+ Note the following peer dependencies:
20
+ - [@medplum/core](https://www.npmjs.com/package/@medplum/core)
21
+ - [@medplum/fhirpath](https://www.npmjs.com/package/@medplum/fhirpath)
22
+
23
+ ## Usage
24
+
25
+ Create a new mock client:
26
+
27
+ ```ts
28
+ const client = new MockClient();
29
+ ```
30
+
31
+ Read a `Patient` resource:
32
+
33
+ ```ts
34
+ const patient = await client.readResource('Patient', '123');
35
+ ```
36
+
37
+ `MockClient` is API compatible with `MedplumClient` in [@medplum/core](https://www.npmjs.com/package/@medplum/core). Please refer to `MedplumClient` for full documentation on client capabilities.
38
+
39
+ ## About Medplum
40
+
41
+ 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.
42
+
11
43
  ## License
12
44
 
13
45
  Apache 2.0. Copyright © Medplum 2022