@medplum/mock 1.0.4 → 1.0.5
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/index.js +49 -1
- 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/smart.d.ts +2 -0
- package/dist/esm/index.js +49 -1
- 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/smart.d.ts +2 -0
- package/dist/types/mocks/smart.d.ts +2 -0
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -516,6 +516,7 @@
|
|
|
516
516
|
const HomerObservation1 = {
|
|
517
517
|
resourceType: 'Observation',
|
|
518
518
|
id: '1',
|
|
519
|
+
status: 'final',
|
|
519
520
|
subject: {
|
|
520
521
|
reference: 'Patient/123',
|
|
521
522
|
display: 'Homer Simpson',
|
|
@@ -528,6 +529,7 @@
|
|
|
528
529
|
const HomerObservation2 = {
|
|
529
530
|
resourceType: 'Observation',
|
|
530
531
|
id: '2',
|
|
532
|
+
status: 'corrected',
|
|
531
533
|
subject: {
|
|
532
534
|
reference: 'Patient/123',
|
|
533
535
|
display: 'Homer Simpson',
|
|
@@ -550,6 +552,7 @@
|
|
|
550
552
|
const HomerObservation3 = {
|
|
551
553
|
resourceType: 'Observation',
|
|
552
554
|
id: '3',
|
|
555
|
+
status: 'final',
|
|
553
556
|
subject: {
|
|
554
557
|
reference: 'Patient/123',
|
|
555
558
|
display: 'Homer Simpson',
|
|
@@ -572,6 +575,7 @@
|
|
|
572
575
|
const HomerObservation4 = {
|
|
573
576
|
resourceType: 'Observation',
|
|
574
577
|
id: '4',
|
|
578
|
+
status: 'final',
|
|
575
579
|
subject: {
|
|
576
580
|
reference: 'Patient/123',
|
|
577
581
|
display: 'Homer Simpson',
|
|
@@ -605,6 +609,7 @@
|
|
|
605
609
|
const HomerObservation5 = {
|
|
606
610
|
resourceType: 'Observation',
|
|
607
611
|
id: '5',
|
|
612
|
+
status: 'final',
|
|
608
613
|
subject: {
|
|
609
614
|
reference: 'Patient/123',
|
|
610
615
|
display: 'Homer Simpson',
|
|
@@ -622,6 +627,7 @@
|
|
|
622
627
|
const HomerObservation6 = {
|
|
623
628
|
resourceType: 'Observation',
|
|
624
629
|
id: '6',
|
|
630
|
+
status: 'final',
|
|
625
631
|
subject: {
|
|
626
632
|
reference: 'Patient/123',
|
|
627
633
|
display: 'Homer Simpson',
|
|
@@ -649,6 +655,7 @@
|
|
|
649
655
|
const HomerObservation7 = {
|
|
650
656
|
resourceType: 'Observation',
|
|
651
657
|
id: '7',
|
|
658
|
+
status: 'final',
|
|
652
659
|
subject: {
|
|
653
660
|
reference: 'Patient/123',
|
|
654
661
|
display: 'Homer Simpson',
|
|
@@ -680,6 +687,7 @@
|
|
|
680
687
|
const HomerObservation8 = {
|
|
681
688
|
resourceType: 'Observation',
|
|
682
689
|
id: '8',
|
|
690
|
+
status: 'final',
|
|
683
691
|
subject: {
|
|
684
692
|
reference: 'Patient/123',
|
|
685
693
|
display: 'Homer Simpson',
|
|
@@ -16538,6 +16546,15 @@
|
|
|
16538
16546
|
],
|
|
16539
16547
|
};
|
|
16540
16548
|
|
|
16549
|
+
const ExampleSmartClientApplication = {
|
|
16550
|
+
resourceType: 'ClientApplication',
|
|
16551
|
+
id: 'smart-client-app',
|
|
16552
|
+
name: 'Inferno Client',
|
|
16553
|
+
description: 'Client application used for Inferno ONC compliance testing',
|
|
16554
|
+
redirectUri: 'https://inferno.healthit.gov/suites/custom/smart/redirect',
|
|
16555
|
+
launchUri: 'https://inferno.healthit.gov/suites/custom/smart/launch',
|
|
16556
|
+
};
|
|
16557
|
+
|
|
16541
16558
|
var _MemoryRepository_resources, _MemoryRepository_history;
|
|
16542
16559
|
class MemoryRepository {
|
|
16543
16560
|
constructor() {
|
|
@@ -16827,9 +16844,39 @@
|
|
|
16827
16844
|
}
|
|
16828
16845
|
if (path.startsWith('auth/me')) {
|
|
16829
16846
|
return {
|
|
16830
|
-
profile:
|
|
16847
|
+
profile: DrAliceSmith,
|
|
16848
|
+
security: {
|
|
16849
|
+
mfaEnrolled: false,
|
|
16850
|
+
sessions: [
|
|
16851
|
+
{
|
|
16852
|
+
id: '123',
|
|
16853
|
+
lastUpdated: new Date().toISOString(),
|
|
16854
|
+
authMethod: 'password',
|
|
16855
|
+
remoteAddress: '5.5.5.5',
|
|
16856
|
+
browser: 'Chrome',
|
|
16857
|
+
os: 'Linux',
|
|
16858
|
+
},
|
|
16859
|
+
{
|
|
16860
|
+
id: '456',
|
|
16861
|
+
lastUpdated: new Date().toISOString(),
|
|
16862
|
+
authMethod: 'password',
|
|
16863
|
+
remoteAddress: '6.6.6.6',
|
|
16864
|
+
browser: 'Chrome',
|
|
16865
|
+
os: 'Android',
|
|
16866
|
+
},
|
|
16867
|
+
],
|
|
16868
|
+
},
|
|
16869
|
+
};
|
|
16870
|
+
}
|
|
16871
|
+
if (path.startsWith('auth/mfa/status')) {
|
|
16872
|
+
return {
|
|
16873
|
+
enrolled: false,
|
|
16874
|
+
enrollUri: 'otpauth://totp/medplum.com:alice.smith%40example',
|
|
16831
16875
|
};
|
|
16832
16876
|
}
|
|
16877
|
+
if (path.startsWith('auth/mfa/enroll')) {
|
|
16878
|
+
return core.allOk;
|
|
16879
|
+
}
|
|
16833
16880
|
return null;
|
|
16834
16881
|
}
|
|
16835
16882
|
mockChangePasswordHandler(_method, _path, options) {
|
|
@@ -16982,6 +17029,7 @@
|
|
|
16982
17029
|
this.mockRepo.createResource(ExampleWorkflowTask2);
|
|
16983
17030
|
this.mockRepo.createResource(ExampleWorkflowTask3);
|
|
16984
17031
|
this.mockRepo.createResource(ExampleWorkflowRequestGroup);
|
|
17032
|
+
this.mockRepo.createResource(ExampleSmartClientApplication);
|
|
16985
17033
|
DrAliceSmithSlots.forEach((slot) => this.mockRepo.createResource(slot));
|
|
16986
17034
|
}
|
|
16987
17035
|
mockFhirHandler(method, url, options) {
|