@medplum/mock 0.9.38 → 0.10.1

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.
@@ -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,69 @@
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
+ };
475
+ const HomerObservation8 = {
476
+ resourceType: 'Observation',
477
+ id: '8',
478
+ subject: {
479
+ reference: 'Patient/123',
480
+ display: 'Homer Simpson',
481
+ },
482
+ code: {
483
+ text: 'Test 8',
484
+ },
485
+ component: [
486
+ {
487
+ valueString: 'REACTIVE',
488
+ },
489
+ ],
490
+ referenceRange: [
491
+ {
492
+ text: 'NEGATIVE',
493
+ },
494
+ ],
495
+ interpretation: [
496
+ {
497
+ coding: [
498
+ {
499
+ system: 'http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation',
500
+ code: 'RR',
501
+ display: 'Reactive',
502
+ },
503
+ ],
504
+ },
505
+ ],
506
+ };
444
507
  const HomerSimpsonSpecimen = {
445
508
  id: '123',
446
509
  resourceType: 'Specimen',
@@ -511,6 +574,8 @@
511
574
  core.createReference(HomerObservation4),
512
575
  core.createReference(HomerObservation5),
513
576
  core.createReference(HomerObservation6),
577
+ core.createReference(HomerObservation7),
578
+ core.createReference(HomerObservation8),
514
579
  ],
515
580
  };
516
581
  const BartSimpson = {
@@ -8017,12 +8082,24 @@
8017
8082
  this.activeLoginOverride = undefined;
8018
8083
  }
8019
8084
  getProfile() {
8085
+ return DrAliceSmith;
8086
+ }
8087
+ getUserConfiguration() {
8020
8088
  return {
8021
- resourceType: 'Practitioner',
8022
- id: '123',
8023
- meta: {
8024
- versionId: '456',
8025
- },
8089
+ resourceType: 'UserConfiguration',
8090
+ menu: [
8091
+ {
8092
+ title: 'Favorites',
8093
+ link: [{ name: 'Patients', target: '/Patient' }],
8094
+ },
8095
+ {
8096
+ title: 'Admin',
8097
+ link: [
8098
+ { name: 'Project', target: '/admin/project' },
8099
+ { name: 'Batch', target: '/batch' },
8100
+ ],
8101
+ },
8102
+ ],
8026
8103
  };
8027
8104
  }
8028
8105
  setActiveLoginOverride(activeLoginOverride) {
@@ -8274,6 +8351,8 @@
8274
8351
  this.mockRepo.createResource(HomerObservation4);
8275
8352
  this.mockRepo.createResource(HomerObservation5);
8276
8353
  this.mockRepo.createResource(HomerObservation6);
8354
+ this.mockRepo.createResource(HomerObservation7);
8355
+ this.mockRepo.createResource(HomerObservation8);
8277
8356
  this.mockRepo.createResource(HomerSimpsonSpecimen);
8278
8357
  this.mockRepo.createResource(TestOrganization);
8279
8358
  this.mockRepo.createResource(DifferentOrganization);
@@ -8466,6 +8545,8 @@
8466
8545
  exports.HomerObservation4 = HomerObservation4;
8467
8546
  exports.HomerObservation5 = HomerObservation5;
8468
8547
  exports.HomerObservation6 = HomerObservation6;
8548
+ exports.HomerObservation7 = HomerObservation7;
8549
+ exports.HomerObservation8 = HomerObservation8;
8469
8550
  exports.HomerServiceRequest = HomerServiceRequest;
8470
8551
  exports.HomerSimpson = HomerSimpson;
8471
8552
  exports.HomerSimpsonPreviousVersion = HomerSimpsonPreviousVersion;