oro-sdk 5.3.6 → 5.5.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/client.d.ts +1 -1
- package/dist/helpers/prescription-refill.d.ts +7 -2
- package/dist/oro-sdk.cjs.development.js +680 -516
- 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 +680 -516
- package/dist/oro-sdk.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/client.ts +7 -2
- package/src/helpers/prescription-refill.ts +74 -15
package/dist/oro-sdk.esm.js
CHANGED
@@ -839,52 +839,53 @@ function _getImagesFromIndexDb() {
|
|
839
839
|
}
|
840
840
|
function populateWorkflowField(_x6, _x7) {
|
841
841
|
return _populateWorkflowField.apply(this, arguments);
|
842
|
-
}
|
843
|
-
|
844
|
-
|
845
|
-
|
846
|
-
|
847
|
-
|
848
|
-
|
849
|
-
|
850
|
-
|
851
|
-
|
852
|
-
|
853
|
-
|
854
|
-
|
855
|
-
|
856
|
-
|
857
|
-
|
858
|
-
|
859
|
-
|
860
|
-
|
861
|
-
|
862
|
-
|
863
|
-
|
864
|
-
|
865
|
-
|
866
|
-
|
867
|
-
|
868
|
-
|
869
|
-
|
870
|
-
|
871
|
-
|
872
|
-
|
873
|
-
|
874
|
-
|
875
|
-
|
876
|
-
|
877
|
-
|
878
|
-
|
879
|
-
|
880
|
-
|
881
|
-
|
882
|
-
|
883
|
-
|
884
|
-
|
885
|
-
|
886
|
-
|
887
|
-
|
842
|
+
}
|
843
|
+
/**
|
844
|
+
* Determine if a question is triggered by some answers
|
845
|
+
*
|
846
|
+
* We use the following logical combinations of rules:
|
847
|
+
*
|
848
|
+
* #### Single string
|
849
|
+
*
|
850
|
+
* ```
|
851
|
+
* // Required: rule1
|
852
|
+
* rules: rule1
|
853
|
+
* ```
|
854
|
+
*
|
855
|
+
* #### Array of strings (AND is applied between statements):
|
856
|
+
*
|
857
|
+
* ```
|
858
|
+
* // Required: rule1 AND rule2
|
859
|
+
* rules: [ rule1, rule2 ]
|
860
|
+
* ```
|
861
|
+
*
|
862
|
+
* #### Array of arrays of strings (OR is applied between inner arrays. AND is applied between inner arrays statements)
|
863
|
+
*
|
864
|
+
* ```
|
865
|
+
* // Required: rule1 OR rule2
|
866
|
+
* rules: [
|
867
|
+
* [ rule1 ],
|
868
|
+
* [ rule2 ]
|
869
|
+
* ]
|
870
|
+
*
|
871
|
+
* // Required: rule1 OR (rule2 AND rule3)
|
872
|
+
* rules: [
|
873
|
+
* [ rule1 ],
|
874
|
+
* [ rule2, rule3 ]
|
875
|
+
* ]
|
876
|
+
*
|
877
|
+
* // THIS IS FORBIDDEN
|
878
|
+
* rules: [
|
879
|
+
* rule1, // <-- THIS IS FORBIDDEN. Instead use [ rule1 ]
|
880
|
+
* [ rule2, rule3 ]
|
881
|
+
* ]
|
882
|
+
* ```
|
883
|
+
*
|
884
|
+
* @param triggers the triggering rules
|
885
|
+
* @param answers the answers to check againts triggering rules
|
886
|
+
* @returns `true` if triggers are verified against ansers. Otherwise, returns `false`.
|
887
|
+
* @throws an Error if triggers typing is wrong
|
888
|
+
*/
|
888
889
|
function _populateWorkflowField() {
|
889
890
|
_populateWorkflowField = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(question, answerValue) {
|
890
891
|
var answer, displayedAnswer;
|
@@ -1386,15 +1387,16 @@ function _registerPatient() {
|
|
1386
1387
|
}
|
1387
1388
|
function getOrCreatePatientLockbox(_x9) {
|
1388
1389
|
return _getOrCreatePatientLockbox.apply(this, arguments);
|
1389
|
-
}
|
1390
|
-
|
1391
|
-
|
1392
|
-
|
1393
|
-
|
1394
|
-
|
1395
|
-
|
1396
|
-
|
1397
|
-
|
1390
|
+
}
|
1391
|
+
/**
|
1392
|
+
* Store all patient related information into his/her lockbox
|
1393
|
+
* @param consultationId The consultation id
|
1394
|
+
* @param isoLanguage the prefered language of communication (ISO 639-3 https://en.wikipedia.org/wiki/List_of_ISO_639-2_codes)
|
1395
|
+
* @param lockboxUuid the lockbox uuid to store data in
|
1396
|
+
* @param workflow the workflow used to extract informations
|
1397
|
+
* @param oroClient an oroClient instance
|
1398
|
+
* @returns
|
1399
|
+
*/
|
1398
1400
|
function _getOrCreatePatientLockbox() {
|
1399
1401
|
_getOrCreatePatientLockbox = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(oroClient) {
|
1400
1402
|
var grants, lockboxResponse, tokens;
|
@@ -1493,15 +1495,16 @@ function _storePatientData() {
|
|
1493
1495
|
}
|
1494
1496
|
function storeImageAliases(_x15, _x16, _x17, _x18, _x19) {
|
1495
1497
|
return _storeImageAliases.apply(this, arguments);
|
1496
|
-
}
|
1497
|
-
|
1498
|
-
|
1499
|
-
|
1500
|
-
|
1501
|
-
|
1502
|
-
|
1503
|
-
|
1504
|
-
|
1498
|
+
}
|
1499
|
+
/**
|
1500
|
+
* Extracts the workflow MetadataCategory for Personal, ChildPersonal and OtherPersonal
|
1501
|
+
* then stores it in the vault
|
1502
|
+
*
|
1503
|
+
* @param workflow
|
1504
|
+
* @param lockboxUuid
|
1505
|
+
* @param category
|
1506
|
+
* @returns The data uuid
|
1507
|
+
*/
|
1505
1508
|
function _storeImageAliases() {
|
1506
1509
|
_storeImageAliases = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(consultationId, lockboxUuid, workflow, oroClient, progress) {
|
1507
1510
|
var images, nonNullImages, storedImagesNum, totalImagesNum, promises;
|
@@ -1733,6 +1736,8 @@ var MAX_RETRIES$1 = 15;
|
|
1733
1736
|
*
|
1734
1737
|
* Creates a fake workflow in which the workflow data will reside
|
1735
1738
|
*
|
1739
|
+
* @todo deprecate this function when using workflows and populating them from the app
|
1740
|
+
*
|
1736
1741
|
* @param isTreatmentWorking the value from the `is treatment working` question
|
1737
1742
|
* @param hasSideEffects the value from the `does the treatment have side effects` question
|
1738
1743
|
* @param deliveryAddress the provided delivery address
|
@@ -1740,10 +1745,12 @@ var MAX_RETRIES$1 = 15;
|
|
1740
1745
|
* @returns a workflow
|
1741
1746
|
*/
|
1742
1747
|
function getRefillAnswersAsWorkflow(isTreatmentWorking, hasSideEffects, deliveryAddress, pharmacy) {
|
1743
|
-
var _ref,
|
1744
|
-
var selectedAnswers = [(_ref = {}, _ref['isTreatmentWorking'] = isTreatmentWorking, _ref
|
1745
|
-
|
1746
|
-
if (
|
1748
|
+
var _ref, _extends2, _extends3;
|
1749
|
+
var selectedAnswers = [(_ref = {}, _ref['isTreatmentWorking'] = isTreatmentWorking, _ref['hasSideEffects'] = hasSideEffects, _ref)];
|
1750
|
+
// appends the delivery address to the first page of the answers if provided
|
1751
|
+
if (deliveryAddress) selectedAnswers[0] = _extends({}, selectedAnswers[0], (_extends2 = {}, _extends2['deliveryAddress'] = deliveryAddress, _extends2));
|
1752
|
+
// appends the pharmacy to the first page of the answers if provided
|
1753
|
+
if (pharmacy) selectedAnswers[0] = _extends({}, selectedAnswers[0], (_extends3 = {}, _extends3['pharmacy'] = JSON.stringify(pharmacy), _extends3));
|
1747
1754
|
return {
|
1748
1755
|
id: '32573a20-6f1d-49be-9ad3-b87c58074979',
|
1749
1756
|
createdAt: '2022-10-03T00:00:00.000Z',
|
@@ -1802,7 +1809,6 @@ function getRefillAnswersAsWorkflow(isTreatmentWorking, hasSideEffects, delivery
|
|
1802
1809
|
kind: 'online-pharmacy-picker',
|
1803
1810
|
label: 'Which pharmacy do you want the prescription sent to?',
|
1804
1811
|
metaCategory: MetadataCategory.Refill,
|
1805
|
-
minorLabel: ' (Optional)',
|
1806
1812
|
summaryLabel: 'Your pharmacy'
|
1807
1813
|
},
|
1808
1814
|
youAddress: {
|
@@ -1822,43 +1828,48 @@ function getRefillAnswersAsWorkflow(isTreatmentWorking, hasSideEffects, delivery
|
|
1822
1828
|
* @param populatedRefillWorkflow the refill workflow data
|
1823
1829
|
* @param oroClient
|
1824
1830
|
*/
|
1825
|
-
function createRefill(_x, _x2, _x3) {
|
1831
|
+
function createRefill(_x, _x2, _x3, _x4, _x5) {
|
1826
1832
|
return _createRefill.apply(this, arguments);
|
1827
1833
|
}
|
1828
1834
|
function _createRefill() {
|
1829
|
-
_createRefill = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(consultRequest, populatedRefillWorkflow, oroClient) {
|
1830
|
-
var retry, errorsThrown, newConsult, lockboxUuid;
|
1835
|
+
_createRefill = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(consultRequest, populatedRefillWorkflow, oroClient, indexSearch, onProgress) {
|
1836
|
+
var retry, errorsThrown, newConsult, lockboxUuid, stepsTotalNum, currentStep, rawConsultationManifest, rawConsultation;
|
1831
1837
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
1832
1838
|
while (1) {
|
1833
1839
|
switch (_context.prev = _context.next) {
|
1834
1840
|
case 0:
|
1841
|
+
if (indexSearch === void 0) {
|
1842
|
+
indexSearch = true;
|
1843
|
+
}
|
1835
1844
|
retry = MAX_RETRIES$1;
|
1836
1845
|
errorsThrown = [];
|
1837
|
-
|
1846
|
+
newConsult = undefined;
|
1847
|
+
stepsTotalNum = 6;
|
1848
|
+
case 5:
|
1838
1849
|
if (!(retry > 0)) {
|
1839
|
-
_context.next =
|
1850
|
+
_context.next = 54;
|
1840
1851
|
break;
|
1841
1852
|
}
|
1842
|
-
_context.prev =
|
1843
|
-
|
1844
|
-
|
1845
|
-
|
1846
|
-
|
1847
|
-
_context.next = 7;
|
1853
|
+
_context.prev = 6;
|
1854
|
+
currentStep = 0;
|
1855
|
+
if (onProgress) onProgress(currentStep++ / stepsTotalNum, 'create_consult');
|
1856
|
+
// Creating refill consult
|
1857
|
+
_context.next = 11;
|
1848
1858
|
return getOrCreatePatientConsultationUuid(consultRequest, oroClient);
|
1849
|
-
case
|
1859
|
+
case 11:
|
1850
1860
|
newConsult = _context.sent;
|
1851
|
-
|
1861
|
+
if (onProgress) onProgress(currentStep++ / stepsTotalNum, 'get_patient_grant');
|
1852
1862
|
if (lockboxUuid) {
|
1853
|
-
_context.next =
|
1863
|
+
_context.next = 17;
|
1854
1864
|
break;
|
1855
1865
|
}
|
1856
|
-
_context.next =
|
1866
|
+
_context.next = 16;
|
1857
1867
|
return oroClient.getGrants();
|
1858
|
-
case
|
1868
|
+
case 16:
|
1859
1869
|
lockboxUuid = _context.sent[0].lockboxUuid;
|
1860
|
-
case
|
1861
|
-
|
1870
|
+
case 17:
|
1871
|
+
if (onProgress) onProgress(currentStep++ / stepsTotalNum, 'store_patient_data');
|
1872
|
+
_context.next = 20;
|
1862
1873
|
return oroClient.getOrInsertJsonData(lockboxUuid, populatedRefillWorkflow, {
|
1863
1874
|
category: MetadataCategory.Refill,
|
1864
1875
|
documentType: DocumentType.PopulatedWorkflowData,
|
@@ -1866,39 +1877,95 @@ function _createRefill() {
|
|
1866
1877
|
}, {}, {
|
1867
1878
|
withNotification: true
|
1868
1879
|
})["catch"](function (err) {
|
1869
|
-
console.error('[SDK: prescription refill] Some errors happened during refill data upload', err);
|
1880
|
+
console.error('[SDK: prescription refill request] Some errors happened during refill data upload', err);
|
1870
1881
|
errorsThrown.push(err);
|
1871
1882
|
});
|
1872
|
-
case
|
1883
|
+
case 20:
|
1884
|
+
if (!indexSearch) {
|
1885
|
+
_context.next = 36;
|
1886
|
+
break;
|
1887
|
+
}
|
1888
|
+
if (onProgress) onProgress(currentStep++ / stepsTotalNum, 'fetching_parent_workflow_data');
|
1889
|
+
// raw workflow from parent consultation (contains first and last name of patient)
|
1890
|
+
_context.next = 24;
|
1891
|
+
return oroClient.getLockboxManifest(lockboxUuid, {
|
1892
|
+
category: MetadataCategory.Raw,
|
1893
|
+
consultationId: consultRequest.uuidParent
|
1894
|
+
}, false);
|
1895
|
+
case 24:
|
1896
|
+
rawConsultationManifest = _context.sent;
|
1897
|
+
if (!(rawConsultationManifest && rawConsultationManifest.length > 0)) {
|
1898
|
+
_context.next = 34;
|
1899
|
+
break;
|
1900
|
+
}
|
1901
|
+
_context.next = 28;
|
1902
|
+
return oroClient.getJsonData(lockboxUuid, rawConsultationManifest[0].dataUuid);
|
1903
|
+
case 28:
|
1904
|
+
rawConsultation = _context.sent;
|
1905
|
+
if (onProgress) onProgress(currentStep++ / stepsTotalNum, 'search_indexing');
|
1906
|
+
_context.next = 32;
|
1907
|
+
return buildConsultSearchIndex(newConsult, rawConsultation, oroClient)["catch"](function (err) {
|
1908
|
+
console.error('[SDK: prescription refill request] personal information not found or another error occured during search indexing', err);
|
1909
|
+
if (retry <= 1) return; // this statement is to avoid failing the registration due to the failure in search indexing the consult, this practically implements a soft retry
|
1910
|
+
errorsThrown.push(err);
|
1911
|
+
});
|
1912
|
+
case 32:
|
1913
|
+
_context.next = 36;
|
1914
|
+
break;
|
1915
|
+
case 34:
|
1916
|
+
console.error('[SDK: prescription refill request] parent consultation\'s raw data not found');
|
1917
|
+
errorsThrown.push(Error('RawData Not Found'));
|
1918
|
+
case 36:
|
1873
1919
|
if (!(errorsThrown.length > 0)) {
|
1874
|
-
_context.next =
|
1920
|
+
_context.next = 38;
|
1875
1921
|
break;
|
1876
1922
|
}
|
1877
1923
|
throw errorsThrown;
|
1878
|
-
case
|
1879
|
-
_context.next =
|
1924
|
+
case 38:
|
1925
|
+
_context.next = 40;
|
1880
1926
|
return oroClient.consultClient.updateConsultByUUID(newConsult.uuid, {
|
1881
1927
|
statusMedical: MedicalStatus.New
|
1882
1928
|
});
|
1883
|
-
case
|
1884
|
-
|
1885
|
-
|
1886
|
-
|
1887
|
-
|
1888
|
-
|
1889
|
-
|
1929
|
+
case 40:
|
1930
|
+
// if we got through the complete flow, the registration succeeded
|
1931
|
+
if (onProgress) onProgress(currentStep++ / stepsTotalNum, 'success');
|
1932
|
+
_context.next = 43;
|
1933
|
+
return oroClient.cleanIndex();
|
1934
|
+
case 43:
|
1935
|
+
return _context.abrupt("break", 54);
|
1936
|
+
case 46:
|
1937
|
+
_context.prev = 46;
|
1938
|
+
_context.t0 = _context["catch"](6);
|
1939
|
+
console.error("[SDK] Error occured during prescription refill request: " + _context.t0 + ", retrying... Retries remaining: " + retry);
|
1890
1940
|
errorsThrown = [];
|
1891
|
-
return _context.abrupt("continue",
|
1892
|
-
case
|
1941
|
+
return _context.abrupt("continue", 51);
|
1942
|
+
case 51:
|
1893
1943
|
retry--;
|
1894
|
-
_context.next =
|
1944
|
+
_context.next = 5;
|
1895
1945
|
break;
|
1896
|
-
case
|
1946
|
+
case 54:
|
1947
|
+
if (!(retry <= 0)) {
|
1948
|
+
_context.next = 57;
|
1949
|
+
break;
|
1950
|
+
}
|
1951
|
+
console.error('[SDK] prescription refill request failed: MAX_RETRIES reached');
|
1952
|
+
throw 'RegistrationFailed';
|
1953
|
+
case 57:
|
1954
|
+
if (newConsult) {
|
1955
|
+
_context.next = 60;
|
1956
|
+
break;
|
1957
|
+
}
|
1958
|
+
console.error('[SDK] prescription refill request failed: MAX_RETRIES reached');
|
1959
|
+
throw 'RegistrationFailed';
|
1960
|
+
case 60:
|
1961
|
+
console.log('Successfully Created refill');
|
1962
|
+
return _context.abrupt("return", newConsult);
|
1963
|
+
case 62:
|
1897
1964
|
case "end":
|
1898
1965
|
return _context.stop();
|
1899
1966
|
}
|
1900
1967
|
}
|
1901
|
-
}, _callee, null, [[
|
1968
|
+
}, _callee, null, [[6, 46]]);
|
1902
1969
|
}));
|
1903
1970
|
return _createRefill.apply(this, arguments);
|
1904
1971
|
}
|
@@ -1997,17 +2064,19 @@ var OroClient = /*#__PURE__*/function () {
|
|
1997
2064
|
return _cleanIndex.apply(this, arguments);
|
1998
2065
|
}
|
1999
2066
|
return cleanIndex;
|
2000
|
-
}()
|
2001
|
-
|
2002
|
-
|
2003
|
-
|
2004
|
-
|
2005
|
-
|
2006
|
-
|
2007
|
-
|
2008
|
-
|
2009
|
-
|
2010
|
-
|
2067
|
+
}()
|
2068
|
+
/**
|
2069
|
+
* Generates an RSA key pair and password payload (rsa private key encrypted with the password)
|
2070
|
+
* Calls Guard to sign up with the email address, password, practice, legal and token data
|
2071
|
+
*
|
2072
|
+
* @param email
|
2073
|
+
* @param password
|
2074
|
+
* @param practice
|
2075
|
+
* @param legal
|
2076
|
+
* @param tokenData
|
2077
|
+
* @returns
|
2078
|
+
*/
|
2079
|
+
;
|
2011
2080
|
_proto.signUp =
|
2012
2081
|
/*#__PURE__*/
|
2013
2082
|
function () {
|
@@ -2055,11 +2124,13 @@ var OroClient = /*#__PURE__*/function () {
|
|
2055
2124
|
return _signUp.apply(this, arguments);
|
2056
2125
|
}
|
2057
2126
|
return signUp;
|
2058
|
-
}()
|
2059
|
-
|
2060
|
-
|
2061
|
-
|
2062
|
-
|
2127
|
+
}()
|
2128
|
+
/**
|
2129
|
+
* Parse the given accessToken claims by calling guard whoami and update theidentity to set it's emailConfirmed flag
|
2130
|
+
* @param accessToken
|
2131
|
+
* @returns The identity related to confirmedEmail
|
2132
|
+
*/
|
2133
|
+
;
|
2063
2134
|
_proto.confirmEmail =
|
2064
2135
|
/*#__PURE__*/
|
2065
2136
|
function () {
|
@@ -2090,16 +2161,18 @@ var OroClient = /*#__PURE__*/function () {
|
|
2090
2161
|
return _confirmEmail.apply(this, arguments);
|
2091
2162
|
}
|
2092
2163
|
return confirmEmail;
|
2093
|
-
}()
|
2094
|
-
|
2095
|
-
|
2096
|
-
|
2097
|
-
|
2098
|
-
|
2099
|
-
|
2100
|
-
|
2101
|
-
|
2102
|
-
|
2164
|
+
}()
|
2165
|
+
/**
|
2166
|
+
* Calls Guard to sign in with the email address, password and one time password (if MFA is enabled)
|
2167
|
+
* Then recover's the rsa private key from the recovery payload
|
2168
|
+
*
|
2169
|
+
* @param practiceUuid
|
2170
|
+
* @param email
|
2171
|
+
* @param password
|
2172
|
+
* @param otp
|
2173
|
+
* @returns the user identity
|
2174
|
+
*/
|
2175
|
+
;
|
2103
2176
|
_proto.signIn =
|
2104
2177
|
/*#__PURE__*/
|
2105
2178
|
function () {
|
@@ -2141,10 +2214,12 @@ var OroClient = /*#__PURE__*/function () {
|
|
2141
2214
|
return _signIn.apply(this, arguments);
|
2142
2215
|
}
|
2143
2216
|
return signIn;
|
2144
|
-
}()
|
2145
|
-
|
2146
|
-
|
2147
|
-
|
2217
|
+
}()
|
2218
|
+
/**
|
2219
|
+
* Will attempt to recover an existing login session and set back
|
2220
|
+
* the private key in scope
|
2221
|
+
*/
|
2222
|
+
;
|
2148
2223
|
_proto.resumeSession =
|
2149
2224
|
/*#__PURE__*/
|
2150
2225
|
function () {
|
@@ -2183,13 +2258,15 @@ var OroClient = /*#__PURE__*/function () {
|
|
2183
2258
|
return _resumeSession.apply(this, arguments);
|
2184
2259
|
}
|
2185
2260
|
return resumeSession;
|
2186
|
-
}()
|
2187
|
-
|
2188
|
-
|
2189
|
-
|
2190
|
-
|
2191
|
-
|
2192
|
-
|
2261
|
+
}()
|
2262
|
+
/**
|
2263
|
+
* This function let's you encrypt locally an Object
|
2264
|
+
* @param value the Object to encrypt
|
2265
|
+
* @returns a LocalEncryptedData Object
|
2266
|
+
* @throws IncompleteAuthentication if rsa is not set
|
2267
|
+
* @calls authenticationCallback if rsa is not set
|
2268
|
+
*/
|
2269
|
+
;
|
2193
2270
|
_proto.localEncryptToJsonPayload = function localEncryptToJsonPayload(value) {
|
2194
2271
|
if (!this.rsa) {
|
2195
2272
|
if (this.authenticationCallback) {
|
@@ -2255,25 +2332,27 @@ var OroClient = /*#__PURE__*/function () {
|
|
2255
2332
|
return _signOut.apply(this, arguments);
|
2256
2333
|
}
|
2257
2334
|
return signOut;
|
2258
|
-
}()
|
2259
|
-
|
2260
|
-
|
2261
|
-
|
2262
|
-
|
2263
|
-
|
2264
|
-
|
2265
|
-
|
2266
|
-
|
2267
|
-
|
2268
|
-
|
2269
|
-
|
2270
|
-
|
2271
|
-
|
2272
|
-
|
2273
|
-
|
2274
|
-
|
2275
|
-
|
2276
|
-
|
2335
|
+
}()
|
2336
|
+
/**
|
2337
|
+
* @name registerPatient
|
2338
|
+
* @description The complete flow to register a patient
|
2339
|
+
*
|
2340
|
+
* Steps:
|
2341
|
+
* 1. Create a consult (checks if payment has been done)
|
2342
|
+
* 2. Creates a lockbox
|
2343
|
+
* 3. Grants lockbox access to all practice personnel
|
2344
|
+
* 4. Creates secure identification, medical, onboarding data
|
2345
|
+
* 5. Generates and stores the rsa key pair and recovery payloads
|
2346
|
+
*
|
2347
|
+
* @param patientUuid
|
2348
|
+
* @param consult
|
2349
|
+
* @param workflow
|
2350
|
+
* @param recoveryQA
|
2351
|
+
* @param indexSearch create search index for the consultation if true
|
2352
|
+
* @param onProgress callback that is called whenever a new step of patient registration is executed. Note: progress ranges from 0 to 1, and descriptionKey is a description of the progress as a key so the app would use it to translate the description
|
2353
|
+
* @returns
|
2354
|
+
*/
|
2355
|
+
;
|
2277
2356
|
_proto.registerPatient =
|
2278
2357
|
/*#__PURE__*/
|
2279
2358
|
function () {
|
@@ -2303,46 +2382,53 @@ var OroClient = /*#__PURE__*/function () {
|
|
2303
2382
|
return _registerPatient2.apply(this, arguments);
|
2304
2383
|
}
|
2305
2384
|
return registerPatient$1;
|
2306
|
-
}()
|
2307
|
-
|
2308
|
-
|
2309
|
-
|
2310
|
-
|
2311
|
-
|
2312
|
-
|
2313
|
-
|
2314
|
-
|
2315
|
-
|
2385
|
+
}()
|
2386
|
+
/**
|
2387
|
+
* Creates and stores all relevant refill data
|
2388
|
+
* - New consultation is created
|
2389
|
+
* - Stores refill workflow data in the lockbox
|
2390
|
+
* - Updates the consult to new
|
2391
|
+
*
|
2392
|
+
* @param consult
|
2393
|
+
* @param populatedRefillWorkflow
|
2394
|
+
* @returns
|
2395
|
+
*/
|
2396
|
+
;
|
2316
2397
|
_proto.createRefill =
|
2317
2398
|
/*#__PURE__*/
|
2318
2399
|
function () {
|
2319
|
-
var _createRefill2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(consult, populatedRefillWorkflow) {
|
2400
|
+
var _createRefill2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(consult, populatedRefillWorkflow, indexSearch, onProgress) {
|
2320
2401
|
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
2321
2402
|
while (1) {
|
2322
2403
|
switch (_context8.prev = _context8.next) {
|
2323
2404
|
case 0:
|
2405
|
+
if (indexSearch === void 0) {
|
2406
|
+
indexSearch = true;
|
2407
|
+
}
|
2324
2408
|
if (this.rsa) {
|
2325
|
-
_context8.next =
|
2409
|
+
_context8.next = 3;
|
2326
2410
|
break;
|
2327
2411
|
}
|
2328
2412
|
throw IncompleteAuthentication;
|
2329
|
-
case 2:
|
2330
|
-
return _context8.abrupt("return", createRefill(consult, populatedRefillWorkflow, this));
|
2331
2413
|
case 3:
|
2414
|
+
return _context8.abrupt("return", createRefill(consult, populatedRefillWorkflow, this, indexSearch, onProgress));
|
2415
|
+
case 4:
|
2332
2416
|
case "end":
|
2333
2417
|
return _context8.stop();
|
2334
2418
|
}
|
2335
2419
|
}
|
2336
2420
|
}, _callee8, this);
|
2337
2421
|
}));
|
2338
|
-
function createRefill$1(_x19, _x20) {
|
2422
|
+
function createRefill$1(_x19, _x20, _x21, _x22) {
|
2339
2423
|
return _createRefill2.apply(this, arguments);
|
2340
2424
|
}
|
2341
2425
|
return createRefill$1;
|
2342
|
-
}()
|
2343
|
-
|
2344
|
-
|
2345
|
-
|
2426
|
+
}()
|
2427
|
+
/**
|
2428
|
+
* Fetches all grants, and consultations that exist in each lockbox
|
2429
|
+
* Then updates the index for the current user with the lockbox consult relationship
|
2430
|
+
*/
|
2431
|
+
;
|
2346
2432
|
_proto.forceUpdateIndexEntries =
|
2347
2433
|
/*#__PURE__*/
|
2348
2434
|
function () {
|
@@ -2394,7 +2480,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
2394
2480
|
}
|
2395
2481
|
}, _callee9);
|
2396
2482
|
}));
|
2397
|
-
return function (
|
2483
|
+
return function (_x23) {
|
2398
2484
|
return _ref2.apply(this, arguments);
|
2399
2485
|
};
|
2400
2486
|
}())).then(function (consults) {
|
@@ -2418,12 +2504,14 @@ var OroClient = /*#__PURE__*/function () {
|
|
2418
2504
|
return _forceUpdateIndexEntries.apply(this, arguments);
|
2419
2505
|
}
|
2420
2506
|
return forceUpdateIndexEntries;
|
2421
|
-
}()
|
2422
|
-
|
2423
|
-
|
2424
|
-
|
2425
|
-
|
2426
|
-
|
2507
|
+
}()
|
2508
|
+
/**
|
2509
|
+
* Generates, encrypts and adds entries to vault index for a given index owner
|
2510
|
+
*
|
2511
|
+
* @param entries
|
2512
|
+
* @param indexOwnerUuid
|
2513
|
+
*/
|
2514
|
+
;
|
2427
2515
|
_proto.vaultIndexAdd =
|
2428
2516
|
/*#__PURE__*/
|
2429
2517
|
function () {
|
@@ -2496,17 +2584,19 @@ var OroClient = /*#__PURE__*/function () {
|
|
2496
2584
|
}
|
2497
2585
|
}, _callee11, this);
|
2498
2586
|
}));
|
2499
|
-
function vaultIndexAdd(
|
2587
|
+
function vaultIndexAdd(_x24, _x25) {
|
2500
2588
|
return _vaultIndexAdd.apply(this, arguments);
|
2501
2589
|
}
|
2502
2590
|
return vaultIndexAdd;
|
2503
|
-
}()
|
2504
|
-
|
2505
|
-
|
2506
|
-
|
2507
|
-
|
2508
|
-
|
2509
|
-
|
2591
|
+
}()
|
2592
|
+
/**
|
2593
|
+
* @name grantLockbox
|
2594
|
+
* @description Grants a lockbox by retrieving the shared secret of the lockbox and encrypting it with the grantees public key
|
2595
|
+
* @param granteeUuid
|
2596
|
+
* @param lockboxUuid
|
2597
|
+
* @param lockboxOwnerUuid the lockbox owner (ignored if lockbox is owned by self)
|
2598
|
+
*/
|
2599
|
+
;
|
2510
2600
|
_proto.grantLockbox =
|
2511
2601
|
/*#__PURE__*/
|
2512
2602
|
function () {
|
@@ -2545,20 +2635,22 @@ var OroClient = /*#__PURE__*/function () {
|
|
2545
2635
|
}
|
2546
2636
|
}, _callee12, this);
|
2547
2637
|
}));
|
2548
|
-
function grantLockbox(
|
2638
|
+
function grantLockbox(_x26, _x27, _x28) {
|
2549
2639
|
return _grantLockbox.apply(this, arguments);
|
2550
2640
|
}
|
2551
2641
|
return grantLockbox;
|
2552
|
-
}()
|
2553
|
-
|
2554
|
-
|
2555
|
-
|
2556
|
-
|
2557
|
-
|
2558
|
-
|
2559
|
-
|
2560
|
-
|
2561
|
-
|
2642
|
+
}()
|
2643
|
+
/**
|
2644
|
+
* @name createMessageData
|
2645
|
+
* @description Creates a Base64 encrypted Payload to send and store in the vault from a message string
|
2646
|
+
* @param lockboxUuid
|
2647
|
+
* @param message
|
2648
|
+
* @param consultationId the consultation for which this message is sent
|
2649
|
+
* @param lockboxOwnerUuid the lockbox owner (ignored if lockbox is owned by self)
|
2650
|
+
* @param previousDataUuid if it's a revision of existing file, specify the previous data uuid
|
2651
|
+
* @returns the data uuid
|
2652
|
+
*/
|
2653
|
+
;
|
2562
2654
|
_proto.createMessageData =
|
2563
2655
|
/*#__PURE__*/
|
2564
2656
|
function () {
|
@@ -2607,20 +2699,22 @@ var OroClient = /*#__PURE__*/function () {
|
|
2607
2699
|
}
|
2608
2700
|
}, _callee13, this);
|
2609
2701
|
}));
|
2610
|
-
function createMessageData(
|
2702
|
+
function createMessageData(_x29, _x30, _x31, _x32, _x33) {
|
2611
2703
|
return _createMessageData.apply(this, arguments);
|
2612
2704
|
}
|
2613
2705
|
return createMessageData;
|
2614
|
-
}()
|
2615
|
-
|
2616
|
-
|
2617
|
-
|
2618
|
-
|
2619
|
-
|
2620
|
-
|
2621
|
-
|
2622
|
-
|
2623
|
-
|
2706
|
+
}()
|
2707
|
+
/**
|
2708
|
+
* @name createMessageAttachmentData
|
2709
|
+
* @description Creates a Base64 encrypted Payload to send and store in the vault from a file
|
2710
|
+
* @param lockboxUuid
|
2711
|
+
* @param data the file stored
|
2712
|
+
* @param consultationId the consultation for which this message is sent
|
2713
|
+
* @param lockboxOwnerUuid the lockbox owner (ignored if lockbox is owned by self)
|
2714
|
+
* @param previousDataUuid if it's a revision of existing file, specify the previous data uuid
|
2715
|
+
* @returns the data uuid
|
2716
|
+
*/
|
2717
|
+
;
|
2624
2718
|
_proto.createMessageAttachmentData =
|
2625
2719
|
/*#__PURE__*/
|
2626
2720
|
function () {
|
@@ -2682,22 +2776,24 @@ var OroClient = /*#__PURE__*/function () {
|
|
2682
2776
|
}
|
2683
2777
|
}, _callee14, this);
|
2684
2778
|
}));
|
2685
|
-
function createMessageAttachmentData(
|
2779
|
+
function createMessageAttachmentData(_x34, _x35, _x36, _x37, _x38) {
|
2686
2780
|
return _createMessageAttachmentData.apply(this, arguments);
|
2687
2781
|
}
|
2688
2782
|
return createMessageAttachmentData;
|
2689
|
-
}()
|
2690
|
-
|
2691
|
-
|
2692
|
-
|
2693
|
-
|
2694
|
-
|
2695
|
-
|
2696
|
-
|
2697
|
-
|
2698
|
-
|
2699
|
-
|
2700
|
-
|
2783
|
+
}()
|
2784
|
+
/**
|
2785
|
+
* @name createAttachmentData
|
2786
|
+
* @description Creates a Base64 encrypted Payload to send and store in the vault from a file
|
2787
|
+
* @param lockboxUuid
|
2788
|
+
* @param data the file stored
|
2789
|
+
* @param consultationId the consultation for which this message is sent
|
2790
|
+
* @param category the category for the attachment data
|
2791
|
+
* @param lockboxOwnerUuid the lockbox owner (ignored if lockbox is owned by self)
|
2792
|
+
* @param previousDataUuid if it's a revision of existing file, specify the previous data uuid
|
2793
|
+
* @param withNotification if the insertion of data requires notification
|
2794
|
+
* @returns the data uuid
|
2795
|
+
*/
|
2796
|
+
;
|
2701
2797
|
_proto.createConsultationAttachmentData =
|
2702
2798
|
/*#__PURE__*/
|
2703
2799
|
function () {
|
@@ -2751,22 +2847,24 @@ var OroClient = /*#__PURE__*/function () {
|
|
2751
2847
|
}
|
2752
2848
|
}, _callee15, this);
|
2753
2849
|
}));
|
2754
|
-
function createConsultationAttachmentData(
|
2850
|
+
function createConsultationAttachmentData(_x39, _x40, _x41, _x42, _x43, _x44, _x45) {
|
2755
2851
|
return _createConsultationAttachmentData.apply(this, arguments);
|
2756
2852
|
}
|
2757
2853
|
return createConsultationAttachmentData;
|
2758
|
-
}()
|
2759
|
-
|
2760
|
-
|
2761
|
-
|
2762
|
-
|
2763
|
-
|
2764
|
-
|
2765
|
-
|
2766
|
-
|
2767
|
-
|
2768
|
-
|
2769
|
-
|
2854
|
+
}()
|
2855
|
+
/**
|
2856
|
+
* @name createJsonData
|
2857
|
+
* @description Creates a Base64 encrypted Payload to send and store in the vault. With the data input as a JSON
|
2858
|
+
* @param lockboxUuid
|
2859
|
+
* @param data
|
2860
|
+
* @param meta
|
2861
|
+
* @param privateMeta the metadata that will be secured in the vault
|
2862
|
+
* @param lockboxOwnerUuid the lockbox owner (ignored if lockbox is owned by self)
|
2863
|
+
* @param previousDataUuid if it's a revision of existing data, specify the previous data uuid
|
2864
|
+
* @param options if the insertion of data requires email notification
|
2865
|
+
* @returns the data uuid
|
2866
|
+
*/
|
2867
|
+
;
|
2770
2868
|
_proto.createJsonData =
|
2771
2869
|
/*#__PURE__*/
|
2772
2870
|
function () {
|
@@ -2812,20 +2910,22 @@ var OroClient = /*#__PURE__*/function () {
|
|
2812
2910
|
}
|
2813
2911
|
}, _callee16, this);
|
2814
2912
|
}));
|
2815
|
-
function createJsonData(
|
2913
|
+
function createJsonData(_x46, _x47, _x48, _x49, _x50, _x51, _x52) {
|
2816
2914
|
return _createJsonData.apply(this, arguments);
|
2817
2915
|
}
|
2818
2916
|
return createJsonData;
|
2819
|
-
}()
|
2820
|
-
|
2821
|
-
|
2822
|
-
|
2823
|
-
|
2824
|
-
|
2825
|
-
|
2826
|
-
|
2827
|
-
|
2828
|
-
|
2917
|
+
}()
|
2918
|
+
/**
|
2919
|
+
* Get or upsert a data in lockbox
|
2920
|
+
* @param lockboxUuid the lockbox uuid
|
2921
|
+
* @param data the data to insert
|
2922
|
+
* @param publicMetadata the public Metadata
|
2923
|
+
* @param privateMetadata the private Metadata
|
2924
|
+
* @param forceReplace set true when the insertion of data requires to replace the data when it exists already
|
2925
|
+
* @param options if the insertion of data requires email notification
|
2926
|
+
* @returns the data uuid
|
2927
|
+
*/
|
2928
|
+
;
|
2829
2929
|
_proto.getOrInsertJsonData =
|
2830
2930
|
/*#__PURE__*/
|
2831
2931
|
function () {
|
@@ -2870,22 +2970,24 @@ var OroClient = /*#__PURE__*/function () {
|
|
2870
2970
|
}
|
2871
2971
|
}, _callee17, this);
|
2872
2972
|
}));
|
2873
|
-
function getOrInsertJsonData(
|
2973
|
+
function getOrInsertJsonData(_x53, _x54, _x55, _x56, _x57) {
|
2874
2974
|
return _getOrInsertJsonData.apply(this, arguments);
|
2875
2975
|
}
|
2876
2976
|
return getOrInsertJsonData;
|
2877
|
-
}()
|
2878
|
-
|
2879
|
-
|
2880
|
-
|
2881
|
-
|
2882
|
-
|
2883
|
-
|
2884
|
-
|
2885
|
-
|
2886
|
-
|
2887
|
-
|
2888
|
-
|
2977
|
+
}()
|
2978
|
+
/**
|
2979
|
+
* @name createBytesData
|
2980
|
+
* @description Creates a Base64 encrypted Payload to send and store in the vault. With the data input as a Bytes
|
2981
|
+
* @param lockboxUuid
|
2982
|
+
* @param data
|
2983
|
+
* @param meta
|
2984
|
+
* @param privateMeta the metadata that will be secured in the vault
|
2985
|
+
* @param lockboxOwnerUuid the lockbox owner (ignored if lockbox is owned by self)
|
2986
|
+
* @param previousDataUuid if it's a revision of existing data, specify the previous data uuid
|
2987
|
+
* @param withNotification if the insertion of data requires notification
|
2988
|
+
* @returns the data uuid
|
2989
|
+
*/
|
2990
|
+
;
|
2889
2991
|
_proto.createBytesData =
|
2890
2992
|
/*#__PURE__*/
|
2891
2993
|
function () {
|
@@ -2931,21 +3033,23 @@ var OroClient = /*#__PURE__*/function () {
|
|
2931
3033
|
}
|
2932
3034
|
}, _callee18, this);
|
2933
3035
|
}));
|
2934
|
-
function createBytesData(
|
3036
|
+
function createBytesData(_x58, _x59, _x60, _x61, _x62, _x63, _x64) {
|
2935
3037
|
return _createBytesData.apply(this, arguments);
|
2936
3038
|
}
|
2937
3039
|
return createBytesData;
|
2938
|
-
}()
|
2939
|
-
|
2940
|
-
|
2941
|
-
|
2942
|
-
|
2943
|
-
|
2944
|
-
|
2945
|
-
|
2946
|
-
|
2947
|
-
|
2948
|
-
|
3040
|
+
}()
|
3041
|
+
/**
|
3042
|
+
* @name getJsonData
|
3043
|
+
* @description Fetches and decrypts the lockbox data with the cached shared secret.
|
3044
|
+
* Decrypts the data to a valid JSON object. If this is impossible, the call to the WASM binary will fail
|
3045
|
+
*
|
3046
|
+
* @type T is the generic type specifying the return type object of the function
|
3047
|
+
* @param lockboxUuid
|
3048
|
+
* @param dataUuid
|
3049
|
+
* @param lockboxOwnerUuid the lockbox owner (ignored if lockbox is owned by self)
|
3050
|
+
* @returns the data specified by the generic type <T>
|
3051
|
+
*/
|
3052
|
+
;
|
2949
3053
|
_proto.getJsonData =
|
2950
3054
|
/*#__PURE__*/
|
2951
3055
|
function () {
|
@@ -2975,17 +3079,19 @@ var OroClient = /*#__PURE__*/function () {
|
|
2975
3079
|
}
|
2976
3080
|
}, _callee19, this);
|
2977
3081
|
}));
|
2978
|
-
function getJsonData(
|
3082
|
+
function getJsonData(_x65, _x66, _x67) {
|
2979
3083
|
return _getJsonData.apply(this, arguments);
|
2980
3084
|
}
|
2981
3085
|
return getJsonData;
|
2982
|
-
}()
|
2983
|
-
|
2984
|
-
|
2985
|
-
|
2986
|
-
|
2987
|
-
|
2988
|
-
|
3086
|
+
}()
|
3087
|
+
/**
|
3088
|
+
* @description Fetches and decrypts the lockbox data with the cached shared secret.
|
3089
|
+
* @param lockboxUuid
|
3090
|
+
* @param dataUuid
|
3091
|
+
* @param lockboxOwnerUuid the lockbox owner (ignored if lockbox is owned by self)
|
3092
|
+
* @returns the bytes data
|
3093
|
+
*/
|
3094
|
+
;
|
2989
3095
|
_proto.getBytesData =
|
2990
3096
|
/*#__PURE__*/
|
2991
3097
|
function () {
|
@@ -3015,20 +3121,22 @@ var OroClient = /*#__PURE__*/function () {
|
|
3015
3121
|
}
|
3016
3122
|
}, _callee20, this);
|
3017
3123
|
}));
|
3018
|
-
function getBytesData(
|
3124
|
+
function getBytesData(_x68, _x69, _x70) {
|
3019
3125
|
return _getBytesData.apply(this, arguments);
|
3020
3126
|
}
|
3021
3127
|
return getBytesData;
|
3022
|
-
}()
|
3023
|
-
|
3024
|
-
|
3025
|
-
|
3026
|
-
|
3027
|
-
|
3028
|
-
|
3029
|
-
|
3030
|
-
|
3031
|
-
|
3128
|
+
}()
|
3129
|
+
/**
|
3130
|
+
* @name getGrants
|
3131
|
+
* @description Get all lockboxes granted to user with the applied filter
|
3132
|
+
* @note this function returns cached grants and will not update unless the page is refreshed
|
3133
|
+
* @todo some versions of lockboxes do not make use of lockbox metadata
|
3134
|
+
* in this case, all lockboxes need to be filtered one-by-one to find the correct one
|
3135
|
+
* Remove if this is no longer the case
|
3136
|
+
* @param filter: the consultationId in which the grant exists
|
3137
|
+
* @returns decrypted lockboxes granted to user
|
3138
|
+
*/
|
3139
|
+
;
|
3032
3140
|
_proto.getGrants =
|
3033
3141
|
/*#__PURE__*/
|
3034
3142
|
function () {
|
@@ -3124,15 +3232,17 @@ var OroClient = /*#__PURE__*/function () {
|
|
3124
3232
|
}
|
3125
3233
|
}, _callee21, this);
|
3126
3234
|
}));
|
3127
|
-
function getGrants(
|
3235
|
+
function getGrants(_x71) {
|
3128
3236
|
return _getGrants.apply(this, arguments);
|
3129
3237
|
}
|
3130
3238
|
return getGrants;
|
3131
|
-
}()
|
3132
|
-
|
3133
|
-
|
3134
|
-
|
3135
|
-
|
3239
|
+
}()
|
3240
|
+
/**
|
3241
|
+
* Fetches the role of the account that is logged in
|
3242
|
+
*
|
3243
|
+
* @returns the role based scopes defined by the whoami
|
3244
|
+
*/
|
3245
|
+
;
|
3136
3246
|
_proto.getAccountRole =
|
3137
3247
|
/*#__PURE__*/
|
3138
3248
|
function () {
|
@@ -3156,13 +3266,15 @@ var OroClient = /*#__PURE__*/function () {
|
|
3156
3266
|
return _getAccountRole.apply(this, arguments);
|
3157
3267
|
}
|
3158
3268
|
return getAccountRole;
|
3159
|
-
}()
|
3160
|
-
|
3161
|
-
|
3162
|
-
|
3163
|
-
|
3164
|
-
|
3165
|
-
|
3269
|
+
}()
|
3270
|
+
/**
|
3271
|
+
* @name getCachedSecretCryptor
|
3272
|
+
* @description Retrieves the cached lockbox secret or fetches the secret from vault, then creates the symmetric cryptor and stores it in memory
|
3273
|
+
* @param lockboxUuid
|
3274
|
+
* @param lockboxOwnerUuid the lockbox owner (ignored if lockbox is owned by self)
|
3275
|
+
* @returns
|
3276
|
+
*/
|
3277
|
+
;
|
3166
3278
|
_proto.getCachedSecretCryptor =
|
3167
3279
|
/*#__PURE__*/
|
3168
3280
|
function () {
|
@@ -3205,19 +3317,21 @@ var OroClient = /*#__PURE__*/function () {
|
|
3205
3317
|
}
|
3206
3318
|
}, _callee23, this);
|
3207
3319
|
}));
|
3208
|
-
function getCachedSecretCryptor(
|
3320
|
+
function getCachedSecretCryptor(_x72, _x73) {
|
3209
3321
|
return _getCachedSecretCryptor.apply(this, arguments);
|
3210
3322
|
}
|
3211
3323
|
return getCachedSecretCryptor;
|
3212
|
-
}()
|
3213
|
-
|
3214
|
-
|
3215
|
-
|
3216
|
-
|
3217
|
-
|
3218
|
-
|
3219
|
-
|
3220
|
-
|
3324
|
+
}()
|
3325
|
+
/**
|
3326
|
+
* Retrieves the patient personal information associated to the `consultationId`
|
3327
|
+
* The `consultationId` only helps to retrieve the patient lockboxes
|
3328
|
+
* Note: it is possible to have several personal informations data
|
3329
|
+
* @param consultationId The consultation Id
|
3330
|
+
* @param category The personal MetadataCategory to fetch
|
3331
|
+
* @param forceRefresh force data refresh (default to false)
|
3332
|
+
* @returns the personal data
|
3333
|
+
*/
|
3334
|
+
;
|
3221
3335
|
_proto.getPersonalInformationsFromConsultId =
|
3222
3336
|
/*#__PURE__*/
|
3223
3337
|
function () {
|
@@ -3239,18 +3353,20 @@ var OroClient = /*#__PURE__*/function () {
|
|
3239
3353
|
}
|
3240
3354
|
}, _callee24, this);
|
3241
3355
|
}));
|
3242
|
-
function getPersonalInformationsFromConsultId(
|
3356
|
+
function getPersonalInformationsFromConsultId(_x74, _x75, _x76) {
|
3243
3357
|
return _getPersonalInformationsFromConsultId.apply(this, arguments);
|
3244
3358
|
}
|
3245
3359
|
return getPersonalInformationsFromConsultId;
|
3246
|
-
}()
|
3247
|
-
|
3248
|
-
|
3249
|
-
|
3250
|
-
|
3251
|
-
|
3252
|
-
|
3253
|
-
|
3360
|
+
}()
|
3361
|
+
/**
|
3362
|
+
* Retrieves the patient medical data associated to the `consultationId`
|
3363
|
+
* The `consultationId` only helps to retrieve the patient lockboxes
|
3364
|
+
* Note: it is possible to have several medical data
|
3365
|
+
* @param consultationId The consultation Id
|
3366
|
+
* @param forceRefresh force data refresh (default to false)
|
3367
|
+
* @returns the medical data
|
3368
|
+
*/
|
3369
|
+
;
|
3254
3370
|
_proto.getMedicalDataFromConsultId =
|
3255
3371
|
/*#__PURE__*/
|
3256
3372
|
function () {
|
@@ -3272,7 +3388,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
3272
3388
|
}
|
3273
3389
|
}, _callee25, this);
|
3274
3390
|
}));
|
3275
|
-
function getMedicalDataFromConsultId(
|
3391
|
+
function getMedicalDataFromConsultId(_x77, _x78) {
|
3276
3392
|
return _getMedicalDataFromConsultId.apply(this, arguments);
|
3277
3393
|
}
|
3278
3394
|
return getMedicalDataFromConsultId;
|
@@ -3353,7 +3469,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
3353
3469
|
}
|
3354
3470
|
}, _callee26);
|
3355
3471
|
}));
|
3356
|
-
return function (
|
3472
|
+
return function (_x82) {
|
3357
3473
|
return _ref3.apply(this, arguments);
|
3358
3474
|
};
|
3359
3475
|
}()));
|
@@ -3386,15 +3502,17 @@ var OroClient = /*#__PURE__*/function () {
|
|
3386
3502
|
}
|
3387
3503
|
}, _callee27, this);
|
3388
3504
|
}));
|
3389
|
-
function getMetaCategoryFromConsultId(
|
3505
|
+
function getMetaCategoryFromConsultId(_x79, _x80, _x81) {
|
3390
3506
|
return _getMetaCategoryFromConsultId.apply(this, arguments);
|
3391
3507
|
}
|
3392
3508
|
return getMetaCategoryFromConsultId;
|
3393
|
-
}()
|
3394
|
-
|
3395
|
-
|
3396
|
-
|
3397
|
-
|
3509
|
+
}()
|
3510
|
+
/**
|
3511
|
+
* @description retrieves the personal information stored in the first owned lockbox
|
3512
|
+
* @param userId The user Id
|
3513
|
+
* @returns the personal data
|
3514
|
+
*/
|
3515
|
+
;
|
3398
3516
|
_proto.getPersonalInformations =
|
3399
3517
|
/*#__PURE__*/
|
3400
3518
|
function () {
|
@@ -3456,16 +3574,18 @@ var OroClient = /*#__PURE__*/function () {
|
|
3456
3574
|
}
|
3457
3575
|
}, _callee28, this);
|
3458
3576
|
}));
|
3459
|
-
function getPersonalInformations(
|
3577
|
+
function getPersonalInformations(_x83) {
|
3460
3578
|
return _getPersonalInformations.apply(this, arguments);
|
3461
3579
|
}
|
3462
3580
|
return getPersonalInformations;
|
3463
|
-
}()
|
3464
|
-
|
3465
|
-
|
3466
|
-
|
3467
|
-
|
3468
|
-
|
3581
|
+
}()
|
3582
|
+
/**
|
3583
|
+
* Retrieves the grant associated to a consultationId
|
3584
|
+
* @note returns the first grant only
|
3585
|
+
* @param consultationId The consultationId
|
3586
|
+
* @returns the grant
|
3587
|
+
*/
|
3588
|
+
;
|
3469
3589
|
_proto.getGrantFromConsultId =
|
3470
3590
|
/*#__PURE__*/
|
3471
3591
|
function () {
|
@@ -3495,15 +3615,17 @@ var OroClient = /*#__PURE__*/function () {
|
|
3495
3615
|
}
|
3496
3616
|
}, _callee29, this);
|
3497
3617
|
}));
|
3498
|
-
function getGrantFromConsultId(
|
3618
|
+
function getGrantFromConsultId(_x84) {
|
3499
3619
|
return _getGrantFromConsultId.apply(this, arguments);
|
3500
3620
|
}
|
3501
3621
|
return getGrantFromConsultId;
|
3502
|
-
}()
|
3503
|
-
|
3504
|
-
|
3505
|
-
|
3506
|
-
|
3622
|
+
}()
|
3623
|
+
/**
|
3624
|
+
* retrieves the identity associated to the `consultationId`
|
3625
|
+
* @param consultationId The consultation Id
|
3626
|
+
* @returns the identity
|
3627
|
+
*/
|
3628
|
+
;
|
3507
3629
|
_proto.getIdentityFromConsultId =
|
3508
3630
|
/*#__PURE__*/
|
3509
3631
|
function () {
|
@@ -3534,20 +3656,22 @@ var OroClient = /*#__PURE__*/function () {
|
|
3534
3656
|
}
|
3535
3657
|
}, _callee30, this);
|
3536
3658
|
}));
|
3537
|
-
function getIdentityFromConsultId(
|
3659
|
+
function getIdentityFromConsultId(_x85) {
|
3538
3660
|
return _getIdentityFromConsultId.apply(this, arguments);
|
3539
3661
|
}
|
3540
3662
|
return getIdentityFromConsultId;
|
3541
|
-
}()
|
3542
|
-
|
3543
|
-
|
3544
|
-
|
3545
|
-
|
3546
|
-
|
3547
|
-
|
3548
|
-
|
3549
|
-
|
3550
|
-
|
3663
|
+
}()
|
3664
|
+
/**
|
3665
|
+
* retrieves the lockbox manifest for a given lockbox and add's its private metadata
|
3666
|
+
* @note the lockbox manifest will retrieved the cached manifest first unless force refresh is enabled
|
3667
|
+
* @param lockboxUuid
|
3668
|
+
* @param filter
|
3669
|
+
* @param expandPrivateMetadata
|
3670
|
+
* @param lockboxOwnerUuid
|
3671
|
+
* @param forceRefresh
|
3672
|
+
* @returns the lockbox manifest
|
3673
|
+
*/
|
3674
|
+
;
|
3551
3675
|
_proto.getLockboxManifest =
|
3552
3676
|
/*#__PURE__*/
|
3553
3677
|
function () {
|
@@ -3601,7 +3725,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
3601
3725
|
}
|
3602
3726
|
}, _callee31);
|
3603
3727
|
}));
|
3604
|
-
return function (
|
3728
|
+
return function (_x91) {
|
3605
3729
|
return _ref4.apply(this, arguments);
|
3606
3730
|
};
|
3607
3731
|
}())).then(function (manifest) {
|
@@ -3615,17 +3739,19 @@ var OroClient = /*#__PURE__*/function () {
|
|
3615
3739
|
}
|
3616
3740
|
}, _callee32, this);
|
3617
3741
|
}));
|
3618
|
-
function getLockboxManifest(
|
3742
|
+
function getLockboxManifest(_x86, _x87, _x88, _x89, _x90) {
|
3619
3743
|
return _getLockboxManifest.apply(this, arguments);
|
3620
3744
|
}
|
3621
3745
|
return getLockboxManifest;
|
3622
|
-
}()
|
3623
|
-
|
3624
|
-
|
3625
|
-
|
3626
|
-
|
3627
|
-
|
3628
|
-
|
3746
|
+
}()
|
3747
|
+
/**
|
3748
|
+
* @description Create or update the personal information and store it in the first owned lockbox
|
3749
|
+
* @param identity The identity to use
|
3750
|
+
* @param data The personal data to store
|
3751
|
+
* @param dataUuid (optional) The dataUuid to update
|
3752
|
+
* @returns
|
3753
|
+
*/
|
3754
|
+
;
|
3629
3755
|
_proto.createPersonalInformations =
|
3630
3756
|
/*#__PURE__*/
|
3631
3757
|
function () {
|
@@ -3670,17 +3796,19 @@ var OroClient = /*#__PURE__*/function () {
|
|
3670
3796
|
}
|
3671
3797
|
}, _callee33, this);
|
3672
3798
|
}));
|
3673
|
-
function createPersonalInformations(
|
3799
|
+
function createPersonalInformations(_x92, _x93, _x94) {
|
3674
3800
|
return _createPersonalInformations.apply(this, arguments);
|
3675
3801
|
}
|
3676
3802
|
return createPersonalInformations;
|
3677
|
-
}()
|
3678
|
-
|
3679
|
-
|
3680
|
-
|
3681
|
-
|
3682
|
-
|
3683
|
-
|
3803
|
+
}()
|
3804
|
+
/**
|
3805
|
+
* Create or update user Preference
|
3806
|
+
* @param identity
|
3807
|
+
* @param preference
|
3808
|
+
* @param dataUuid
|
3809
|
+
* @returns
|
3810
|
+
*/
|
3811
|
+
;
|
3684
3812
|
_proto.createUserPreference =
|
3685
3813
|
/*#__PURE__*/
|
3686
3814
|
function () {
|
@@ -3725,15 +3853,17 @@ var OroClient = /*#__PURE__*/function () {
|
|
3725
3853
|
}
|
3726
3854
|
}, _callee34, this);
|
3727
3855
|
}));
|
3728
|
-
function createUserPreference(
|
3856
|
+
function createUserPreference(_x95, _x96, _x97) {
|
3729
3857
|
return _createUserPreference.apply(this, arguments);
|
3730
3858
|
}
|
3731
3859
|
return createUserPreference;
|
3732
|
-
}()
|
3733
|
-
|
3734
|
-
|
3735
|
-
|
3736
|
-
|
3860
|
+
}()
|
3861
|
+
/**
|
3862
|
+
* retrieves the user preference from a grant
|
3863
|
+
* @param grant The grant
|
3864
|
+
* @returns the user preference
|
3865
|
+
*/
|
3866
|
+
;
|
3737
3867
|
_proto.getDataFromGrant =
|
3738
3868
|
/*#__PURE__*/
|
3739
3869
|
function () {
|
@@ -3782,15 +3912,17 @@ var OroClient = /*#__PURE__*/function () {
|
|
3782
3912
|
}
|
3783
3913
|
}, _callee35, this);
|
3784
3914
|
}));
|
3785
|
-
function getDataFromGrant(
|
3915
|
+
function getDataFromGrant(_x98, _x99) {
|
3786
3916
|
return _getDataFromGrant.apply(this, arguments);
|
3787
3917
|
}
|
3788
3918
|
return getDataFromGrant;
|
3789
|
-
}()
|
3790
|
-
|
3791
|
-
|
3792
|
-
|
3793
|
-
|
3919
|
+
}()
|
3920
|
+
/**
|
3921
|
+
* retrieves the user preference from a consultation id
|
3922
|
+
* @param consultationId The related consultationId
|
3923
|
+
* @returns the user preference
|
3924
|
+
*/
|
3925
|
+
;
|
3794
3926
|
_proto.getUserPreferenceFromConsultId =
|
3795
3927
|
/*#__PURE__*/
|
3796
3928
|
function () {
|
@@ -3821,15 +3953,17 @@ var OroClient = /*#__PURE__*/function () {
|
|
3821
3953
|
}
|
3822
3954
|
}, _callee36, this);
|
3823
3955
|
}));
|
3824
|
-
function getUserPreferenceFromConsultId(
|
3956
|
+
function getUserPreferenceFromConsultId(_x100) {
|
3825
3957
|
return _getUserPreferenceFromConsultId.apply(this, arguments);
|
3826
3958
|
}
|
3827
3959
|
return getUserPreferenceFromConsultId;
|
3828
|
-
}()
|
3829
|
-
|
3830
|
-
|
3831
|
-
|
3832
|
-
|
3960
|
+
}()
|
3961
|
+
/**
|
3962
|
+
* retrieves the user preference stored in the first owned lockbox from identity
|
3963
|
+
* @param identity The identity to use
|
3964
|
+
* @returns the user preference
|
3965
|
+
*/
|
3966
|
+
;
|
3833
3967
|
_proto.getUserPreference =
|
3834
3968
|
/*#__PURE__*/
|
3835
3969
|
function () {
|
@@ -3862,15 +3996,17 @@ var OroClient = /*#__PURE__*/function () {
|
|
3862
3996
|
}
|
3863
3997
|
}, _callee37, this);
|
3864
3998
|
}));
|
3865
|
-
function getUserPreference(
|
3999
|
+
function getUserPreference(_x101) {
|
3866
4000
|
return _getUserPreference.apply(this, arguments);
|
3867
4001
|
}
|
3868
4002
|
return getUserPreference;
|
3869
|
-
}()
|
3870
|
-
|
3871
|
-
|
3872
|
-
|
3873
|
-
|
4003
|
+
}()
|
4004
|
+
/**
|
4005
|
+
* retrieves the user preference from a consultation id
|
4006
|
+
* @param consultationId The related consultationId
|
4007
|
+
* @returns the user preference
|
4008
|
+
*/
|
4009
|
+
;
|
3874
4010
|
_proto.getRecoveryDataFromConsultId =
|
3875
4011
|
/*#__PURE__*/
|
3876
4012
|
function () {
|
@@ -3901,15 +4037,17 @@ var OroClient = /*#__PURE__*/function () {
|
|
3901
4037
|
}
|
3902
4038
|
}, _callee38, this);
|
3903
4039
|
}));
|
3904
|
-
function getRecoveryDataFromConsultId(
|
4040
|
+
function getRecoveryDataFromConsultId(_x102) {
|
3905
4041
|
return _getRecoveryDataFromConsultId.apply(this, arguments);
|
3906
4042
|
}
|
3907
4043
|
return getRecoveryDataFromConsultId;
|
3908
|
-
}()
|
3909
|
-
|
3910
|
-
|
3911
|
-
|
3912
|
-
|
4044
|
+
}()
|
4045
|
+
/**
|
4046
|
+
* retrieves the user preference stored in the first owned lockbox from identity
|
4047
|
+
* @param identity The identity to use
|
4048
|
+
* @returns the user preference
|
4049
|
+
*/
|
4050
|
+
;
|
3913
4051
|
_proto.getRecoveryData =
|
3914
4052
|
/*#__PURE__*/
|
3915
4053
|
function () {
|
@@ -3942,20 +4080,22 @@ var OroClient = /*#__PURE__*/function () {
|
|
3942
4080
|
}
|
3943
4081
|
}, _callee39, this);
|
3944
4082
|
}));
|
3945
|
-
function getRecoveryData(
|
4083
|
+
function getRecoveryData(_x103) {
|
3946
4084
|
return _getRecoveryData.apply(this, arguments);
|
3947
4085
|
}
|
3948
4086
|
return getRecoveryData;
|
3949
|
-
}()
|
3950
|
-
|
3951
|
-
|
3952
|
-
|
3953
|
-
|
3954
|
-
|
3955
|
-
|
3956
|
-
|
3957
|
-
|
3958
|
-
|
4087
|
+
}()
|
4088
|
+
/**
|
4089
|
+
* @name getAssignedConsultations
|
4090
|
+
* @description finds all assigned or owned consultations for the logged user
|
4091
|
+
* Steps:
|
4092
|
+
* - Retrieves all granted lockboxes given to the logged user
|
4093
|
+
* - for each lockbox, find all consultation ids
|
4094
|
+
* - for each consultation id, retrieve the consult information
|
4095
|
+
* @param practiceUuid the uuid of the practice to look consult into
|
4096
|
+
* @returns the list of consults
|
4097
|
+
*/
|
4098
|
+
;
|
3959
4099
|
_proto.getAssignedConsultations =
|
3960
4100
|
/*#__PURE__*/
|
3961
4101
|
function () {
|
@@ -3991,7 +4131,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
3991
4131
|
}
|
3992
4132
|
}, _callee40);
|
3993
4133
|
}));
|
3994
|
-
return function (
|
4134
|
+
return function (_x105) {
|
3995
4135
|
return _ref5.apply(this, arguments);
|
3996
4136
|
};
|
3997
4137
|
}())).then(function (promise) {
|
@@ -4009,15 +4149,17 @@ var OroClient = /*#__PURE__*/function () {
|
|
4009
4149
|
}
|
4010
4150
|
}, _callee41, this);
|
4011
4151
|
}));
|
4012
|
-
function getAssignedConsultations(
|
4152
|
+
function getAssignedConsultations(_x104) {
|
4013
4153
|
return _getAssignedConsultations.apply(this, arguments);
|
4014
4154
|
}
|
4015
4155
|
return getAssignedConsultations;
|
4016
|
-
}()
|
4017
|
-
|
4018
|
-
|
4019
|
-
|
4020
|
-
|
4156
|
+
}()
|
4157
|
+
/**
|
4158
|
+
* Gets the past consultations of the patient as well as his relatives if any
|
4159
|
+
* @param consultationId any consultation uuid from which we will fetch all the other consultations of the same patient as the owner of this consultation id
|
4160
|
+
* @param practiceUuid
|
4161
|
+
*/
|
4162
|
+
;
|
4021
4163
|
_proto.getPastConsultationsFromConsultId =
|
4022
4164
|
/*#__PURE__*/
|
4023
4165
|
function () {
|
@@ -4071,7 +4213,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
4071
4213
|
}
|
4072
4214
|
}, _callee42);
|
4073
4215
|
}));
|
4074
|
-
return function (
|
4216
|
+
return function (_x108) {
|
4075
4217
|
return _ref6.apply(this, arguments);
|
4076
4218
|
};
|
4077
4219
|
}()));
|
@@ -4084,16 +4226,18 @@ var OroClient = /*#__PURE__*/function () {
|
|
4084
4226
|
}
|
4085
4227
|
}, _callee43, this);
|
4086
4228
|
}));
|
4087
|
-
function getPastConsultationsFromConsultId(
|
4229
|
+
function getPastConsultationsFromConsultId(_x106, _x107) {
|
4088
4230
|
return _getPastConsultationsFromConsultId.apply(this, arguments);
|
4089
4231
|
}
|
4090
4232
|
return getPastConsultationsFromConsultId;
|
4091
|
-
}()
|
4092
|
-
|
4093
|
-
|
4094
|
-
|
4095
|
-
|
4096
|
-
|
4233
|
+
}()
|
4234
|
+
/**
|
4235
|
+
* @name getPatientConsultationData
|
4236
|
+
* @description retrieves the consultation data
|
4237
|
+
* @param consultationId
|
4238
|
+
* @returns
|
4239
|
+
*/
|
4240
|
+
;
|
4097
4241
|
_proto.getPatientConsultationData =
|
4098
4242
|
/*#__PURE__*/
|
4099
4243
|
function () {
|
@@ -4135,15 +4279,17 @@ var OroClient = /*#__PURE__*/function () {
|
|
4135
4279
|
}
|
4136
4280
|
}, _callee44, this);
|
4137
4281
|
}));
|
4138
|
-
function getPatientConsultationData(
|
4282
|
+
function getPatientConsultationData(_x109, _x110) {
|
4139
4283
|
return _getPatientConsultationData.apply(this, arguments);
|
4140
4284
|
}
|
4141
4285
|
return getPatientConsultationData;
|
4142
|
-
}()
|
4143
|
-
|
4144
|
-
|
4145
|
-
|
4146
|
-
|
4286
|
+
}()
|
4287
|
+
/**
|
4288
|
+
* This function returns the patient prescriptions
|
4289
|
+
* @param consultationId
|
4290
|
+
* @returns
|
4291
|
+
*/
|
4292
|
+
;
|
4147
4293
|
_proto.getPatientPrescriptionsList =
|
4148
4294
|
/*#__PURE__*/
|
4149
4295
|
function () {
|
@@ -4163,15 +4309,17 @@ var OroClient = /*#__PURE__*/function () {
|
|
4163
4309
|
}
|
4164
4310
|
}, _callee45, this);
|
4165
4311
|
}));
|
4166
|
-
function getPatientPrescriptionsList(
|
4312
|
+
function getPatientPrescriptionsList(_x111) {
|
4167
4313
|
return _getPatientPrescriptionsList.apply(this, arguments);
|
4168
4314
|
}
|
4169
4315
|
return getPatientPrescriptionsList;
|
4170
|
-
}()
|
4171
|
-
|
4172
|
-
|
4173
|
-
|
4174
|
-
|
4316
|
+
}()
|
4317
|
+
/**
|
4318
|
+
* This function returns the patient results
|
4319
|
+
* @param consultationId
|
4320
|
+
* @returns
|
4321
|
+
*/
|
4322
|
+
;
|
4175
4323
|
_proto.getPatientResultsList =
|
4176
4324
|
/*#__PURE__*/
|
4177
4325
|
function () {
|
@@ -4191,15 +4339,17 @@ var OroClient = /*#__PURE__*/function () {
|
|
4191
4339
|
}
|
4192
4340
|
}, _callee46, this);
|
4193
4341
|
}));
|
4194
|
-
function getPatientResultsList(
|
4342
|
+
function getPatientResultsList(_x112) {
|
4195
4343
|
return _getPatientResultsList.apply(this, arguments);
|
4196
4344
|
}
|
4197
4345
|
return getPatientResultsList;
|
4198
|
-
}()
|
4199
|
-
|
4200
|
-
|
4201
|
-
|
4202
|
-
|
4346
|
+
}()
|
4347
|
+
/**
|
4348
|
+
* returns the patient treatment plan options
|
4349
|
+
* @param consultationId
|
4350
|
+
* @returns Document[] corresponding to the patient treatment plan options
|
4351
|
+
*/
|
4352
|
+
;
|
4203
4353
|
_proto.getPatientTreatmentPlans =
|
4204
4354
|
/*#__PURE__*/
|
4205
4355
|
function () {
|
@@ -4219,16 +4369,18 @@ var OroClient = /*#__PURE__*/function () {
|
|
4219
4369
|
}
|
4220
4370
|
}, _callee47, this);
|
4221
4371
|
}));
|
4222
|
-
function getPatientTreatmentPlans(
|
4372
|
+
function getPatientTreatmentPlans(_x113) {
|
4223
4373
|
return _getPatientTreatmentPlans.apply(this, arguments);
|
4224
4374
|
}
|
4225
4375
|
return getPatientTreatmentPlans;
|
4226
|
-
}()
|
4227
|
-
|
4228
|
-
|
4229
|
-
|
4230
|
-
|
4231
|
-
|
4376
|
+
}()
|
4377
|
+
/**
|
4378
|
+
* returns a specific patient treatment plan option
|
4379
|
+
* @param consultationId
|
4380
|
+
* @param treatmentPlanId
|
4381
|
+
* @returns
|
4382
|
+
*/
|
4383
|
+
;
|
4232
4384
|
_proto.getPatientTreatmentPlanByUuid =
|
4233
4385
|
/*#__PURE__*/
|
4234
4386
|
function () {
|
@@ -4249,19 +4401,21 @@ var OroClient = /*#__PURE__*/function () {
|
|
4249
4401
|
}
|
4250
4402
|
}, _callee48, this);
|
4251
4403
|
}));
|
4252
|
-
function getPatientTreatmentPlanByUuid(
|
4404
|
+
function getPatientTreatmentPlanByUuid(_x114, _x115) {
|
4253
4405
|
return _getPatientTreatmentPlanByUuid.apply(this, arguments);
|
4254
4406
|
}
|
4255
4407
|
return getPatientTreatmentPlanByUuid;
|
4256
|
-
}()
|
4257
|
-
|
4258
|
-
|
4259
|
-
|
4260
|
-
|
4261
|
-
|
4262
|
-
|
4263
|
-
|
4264
|
-
|
4408
|
+
}()
|
4409
|
+
/**
|
4410
|
+
* @name getPatientDocumentsList
|
4411
|
+
* @description applies the provided filter to the vault to only find those documents
|
4412
|
+
* @param filters the applied filters (e.g. type of documents)
|
4413
|
+
* @param expandPrivateMetadata whether or not, the private metadata needs to be retrieved
|
4414
|
+
* (more computationally expensive)
|
4415
|
+
* @param consultationId
|
4416
|
+
* @returns the filtered document list
|
4417
|
+
*/
|
4418
|
+
;
|
4265
4419
|
_proto.getPatientDocumentsList =
|
4266
4420
|
/*#__PURE__*/
|
4267
4421
|
function () {
|
@@ -4300,7 +4454,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
4300
4454
|
}
|
4301
4455
|
}, _callee49);
|
4302
4456
|
}));
|
4303
|
-
return function (
|
4457
|
+
return function (_x119) {
|
4304
4458
|
return _ref7.apply(this, arguments);
|
4305
4459
|
};
|
4306
4460
|
}()));
|
@@ -4316,7 +4470,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
4316
4470
|
}
|
4317
4471
|
}, _callee50, this);
|
4318
4472
|
}));
|
4319
|
-
function getPatientDocumentsList(
|
4473
|
+
function getPatientDocumentsList(_x116, _x117, _x118) {
|
4320
4474
|
return _getPatientDocumentsList.apply(this, arguments);
|
4321
4475
|
}
|
4322
4476
|
return getPatientDocumentsList;
|
@@ -4371,16 +4525,18 @@ var OroClient = /*#__PURE__*/function () {
|
|
4371
4525
|
}
|
4372
4526
|
}, _callee51, this);
|
4373
4527
|
}));
|
4374
|
-
function recoverPrivateKeyFromSecurityQuestions(
|
4528
|
+
function recoverPrivateKeyFromSecurityQuestions(_x120, _x121, _x122, _x123) {
|
4375
4529
|
return _recoverPrivateKeyFromSecurityQuestions.apply(this, arguments);
|
4376
4530
|
}
|
4377
4531
|
return recoverPrivateKeyFromSecurityQuestions;
|
4378
|
-
}()
|
4379
|
-
|
4380
|
-
|
4381
|
-
|
4382
|
-
|
4383
|
-
|
4532
|
+
}()
|
4533
|
+
/**
|
4534
|
+
* @name recoverPrivateKeyFromPassword
|
4535
|
+
* @description Recovers and sets the rsa private key from the password
|
4536
|
+
* @param id
|
4537
|
+
* @param password
|
4538
|
+
*/
|
4539
|
+
;
|
4384
4540
|
_proto.recoverPrivateKeyFromPassword =
|
4385
4541
|
/*#__PURE__*/
|
4386
4542
|
function () {
|
@@ -4410,16 +4566,18 @@ var OroClient = /*#__PURE__*/function () {
|
|
4410
4566
|
}
|
4411
4567
|
}, _callee52, this);
|
4412
4568
|
}));
|
4413
|
-
function recoverPrivateKeyFromPassword(
|
4569
|
+
function recoverPrivateKeyFromPassword(_x124, _x125) {
|
4414
4570
|
return _recoverPrivateKeyFromPassword.apply(this, arguments);
|
4415
4571
|
}
|
4416
4572
|
return recoverPrivateKeyFromPassword;
|
4417
|
-
}()
|
4418
|
-
|
4419
|
-
|
4420
|
-
|
4421
|
-
|
4422
|
-
|
4573
|
+
}()
|
4574
|
+
/**
|
4575
|
+
* @name recoverPrivateKeyFromMasterKey
|
4576
|
+
* @description Recovers and sets the rsa private key from the master key
|
4577
|
+
* @param id
|
4578
|
+
* @param masterKey
|
4579
|
+
*/
|
4580
|
+
;
|
4423
4581
|
_proto.recoverPrivateKeyFromMasterKey =
|
4424
4582
|
/*#__PURE__*/
|
4425
4583
|
function () {
|
@@ -4443,18 +4601,20 @@ var OroClient = /*#__PURE__*/function () {
|
|
4443
4601
|
}
|
4444
4602
|
}, _callee53, this);
|
4445
4603
|
}));
|
4446
|
-
function recoverPrivateKeyFromMasterKey(
|
4604
|
+
function recoverPrivateKeyFromMasterKey(_x126, _x127) {
|
4447
4605
|
return _recoverPrivateKeyFromMasterKey.apply(this, arguments);
|
4448
4606
|
}
|
4449
4607
|
return recoverPrivateKeyFromMasterKey;
|
4450
|
-
}()
|
4451
|
-
|
4452
|
-
|
4453
|
-
|
4454
|
-
|
4455
|
-
|
4456
|
-
|
4457
|
-
|
4608
|
+
}()
|
4609
|
+
/**
|
4610
|
+
* @description Generates and updates the security questions and answers payload using new recovery questions and answers
|
4611
|
+
* Important: Since the security questions generate a payload for the private key, they will never be stored on the device as they must remain secret!!!
|
4612
|
+
* @param id
|
4613
|
+
* @param recoverySecurityQuestions
|
4614
|
+
* @param recoverySecurityAnswers
|
4615
|
+
* @param threshold the number of answers needed to rebuild the secret
|
4616
|
+
*/
|
4617
|
+
;
|
4458
4618
|
_proto.updateSecurityQuestions =
|
4459
4619
|
/*#__PURE__*/
|
4460
4620
|
function () {
|
@@ -4485,21 +4645,23 @@ var OroClient = /*#__PURE__*/function () {
|
|
4485
4645
|
}
|
4486
4646
|
}, _callee54, this);
|
4487
4647
|
}));
|
4488
|
-
function updateSecurityQuestions(
|
4648
|
+
function updateSecurityQuestions(_x128, _x129, _x130, _x131) {
|
4489
4649
|
return _updateSecurityQuestions.apply(this, arguments);
|
4490
4650
|
}
|
4491
4651
|
return updateSecurityQuestions;
|
4492
|
-
}()
|
4493
|
-
|
4494
|
-
|
4495
|
-
|
4496
|
-
|
4497
|
-
|
4498
|
-
|
4499
|
-
|
4500
|
-
|
4501
|
-
|
4502
|
-
|
4652
|
+
}()
|
4653
|
+
/**
|
4654
|
+
* @description Generates and stores the payload encrypted payload and updates the password itself (double hash)
|
4655
|
+
* @important
|
4656
|
+
* the recovery payload uses a singly hashed password and the password stored is doubly hashed so
|
4657
|
+
* the stored password cannot derive the decryption key in the payload
|
4658
|
+
* @note
|
4659
|
+
* the old password must be provided when not performing an account recovery
|
4660
|
+
* @param id
|
4661
|
+
* @param newPassword
|
4662
|
+
* @param oldPassword
|
4663
|
+
*/
|
4664
|
+
;
|
4503
4665
|
_proto.updatePassword =
|
4504
4666
|
/*#__PURE__*/
|
4505
4667
|
function () {
|
@@ -4539,18 +4701,20 @@ var OroClient = /*#__PURE__*/function () {
|
|
4539
4701
|
}
|
4540
4702
|
}, _callee55, this);
|
4541
4703
|
}));
|
4542
|
-
function updatePassword(
|
4704
|
+
function updatePassword(_x132, _x133, _x134) {
|
4543
4705
|
return _updatePassword.apply(this, arguments);
|
4544
4706
|
}
|
4545
4707
|
return updatePassword;
|
4546
|
-
}()
|
4547
|
-
|
4548
|
-
|
4549
|
-
|
4550
|
-
|
4551
|
-
|
4552
|
-
|
4553
|
-
|
4708
|
+
}()
|
4709
|
+
/**
|
4710
|
+
* @description Generates and stores the master key encrypted payload
|
4711
|
+
* Important
|
4712
|
+
* Since the master key is used to generate a payload for the private key, it will never be stored on the device as it must remain secret!
|
4713
|
+
* @param id
|
4714
|
+
* @param masterKey
|
4715
|
+
* @param lockboxUuid
|
4716
|
+
*/
|
4717
|
+
;
|
4554
4718
|
_proto.updateMasterKey =
|
4555
4719
|
/*#__PURE__*/
|
4556
4720
|
function () {
|
@@ -4593,7 +4757,7 @@ var OroClient = /*#__PURE__*/function () {
|
|
4593
4757
|
}
|
4594
4758
|
}, _callee56, this);
|
4595
4759
|
}));
|
4596
|
-
function updateMasterKey(
|
4760
|
+
function updateMasterKey(_x135, _x136, _x137) {
|
4597
4761
|
return _updateMasterKey.apply(this, arguments);
|
4598
4762
|
}
|
4599
4763
|
return updateMasterKey;
|