oro-sdk 5.3.4 → 5.3.5
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/client.d.ts +27 -10
- package/dist/oro-sdk.cjs.development.js +174 -148
- package/dist/oro-sdk.cjs.development.js.map +1 -1
- package/dist/oro-sdk.cjs.production.min.js +1 -1
- package/dist/oro-sdk.cjs.production.min.js.map +1 -1
- package/dist/oro-sdk.esm.js +174 -148
- package/dist/oro-sdk.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +40 -41
- package/src/helpers/patient-registration.ts +8 -8
- package/src/helpers/prescription-refill.ts +64 -63
@@ -1727,8 +1727,9 @@ function _storePatientData() {
|
|
1727
1727
|
consultationId: consultationId
|
1728
1728
|
}, {
|
1729
1729
|
consultationId: consultationId
|
1730
|
-
},
|
1731
|
-
|
1730
|
+
}, {
|
1731
|
+
withNotification: true
|
1732
|
+
});
|
1732
1733
|
}), getWorkflowDataByCategory(workflow, initApis.MetadataCategory.Medical).then(function (data) {
|
1733
1734
|
return oroClient.getOrInsertJsonData(lockboxUuid, data, {
|
1734
1735
|
category: initApis.MetadataCategory.Medical,
|
@@ -2035,74 +2036,74 @@ function getRefillAnswersAsWorkflow(isTreatmentWorking, hasSideEffects, delivery
|
|
2035
2036
|
if (deliveryAddress) selectedAnswers.push((_selectedAnswers$push = {}, _selectedAnswers$push['deliveryAddress'] = deliveryAddress, _selectedAnswers$push));
|
2036
2037
|
if (pharmacy) selectedAnswers.push((_selectedAnswers$push2 = {}, _selectedAnswers$push2['pharmacy'] = JSON.stringify(pharmacy), _selectedAnswers$push2));
|
2037
2038
|
return {
|
2038
|
-
|
2039
|
-
|
2040
|
-
|
2041
|
-
|
2042
|
-
|
2043
|
-
|
2044
|
-
|
2045
|
-
|
2046
|
-
|
2047
|
-
|
2048
|
-
|
2039
|
+
id: '32573a20-6f1d-49be-9ad3-b87c58074979',
|
2040
|
+
createdAt: '2022-10-03T00:00:00.000Z',
|
2041
|
+
culDeSacs: [],
|
2042
|
+
hidePlanRules: [],
|
2043
|
+
pages: [{
|
2044
|
+
title: 'Prescription Refill',
|
2045
|
+
groups: [{
|
2046
|
+
type: 'field-group',
|
2047
|
+
fieldsAndGroups: [{
|
2048
|
+
type: 'field',
|
2049
|
+
id: 'isTreatmentWorking'
|
2049
2050
|
}, {
|
2050
|
-
|
2051
|
-
|
2051
|
+
type: 'field',
|
2052
|
+
id: 'hasSideEffects'
|
2052
2053
|
}, {
|
2053
|
-
|
2054
|
-
|
2054
|
+
type: 'field',
|
2055
|
+
id: 'youPharmacy'
|
2055
2056
|
}, {
|
2056
|
-
|
2057
|
-
|
2057
|
+
type: 'field',
|
2058
|
+
id: 'youAddress'
|
2058
2059
|
}]
|
2059
2060
|
}],
|
2060
|
-
|
2061
|
-
|
2062
|
-
|
2063
|
-
|
2064
|
-
|
2065
|
-
|
2066
|
-
|
2067
|
-
|
2068
|
-
|
2069
|
-
|
2061
|
+
questions: {
|
2062
|
+
isTreatmentWorking: {
|
2063
|
+
label: 'Is the treatment working for you?',
|
2064
|
+
kind: 'radio',
|
2065
|
+
inline: true,
|
2066
|
+
inlineLabel: false,
|
2067
|
+
metaCategory: initApis.MetadataCategory.Refill,
|
2068
|
+
answers: {
|
2069
|
+
'73bec6eb-0310-4787-af3c-ac9c291737b2': {
|
2070
|
+
text: 'Yes'
|
2070
2071
|
},
|
2071
|
-
|
2072
|
-
|
2072
|
+
'e193951f-986f-4db3-bede-903045a1804a': {
|
2073
|
+
text: 'No'
|
2073
2074
|
}
|
2074
2075
|
}
|
2075
2076
|
},
|
2076
|
-
|
2077
|
-
|
2078
|
-
|
2079
|
-
|
2080
|
-
|
2081
|
-
|
2082
|
-
|
2083
|
-
|
2084
|
-
|
2077
|
+
hasSideEffects: {
|
2078
|
+
label: 'Are there any side effects',
|
2079
|
+
kind: 'radio',
|
2080
|
+
inline: true,
|
2081
|
+
inlineLabel: false,
|
2082
|
+
metaCategory: initApis.MetadataCategory.Refill,
|
2083
|
+
answers: {
|
2084
|
+
'1b87ad22-d316-4fac-9c7f-8f4ccb841aed': {
|
2085
|
+
text: 'Yes'
|
2085
2086
|
},
|
2086
|
-
|
2087
|
-
|
2087
|
+
'ab7f5a41-c351-4f5d-a568-e38f9f200e9a': {
|
2088
|
+
text: 'No'
|
2088
2089
|
}
|
2089
2090
|
}
|
2090
2091
|
},
|
2091
|
-
|
2092
|
-
|
2093
|
-
|
2094
|
-
|
2095
|
-
|
2096
|
-
|
2092
|
+
youPharmacy: {
|
2093
|
+
kind: 'online-pharmacy-picker',
|
2094
|
+
label: 'Which pharmacy do you want the prescription sent to?',
|
2095
|
+
metaCategory: initApis.MetadataCategory.Refill,
|
2096
|
+
minorLabel: ' (Optional)',
|
2097
|
+
summaryLabel: 'Your pharmacy'
|
2097
2098
|
},
|
2098
|
-
|
2099
|
-
|
2100
|
-
|
2101
|
-
|
2099
|
+
youAddress: {
|
2100
|
+
kind: 'place-address',
|
2101
|
+
label: 'Address',
|
2102
|
+
metaCategory: initApis.MetadataCategory.Refill
|
2102
2103
|
}
|
2103
2104
|
}
|
2104
2105
|
}],
|
2105
|
-
|
2106
|
+
locale: 'en',
|
2106
2107
|
selectedAnswers: selectedAnswers
|
2107
2108
|
};
|
2108
2109
|
}
|
@@ -2164,7 +2165,9 @@ function _createRefill() {
|
|
2164
2165
|
category: initApis.MetadataCategory.Refill,
|
2165
2166
|
documentType: initApis.DocumentType.PopulatedWorkflowData,
|
2166
2167
|
consultationIds: [newConsult.uuid]
|
2167
|
-
}, {}
|
2168
|
+
}, {}, {
|
2169
|
+
withNotification: true
|
2170
|
+
})["catch"](function (err) {
|
2168
2171
|
console.error('[SDK: prescription refill] Some errors happened during refill data upload', err);
|
2169
2172
|
errorsThrown.push(err);
|
2170
2173
|
});
|
@@ -3156,13 +3159,15 @@ var OroClient = /*#__PURE__*/function () {
|
|
3156
3159
|
_proto.createConsultationAttachmentData =
|
3157
3160
|
/*#__PURE__*/
|
3158
3161
|
function () {
|
3159
|
-
var _createConsultationAttachmentData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15(lockboxUuid, data, consultationId, documentType, lockboxOwnerUuid, previousDataUuid,
|
3162
|
+
var _createConsultationAttachmentData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15(lockboxUuid, data, consultationId, documentType, lockboxOwnerUuid, previousDataUuid, options) {
|
3160
3163
|
return _regeneratorRuntime().wrap(function _callee15$(_context15) {
|
3161
3164
|
while (1) {
|
3162
3165
|
switch (_context15.prev = _context15.next) {
|
3163
3166
|
case 0:
|
3164
|
-
if (
|
3165
|
-
|
3167
|
+
if (options === void 0) {
|
3168
|
+
options = {
|
3169
|
+
withNotification: false
|
3170
|
+
};
|
3166
3171
|
}
|
3167
3172
|
|
3168
3173
|
if (this.rsa) {
|
@@ -3200,7 +3205,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
3200
3205
|
};
|
3201
3206
|
_context15.t9 = lockboxOwnerUuid;
|
3202
3207
|
_context15.t10 = previousDataUuid;
|
3203
|
-
_context15.t11 =
|
3208
|
+
_context15.t11 = options;
|
3204
3209
|
return _context15.abrupt("return", _context15.t0.createBytesData.call(_context15.t0, _context15.t1, _context15.t4, _context15.t5, _context15.t8, _context15.t9, _context15.t10, _context15.t11));
|
3205
3210
|
|
3206
3211
|
case 20:
|
@@ -3226,7 +3231,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
3226
3231
|
* @param privateMeta the metadata that will be secured in the vault
|
3227
3232
|
* @param lockboxOwnerUuid the lockbox owner (ignored if lockbox is owned by self)
|
3228
3233
|
* @param previousDataUuid if it's a revision of existing data, specify the previous data uuid
|
3229
|
-
* @param
|
3234
|
+
* @param options if the insertion of data requires email notification
|
3230
3235
|
* @returns the data uuid
|
3231
3236
|
*/
|
3232
3237
|
;
|
@@ -3234,14 +3239,16 @@ var OroClient = /*#__PURE__*/function () {
|
|
3234
3239
|
_proto.createJsonData =
|
3235
3240
|
/*#__PURE__*/
|
3236
3241
|
function () {
|
3237
|
-
var _createJsonData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee16(lockboxUuid, data, meta, privateMeta, lockboxOwnerUuid, previousDataUuid,
|
3242
|
+
var _createJsonData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee16(lockboxUuid, data, meta, privateMeta, lockboxOwnerUuid, previousDataUuid, options) {
|
3238
3243
|
var symmetricEncryptor, encryptedData, encryptedPrivateMeta, request;
|
3239
3244
|
return _regeneratorRuntime().wrap(function _callee16$(_context16) {
|
3240
3245
|
while (1) {
|
3241
3246
|
switch (_context16.prev = _context16.next) {
|
3242
3247
|
case 0:
|
3243
|
-
if (
|
3244
|
-
|
3248
|
+
if (options === void 0) {
|
3249
|
+
options = {
|
3250
|
+
withNotification: false
|
3251
|
+
};
|
3245
3252
|
}
|
3246
3253
|
|
3247
3254
|
if (this.rsa) {
|
@@ -3265,7 +3272,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
3265
3272
|
privateMetadata: encryptedPrivateMeta
|
3266
3273
|
};
|
3267
3274
|
|
3268
|
-
if (!withNotification) {
|
3275
|
+
if (!options.withNotification) {
|
3269
3276
|
_context16.next = 13;
|
3270
3277
|
break;
|
3271
3278
|
}
|
@@ -3296,7 +3303,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
3296
3303
|
* @param publicMetadata the public Metadata
|
3297
3304
|
* @param privateMetadata the private Metadata
|
3298
3305
|
* @param forceReplace set true when the insertion of data requires to replace the data when it exists already
|
3299
|
-
* @param
|
3306
|
+
* @param options if the insertion of data requires email notification
|
3300
3307
|
* @returns the data uuid
|
3301
3308
|
*/
|
3302
3309
|
;
|
@@ -3304,46 +3311,47 @@ var OroClient = /*#__PURE__*/function () {
|
|
3304
3311
|
_proto.getOrInsertJsonData =
|
3305
3312
|
/*#__PURE__*/
|
3306
3313
|
function () {
|
3307
|
-
var _getOrInsertJsonData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee17(lockboxUuid, data, publicMetadata, privateMetadata,
|
3314
|
+
var _getOrInsertJsonData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee17(lockboxUuid, data, publicMetadata, privateMetadata, options) {
|
3308
3315
|
var manifest;
|
3309
3316
|
return _regeneratorRuntime().wrap(function _callee17$(_context17) {
|
3310
3317
|
while (1) {
|
3311
3318
|
switch (_context17.prev = _context17.next) {
|
3312
3319
|
case 0:
|
3313
|
-
if (
|
3314
|
-
|
3315
|
-
|
3316
|
-
|
3317
|
-
|
3318
|
-
withNotification = false;
|
3320
|
+
if (options === void 0) {
|
3321
|
+
options = {
|
3322
|
+
withNotification: false,
|
3323
|
+
forceReplace: false
|
3324
|
+
};
|
3319
3325
|
}
|
3320
3326
|
|
3321
|
-
_context17.next =
|
3327
|
+
_context17.next = 3;
|
3322
3328
|
return this.vaultClient.lockboxManifestGet(lockboxUuid, publicMetadata);
|
3323
3329
|
|
3324
|
-
case
|
3330
|
+
case 3:
|
3325
3331
|
manifest = _context17.sent;
|
3326
3332
|
|
3327
|
-
if (!(!forceReplace && manifest.length > 0)) {
|
3328
|
-
_context17.next =
|
3333
|
+
if (!(!options.forceReplace && manifest.length > 0)) {
|
3334
|
+
_context17.next = 9;
|
3329
3335
|
break;
|
3330
3336
|
}
|
3331
3337
|
|
3332
3338
|
console.log("The data for " + JSON.stringify(publicMetadata) + " already exist");
|
3333
3339
|
return _context17.abrupt("return", manifest[0].dataUuid);
|
3334
3340
|
|
3335
|
-
case
|
3336
|
-
_context17.next =
|
3337
|
-
return this.createJsonData(lockboxUuid, data, publicMetadata, privateMetadata, undefined,
|
3338
|
-
|
3341
|
+
case 9:
|
3342
|
+
_context17.next = 11;
|
3343
|
+
return this.createJsonData(lockboxUuid, data, publicMetadata, privateMetadata, undefined, // if forceReplace and data already exist, then replace data. Otherwise insert it
|
3344
|
+
options.forceReplace && manifest.length > 0 ? manifest[0].dataUuid : undefined, {
|
3345
|
+
withNotification: options.withNotification
|
3346
|
+
})["catch"](function (err) {
|
3339
3347
|
console.error("Error while upserting data " + JSON.stringify(publicMetadata) + " data", err);
|
3340
3348
|
throw err;
|
3341
3349
|
});
|
3342
3350
|
|
3343
|
-
case
|
3351
|
+
case 11:
|
3344
3352
|
return _context17.abrupt("return", _context17.sent.dataUuid);
|
3345
3353
|
|
3346
|
-
case
|
3354
|
+
case 12:
|
3347
3355
|
case "end":
|
3348
3356
|
return _context17.stop();
|
3349
3357
|
}
|
@@ -3351,7 +3359,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
3351
3359
|
}, _callee17, this);
|
3352
3360
|
}));
|
3353
3361
|
|
3354
|
-
function getOrInsertJsonData(_x51, _x52, _x53, _x54, _x55
|
3362
|
+
function getOrInsertJsonData(_x51, _x52, _x53, _x54, _x55) {
|
3355
3363
|
return _getOrInsertJsonData.apply(this, arguments);
|
3356
3364
|
}
|
3357
3365
|
|
@@ -3374,14 +3382,16 @@ var OroClient = /*#__PURE__*/function () {
|
|
3374
3382
|
_proto.createBytesData =
|
3375
3383
|
/*#__PURE__*/
|
3376
3384
|
function () {
|
3377
|
-
var _createBytesData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee18(lockboxUuid, data, meta, privateMeta, lockboxOwnerUuid, previousDataUuid,
|
3385
|
+
var _createBytesData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee18(lockboxUuid, data, meta, privateMeta, lockboxOwnerUuid, previousDataUuid, options) {
|
3378
3386
|
var symmetricEncryptor, encryptedData, encryptedPrivateMeta, request;
|
3379
3387
|
return _regeneratorRuntime().wrap(function _callee18$(_context18) {
|
3380
3388
|
while (1) {
|
3381
3389
|
switch (_context18.prev = _context18.next) {
|
3382
3390
|
case 0:
|
3383
|
-
if (
|
3384
|
-
|
3391
|
+
if (options === void 0) {
|
3392
|
+
options = {
|
3393
|
+
withNotification: false
|
3394
|
+
};
|
3385
3395
|
}
|
3386
3396
|
|
3387
3397
|
if (this.rsa) {
|
@@ -3405,7 +3415,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
3405
3415
|
privateMetadata: encryptedPrivateMeta
|
3406
3416
|
};
|
3407
3417
|
|
3408
|
-
if (!withNotification) {
|
3418
|
+
if (!options.withNotification) {
|
3409
3419
|
_context18.next = 13;
|
3410
3420
|
break;
|
3411
3421
|
}
|
@@ -3423,7 +3433,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
3423
3433
|
}, _callee18, this);
|
3424
3434
|
}));
|
3425
3435
|
|
3426
|
-
function createBytesData(_x57, _x58, _x59, _x60, _x61, _x62
|
3436
|
+
function createBytesData(_x56, _x57, _x58, _x59, _x60, _x61, _x62) {
|
3427
3437
|
return _createBytesData.apply(this, arguments);
|
3428
3438
|
}
|
3429
3439
|
|
@@ -3477,7 +3487,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
3477
3487
|
}, _callee19, this);
|
3478
3488
|
}));
|
3479
3489
|
|
3480
|
-
function getJsonData(_x64, _x65
|
3490
|
+
function getJsonData(_x63, _x64, _x65) {
|
3481
3491
|
return _getJsonData.apply(this, arguments);
|
3482
3492
|
}
|
3483
3493
|
|
@@ -3527,7 +3537,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
3527
3537
|
}, _callee20, this);
|
3528
3538
|
}));
|
3529
3539
|
|
3530
|
-
function getBytesData(_x67, _x68
|
3540
|
+
function getBytesData(_x66, _x67, _x68) {
|
3531
3541
|
return _getBytesData.apply(this, arguments);
|
3532
3542
|
}
|
3533
3543
|
|
@@ -3665,7 +3675,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
3665
3675
|
}, _callee21, this);
|
3666
3676
|
}));
|
3667
3677
|
|
3668
|
-
function getGrants(
|
3678
|
+
function getGrants(_x69) {
|
3669
3679
|
return _getGrants.apply(this, arguments);
|
3670
3680
|
}
|
3671
3681
|
|
@@ -3765,7 +3775,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
3765
3775
|
}, _callee23, this);
|
3766
3776
|
}));
|
3767
3777
|
|
3768
|
-
function getCachedSecretCryptor(
|
3778
|
+
function getCachedSecretCryptor(_x70, _x71) {
|
3769
3779
|
return _getCachedSecretCryptor.apply(this, arguments);
|
3770
3780
|
}
|
3771
3781
|
|
@@ -3785,16 +3795,18 @@ var OroClient = /*#__PURE__*/function () {
|
|
3785
3795
|
_proto.getPersonalInformationsFromConsultId =
|
3786
3796
|
/*#__PURE__*/
|
3787
3797
|
function () {
|
3788
|
-
var _getPersonalInformationsFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee24(consultationId, category,
|
3798
|
+
var _getPersonalInformationsFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee24(consultationId, category, options) {
|
3789
3799
|
return _regeneratorRuntime().wrap(function _callee24$(_context24) {
|
3790
3800
|
while (1) {
|
3791
3801
|
switch (_context24.prev = _context24.next) {
|
3792
3802
|
case 0:
|
3793
|
-
if (
|
3794
|
-
|
3803
|
+
if (options === void 0) {
|
3804
|
+
options = {
|
3805
|
+
forceRefresh: false
|
3806
|
+
};
|
3795
3807
|
}
|
3796
3808
|
|
3797
|
-
return _context24.abrupt("return", this.getMetaCategoryFromConsultId(consultationId, category,
|
3809
|
+
return _context24.abrupt("return", this.getMetaCategoryFromConsultId(consultationId, category, options));
|
3798
3810
|
|
3799
3811
|
case 2:
|
3800
3812
|
case "end":
|
@@ -3804,7 +3816,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
3804
3816
|
}, _callee24, this);
|
3805
3817
|
}));
|
3806
3818
|
|
3807
|
-
function getPersonalInformationsFromConsultId(_x73, _x74
|
3819
|
+
function getPersonalInformationsFromConsultId(_x72, _x73, _x74) {
|
3808
3820
|
return _getPersonalInformationsFromConsultId.apply(this, arguments);
|
3809
3821
|
}
|
3810
3822
|
|
@@ -3823,16 +3835,18 @@ var OroClient = /*#__PURE__*/function () {
|
|
3823
3835
|
_proto.getMedicalDataFromConsultId =
|
3824
3836
|
/*#__PURE__*/
|
3825
3837
|
function () {
|
3826
|
-
var _getMedicalDataFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee25(consultationId,
|
3838
|
+
var _getMedicalDataFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee25(consultationId, options) {
|
3827
3839
|
return _regeneratorRuntime().wrap(function _callee25$(_context25) {
|
3828
3840
|
while (1) {
|
3829
3841
|
switch (_context25.prev = _context25.next) {
|
3830
3842
|
case 0:
|
3831
|
-
if (
|
3832
|
-
|
3843
|
+
if (options === void 0) {
|
3844
|
+
options = {
|
3845
|
+
forceRefresh: false
|
3846
|
+
};
|
3833
3847
|
}
|
3834
3848
|
|
3835
|
-
return _context25.abrupt("return", this.getMetaCategoryFromConsultId(consultationId, initApis.MetadataCategory.Medical,
|
3849
|
+
return _context25.abrupt("return", this.getMetaCategoryFromConsultId(consultationId, initApis.MetadataCategory.Medical, options));
|
3836
3850
|
|
3837
3851
|
case 2:
|
3838
3852
|
case "end":
|
@@ -3842,7 +3856,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
3842
3856
|
}, _callee25, this);
|
3843
3857
|
}));
|
3844
3858
|
|
3845
|
-
function getMedicalDataFromConsultId(
|
3859
|
+
function getMedicalDataFromConsultId(_x75, _x76) {
|
3846
3860
|
return _getMedicalDataFromConsultId.apply(this, arguments);
|
3847
3861
|
}
|
3848
3862
|
|
@@ -3850,7 +3864,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
3850
3864
|
}();
|
3851
3865
|
|
3852
3866
|
_proto.getMetaCategoryFromConsultId = /*#__PURE__*/function () {
|
3853
|
-
var _getMetaCategoryFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee27(consultationId, category,
|
3867
|
+
var _getMetaCategoryFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee27(consultationId, category, options) {
|
3854
3868
|
var _this2 = this;
|
3855
3869
|
|
3856
3870
|
var grants, workflowData, _loop, _iterator, _step;
|
@@ -3859,8 +3873,10 @@ var OroClient = /*#__PURE__*/function () {
|
|
3859
3873
|
while (1) {
|
3860
3874
|
switch (_context28.prev = _context28.next) {
|
3861
3875
|
case 0:
|
3862
|
-
if (
|
3863
|
-
|
3876
|
+
if (options === void 0) {
|
3877
|
+
options = {
|
3878
|
+
forceRefresh: false
|
3879
|
+
};
|
3864
3880
|
}
|
3865
3881
|
|
3866
3882
|
_context28.next = 3;
|
@@ -3883,7 +3899,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
3883
3899
|
category: category,
|
3884
3900
|
documentType: initApis.DocumentType.PopulatedWorkflowData,
|
3885
3901
|
consultationIds: [consultationId]
|
3886
|
-
}, true, grant.lockboxOwnerUuid,
|
3902
|
+
}, true, grant.lockboxOwnerUuid, options);
|
3887
3903
|
|
3888
3904
|
case 3:
|
3889
3905
|
manifest = _context27.sent;
|
@@ -3897,7 +3913,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
3897
3913
|
return _this2.getLockboxManifest(grant.lockboxUuid, {
|
3898
3914
|
category: category,
|
3899
3915
|
documentType: initApis.DocumentType.PopulatedWorkflowData
|
3900
|
-
}, true, grant.lockboxOwnerUuid,
|
3916
|
+
}, true, grant.lockboxOwnerUuid, options);
|
3901
3917
|
|
3902
3918
|
case 7:
|
3903
3919
|
manifest = _context27.sent.filter(function (entry) {
|
@@ -3935,7 +3951,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
3935
3951
|
}, _callee26);
|
3936
3952
|
}));
|
3937
3953
|
|
3938
|
-
return function (
|
3954
|
+
return function (_x80) {
|
3939
3955
|
return _ref3.apply(this, arguments);
|
3940
3956
|
};
|
3941
3957
|
}()));
|
@@ -3976,7 +3992,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
3976
3992
|
}, _callee27, this);
|
3977
3993
|
}));
|
3978
3994
|
|
3979
|
-
function getMetaCategoryFromConsultId(_x78, _x79
|
3995
|
+
function getMetaCategoryFromConsultId(_x77, _x78, _x79) {
|
3980
3996
|
return _getMetaCategoryFromConsultId.apply(this, arguments);
|
3981
3997
|
}
|
3982
3998
|
|
@@ -4063,7 +4079,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
4063
4079
|
}, _callee28, this);
|
4064
4080
|
}));
|
4065
4081
|
|
4066
|
-
function getPersonalInformations(
|
4082
|
+
function getPersonalInformations(_x81) {
|
4067
4083
|
return _getPersonalInformations.apply(this, arguments);
|
4068
4084
|
}
|
4069
4085
|
|
@@ -4112,7 +4128,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
4112
4128
|
}, _callee29, this);
|
4113
4129
|
}));
|
4114
4130
|
|
4115
|
-
function getGrantFromConsultId(
|
4131
|
+
function getGrantFromConsultId(_x82) {
|
4116
4132
|
return _getGrantFromConsultId.apply(this, arguments);
|
4117
4133
|
}
|
4118
4134
|
|
@@ -4162,7 +4178,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
4162
4178
|
}, _callee30, this);
|
4163
4179
|
}));
|
4164
4180
|
|
4165
|
-
function getIdentityFromConsultId(
|
4181
|
+
function getIdentityFromConsultId(_x83) {
|
4166
4182
|
return _getIdentityFromConsultId.apply(this, arguments);
|
4167
4183
|
}
|
4168
4184
|
|
@@ -4183,7 +4199,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
4183
4199
|
_proto.getLockboxManifest =
|
4184
4200
|
/*#__PURE__*/
|
4185
4201
|
function () {
|
4186
|
-
var _getLockboxManifest = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee32(lockboxUuid, filter, expandPrivateMetadata, lockboxOwnerUuid,
|
4202
|
+
var _getLockboxManifest = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee32(lockboxUuid, filter, expandPrivateMetadata, lockboxOwnerUuid, options) {
|
4187
4203
|
var _this3 = this;
|
4188
4204
|
|
4189
4205
|
var manifestKey;
|
@@ -4191,8 +4207,10 @@ var OroClient = /*#__PURE__*/function () {
|
|
4191
4207
|
while (1) {
|
4192
4208
|
switch (_context33.prev = _context33.next) {
|
4193
4209
|
case 0:
|
4194
|
-
if (
|
4195
|
-
|
4210
|
+
if (options === void 0) {
|
4211
|
+
options = {
|
4212
|
+
forceRefresh: false
|
4213
|
+
};
|
4196
4214
|
}
|
4197
4215
|
|
4198
4216
|
manifestKey = JSON.stringify({
|
@@ -4202,7 +4220,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
4202
4220
|
lockboxOwnerUuid: lockboxOwnerUuid
|
4203
4221
|
});
|
4204
4222
|
|
4205
|
-
if (!(!forceRefresh && this.cachedManifest[manifestKey])) {
|
4223
|
+
if (!(!options.forceRefresh && this.cachedManifest[manifestKey])) {
|
4206
4224
|
_context33.next = 4;
|
4207
4225
|
break;
|
4208
4226
|
}
|
@@ -4241,7 +4259,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
4241
4259
|
}, _callee31);
|
4242
4260
|
}));
|
4243
4261
|
|
4244
|
-
return function (
|
4262
|
+
return function (_x89) {
|
4245
4263
|
return _ref4.apply(this, arguments);
|
4246
4264
|
};
|
4247
4265
|
}())).then(function (manifest) {
|
@@ -4257,7 +4275,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
4257
4275
|
}, _callee32, this);
|
4258
4276
|
}));
|
4259
4277
|
|
4260
|
-
function getLockboxManifest(_x85, _x86, _x87, _x88
|
4278
|
+
function getLockboxManifest(_x84, _x85, _x86, _x87, _x88) {
|
4261
4279
|
return _getLockboxManifest.apply(this, arguments);
|
4262
4280
|
}
|
4263
4281
|
|
@@ -4327,7 +4345,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
4327
4345
|
}, _callee33, this);
|
4328
4346
|
}));
|
4329
4347
|
|
4330
|
-
function createPersonalInformations(_x91, _x92
|
4348
|
+
function createPersonalInformations(_x90, _x91, _x92) {
|
4331
4349
|
return _createPersonalInformations.apply(this, arguments);
|
4332
4350
|
}
|
4333
4351
|
|
@@ -4397,7 +4415,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
4397
4415
|
}, _callee34, this);
|
4398
4416
|
}));
|
4399
4417
|
|
4400
|
-
function createUserPreference(_x94, _x95
|
4418
|
+
function createUserPreference(_x93, _x94, _x95) {
|
4401
4419
|
return _createUserPreference.apply(this, arguments);
|
4402
4420
|
}
|
4403
4421
|
|
@@ -4438,7 +4456,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
4438
4456
|
|
4439
4457
|
case 5:
|
4440
4458
|
_context36.next = 7;
|
4441
|
-
return this.getLockboxManifest(lockboxUuid, filter, false, grant.lockboxOwnerUuid,
|
4459
|
+
return this.getLockboxManifest(lockboxUuid, filter, false, grant.lockboxOwnerUuid, {
|
4460
|
+
forceRefresh: true
|
4461
|
+
});
|
4442
4462
|
|
4443
4463
|
case 7:
|
4444
4464
|
identificationDataUuid = _context36.sent[0].dataUuid;
|
@@ -4465,7 +4485,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
4465
4485
|
}, _callee35, this);
|
4466
4486
|
}));
|
4467
4487
|
|
4468
|
-
function getDataFromGrant(
|
4488
|
+
function getDataFromGrant(_x96, _x97) {
|
4469
4489
|
return _getDataFromGrant.apply(this, arguments);
|
4470
4490
|
}
|
4471
4491
|
|
@@ -4514,7 +4534,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
4514
4534
|
}, _callee36, this);
|
4515
4535
|
}));
|
4516
4536
|
|
4517
|
-
function getUserPreferenceFromConsultId(
|
4537
|
+
function getUserPreferenceFromConsultId(_x98) {
|
4518
4538
|
return _getUserPreferenceFromConsultId.apply(this, arguments);
|
4519
4539
|
}
|
4520
4540
|
|
@@ -4565,7 +4585,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
4565
4585
|
}, _callee37, this);
|
4566
4586
|
}));
|
4567
4587
|
|
4568
|
-
function getUserPreference(
|
4588
|
+
function getUserPreference(_x99) {
|
4569
4589
|
return _getUserPreference.apply(this, arguments);
|
4570
4590
|
}
|
4571
4591
|
|
@@ -4614,7 +4634,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
4614
4634
|
}, _callee38, this);
|
4615
4635
|
}));
|
4616
4636
|
|
4617
|
-
function getRecoveryDataFromConsultId(
|
4637
|
+
function getRecoveryDataFromConsultId(_x100) {
|
4618
4638
|
return _getRecoveryDataFromConsultId.apply(this, arguments);
|
4619
4639
|
}
|
4620
4640
|
|
@@ -4665,7 +4685,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
4665
4685
|
}, _callee39, this);
|
4666
4686
|
}));
|
4667
4687
|
|
4668
|
-
function getRecoveryData(
|
4688
|
+
function getRecoveryData(_x101) {
|
4669
4689
|
return _getRecoveryData.apply(this, arguments);
|
4670
4690
|
}
|
4671
4691
|
|
@@ -4723,7 +4743,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
4723
4743
|
}, _callee40);
|
4724
4744
|
}));
|
4725
4745
|
|
4726
|
-
return function (
|
4746
|
+
return function (_x103) {
|
4727
4747
|
return _ref5.apply(this, arguments);
|
4728
4748
|
};
|
4729
4749
|
}())).then(function (promise) {
|
@@ -4743,7 +4763,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
4743
4763
|
}, _callee41, this);
|
4744
4764
|
}));
|
4745
4765
|
|
4746
|
-
function getAssignedConsultations(
|
4766
|
+
function getAssignedConsultations(_x102) {
|
4747
4767
|
return _getAssignedConsultations.apply(this, arguments);
|
4748
4768
|
}
|
4749
4769
|
|
@@ -4821,7 +4841,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
4821
4841
|
}, _callee42);
|
4822
4842
|
}));
|
4823
4843
|
|
4824
|
-
return function (
|
4844
|
+
return function (_x106) {
|
4825
4845
|
return _ref6.apply(this, arguments);
|
4826
4846
|
};
|
4827
4847
|
}()));
|
@@ -4837,7 +4857,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
4837
4857
|
}, _callee43, this);
|
4838
4858
|
}));
|
4839
4859
|
|
4840
|
-
function getPastConsultationsFromConsultId(
|
4860
|
+
function getPastConsultationsFromConsultId(_x104, _x105) {
|
4841
4861
|
return _getPastConsultationsFromConsultId.apply(this, arguments);
|
4842
4862
|
}
|
4843
4863
|
|
@@ -4854,15 +4874,17 @@ var OroClient = /*#__PURE__*/function () {
|
|
4854
4874
|
_proto.getPatientConsultationData =
|
4855
4875
|
/*#__PURE__*/
|
4856
4876
|
function () {
|
4857
|
-
var _getPatientConsultationData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee44(consultationId,
|
4877
|
+
var _getPatientConsultationData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee44(consultationId, options) {
|
4858
4878
|
var _this6 = this;
|
4859
4879
|
|
4860
4880
|
return _regeneratorRuntime().wrap(function _callee44$(_context45) {
|
4861
4881
|
while (1) {
|
4862
4882
|
switch (_context45.prev = _context45.next) {
|
4863
4883
|
case 0:
|
4864
|
-
if (
|
4865
|
-
|
4884
|
+
if (options === void 0) {
|
4885
|
+
options = {
|
4886
|
+
forceRefresh: false
|
4887
|
+
};
|
4866
4888
|
}
|
4867
4889
|
|
4868
4890
|
_context45.t0 = Promise;
|
@@ -4877,7 +4899,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
4877
4899
|
category: initApis.MetadataCategory.Consultation,
|
4878
4900
|
documentType: initApis.DocumentType.PopulatedWorkflowData,
|
4879
4901
|
consultationId: consultationId
|
4880
|
-
}, true, grant.lockboxOwnerUuid,
|
4902
|
+
}, true, grant.lockboxOwnerUuid, options).then(function (manifest) {
|
4881
4903
|
return Promise.all(manifest.map(function (e) {
|
4882
4904
|
return _this6.getJsonData(grant.lockboxUuid, e.dataUuid, grant.lockboxOwnerUuid);
|
4883
4905
|
}));
|
@@ -4895,7 +4917,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
4895
4917
|
}, _callee44, this);
|
4896
4918
|
}));
|
4897
4919
|
|
4898
|
-
function getPatientConsultationData(
|
4920
|
+
function getPatientConsultationData(_x107, _x108) {
|
4899
4921
|
return _getPatientConsultationData.apply(this, arguments);
|
4900
4922
|
}
|
4901
4923
|
|
@@ -4929,7 +4951,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
4929
4951
|
}, _callee45, this);
|
4930
4952
|
}));
|
4931
4953
|
|
4932
|
-
function getPatientPrescriptionsList(
|
4954
|
+
function getPatientPrescriptionsList(_x109) {
|
4933
4955
|
return _getPatientPrescriptionsList.apply(this, arguments);
|
4934
4956
|
}
|
4935
4957
|
|
@@ -4963,7 +4985,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
4963
4985
|
}, _callee46, this);
|
4964
4986
|
}));
|
4965
4987
|
|
4966
|
-
function getPatientResultsList(
|
4988
|
+
function getPatientResultsList(_x110) {
|
4967
4989
|
return _getPatientResultsList.apply(this, arguments);
|
4968
4990
|
}
|
4969
4991
|
|
@@ -4997,7 +5019,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
4997
5019
|
}, _callee47, this);
|
4998
5020
|
}));
|
4999
5021
|
|
5000
|
-
function getPatientTreatmentPlans(
|
5022
|
+
function getPatientTreatmentPlans(_x111) {
|
5001
5023
|
return _getPatientTreatmentPlans.apply(this, arguments);
|
5002
5024
|
}
|
5003
5025
|
|
@@ -5033,7 +5055,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
5033
5055
|
}, _callee48, this);
|
5034
5056
|
}));
|
5035
5057
|
|
5036
|
-
function getPatientTreatmentPlanByUuid(
|
5058
|
+
function getPatientTreatmentPlanByUuid(_x112, _x113) {
|
5037
5059
|
return _getPatientTreatmentPlanByUuid.apply(this, arguments);
|
5038
5060
|
}
|
5039
5061
|
|
@@ -5070,7 +5092,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
5070
5092
|
_context51.t1 = _context51.sent.map(function (grant) {
|
5071
5093
|
return _this7.getLockboxManifest(grant.lockboxUuid, _extends({}, filters, {
|
5072
5094
|
consultationId: consultationId
|
5073
|
-
}), expandPrivateMetadata, grant.lockboxOwnerUuid,
|
5095
|
+
}), expandPrivateMetadata, grant.lockboxOwnerUuid, {
|
5096
|
+
forceRefresh: true
|
5097
|
+
}).then(function (manifest) {
|
5074
5098
|
return Promise.all(manifest.map( /*#__PURE__*/function () {
|
5075
5099
|
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee49(entry) {
|
5076
5100
|
return _regeneratorRuntime().wrap(function _callee49$(_context50) {
|
@@ -5090,7 +5114,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
5090
5114
|
}, _callee49);
|
5091
5115
|
}));
|
5092
5116
|
|
5093
|
-
return function (
|
5117
|
+
return function (_x117) {
|
5094
5118
|
return _ref7.apply(this, arguments);
|
5095
5119
|
};
|
5096
5120
|
}()));
|
@@ -5108,7 +5132,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
5108
5132
|
}, _callee50, this);
|
5109
5133
|
}));
|
5110
5134
|
|
5111
|
-
function getPatientDocumentsList(_x115, _x116
|
5135
|
+
function getPatientDocumentsList(_x114, _x115, _x116) {
|
5112
5136
|
return _getPatientDocumentsList.apply(this, arguments);
|
5113
5137
|
}
|
5114
5138
|
|
@@ -5170,7 +5194,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
5170
5194
|
}, _callee51, this);
|
5171
5195
|
}));
|
5172
5196
|
|
5173
|
-
function recoverPrivateKeyFromSecurityQuestions(_x119, _x120, _x121
|
5197
|
+
function recoverPrivateKeyFromSecurityQuestions(_x118, _x119, _x120, _x121) {
|
5174
5198
|
return _recoverPrivateKeyFromSecurityQuestions.apply(this, arguments);
|
5175
5199
|
}
|
5176
5200
|
|
@@ -5218,7 +5242,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
5218
5242
|
}, _callee52, this);
|
5219
5243
|
}));
|
5220
5244
|
|
5221
|
-
function recoverPrivateKeyFromPassword(
|
5245
|
+
function recoverPrivateKeyFromPassword(_x122, _x123) {
|
5222
5246
|
return _recoverPrivateKeyFromPassword.apply(this, arguments);
|
5223
5247
|
}
|
5224
5248
|
|
@@ -5258,7 +5282,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
5258
5282
|
}, _callee53, this);
|
5259
5283
|
}));
|
5260
5284
|
|
5261
|
-
function recoverPrivateKeyFromMasterKey(
|
5285
|
+
function recoverPrivateKeyFromMasterKey(_x124, _x125) {
|
5262
5286
|
return _recoverPrivateKeyFromMasterKey.apply(this, arguments);
|
5263
5287
|
}
|
5264
5288
|
|
@@ -5309,7 +5333,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
5309
5333
|
}, _callee54, this);
|
5310
5334
|
}));
|
5311
5335
|
|
5312
|
-
function updateSecurityQuestions(_x127, _x128, _x129
|
5336
|
+
function updateSecurityQuestions(_x126, _x127, _x128, _x129) {
|
5313
5337
|
return _updateSecurityQuestions.apply(this, arguments);
|
5314
5338
|
}
|
5315
5339
|
|
@@ -5374,7 +5398,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
5374
5398
|
}, _callee55, this);
|
5375
5399
|
}));
|
5376
5400
|
|
5377
|
-
function updatePassword(_x131, _x132
|
5401
|
+
function updatePassword(_x130, _x131, _x132) {
|
5378
5402
|
return _updatePassword.apply(this, arguments);
|
5379
5403
|
}
|
5380
5404
|
|
@@ -5423,7 +5447,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
5423
5447
|
}, {
|
5424
5448
|
category: initApis.MetadataCategory.Recovery,
|
5425
5449
|
contentType: 'application/json'
|
5426
|
-
}, {},
|
5450
|
+
}, {}, {
|
5451
|
+
forceReplace: true
|
5452
|
+
});
|
5427
5453
|
|
5428
5454
|
case 10:
|
5429
5455
|
return _context57.abrupt("return", updatedIdentity);
|
@@ -5436,7 +5462,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
5436
5462
|
}, _callee56, this);
|
5437
5463
|
}));
|
5438
5464
|
|
5439
|
-
function updateMasterKey(_x134, _x135
|
5465
|
+
function updateMasterKey(_x133, _x134, _x135) {
|
5440
5466
|
return _updateMasterKey.apply(this, arguments);
|
5441
5467
|
}
|
5442
5468
|
|