@medplum/mock 0.9.37 → 0.10.0
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/dist/cjs/client.d.ts +2 -1
- package/dist/cjs/index.js +51 -5
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/index.min.js +1 -1
- package/dist/cjs/index.min.js.map +1 -1
- package/dist/cjs/mocks/simpsons.d.ts +1 -0
- package/dist/esm/client.d.ts +2 -1
- package/dist/esm/index.js +51 -6
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index.min.js +1 -1
- package/dist/esm/index.min.js.map +1 -1
- package/dist/esm/mocks/simpsons.d.ts +1 -0
- package/dist/types/client.d.ts +2 -1
- package/dist/types/mocks/simpsons.d.ts +1 -0
- package/package.json +4 -4
package/dist/cjs/client.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LoginState, MedplumClient, ProfileResource } from '@medplum/core';
|
|
2
|
-
import { Binary } from '@medplum/fhirtypes';
|
|
2
|
+
import { Binary, UserConfiguration } from '@medplum/fhirtypes';
|
|
3
3
|
export interface MockClientOptions {
|
|
4
4
|
readonly debug?: boolean;
|
|
5
5
|
}
|
|
@@ -9,6 +9,7 @@ export declare class MockClient extends MedplumClient {
|
|
|
9
9
|
constructor(clientOptions?: MockClientOptions);
|
|
10
10
|
clear(): void;
|
|
11
11
|
getProfile(): ProfileResource;
|
|
12
|
+
getUserConfiguration(): UserConfiguration | undefined;
|
|
12
13
|
setActiveLoginOverride(activeLoginOverride: LoginState): void;
|
|
13
14
|
getActiveLogin(): LoginState | undefined;
|
|
14
15
|
createBinary(_data: any, filename: string, contentType: string): Promise<Binary>;
|
package/dist/cjs/index.js
CHANGED
|
@@ -441,6 +441,37 @@
|
|
|
441
441
|
},
|
|
442
442
|
],
|
|
443
443
|
};
|
|
444
|
+
const HomerObservation7 = {
|
|
445
|
+
resourceType: 'Observation',
|
|
446
|
+
id: '7',
|
|
447
|
+
subject: {
|
|
448
|
+
reference: 'Patient/123',
|
|
449
|
+
display: 'Homer Simpson',
|
|
450
|
+
},
|
|
451
|
+
code: {
|
|
452
|
+
text: 'Test 7',
|
|
453
|
+
},
|
|
454
|
+
component: [
|
|
455
|
+
{
|
|
456
|
+
valueQuantity: {
|
|
457
|
+
value: 1000,
|
|
458
|
+
unit: 'mg/dL',
|
|
459
|
+
system: 'http://unitsofmeasure.org',
|
|
460
|
+
},
|
|
461
|
+
},
|
|
462
|
+
],
|
|
463
|
+
interpretation: [
|
|
464
|
+
{
|
|
465
|
+
coding: [
|
|
466
|
+
{
|
|
467
|
+
system: 'http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation',
|
|
468
|
+
code: 'HH',
|
|
469
|
+
display: 'Critical high',
|
|
470
|
+
},
|
|
471
|
+
],
|
|
472
|
+
},
|
|
473
|
+
],
|
|
474
|
+
};
|
|
444
475
|
const HomerSimpsonSpecimen = {
|
|
445
476
|
id: '123',
|
|
446
477
|
resourceType: 'Specimen',
|
|
@@ -511,6 +542,7 @@
|
|
|
511
542
|
core.createReference(HomerObservation4),
|
|
512
543
|
core.createReference(HomerObservation5),
|
|
513
544
|
core.createReference(HomerObservation6),
|
|
545
|
+
core.createReference(HomerObservation7),
|
|
514
546
|
],
|
|
515
547
|
};
|
|
516
548
|
const BartSimpson = {
|
|
@@ -8017,12 +8049,24 @@
|
|
|
8017
8049
|
this.activeLoginOverride = undefined;
|
|
8018
8050
|
}
|
|
8019
8051
|
getProfile() {
|
|
8052
|
+
return DrAliceSmith;
|
|
8053
|
+
}
|
|
8054
|
+
getUserConfiguration() {
|
|
8020
8055
|
return {
|
|
8021
|
-
resourceType: '
|
|
8022
|
-
|
|
8023
|
-
|
|
8024
|
-
|
|
8025
|
-
|
|
8056
|
+
resourceType: 'UserConfiguration',
|
|
8057
|
+
menu: [
|
|
8058
|
+
{
|
|
8059
|
+
title: 'Favorites',
|
|
8060
|
+
link: [{ name: 'Patients', target: '/Patient' }],
|
|
8061
|
+
},
|
|
8062
|
+
{
|
|
8063
|
+
title: 'Admin',
|
|
8064
|
+
link: [
|
|
8065
|
+
{ name: 'Project', target: '/admin/project' },
|
|
8066
|
+
{ name: 'Batch', target: '/batch' },
|
|
8067
|
+
],
|
|
8068
|
+
},
|
|
8069
|
+
],
|
|
8026
8070
|
};
|
|
8027
8071
|
}
|
|
8028
8072
|
setActiveLoginOverride(activeLoginOverride) {
|
|
@@ -8274,6 +8318,7 @@
|
|
|
8274
8318
|
this.mockRepo.createResource(HomerObservation4);
|
|
8275
8319
|
this.mockRepo.createResource(HomerObservation5);
|
|
8276
8320
|
this.mockRepo.createResource(HomerObservation6);
|
|
8321
|
+
this.mockRepo.createResource(HomerObservation7);
|
|
8277
8322
|
this.mockRepo.createResource(HomerSimpsonSpecimen);
|
|
8278
8323
|
this.mockRepo.createResource(TestOrganization);
|
|
8279
8324
|
this.mockRepo.createResource(DifferentOrganization);
|
|
@@ -8466,6 +8511,7 @@
|
|
|
8466
8511
|
exports.HomerObservation4 = HomerObservation4;
|
|
8467
8512
|
exports.HomerObservation5 = HomerObservation5;
|
|
8468
8513
|
exports.HomerObservation6 = HomerObservation6;
|
|
8514
|
+
exports.HomerObservation7 = HomerObservation7;
|
|
8469
8515
|
exports.HomerServiceRequest = HomerServiceRequest;
|
|
8470
8516
|
exports.HomerSimpson = HomerSimpson;
|
|
8471
8517
|
exports.HomerSimpsonPreviousVersion = HomerSimpsonPreviousVersion;
|