oro-sdk 5.3.4 → 5.3.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.
@@ -1723,8 +1723,9 @@ function _storePatientData() {
1723
1723
  consultationId: consultationId
1724
1724
  }, {
1725
1725
  consultationId: consultationId
1726
- }, false, true // the only data that needs to include an email notification
1727
- );
1726
+ }, {
1727
+ withNotification: true
1728
+ });
1728
1729
  }), getWorkflowDataByCategory(workflow, MetadataCategory.Medical).then(function (data) {
1729
1730
  return oroClient.getOrInsertJsonData(lockboxUuid, data, {
1730
1731
  category: MetadataCategory.Medical,
@@ -2031,74 +2032,74 @@ function getRefillAnswersAsWorkflow(isTreatmentWorking, hasSideEffects, delivery
2031
2032
  if (deliveryAddress) selectedAnswers.push((_selectedAnswers$push = {}, _selectedAnswers$push['deliveryAddress'] = deliveryAddress, _selectedAnswers$push));
2032
2033
  if (pharmacy) selectedAnswers.push((_selectedAnswers$push2 = {}, _selectedAnswers$push2['pharmacy'] = JSON.stringify(pharmacy), _selectedAnswers$push2));
2033
2034
  return {
2034
- "id": "32573a20-6f1d-49be-9ad3-b87c58074979",
2035
- "createdAt": "2022-10-03T00:00:00.000Z",
2036
- "culDeSacs": [],
2037
- "hidePlanRules": [],
2038
- "pages": [{
2039
- "title": "Prescription Refill",
2040
- "groups": [{
2041
- "type": "field-group",
2042
- "fieldsAndGroups": [{
2043
- "type": "field",
2044
- "id": "isTreatmentWorking"
2035
+ id: '32573a20-6f1d-49be-9ad3-b87c58074979',
2036
+ createdAt: '2022-10-03T00:00:00.000Z',
2037
+ culDeSacs: [],
2038
+ hidePlanRules: [],
2039
+ pages: [{
2040
+ title: 'Prescription Refill',
2041
+ groups: [{
2042
+ type: 'field-group',
2043
+ fieldsAndGroups: [{
2044
+ type: 'field',
2045
+ id: 'isTreatmentWorking'
2045
2046
  }, {
2046
- "type": "field",
2047
- "id": "hasSideEffects"
2047
+ type: 'field',
2048
+ id: 'hasSideEffects'
2048
2049
  }, {
2049
- "type": "field",
2050
- "id": "youPharmacy"
2050
+ type: 'field',
2051
+ id: 'youPharmacy'
2051
2052
  }, {
2052
- "type": "field",
2053
- "id": "youAddress"
2053
+ type: 'field',
2054
+ id: 'youAddress'
2054
2055
  }]
2055
2056
  }],
2056
- "questions": {
2057
- "isTreatmentWorking": {
2058
- "label": "Is the treatment working for you?",
2059
- "kind": "radio",
2060
- "inline": true,
2061
- "inlineLabel": false,
2062
- "metaCategory": MetadataCategory.Refill,
2063
- "answers": {
2064
- "73bec6eb-0310-4787-af3c-ac9c291737b2": {
2065
- "text": "Yes"
2057
+ questions: {
2058
+ isTreatmentWorking: {
2059
+ label: 'Is the treatment working for you?',
2060
+ kind: 'radio',
2061
+ inline: true,
2062
+ inlineLabel: false,
2063
+ metaCategory: MetadataCategory.Refill,
2064
+ answers: {
2065
+ '73bec6eb-0310-4787-af3c-ac9c291737b2': {
2066
+ text: 'Yes'
2066
2067
  },
2067
- "e193951f-986f-4db3-bede-903045a1804a": {
2068
- "text": "No"
2068
+ 'e193951f-986f-4db3-bede-903045a1804a': {
2069
+ text: 'No'
2069
2070
  }
2070
2071
  }
2071
2072
  },
2072
- "hasSideEffects": {
2073
- "label": "Are there any side effects",
2074
- "kind": "radio",
2075
- "inline": true,
2076
- "inlineLabel": false,
2077
- "metaCategory": MetadataCategory.Refill,
2078
- "answers": {
2079
- "1b87ad22-d316-4fac-9c7f-8f4ccb841aed": {
2080
- "text": "Yes"
2073
+ hasSideEffects: {
2074
+ label: 'Are there any side effects',
2075
+ kind: 'radio',
2076
+ inline: true,
2077
+ inlineLabel: false,
2078
+ metaCategory: MetadataCategory.Refill,
2079
+ answers: {
2080
+ '1b87ad22-d316-4fac-9c7f-8f4ccb841aed': {
2081
+ text: 'Yes'
2081
2082
  },
2082
- "ab7f5a41-c351-4f5d-a568-e38f9f200e9a": {
2083
- "text": "No"
2083
+ 'ab7f5a41-c351-4f5d-a568-e38f9f200e9a': {
2084
+ text: 'No'
2084
2085
  }
2085
2086
  }
2086
2087
  },
2087
- "youPharmacy": {
2088
- "kind": "online-pharmacy-picker",
2089
- "label": "Which pharmacy do you want the prescription sent to?",
2090
- "metaCategory": MetadataCategory.Refill,
2091
- "minorLabel": " (Optional)",
2092
- "summaryLabel": "Your pharmacy"
2088
+ youPharmacy: {
2089
+ kind: 'online-pharmacy-picker',
2090
+ label: 'Which pharmacy do you want the prescription sent to?',
2091
+ metaCategory: MetadataCategory.Refill,
2092
+ minorLabel: ' (Optional)',
2093
+ summaryLabel: 'Your pharmacy'
2093
2094
  },
2094
- "youAddress": {
2095
- "kind": "place-address",
2096
- "label": "Address",
2097
- "metaCategory": MetadataCategory.Refill
2095
+ youAddress: {
2096
+ kind: 'place-address',
2097
+ label: 'Address',
2098
+ metaCategory: MetadataCategory.Refill
2098
2099
  }
2099
2100
  }
2100
2101
  }],
2101
- "locale": "en",
2102
+ locale: 'en',
2102
2103
  selectedAnswers: selectedAnswers
2103
2104
  };
2104
2105
  }
@@ -2160,7 +2161,9 @@ function _createRefill() {
2160
2161
  category: MetadataCategory.Refill,
2161
2162
  documentType: DocumentType.PopulatedWorkflowData,
2162
2163
  consultationIds: [newConsult.uuid]
2163
- }, {})["catch"](function (err) {
2164
+ }, {}, {
2165
+ withNotification: true
2166
+ })["catch"](function (err) {
2164
2167
  console.error('[SDK: prescription refill] Some errors happened during refill data upload', err);
2165
2168
  errorsThrown.push(err);
2166
2169
  });
@@ -3152,13 +3155,15 @@ var OroClient = /*#__PURE__*/function () {
3152
3155
  _proto.createConsultationAttachmentData =
3153
3156
  /*#__PURE__*/
3154
3157
  function () {
3155
- var _createConsultationAttachmentData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15(lockboxUuid, data, consultationId, documentType, lockboxOwnerUuid, previousDataUuid, withNotification) {
3158
+ var _createConsultationAttachmentData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15(lockboxUuid, data, consultationId, documentType, lockboxOwnerUuid, previousDataUuid, options) {
3156
3159
  return _regeneratorRuntime().wrap(function _callee15$(_context15) {
3157
3160
  while (1) {
3158
3161
  switch (_context15.prev = _context15.next) {
3159
3162
  case 0:
3160
- if (withNotification === void 0) {
3161
- withNotification = false;
3163
+ if (options === void 0) {
3164
+ options = {
3165
+ withNotification: false
3166
+ };
3162
3167
  }
3163
3168
 
3164
3169
  if (this.rsa) {
@@ -3196,7 +3201,7 @@ var OroClient = /*#__PURE__*/function () {
3196
3201
  };
3197
3202
  _context15.t9 = lockboxOwnerUuid;
3198
3203
  _context15.t10 = previousDataUuid;
3199
- _context15.t11 = withNotification;
3204
+ _context15.t11 = options;
3200
3205
  return _context15.abrupt("return", _context15.t0.createBytesData.call(_context15.t0, _context15.t1, _context15.t4, _context15.t5, _context15.t8, _context15.t9, _context15.t10, _context15.t11));
3201
3206
 
3202
3207
  case 20:
@@ -3222,7 +3227,7 @@ var OroClient = /*#__PURE__*/function () {
3222
3227
  * @param privateMeta the metadata that will be secured in the vault
3223
3228
  * @param lockboxOwnerUuid the lockbox owner (ignored if lockbox is owned by self)
3224
3229
  * @param previousDataUuid if it's a revision of existing data, specify the previous data uuid
3225
- * @param withNotification if the insertion of data requires notification
3230
+ * @param options if the insertion of data requires email notification
3226
3231
  * @returns the data uuid
3227
3232
  */
3228
3233
  ;
@@ -3230,14 +3235,16 @@ var OroClient = /*#__PURE__*/function () {
3230
3235
  _proto.createJsonData =
3231
3236
  /*#__PURE__*/
3232
3237
  function () {
3233
- var _createJsonData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee16(lockboxUuid, data, meta, privateMeta, lockboxOwnerUuid, previousDataUuid, withNotification) {
3238
+ var _createJsonData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee16(lockboxUuid, data, meta, privateMeta, lockboxOwnerUuid, previousDataUuid, options) {
3234
3239
  var symmetricEncryptor, encryptedData, encryptedPrivateMeta, request;
3235
3240
  return _regeneratorRuntime().wrap(function _callee16$(_context16) {
3236
3241
  while (1) {
3237
3242
  switch (_context16.prev = _context16.next) {
3238
3243
  case 0:
3239
- if (withNotification === void 0) {
3240
- withNotification = false;
3244
+ if (options === void 0) {
3245
+ options = {
3246
+ withNotification: false
3247
+ };
3241
3248
  }
3242
3249
 
3243
3250
  if (this.rsa) {
@@ -3261,7 +3268,7 @@ var OroClient = /*#__PURE__*/function () {
3261
3268
  privateMetadata: encryptedPrivateMeta
3262
3269
  };
3263
3270
 
3264
- if (!withNotification) {
3271
+ if (!options.withNotification) {
3265
3272
  _context16.next = 13;
3266
3273
  break;
3267
3274
  }
@@ -3292,7 +3299,7 @@ var OroClient = /*#__PURE__*/function () {
3292
3299
  * @param publicMetadata the public Metadata
3293
3300
  * @param privateMetadata the private Metadata
3294
3301
  * @param forceReplace set true when the insertion of data requires to replace the data when it exists already
3295
- * @param withNotification if the insertion of data requires notification
3302
+ * @param options if the insertion of data requires email notification
3296
3303
  * @returns the data uuid
3297
3304
  */
3298
3305
  ;
@@ -3300,46 +3307,47 @@ var OroClient = /*#__PURE__*/function () {
3300
3307
  _proto.getOrInsertJsonData =
3301
3308
  /*#__PURE__*/
3302
3309
  function () {
3303
- var _getOrInsertJsonData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee17(lockboxUuid, data, publicMetadata, privateMetadata, forceReplace, withNotification) {
3310
+ var _getOrInsertJsonData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee17(lockboxUuid, data, publicMetadata, privateMetadata, options) {
3304
3311
  var manifest;
3305
3312
  return _regeneratorRuntime().wrap(function _callee17$(_context17) {
3306
3313
  while (1) {
3307
3314
  switch (_context17.prev = _context17.next) {
3308
3315
  case 0:
3309
- if (forceReplace === void 0) {
3310
- forceReplace = false;
3311
- }
3312
-
3313
- if (withNotification === void 0) {
3314
- withNotification = false;
3316
+ if (options === void 0) {
3317
+ options = {
3318
+ withNotification: false,
3319
+ forceReplace: false
3320
+ };
3315
3321
  }
3316
3322
 
3317
- _context17.next = 4;
3323
+ _context17.next = 3;
3318
3324
  return this.vaultClient.lockboxManifestGet(lockboxUuid, publicMetadata);
3319
3325
 
3320
- case 4:
3326
+ case 3:
3321
3327
  manifest = _context17.sent;
3322
3328
 
3323
- if (!(!forceReplace && manifest.length > 0)) {
3324
- _context17.next = 10;
3329
+ if (!(!options.forceReplace && manifest.length > 0)) {
3330
+ _context17.next = 9;
3325
3331
  break;
3326
3332
  }
3327
3333
 
3328
3334
  console.log("The data for " + JSON.stringify(publicMetadata) + " already exist");
3329
3335
  return _context17.abrupt("return", manifest[0].dataUuid);
3330
3336
 
3331
- case 10:
3332
- _context17.next = 12;
3333
- return this.createJsonData(lockboxUuid, data, publicMetadata, privateMetadata, undefined, forceReplace && manifest.length > 0 ? manifest[0].dataUuid : undefined, // if forceReplace and data already exist, then replace data. Otherwise insert it
3334
- withNotification)["catch"](function (err) {
3337
+ case 9:
3338
+ _context17.next = 11;
3339
+ return this.createJsonData(lockboxUuid, data, publicMetadata, privateMetadata, undefined, // if forceReplace and data already exist, then replace data. Otherwise insert it
3340
+ options.forceReplace && manifest.length > 0 ? manifest[0].dataUuid : undefined, {
3341
+ withNotification: options.withNotification
3342
+ })["catch"](function (err) {
3335
3343
  console.error("Error while upserting data " + JSON.stringify(publicMetadata) + " data", err);
3336
3344
  throw err;
3337
3345
  });
3338
3346
 
3339
- case 12:
3347
+ case 11:
3340
3348
  return _context17.abrupt("return", _context17.sent.dataUuid);
3341
3349
 
3342
- case 13:
3350
+ case 12:
3343
3351
  case "end":
3344
3352
  return _context17.stop();
3345
3353
  }
@@ -3347,7 +3355,7 @@ var OroClient = /*#__PURE__*/function () {
3347
3355
  }, _callee17, this);
3348
3356
  }));
3349
3357
 
3350
- function getOrInsertJsonData(_x51, _x52, _x53, _x54, _x55, _x56) {
3358
+ function getOrInsertJsonData(_x51, _x52, _x53, _x54, _x55) {
3351
3359
  return _getOrInsertJsonData.apply(this, arguments);
3352
3360
  }
3353
3361
 
@@ -3370,14 +3378,16 @@ var OroClient = /*#__PURE__*/function () {
3370
3378
  _proto.createBytesData =
3371
3379
  /*#__PURE__*/
3372
3380
  function () {
3373
- var _createBytesData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee18(lockboxUuid, data, meta, privateMeta, lockboxOwnerUuid, previousDataUuid, withNotification) {
3381
+ var _createBytesData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee18(lockboxUuid, data, meta, privateMeta, lockboxOwnerUuid, previousDataUuid, options) {
3374
3382
  var symmetricEncryptor, encryptedData, encryptedPrivateMeta, request;
3375
3383
  return _regeneratorRuntime().wrap(function _callee18$(_context18) {
3376
3384
  while (1) {
3377
3385
  switch (_context18.prev = _context18.next) {
3378
3386
  case 0:
3379
- if (withNotification === void 0) {
3380
- withNotification = false;
3387
+ if (options === void 0) {
3388
+ options = {
3389
+ withNotification: false
3390
+ };
3381
3391
  }
3382
3392
 
3383
3393
  if (this.rsa) {
@@ -3401,7 +3411,7 @@ var OroClient = /*#__PURE__*/function () {
3401
3411
  privateMetadata: encryptedPrivateMeta
3402
3412
  };
3403
3413
 
3404
- if (!withNotification) {
3414
+ if (!options.withNotification) {
3405
3415
  _context18.next = 13;
3406
3416
  break;
3407
3417
  }
@@ -3419,7 +3429,7 @@ var OroClient = /*#__PURE__*/function () {
3419
3429
  }, _callee18, this);
3420
3430
  }));
3421
3431
 
3422
- function createBytesData(_x57, _x58, _x59, _x60, _x61, _x62, _x63) {
3432
+ function createBytesData(_x56, _x57, _x58, _x59, _x60, _x61, _x62) {
3423
3433
  return _createBytesData.apply(this, arguments);
3424
3434
  }
3425
3435
 
@@ -3473,7 +3483,7 @@ var OroClient = /*#__PURE__*/function () {
3473
3483
  }, _callee19, this);
3474
3484
  }));
3475
3485
 
3476
- function getJsonData(_x64, _x65, _x66) {
3486
+ function getJsonData(_x63, _x64, _x65) {
3477
3487
  return _getJsonData.apply(this, arguments);
3478
3488
  }
3479
3489
 
@@ -3523,7 +3533,7 @@ var OroClient = /*#__PURE__*/function () {
3523
3533
  }, _callee20, this);
3524
3534
  }));
3525
3535
 
3526
- function getBytesData(_x67, _x68, _x69) {
3536
+ function getBytesData(_x66, _x67, _x68) {
3527
3537
  return _getBytesData.apply(this, arguments);
3528
3538
  }
3529
3539
 
@@ -3661,7 +3671,7 @@ var OroClient = /*#__PURE__*/function () {
3661
3671
  }, _callee21, this);
3662
3672
  }));
3663
3673
 
3664
- function getGrants(_x70) {
3674
+ function getGrants(_x69) {
3665
3675
  return _getGrants.apply(this, arguments);
3666
3676
  }
3667
3677
 
@@ -3761,7 +3771,7 @@ var OroClient = /*#__PURE__*/function () {
3761
3771
  }, _callee23, this);
3762
3772
  }));
3763
3773
 
3764
- function getCachedSecretCryptor(_x71, _x72) {
3774
+ function getCachedSecretCryptor(_x70, _x71) {
3765
3775
  return _getCachedSecretCryptor.apply(this, arguments);
3766
3776
  }
3767
3777
 
@@ -3781,16 +3791,18 @@ var OroClient = /*#__PURE__*/function () {
3781
3791
  _proto.getPersonalInformationsFromConsultId =
3782
3792
  /*#__PURE__*/
3783
3793
  function () {
3784
- var _getPersonalInformationsFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee24(consultationId, category, forceRefresh) {
3794
+ var _getPersonalInformationsFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee24(consultationId, category, options) {
3785
3795
  return _regeneratorRuntime().wrap(function _callee24$(_context24) {
3786
3796
  while (1) {
3787
3797
  switch (_context24.prev = _context24.next) {
3788
3798
  case 0:
3789
- if (forceRefresh === void 0) {
3790
- forceRefresh = false;
3799
+ if (options === void 0) {
3800
+ options = {
3801
+ forceRefresh: false
3802
+ };
3791
3803
  }
3792
3804
 
3793
- return _context24.abrupt("return", this.getMetaCategoryFromConsultId(consultationId, category, forceRefresh));
3805
+ return _context24.abrupt("return", this.getMetaCategoryFromConsultId(consultationId, category, options));
3794
3806
 
3795
3807
  case 2:
3796
3808
  case "end":
@@ -3800,7 +3812,7 @@ var OroClient = /*#__PURE__*/function () {
3800
3812
  }, _callee24, this);
3801
3813
  }));
3802
3814
 
3803
- function getPersonalInformationsFromConsultId(_x73, _x74, _x75) {
3815
+ function getPersonalInformationsFromConsultId(_x72, _x73, _x74) {
3804
3816
  return _getPersonalInformationsFromConsultId.apply(this, arguments);
3805
3817
  }
3806
3818
 
@@ -3819,16 +3831,18 @@ var OroClient = /*#__PURE__*/function () {
3819
3831
  _proto.getMedicalDataFromConsultId =
3820
3832
  /*#__PURE__*/
3821
3833
  function () {
3822
- var _getMedicalDataFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee25(consultationId, forceRefresh) {
3834
+ var _getMedicalDataFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee25(consultationId, options) {
3823
3835
  return _regeneratorRuntime().wrap(function _callee25$(_context25) {
3824
3836
  while (1) {
3825
3837
  switch (_context25.prev = _context25.next) {
3826
3838
  case 0:
3827
- if (forceRefresh === void 0) {
3828
- forceRefresh = false;
3839
+ if (options === void 0) {
3840
+ options = {
3841
+ forceRefresh: false
3842
+ };
3829
3843
  }
3830
3844
 
3831
- return _context25.abrupt("return", this.getMetaCategoryFromConsultId(consultationId, MetadataCategory.Medical, forceRefresh));
3845
+ return _context25.abrupt("return", this.getMetaCategoryFromConsultId(consultationId, MetadataCategory.Medical, options));
3832
3846
 
3833
3847
  case 2:
3834
3848
  case "end":
@@ -3838,7 +3852,7 @@ var OroClient = /*#__PURE__*/function () {
3838
3852
  }, _callee25, this);
3839
3853
  }));
3840
3854
 
3841
- function getMedicalDataFromConsultId(_x76, _x77) {
3855
+ function getMedicalDataFromConsultId(_x75, _x76) {
3842
3856
  return _getMedicalDataFromConsultId.apply(this, arguments);
3843
3857
  }
3844
3858
 
@@ -3846,7 +3860,7 @@ var OroClient = /*#__PURE__*/function () {
3846
3860
  }();
3847
3861
 
3848
3862
  _proto.getMetaCategoryFromConsultId = /*#__PURE__*/function () {
3849
- var _getMetaCategoryFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee27(consultationId, category, forceRefresh) {
3863
+ var _getMetaCategoryFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee27(consultationId, category, options) {
3850
3864
  var _this2 = this;
3851
3865
 
3852
3866
  var grants, workflowData, _loop, _iterator, _step;
@@ -3855,8 +3869,10 @@ var OroClient = /*#__PURE__*/function () {
3855
3869
  while (1) {
3856
3870
  switch (_context28.prev = _context28.next) {
3857
3871
  case 0:
3858
- if (forceRefresh === void 0) {
3859
- forceRefresh = false;
3872
+ if (options === void 0) {
3873
+ options = {
3874
+ forceRefresh: false
3875
+ };
3860
3876
  }
3861
3877
 
3862
3878
  _context28.next = 3;
@@ -3879,7 +3895,7 @@ var OroClient = /*#__PURE__*/function () {
3879
3895
  category: category,
3880
3896
  documentType: DocumentType.PopulatedWorkflowData,
3881
3897
  consultationIds: [consultationId]
3882
- }, true, grant.lockboxOwnerUuid, forceRefresh);
3898
+ }, true, grant.lockboxOwnerUuid, options);
3883
3899
 
3884
3900
  case 3:
3885
3901
  manifest = _context27.sent;
@@ -3893,7 +3909,7 @@ var OroClient = /*#__PURE__*/function () {
3893
3909
  return _this2.getLockboxManifest(grant.lockboxUuid, {
3894
3910
  category: category,
3895
3911
  documentType: DocumentType.PopulatedWorkflowData
3896
- }, true, grant.lockboxOwnerUuid, forceRefresh);
3912
+ }, true, grant.lockboxOwnerUuid, options);
3897
3913
 
3898
3914
  case 7:
3899
3915
  manifest = _context27.sent.filter(function (entry) {
@@ -3931,7 +3947,7 @@ var OroClient = /*#__PURE__*/function () {
3931
3947
  }, _callee26);
3932
3948
  }));
3933
3949
 
3934
- return function (_x81) {
3950
+ return function (_x80) {
3935
3951
  return _ref3.apply(this, arguments);
3936
3952
  };
3937
3953
  }()));
@@ -3972,7 +3988,7 @@ var OroClient = /*#__PURE__*/function () {
3972
3988
  }, _callee27, this);
3973
3989
  }));
3974
3990
 
3975
- function getMetaCategoryFromConsultId(_x78, _x79, _x80) {
3991
+ function getMetaCategoryFromConsultId(_x77, _x78, _x79) {
3976
3992
  return _getMetaCategoryFromConsultId.apply(this, arguments);
3977
3993
  }
3978
3994
 
@@ -4059,7 +4075,7 @@ var OroClient = /*#__PURE__*/function () {
4059
4075
  }, _callee28, this);
4060
4076
  }));
4061
4077
 
4062
- function getPersonalInformations(_x82) {
4078
+ function getPersonalInformations(_x81) {
4063
4079
  return _getPersonalInformations.apply(this, arguments);
4064
4080
  }
4065
4081
 
@@ -4108,7 +4124,7 @@ var OroClient = /*#__PURE__*/function () {
4108
4124
  }, _callee29, this);
4109
4125
  }));
4110
4126
 
4111
- function getGrantFromConsultId(_x83) {
4127
+ function getGrantFromConsultId(_x82) {
4112
4128
  return _getGrantFromConsultId.apply(this, arguments);
4113
4129
  }
4114
4130
 
@@ -4158,7 +4174,7 @@ var OroClient = /*#__PURE__*/function () {
4158
4174
  }, _callee30, this);
4159
4175
  }));
4160
4176
 
4161
- function getIdentityFromConsultId(_x84) {
4177
+ function getIdentityFromConsultId(_x83) {
4162
4178
  return _getIdentityFromConsultId.apply(this, arguments);
4163
4179
  }
4164
4180
 
@@ -4179,7 +4195,7 @@ var OroClient = /*#__PURE__*/function () {
4179
4195
  _proto.getLockboxManifest =
4180
4196
  /*#__PURE__*/
4181
4197
  function () {
4182
- var _getLockboxManifest = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee32(lockboxUuid, filter, expandPrivateMetadata, lockboxOwnerUuid, forceRefresh) {
4198
+ var _getLockboxManifest = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee32(lockboxUuid, filter, expandPrivateMetadata, lockboxOwnerUuid, options) {
4183
4199
  var _this3 = this;
4184
4200
 
4185
4201
  var manifestKey;
@@ -4187,8 +4203,10 @@ var OroClient = /*#__PURE__*/function () {
4187
4203
  while (1) {
4188
4204
  switch (_context33.prev = _context33.next) {
4189
4205
  case 0:
4190
- if (forceRefresh === void 0) {
4191
- forceRefresh = false;
4206
+ if (options === void 0) {
4207
+ options = {
4208
+ forceRefresh: false
4209
+ };
4192
4210
  }
4193
4211
 
4194
4212
  manifestKey = JSON.stringify({
@@ -4198,7 +4216,7 @@ var OroClient = /*#__PURE__*/function () {
4198
4216
  lockboxOwnerUuid: lockboxOwnerUuid
4199
4217
  });
4200
4218
 
4201
- if (!(!forceRefresh && this.cachedManifest[manifestKey])) {
4219
+ if (!(!options.forceRefresh && this.cachedManifest[manifestKey])) {
4202
4220
  _context33.next = 4;
4203
4221
  break;
4204
4222
  }
@@ -4237,7 +4255,7 @@ var OroClient = /*#__PURE__*/function () {
4237
4255
  }, _callee31);
4238
4256
  }));
4239
4257
 
4240
- return function (_x90) {
4258
+ return function (_x89) {
4241
4259
  return _ref4.apply(this, arguments);
4242
4260
  };
4243
4261
  }())).then(function (manifest) {
@@ -4253,7 +4271,7 @@ var OroClient = /*#__PURE__*/function () {
4253
4271
  }, _callee32, this);
4254
4272
  }));
4255
4273
 
4256
- function getLockboxManifest(_x85, _x86, _x87, _x88, _x89) {
4274
+ function getLockboxManifest(_x84, _x85, _x86, _x87, _x88) {
4257
4275
  return _getLockboxManifest.apply(this, arguments);
4258
4276
  }
4259
4277
 
@@ -4323,7 +4341,7 @@ var OroClient = /*#__PURE__*/function () {
4323
4341
  }, _callee33, this);
4324
4342
  }));
4325
4343
 
4326
- function createPersonalInformations(_x91, _x92, _x93) {
4344
+ function createPersonalInformations(_x90, _x91, _x92) {
4327
4345
  return _createPersonalInformations.apply(this, arguments);
4328
4346
  }
4329
4347
 
@@ -4393,7 +4411,7 @@ var OroClient = /*#__PURE__*/function () {
4393
4411
  }, _callee34, this);
4394
4412
  }));
4395
4413
 
4396
- function createUserPreference(_x94, _x95, _x96) {
4414
+ function createUserPreference(_x93, _x94, _x95) {
4397
4415
  return _createUserPreference.apply(this, arguments);
4398
4416
  }
4399
4417
 
@@ -4434,7 +4452,9 @@ var OroClient = /*#__PURE__*/function () {
4434
4452
 
4435
4453
  case 5:
4436
4454
  _context36.next = 7;
4437
- return this.getLockboxManifest(lockboxUuid, filter, false, grant.lockboxOwnerUuid, true);
4455
+ return this.getLockboxManifest(lockboxUuid, filter, false, grant.lockboxOwnerUuid, {
4456
+ forceRefresh: true
4457
+ });
4438
4458
 
4439
4459
  case 7:
4440
4460
  identificationDataUuid = _context36.sent[0].dataUuid;
@@ -4461,7 +4481,7 @@ var OroClient = /*#__PURE__*/function () {
4461
4481
  }, _callee35, this);
4462
4482
  }));
4463
4483
 
4464
- function getDataFromGrant(_x97, _x98) {
4484
+ function getDataFromGrant(_x96, _x97) {
4465
4485
  return _getDataFromGrant.apply(this, arguments);
4466
4486
  }
4467
4487
 
@@ -4510,7 +4530,7 @@ var OroClient = /*#__PURE__*/function () {
4510
4530
  }, _callee36, this);
4511
4531
  }));
4512
4532
 
4513
- function getUserPreferenceFromConsultId(_x99) {
4533
+ function getUserPreferenceFromConsultId(_x98) {
4514
4534
  return _getUserPreferenceFromConsultId.apply(this, arguments);
4515
4535
  }
4516
4536
 
@@ -4561,7 +4581,7 @@ var OroClient = /*#__PURE__*/function () {
4561
4581
  }, _callee37, this);
4562
4582
  }));
4563
4583
 
4564
- function getUserPreference(_x100) {
4584
+ function getUserPreference(_x99) {
4565
4585
  return _getUserPreference.apply(this, arguments);
4566
4586
  }
4567
4587
 
@@ -4610,7 +4630,7 @@ var OroClient = /*#__PURE__*/function () {
4610
4630
  }, _callee38, this);
4611
4631
  }));
4612
4632
 
4613
- function getRecoveryDataFromConsultId(_x101) {
4633
+ function getRecoveryDataFromConsultId(_x100) {
4614
4634
  return _getRecoveryDataFromConsultId.apply(this, arguments);
4615
4635
  }
4616
4636
 
@@ -4661,7 +4681,7 @@ var OroClient = /*#__PURE__*/function () {
4661
4681
  }, _callee39, this);
4662
4682
  }));
4663
4683
 
4664
- function getRecoveryData(_x102) {
4684
+ function getRecoveryData(_x101) {
4665
4685
  return _getRecoveryData.apply(this, arguments);
4666
4686
  }
4667
4687
 
@@ -4719,7 +4739,7 @@ var OroClient = /*#__PURE__*/function () {
4719
4739
  }, _callee40);
4720
4740
  }));
4721
4741
 
4722
- return function (_x104) {
4742
+ return function (_x103) {
4723
4743
  return _ref5.apply(this, arguments);
4724
4744
  };
4725
4745
  }())).then(function (promise) {
@@ -4739,7 +4759,7 @@ var OroClient = /*#__PURE__*/function () {
4739
4759
  }, _callee41, this);
4740
4760
  }));
4741
4761
 
4742
- function getAssignedConsultations(_x103) {
4762
+ function getAssignedConsultations(_x102) {
4743
4763
  return _getAssignedConsultations.apply(this, arguments);
4744
4764
  }
4745
4765
 
@@ -4817,7 +4837,7 @@ var OroClient = /*#__PURE__*/function () {
4817
4837
  }, _callee42);
4818
4838
  }));
4819
4839
 
4820
- return function (_x107) {
4840
+ return function (_x106) {
4821
4841
  return _ref6.apply(this, arguments);
4822
4842
  };
4823
4843
  }()));
@@ -4833,7 +4853,7 @@ var OroClient = /*#__PURE__*/function () {
4833
4853
  }, _callee43, this);
4834
4854
  }));
4835
4855
 
4836
- function getPastConsultationsFromConsultId(_x105, _x106) {
4856
+ function getPastConsultationsFromConsultId(_x104, _x105) {
4837
4857
  return _getPastConsultationsFromConsultId.apply(this, arguments);
4838
4858
  }
4839
4859
 
@@ -4850,15 +4870,17 @@ var OroClient = /*#__PURE__*/function () {
4850
4870
  _proto.getPatientConsultationData =
4851
4871
  /*#__PURE__*/
4852
4872
  function () {
4853
- var _getPatientConsultationData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee44(consultationId, forceRefresh) {
4873
+ var _getPatientConsultationData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee44(consultationId, options) {
4854
4874
  var _this6 = this;
4855
4875
 
4856
4876
  return _regeneratorRuntime().wrap(function _callee44$(_context45) {
4857
4877
  while (1) {
4858
4878
  switch (_context45.prev = _context45.next) {
4859
4879
  case 0:
4860
- if (forceRefresh === void 0) {
4861
- forceRefresh = false;
4880
+ if (options === void 0) {
4881
+ options = {
4882
+ forceRefresh: false
4883
+ };
4862
4884
  }
4863
4885
 
4864
4886
  _context45.t0 = Promise;
@@ -4873,7 +4895,7 @@ var OroClient = /*#__PURE__*/function () {
4873
4895
  category: MetadataCategory.Consultation,
4874
4896
  documentType: DocumentType.PopulatedWorkflowData,
4875
4897
  consultationId: consultationId
4876
- }, true, grant.lockboxOwnerUuid, forceRefresh).then(function (manifest) {
4898
+ }, true, grant.lockboxOwnerUuid, options).then(function (manifest) {
4877
4899
  return Promise.all(manifest.map(function (e) {
4878
4900
  return _this6.getJsonData(grant.lockboxUuid, e.dataUuid, grant.lockboxOwnerUuid);
4879
4901
  }));
@@ -4891,7 +4913,7 @@ var OroClient = /*#__PURE__*/function () {
4891
4913
  }, _callee44, this);
4892
4914
  }));
4893
4915
 
4894
- function getPatientConsultationData(_x108, _x109) {
4916
+ function getPatientConsultationData(_x107, _x108) {
4895
4917
  return _getPatientConsultationData.apply(this, arguments);
4896
4918
  }
4897
4919
 
@@ -4925,7 +4947,7 @@ var OroClient = /*#__PURE__*/function () {
4925
4947
  }, _callee45, this);
4926
4948
  }));
4927
4949
 
4928
- function getPatientPrescriptionsList(_x110) {
4950
+ function getPatientPrescriptionsList(_x109) {
4929
4951
  return _getPatientPrescriptionsList.apply(this, arguments);
4930
4952
  }
4931
4953
 
@@ -4959,7 +4981,7 @@ var OroClient = /*#__PURE__*/function () {
4959
4981
  }, _callee46, this);
4960
4982
  }));
4961
4983
 
4962
- function getPatientResultsList(_x111) {
4984
+ function getPatientResultsList(_x110) {
4963
4985
  return _getPatientResultsList.apply(this, arguments);
4964
4986
  }
4965
4987
 
@@ -4993,7 +5015,7 @@ var OroClient = /*#__PURE__*/function () {
4993
5015
  }, _callee47, this);
4994
5016
  }));
4995
5017
 
4996
- function getPatientTreatmentPlans(_x112) {
5018
+ function getPatientTreatmentPlans(_x111) {
4997
5019
  return _getPatientTreatmentPlans.apply(this, arguments);
4998
5020
  }
4999
5021
 
@@ -5029,7 +5051,7 @@ var OroClient = /*#__PURE__*/function () {
5029
5051
  }, _callee48, this);
5030
5052
  }));
5031
5053
 
5032
- function getPatientTreatmentPlanByUuid(_x113, _x114) {
5054
+ function getPatientTreatmentPlanByUuid(_x112, _x113) {
5033
5055
  return _getPatientTreatmentPlanByUuid.apply(this, arguments);
5034
5056
  }
5035
5057
 
@@ -5066,7 +5088,9 @@ var OroClient = /*#__PURE__*/function () {
5066
5088
  _context51.t1 = _context51.sent.map(function (grant) {
5067
5089
  return _this7.getLockboxManifest(grant.lockboxUuid, _extends({}, filters, {
5068
5090
  consultationId: consultationId
5069
- }), expandPrivateMetadata, grant.lockboxOwnerUuid, true).then(function (manifest) {
5091
+ }), expandPrivateMetadata, grant.lockboxOwnerUuid, {
5092
+ forceRefresh: true
5093
+ }).then(function (manifest) {
5070
5094
  return Promise.all(manifest.map( /*#__PURE__*/function () {
5071
5095
  var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee49(entry) {
5072
5096
  return _regeneratorRuntime().wrap(function _callee49$(_context50) {
@@ -5086,7 +5110,7 @@ var OroClient = /*#__PURE__*/function () {
5086
5110
  }, _callee49);
5087
5111
  }));
5088
5112
 
5089
- return function (_x118) {
5113
+ return function (_x117) {
5090
5114
  return _ref7.apply(this, arguments);
5091
5115
  };
5092
5116
  }()));
@@ -5104,7 +5128,7 @@ var OroClient = /*#__PURE__*/function () {
5104
5128
  }, _callee50, this);
5105
5129
  }));
5106
5130
 
5107
- function getPatientDocumentsList(_x115, _x116, _x117) {
5131
+ function getPatientDocumentsList(_x114, _x115, _x116) {
5108
5132
  return _getPatientDocumentsList.apply(this, arguments);
5109
5133
  }
5110
5134
 
@@ -5166,7 +5190,7 @@ var OroClient = /*#__PURE__*/function () {
5166
5190
  }, _callee51, this);
5167
5191
  }));
5168
5192
 
5169
- function recoverPrivateKeyFromSecurityQuestions(_x119, _x120, _x121, _x122) {
5193
+ function recoverPrivateKeyFromSecurityQuestions(_x118, _x119, _x120, _x121) {
5170
5194
  return _recoverPrivateKeyFromSecurityQuestions.apply(this, arguments);
5171
5195
  }
5172
5196
 
@@ -5214,7 +5238,7 @@ var OroClient = /*#__PURE__*/function () {
5214
5238
  }, _callee52, this);
5215
5239
  }));
5216
5240
 
5217
- function recoverPrivateKeyFromPassword(_x123, _x124) {
5241
+ function recoverPrivateKeyFromPassword(_x122, _x123) {
5218
5242
  return _recoverPrivateKeyFromPassword.apply(this, arguments);
5219
5243
  }
5220
5244
 
@@ -5254,7 +5278,7 @@ var OroClient = /*#__PURE__*/function () {
5254
5278
  }, _callee53, this);
5255
5279
  }));
5256
5280
 
5257
- function recoverPrivateKeyFromMasterKey(_x125, _x126) {
5281
+ function recoverPrivateKeyFromMasterKey(_x124, _x125) {
5258
5282
  return _recoverPrivateKeyFromMasterKey.apply(this, arguments);
5259
5283
  }
5260
5284
 
@@ -5305,7 +5329,7 @@ var OroClient = /*#__PURE__*/function () {
5305
5329
  }, _callee54, this);
5306
5330
  }));
5307
5331
 
5308
- function updateSecurityQuestions(_x127, _x128, _x129, _x130) {
5332
+ function updateSecurityQuestions(_x126, _x127, _x128, _x129) {
5309
5333
  return _updateSecurityQuestions.apply(this, arguments);
5310
5334
  }
5311
5335
 
@@ -5370,7 +5394,7 @@ var OroClient = /*#__PURE__*/function () {
5370
5394
  }, _callee55, this);
5371
5395
  }));
5372
5396
 
5373
- function updatePassword(_x131, _x132, _x133) {
5397
+ function updatePassword(_x130, _x131, _x132) {
5374
5398
  return _updatePassword.apply(this, arguments);
5375
5399
  }
5376
5400
 
@@ -5419,7 +5443,9 @@ var OroClient = /*#__PURE__*/function () {
5419
5443
  }, {
5420
5444
  category: MetadataCategory.Recovery,
5421
5445
  contentType: 'application/json'
5422
- }, {}, true);
5446
+ }, {}, {
5447
+ forceReplace: true
5448
+ });
5423
5449
 
5424
5450
  case 10:
5425
5451
  return _context57.abrupt("return", updatedIdentity);
@@ -5432,7 +5458,7 @@ var OroClient = /*#__PURE__*/function () {
5432
5458
  }, _callee56, this);
5433
5459
  }));
5434
5460
 
5435
- function updateMasterKey(_x134, _x135, _x136) {
5461
+ function updateMasterKey(_x133, _x134, _x135) {
5436
5462
  return _updateMasterKey.apply(this, arguments);
5437
5463
  }
5438
5464