oro-sdk 3.22.0 → 3.25.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1633,10 +1633,11 @@ var MAX_RETRIES = 15;
1633
1633
  * @param masterKey
1634
1634
  * @param recoveryQA
1635
1635
  * @param indexSearch create search index for the consultation if true
1636
+ * @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
1636
1637
  * @returns the successful registration
1637
1638
  */
1638
1639
 
1639
- function registerPatient(_x, _x2, _x3, _x4, _x5, _x6, _x7) {
1640
+ function registerPatient(_x, _x2, _x3, _x4, _x5, _x6, _x7, _x8) {
1640
1641
  return _registerPatient.apply(this, arguments);
1641
1642
  }
1642
1643
  /**
@@ -1647,8 +1648,8 @@ function registerPatient(_x, _x2, _x3, _x4, _x5, _x6, _x7) {
1647
1648
  */
1648
1649
 
1649
1650
  function _registerPatient() {
1650
- _registerPatient = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee4(patientUuid, consultRequest, workflow, oroClient, masterKey, recoveryQA, indexSearch) {
1651
- var consult, lockboxUuid, practitionerAdmin, retry, identity, errorsThrown, _ret;
1651
+ _registerPatient = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee4(patientUuid, consultRequest, workflow, oroClient, masterKey, recoveryQA, indexSearch, onProgress) {
1652
+ var consult, lockboxUuid, practitionerAdmin, retry, identity, errorsThrown, stepsTotalNum, currentStep, _ret;
1652
1653
 
1653
1654
  return runtime_1.wrap(function _callee4$(_context4) {
1654
1655
  while (1) {
@@ -1664,14 +1665,15 @@ function _registerPatient() {
1664
1665
  retry = MAX_RETRIES;
1665
1666
  identity = undefined;
1666
1667
  errorsThrown = [];
1668
+ stepsTotalNum = 9;
1667
1669
 
1668
- case 7:
1670
+ case 8:
1669
1671
  if (!(retry > 0)) {
1670
- _context4.next = 23;
1672
+ _context4.next = 24;
1671
1673
  break;
1672
1674
  }
1673
1675
 
1674
- _context4.prev = 8;
1676
+ _context4.prev = 9;
1675
1677
  return _context4.delegateYield( /*#__PURE__*/runtime_1.mark(function _callee3() {
1676
1678
  var _consultIndex, _identity, _identity2;
1677
1679
 
@@ -1680,70 +1682,78 @@ function _registerPatient() {
1680
1682
  while (1) {
1681
1683
  switch (_context3.prev = _context3.next) {
1682
1684
  case 0:
1683
- _context3.next = 2;
1685
+ currentStep = 0;
1686
+ if (onProgress) onProgress(currentStep++ / stepsTotalNum, 'retrieve_practitioners'); // Wait a bit each retry (we also want the first one to wait)
1687
+
1688
+ _context3.next = 4;
1684
1689
  return new Promise(function (resolve) {
1685
1690
  return setTimeout(resolve, 2000);
1686
1691
  });
1687
1692
 
1688
- case 2:
1693
+ case 4:
1689
1694
  if (practitionerAdmin) {
1690
- _context3.next = 6;
1695
+ _context3.next = 8;
1691
1696
  break;
1692
1697
  }
1693
1698
 
1694
- _context3.next = 5;
1699
+ _context3.next = 7;
1695
1700
  return oroClient.practiceClient.practiceGetFromUuid(consultRequest.uuidPractice);
1696
1701
 
1697
- case 5:
1702
+ case 7:
1698
1703
  practitionerAdmin = _context3.sent.uuidAdmin;
1699
1704
 
1700
- case 6:
1701
- _context3.next = 8;
1705
+ case 8:
1706
+ _context3.next = 10;
1702
1707
  return oroClient.practiceClient.practiceGetPractitioners(consultRequest.uuidPractice)["catch"](function (err) {
1703
1708
  console.log("Error retrieving practitioners", err);
1704
1709
  return [];
1705
1710
  });
1706
1711
 
1707
- case 8:
1712
+ case 10:
1708
1713
  practitioners = _context3.sent;
1714
+ // Creating consult
1715
+ if (onProgress) onProgress(currentStep++ / stepsTotalNum, 'create_consult');
1709
1716
 
1710
1717
  if (consult) {
1711
- _context3.next = 13;
1718
+ _context3.next = 16;
1712
1719
  break;
1713
1720
  }
1714
1721
 
1715
- _context3.next = 12;
1722
+ _context3.next = 15;
1716
1723
  return getOrCreatePatientConsultationUuid(consultRequest, oroClient);
1717
1724
 
1718
- case 12:
1725
+ case 15:
1719
1726
  consult = _context3.sent;
1720
1727
 
1721
- case 13:
1728
+ case 16:
1729
+ // Creating lockbox
1730
+ if (onProgress) onProgress(currentStep++ / stepsTotalNum, 'create_lockbox');
1731
+
1722
1732
  if (lockboxUuid) {
1723
- _context3.next = 17;
1733
+ _context3.next = 21;
1724
1734
  break;
1725
1735
  }
1726
1736
 
1727
- _context3.next = 16;
1737
+ _context3.next = 20;
1728
1738
  return getOrCreatePatientLockbox(oroClient);
1729
1739
 
1730
- case 16:
1740
+ case 20:
1731
1741
  lockboxUuid = _context3.sent;
1732
1742
 
1733
- case 17:
1743
+ case 21:
1734
1744
  if (identity) {
1735
- _context3.next = 21;
1745
+ _context3.next = 25;
1736
1746
  break;
1737
1747
  }
1738
1748
 
1739
- _context3.next = 20;
1749
+ _context3.next = 24;
1740
1750
  return oroClient.guardClient.identityGet(patientUuid);
1741
1751
 
1742
- case 20:
1752
+ case 24:
1743
1753
  identity = _context3.sent;
1744
1754
 
1745
- case 21:
1746
- _context3.next = 23;
1755
+ case 25:
1756
+ _context3.next = 27;
1747
1757
  return oroClient.grantLockbox(practitionerAdmin, lockboxUuid)["catch"](function (err) {
1748
1758
  console.error("Error while granting lockbox to practitioner admin " + practitionerAdmin, err); // if we cannot grant to the admin, then the registration will fail
1749
1759
 
@@ -1751,8 +1761,9 @@ function _registerPatient() {
1751
1761
  errorsThrown.push(err);
1752
1762
  });
1753
1763
 
1754
- case 23:
1764
+ case 27:
1755
1765
  // Patient Grant to practice
1766
+ if (onProgress) onProgress(currentStep++ / stepsTotalNum, 'grant_patient');
1756
1767
  grantPromises = practitioners.filter(function (practitioner) {
1757
1768
  return practitioner.uuid !== practitionerAdmin;
1758
1769
  }).map( /*#__PURE__*/function () {
@@ -1777,7 +1788,7 @@ function _registerPatient() {
1777
1788
  }, _callee);
1778
1789
  }));
1779
1790
 
1780
- return function (_x29) {
1791
+ return function (_x31) {
1781
1792
  return _ref.apply(this, arguments);
1782
1793
  };
1783
1794
  }());
@@ -1810,32 +1821,40 @@ function _registerPatient() {
1810
1821
  }, _callee2);
1811
1822
  }));
1812
1823
 
1813
- return function (_x30) {
1824
+ return function (_x32) {
1814
1825
  return _ref2.apply(this, arguments);
1815
1826
  };
1816
1827
  }());
1817
- _context3.next = 28;
1818
- return storeImageAliases(consult.uuid, lockboxUuid, workflow, oroClient)["catch"](function (err) {
1828
+ _context3.next = 33;
1829
+ return storeImageAliases(consult.uuid, lockboxUuid, workflow, oroClient, onProgress ? {
1830
+ onProgress: onProgress,
1831
+ currentStep: currentStep,
1832
+ stepsTotalNum: stepsTotalNum
1833
+ } : undefined)["catch"](function (err) {
1819
1834
  console.error('[SDK: registration] Some errors happened during image upload', err); // Acceptable to continue as images can be requested during the consultation, but we should still retry until the last retry remains
1820
1835
 
1821
1836
  // Acceptable to continue as images can be requested during the consultation, but we should still retry until the last retry remains
1822
1837
  if (retry <= 1) return;else errorsThrown.push(err);
1823
1838
  });
1824
1839
 
1825
- case 28:
1826
- _context3.next = 30;
1840
+ case 33:
1841
+ ++currentStep;
1842
+ if (onProgress) onProgress(currentStep++ / stepsTotalNum, 'store_patient_data');
1843
+ _context3.next = 37;
1827
1844
  return storePatientData(consult.uuid, consultRequest.isoLanguageRequired, lockboxUuid, workflow, oroClient)["catch"](function (err) {
1828
1845
  console.error('[SDK: registration] Some errors happened during patient data upload', err);
1829
1846
  errorsThrown.push(err);
1830
1847
  });
1831
1848
 
1832
- case 30:
1849
+ case 37:
1850
+ if (onProgress) onProgress(currentStep++ / stepsTotalNum, 'set_masterkey');
1851
+
1833
1852
  if (!(masterKey && !((_identity = identity) != null && _identity.recoveryMasterKey))) {
1834
- _context3.next = 36;
1853
+ _context3.next = 44;
1835
1854
  break;
1836
1855
  }
1837
1856
 
1838
- _context3.next = 33;
1857
+ _context3.next = 41;
1839
1858
  return oroClient.updateMasterKey(patientUuid, masterKey, lockboxUuid)["catch"](function (err) {
1840
1859
  console.error("[SDK: registration] Error while updating master key", err); /// it's acceptable to continue registration (return old identity)
1841
1860
 
@@ -1845,22 +1864,24 @@ function _registerPatient() {
1845
1864
  return identity;
1846
1865
  });
1847
1866
 
1848
- case 33:
1867
+ case 41:
1849
1868
  identity = _context3.sent;
1850
- _context3.next = 37;
1869
+ _context3.next = 45;
1851
1870
  break;
1852
1871
 
1853
- case 36:
1872
+ case 44:
1854
1873
  // we did not set the master key so we do not return it
1855
1874
  masterKey = undefined;
1856
1875
 
1857
- case 37:
1876
+ case 45:
1877
+ if (onProgress) onProgress(currentStep++ / stepsTotalNum, 'set_security_questions');
1878
+
1858
1879
  if (!(recoveryQA && !((_identity2 = identity) != null && _identity2.recoverySecurityQuestions))) {
1859
- _context3.next = 41;
1880
+ _context3.next = 50;
1860
1881
  break;
1861
1882
  }
1862
1883
 
1863
- _context3.next = 40;
1884
+ _context3.next = 49;
1864
1885
  return oroClient.updateSecurityQuestions(patientUuid, recoveryQA.recoverySecurityQuestions, recoveryQA.recoverySecurityAnswers, 2)["catch"](function (err) {
1865
1886
  console.error("[SDK: registration] Error while updating security questions", err); /// it's acceptable to continue registration (return old identity)
1866
1887
 
@@ -1870,20 +1891,22 @@ function _registerPatient() {
1870
1891
  return identity;
1871
1892
  });
1872
1893
 
1873
- case 40:
1894
+ case 49:
1874
1895
  identity = _context3.sent;
1875
1896
 
1876
- case 41:
1877
- _context3.next = 43;
1897
+ case 50:
1898
+ _context3.next = 52;
1878
1899
  return Promise.all([].concat(grantPromises, consultIndexPromises));
1879
1900
 
1880
- case 43:
1901
+ case 52:
1902
+ if (onProgress) onProgress(currentStep++ / stepsTotalNum, 'search_indexing');
1903
+
1881
1904
  if (!indexSearch) {
1882
- _context3.next = 46;
1905
+ _context3.next = 56;
1883
1906
  break;
1884
1907
  }
1885
1908
 
1886
- _context3.next = 46;
1909
+ _context3.next = 56;
1887
1910
  return buildConsultSearchIndex(consult, workflow, oroClient)["catch"](function (err) {
1888
1911
  console.error('[SDK: registration] personal information not found or another error occured during search indexing', err);
1889
1912
  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
@@ -1892,89 +1915,91 @@ function _registerPatient() {
1892
1915
  errorsThrown.push(err);
1893
1916
  });
1894
1917
 
1895
- case 46:
1918
+ case 56:
1896
1919
  if (!(errorsThrown.length > 0)) {
1897
- _context3.next = 48;
1920
+ _context3.next = 58;
1898
1921
  break;
1899
1922
  }
1900
1923
 
1901
1924
  throw errorsThrown;
1902
1925
 
1903
- case 48:
1904
- _context3.next = 50;
1926
+ case 58:
1927
+ _context3.next = 60;
1905
1928
  return oroClient.consultClient.updateConsultByUUID(consult.uuid, {
1906
1929
  statusMedical: MedicalStatus.New
1907
1930
  });
1908
1931
 
1909
- case 50:
1932
+ case 60:
1933
+ // if we got through the complete flow, the registration succeeded
1934
+ if (onProgress) onProgress(currentStep++ / stepsTotalNum, 'success');
1910
1935
  return _context3.abrupt("return", "break");
1911
1936
 
1912
- case 51:
1937
+ case 62:
1913
1938
  case "end":
1914
1939
  return _context3.stop();
1915
1940
  }
1916
1941
  }
1917
1942
  }, _callee3);
1918
- })(), "t0", 10);
1943
+ })(), "t0", 11);
1919
1944
 
1920
- case 10:
1945
+ case 11:
1921
1946
  _ret = _context4.t0;
1922
1947
 
1923
1948
  if (!(_ret === "break")) {
1924
- _context4.next = 13;
1949
+ _context4.next = 14;
1925
1950
  break;
1926
1951
  }
1927
1952
 
1928
- return _context4.abrupt("break", 23);
1953
+ return _context4.abrupt("break", 24);
1929
1954
 
1930
- case 13:
1931
- _context4.next = 20;
1955
+ case 14:
1956
+ _context4.next = 21;
1932
1957
  break;
1933
1958
 
1934
- case 15:
1935
- _context4.prev = 15;
1936
- _context4.t1 = _context4["catch"](8);
1959
+ case 16:
1960
+ _context4.prev = 16;
1961
+ _context4.t1 = _context4["catch"](9);
1937
1962
  console.error("[SDK] Error occured during registration: " + _context4.t1 + ", retrying... Retries remaining: " + retry);
1938
1963
  errorsThrown = [];
1939
- return _context4.abrupt("continue", 20);
1964
+ return _context4.abrupt("continue", 21);
1940
1965
 
1941
- case 20:
1966
+ case 21:
1942
1967
  retry--;
1943
- _context4.next = 7;
1968
+ _context4.next = 8;
1944
1969
  break;
1945
1970
 
1946
- case 23:
1971
+ case 24:
1947
1972
  if (!(retry <= 0)) {
1948
- _context4.next = 26;
1973
+ _context4.next = 27;
1949
1974
  break;
1950
1975
  }
1951
1976
 
1952
1977
  console.error('[SDK] registration failed: MAX_RETRIES reached');
1953
1978
  throw 'RegistrationFailed';
1954
1979
 
1955
- case 26:
1980
+ case 27:
1956
1981
  console.log('Successfully Registered');
1957
- _context4.next = 29;
1982
+ _context4.next = 30;
1958
1983
  return oroClient.cleanIndex();
1959
1984
 
1960
- case 29:
1985
+ case 30:
1961
1986
  return _context4.abrupt("return", {
1962
1987
  masterKey: masterKey,
1963
1988
  consultationId: consult.uuid,
1964
1989
  lockboxUuid: lockboxUuid
1965
1990
  });
1966
1991
 
1967
- case 30:
1992
+ case 31:
1968
1993
  case "end":
1969
1994
  return _context4.stop();
1970
1995
  }
1971
1996
  }
1972
- }, _callee4, null, [[8, 15]]);
1997
+ }, _callee4, null, [[9, 16]]);
1973
1998
  }));
1974
1999
  return _registerPatient.apply(this, arguments);
1975
2000
  }
1976
2001
 
1977
- function getOrCreatePatientConsultationUuid(_x8, _x9) {
2002
+ function getOrCreatePatientConsultationUuid(_x9, _x10) {
1978
2003
  return _getOrCreatePatientConsultationUuid.apply(this, arguments);
1979
2004
  }
1980
2005
  /**
@@ -2027,7 +2052,7 @@ function _getOrCreatePatientConsultationUuid() {
2027
2052
  return _getOrCreatePatientConsultationUuid.apply(this, arguments);
2028
2053
  }
2029
2054
 
2030
- function getOrCreatePatientLockbox(_x10) {
2055
+ function getOrCreatePatientLockbox(_x11) {
2031
2056
  return _getOrCreatePatientLockbox.apply(this, arguments);
2032
2057
  }
2033
2058
  /**
@@ -2099,7 +2124,7 @@ function _getOrCreatePatientLockbox() {
2099
2124
  return _getOrCreatePatientLockbox.apply(this, arguments);
2100
2125
  }
2101
2126
 
2102
- function storePatientData(_x11, _x12, _x13, _x14, _x15) {
2127
+ function storePatientData(_x12, _x13, _x14, _x15, _x16) {
2103
2128
  return _storePatientData.apply(this, arguments);
2104
2129
  }
2105
2130
 
@@ -2147,7 +2172,7 @@ function _storePatientData() {
2147
2172
  return _storePatientData.apply(this, arguments);
2148
2173
  }
2149
2174
 
2150
- function storeImageAliases(_x16, _x17, _x18, _x19) {
2175
+ function storeImageAliases(_x17, _x18, _x19, _x20, _x21) {
2151
2176
  return _storeImageAliases.apply(this, arguments);
2152
2177
  }
2153
2178
  /**
@@ -2162,8 +2187,8 @@ function storeImageAliases(_x16, _x17, _x18, _x19) {
2162
2187
 
2163
2188
 
2164
2189
  function _storeImageAliases() {
2165
- _storeImageAliases = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee8(consultationId, lockboxUuid, workflow, oroClient) {
2166
- var images, nonNullImages, promises;
2190
+ _storeImageAliases = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee8(consultationId, lockboxUuid, workflow, oroClient, progress) {
2191
+ var images, nonNullImages, storedImagesNum, totalImagesNum, promises;
2167
2192
  return runtime_1.wrap(function _callee8$(_context8) {
2168
2193
  while (1) {
2169
2194
  switch (_context8.prev = _context8.next) {
@@ -2187,17 +2212,32 @@ function _storeImageAliases() {
2187
2212
  console.error('[SDK] Some images have not been found, they have been skipped.');
2188
2213
  }
2189
2214
 
2215
+ storedImagesNum = 0;
2216
+ totalImagesNum = nonNullImages.length;
2217
+ if (progress) progress.onProgress(progress.currentStep / progress.stepsTotalNum, 'store_images', {
2218
+ storedImagesNum: storedImagesNum,
2219
+ totalImagesNum: totalImagesNum
2220
+ });
2190
2221
  promises = nonNullImages.map(function (image) {
2191
2222
  return oroClient.getOrInsertJsonData(lockboxUuid, image, {
2192
2223
  category: MetadataCategory.Consultation,
2193
2224
  documentType: DocumentType.ImageAlias,
2194
2225
  consultationId: consultationId,
2195
2226
  idbId: image.idbId
2196
- }, {});
2227
+ }, {}).then(function () {
2228
+ if (progress) {
2229
+ ++storedImagesNum;
2230
+ var progressStepValue = Math.round(((progress.currentStep + 1) / progress.stepsTotalNum - progress.currentStep / progress.stepsTotalNum) * 100) / 100;
2231
+ progress.onProgress(progress.currentStep / progress.stepsTotalNum + progressStepValue * (storedImagesNum / totalImagesNum), 'store_images', {
2232
+ storedImagesNum: storedImagesNum,
2233
+ totalImagesNum: totalImagesNum
2234
+ });
2235
+ }
2236
+ });
2197
2237
  });
2198
2238
  return _context8.abrupt("return", Promise.all(promises));
2199
2239
 
2200
- case 11:
2240
+ case 14:
2201
2241
  case "end":
2202
2242
  return _context8.stop();
2203
2243
  }
@@ -2207,7 +2247,7 @@ function _storeImageAliases() {
2207
2247
  return _storeImageAliases.apply(this, arguments);
2208
2248
  }
2209
2249
 
2210
- function extractAndStorePersonalWorkflowData(_x20, _x21, _x22, _x23, _x24) {
2250
+ function extractAndStorePersonalWorkflowData(_x22, _x23, _x24, _x25, _x26) {
2211
2251
  return _extractAndStorePersonalWorkflowData.apply(this, arguments);
2212
2252
  }
2213
2253
  /**
@@ -2240,7 +2280,7 @@ function _extractAndStorePersonalWorkflowData() {
2240
2280
  return _extractAndStorePersonalWorkflowData.apply(this, arguments);
2241
2281
  }
2242
2282
 
2243
- function extractPersonalInfoFromWorkflowData(_x25) {
2283
+ function extractPersonalInfoFromWorkflowData(_x27) {
2244
2284
  return _extractPersonalInfoFromWorkflowData.apply(this, arguments);
2245
2285
  }
2246
2286
  /**
@@ -2277,7 +2317,7 @@ function _extractPersonalInfoFromWorkflowData() {
2277
2317
  return _extractPersonalInfoFromWorkflowData.apply(this, arguments);
2278
2318
  }
2279
2319
 
2280
- function buildConsultSearchIndex(_x26, _x27, _x28) {
2320
+ function buildConsultSearchIndex(_x28, _x29, _x30) {
2281
2321
  return _buildConsultSearchIndex.apply(this, arguments);
2282
2322
  }
2283
2323
 
@@ -2830,6 +2870,7 @@ var OroClient = /*#__PURE__*/function () {
2830
2870
  * @param workflow
2831
2871
  * @param recoveryQA
2832
2872
  * @param indexSearch create search index for the consultation if true
2873
+ * @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
2833
2874
  * @returns
2834
2875
  */
2835
2876
  ;
@@ -2837,7 +2878,7 @@ var OroClient = /*#__PURE__*/function () {
2837
2878
  _proto.registerPatient =
2838
2879
  /*#__PURE__*/
2839
2880
  function () {
2840
- var _registerPatient2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee7(patientUuid, consult, workflow, recoveryQA, indexSearch) {
2881
+ var _registerPatient2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee7(patientUuid, consult, workflow, recoveryQA, indexSearch, onProgress) {
2841
2882
  return runtime_1.wrap(function _callee7$(_context7) {
2842
2883
  while (1) {
2843
2884
  switch (_context7.prev = _context7.next) {
@@ -2854,7 +2895,7 @@ var OroClient = /*#__PURE__*/function () {
2854
2895
  throw IncompleteAuthentication;
2855
2896
 
2856
2897
  case 3:
2857
- return _context7.abrupt("return", registerPatient(patientUuid, consult, workflow, this, this.toolbox.uuid(), recoveryQA, indexSearch));
2898
+ return _context7.abrupt("return", registerPatient(patientUuid, consult, workflow, this, this.toolbox.uuid(), recoveryQA, indexSearch, onProgress));
2858
2899
 
2859
2900
  case 4:
2860
2901
  case "end":
@@ -2864,7 +2905,7 @@ var OroClient = /*#__PURE__*/function () {
2864
2905
  }, _callee7, this);
2865
2906
  }));
2866
2907
 
2867
- function registerPatient$1(_x13, _x14, _x15, _x16, _x17) {
2908
+ function registerPatient$1(_x13, _x14, _x15, _x16, _x17, _x18) {
2868
2909
  return _registerPatient2.apply(this, arguments);
2869
2910
  }
2870
2911
 
@@ -2932,7 +2973,7 @@ var OroClient = /*#__PURE__*/function () {
2932
2973
  }, _callee8);
2933
2974
  }));
2934
2975
 
2935
- return function (_x18) {
2976
+ return function (_x19) {
2936
2977
  return _ref2.apply(this, arguments);
2937
2978
  };
2938
2979
  }())).then(function (consults) {
@@ -3055,7 +3096,7 @@ var OroClient = /*#__PURE__*/function () {
3055
3096
  }, _callee10, this);
3056
3097
  }));
3057
3098
 
3058
- function vaultIndexAdd(_x19, _x20) {
3099
+ function vaultIndexAdd(_x20, _x21) {
3059
3100
  return _vaultIndexAdd.apply(this, arguments);
3060
3101
  }
3061
3102
 
@@ -3114,7 +3155,7 @@ var OroClient = /*#__PURE__*/function () {
3114
3155
  }, _callee11, this);
3115
3156
  }));
3116
3157
 
3117
- function grantLockbox(_x21, _x22, _x23) {
3158
+ function grantLockbox(_x22, _x23, _x24) {
3118
3159
  return _grantLockbox.apply(this, arguments);
3119
3160
  }
3120
3161
 
@@ -3186,7 +3227,7 @@ var OroClient = /*#__PURE__*/function () {
3186
3227
  }, _callee12, this);
3187
3228
  }));
3188
3229
 
3189
- function createMessageData(_x24, _x25, _x26, _x27, _x28) {
3230
+ function createMessageData(_x25, _x26, _x27, _x28, _x29) {
3190
3231
  return _createMessageData.apply(this, arguments);
3191
3232
  }
3192
3233
 
@@ -3272,7 +3313,7 @@ var OroClient = /*#__PURE__*/function () {
3272
3313
  }, _callee13, this);
3273
3314
  }));
3274
3315
 
3275
- function createMessageAttachmentData(_x29, _x30, _x31, _x32, _x33) {
3316
+ function createMessageAttachmentData(_x30, _x31, _x32, _x33, _x34) {
3276
3317
  return _createMessageAttachmentData.apply(this, arguments);
3277
3318
  }
3278
3319
 
@@ -3344,7 +3385,7 @@ var OroClient = /*#__PURE__*/function () {
3344
3385
  }, _callee14, this);
3345
3386
  }));
3346
3387
 
3347
- function createConsultationAttachmentData(_x34, _x35, _x36, _x37, _x38, _x39) {
3388
+ function createConsultationAttachmentData(_x35, _x36, _x37, _x38, _x39, _x40) {
3348
3389
  return _createConsultationAttachmentData.apply(this, arguments);
3349
3390
  }
3350
3391
 
@@ -3402,7 +3443,7 @@ var OroClient = /*#__PURE__*/function () {
3402
3443
  }, _callee15, this);
3403
3444
  }));
3404
3445
 
3405
- function createJsonData(_x40, _x41, _x42, _x43, _x44, _x45) {
3446
+ function createJsonData(_x41, _x42, _x43, _x44, _x45, _x46) {
3406
3447
  return _createJsonData.apply(this, arguments);
3407
3448
  }
3408
3449
 
@@ -3465,7 +3506,7 @@ var OroClient = /*#__PURE__*/function () {
3465
3506
  }, _callee16, this);
3466
3507
  }));
3467
3508
 
3468
- function getOrInsertJsonData(_x46, _x47, _x48, _x49, _x50) {
3509
+ function getOrInsertJsonData(_x47, _x48, _x49, _x50, _x51) {
3469
3510
  return _getOrInsertJsonData.apply(this, arguments);
3470
3511
  }
3471
3512
 
@@ -3523,7 +3564,7 @@ var OroClient = /*#__PURE__*/function () {
3523
3564
  }, _callee17, this);
3524
3565
  }));
3525
3566
 
3526
- function createBytesData(_x51, _x52, _x53, _x54, _x55, _x56) {
3567
+ function createBytesData(_x52, _x53, _x54, _x55, _x56, _x57) {
3527
3568
  return _createBytesData.apply(this, arguments);
3528
3569
  }
3529
3570
 
@@ -3577,7 +3618,7 @@ var OroClient = /*#__PURE__*/function () {
3577
3618
  }, _callee18, this);
3578
3619
  }));
3579
3620
 
3580
- function getJsonData(_x57, _x58, _x59) {
3621
+ function getJsonData(_x58, _x59, _x60) {
3581
3622
  return _getJsonData.apply(this, arguments);
3582
3623
  }
3583
3624
 
@@ -3627,7 +3668,7 @@ var OroClient = /*#__PURE__*/function () {
3627
3668
  }, _callee19, this);
3628
3669
  }));
3629
3670
 
3630
- function getBytesData(_x60, _x61, _x62) {
3671
+ function getBytesData(_x61, _x62, _x63) {
3631
3672
  return _getBytesData.apply(this, arguments);
3632
3673
  }
3633
3674
 
@@ -3765,7 +3806,7 @@ var OroClient = /*#__PURE__*/function () {
3765
3806
  }, _callee20, this);
3766
3807
  }));
3767
3808
 
3768
- function getGrants(_x63) {
3809
+ function getGrants(_x64) {
3769
3810
  return _getGrants.apply(this, arguments);
3770
3811
  }
3771
3812
 
@@ -3865,7 +3906,7 @@ var OroClient = /*#__PURE__*/function () {
3865
3906
  }, _callee22, this);
3866
3907
  }));
3867
3908
 
3868
- function getCachedSecretCryptor(_x64, _x65) {
3909
+ function getCachedSecretCryptor(_x65, _x66) {
3869
3910
  return _getCachedSecretCryptor.apply(this, arguments);
3870
3911
  }
3871
3912
 
@@ -3904,7 +3945,7 @@ var OroClient = /*#__PURE__*/function () {
3904
3945
  }, _callee23, this);
3905
3946
  }));
3906
3947
 
3907
- function getPersonalInformationsFromConsultId(_x66, _x67, _x68) {
3948
+ function getPersonalInformationsFromConsultId(_x67, _x68, _x69) {
3908
3949
  return _getPersonalInformationsFromConsultId.apply(this, arguments);
3909
3950
  }
3910
3951
 
@@ -3942,7 +3983,7 @@ var OroClient = /*#__PURE__*/function () {
3942
3983
  }, _callee24, this);
3943
3984
  }));
3944
3985
 
3945
- function getMedicalDataFromConsultId(_x69, _x70) {
3986
+ function getMedicalDataFromConsultId(_x70, _x71) {
3946
3987
  return _getMedicalDataFromConsultId.apply(this, arguments);
3947
3988
  }
3948
3989
 
@@ -4035,7 +4076,7 @@ var OroClient = /*#__PURE__*/function () {
4035
4076
  }, _callee25);
4036
4077
  }));
4037
4078
 
4038
- return function (_x74) {
4079
+ return function (_x75) {
4039
4080
  return _ref3.apply(this, arguments);
4040
4081
  };
4041
4082
  }()));
@@ -4076,7 +4117,7 @@ var OroClient = /*#__PURE__*/function () {
4076
4117
  }, _callee26, this);
4077
4118
  }));
4078
4119
 
4079
- function getMetaCategoryFromConsultId(_x71, _x72, _x73) {
4120
+ function getMetaCategoryFromConsultId(_x72, _x73, _x74) {
4080
4121
  return _getMetaCategoryFromConsultId.apply(this, arguments);
4081
4122
  }
4082
4123
 
@@ -4163,7 +4204,7 @@ var OroClient = /*#__PURE__*/function () {
4163
4204
  }, _callee27, this);
4164
4205
  }));
4165
4206
 
4166
- function getPersonalInformations(_x75) {
4207
+ function getPersonalInformations(_x76) {
4167
4208
  return _getPersonalInformations.apply(this, arguments);
4168
4209
  }
4169
4210
 
@@ -4212,7 +4253,7 @@ var OroClient = /*#__PURE__*/function () {
4212
4253
  }, _callee28, this);
4213
4254
  }));
4214
4255
 
4215
- function getGrantFromConsultId(_x76) {
4256
+ function getGrantFromConsultId(_x77) {
4216
4257
  return _getGrantFromConsultId.apply(this, arguments);
4217
4258
  }
4218
4259
 
@@ -4262,7 +4303,7 @@ var OroClient = /*#__PURE__*/function () {
4262
4303
  }, _callee29, this);
4263
4304
  }));
4264
4305
 
4265
- function getIdentityFromConsultId(_x77) {
4306
+ function getIdentityFromConsultId(_x78) {
4266
4307
  return _getIdentityFromConsultId.apply(this, arguments);
4267
4308
  }
4268
4309
 
@@ -4341,7 +4382,7 @@ var OroClient = /*#__PURE__*/function () {
4341
4382
  }, _callee30);
4342
4383
  }));
4343
4384
 
4344
- return function (_x83) {
4385
+ return function (_x84) {
4345
4386
  return _ref4.apply(this, arguments);
4346
4387
  };
4347
4388
  }())).then(function (manifest) {
@@ -4357,7 +4398,7 @@ var OroClient = /*#__PURE__*/function () {
4357
4398
  }, _callee31, this);
4358
4399
  }));
4359
4400
 
4360
- function getLockboxManifest(_x78, _x79, _x80, _x81, _x82) {
4401
+ function getLockboxManifest(_x79, _x80, _x81, _x82, _x83) {
4361
4402
  return _getLockboxManifest.apply(this, arguments);
4362
4403
  }
4363
4404
 
@@ -4427,7 +4468,7 @@ var OroClient = /*#__PURE__*/function () {
4427
4468
  }, _callee32, this);
4428
4469
  }));
4429
4470
 
4430
- function createPersonalInformations(_x84, _x85, _x86) {
4471
+ function createPersonalInformations(_x85, _x86, _x87) {
4431
4472
  return _createPersonalInformations.apply(this, arguments);
4432
4473
  }
4433
4474
 
@@ -4497,7 +4538,7 @@ var OroClient = /*#__PURE__*/function () {
4497
4538
  }, _callee33, this);
4498
4539
  }));
4499
4540
 
4500
- function createUserPreference(_x87, _x88, _x89) {
4541
+ function createUserPreference(_x88, _x89, _x90) {
4501
4542
  return _createUserPreference.apply(this, arguments);
4502
4543
  }
4503
4544
 
@@ -4565,7 +4606,7 @@ var OroClient = /*#__PURE__*/function () {
4565
4606
  }, _callee34, this);
4566
4607
  }));
4567
4608
 
4568
- function getDataFromGrant(_x90, _x91) {
4609
+ function getDataFromGrant(_x91, _x92) {
4569
4610
  return _getDataFromGrant.apply(this, arguments);
4570
4611
  }
4571
4612
 
@@ -4614,7 +4655,7 @@ var OroClient = /*#__PURE__*/function () {
4614
4655
  }, _callee35, this);
4615
4656
  }));
4616
4657
 
4617
- function getUserPreferenceFromConsultId(_x92) {
4658
+ function getUserPreferenceFromConsultId(_x93) {
4618
4659
  return _getUserPreferenceFromConsultId.apply(this, arguments);
4619
4660
  }
4620
4661
 
@@ -4665,7 +4706,7 @@ var OroClient = /*#__PURE__*/function () {
4665
4706
  }, _callee36, this);
4666
4707
  }));
4667
4708
 
4668
- function getUserPreference(_x93) {
4709
+ function getUserPreference(_x94) {
4669
4710
  return _getUserPreference.apply(this, arguments);
4670
4711
  }
4671
4712
 
@@ -4714,7 +4755,7 @@ var OroClient = /*#__PURE__*/function () {
4714
4755
  }, _callee37, this);
4715
4756
  }));
4716
4757
 
4717
- function getRecoveryDataFromConsultId(_x94) {
4758
+ function getRecoveryDataFromConsultId(_x95) {
4718
4759
  return _getRecoveryDataFromConsultId.apply(this, arguments);
4719
4760
  }
4720
4761
 
@@ -4765,7 +4806,7 @@ var OroClient = /*#__PURE__*/function () {
4765
4806
  }, _callee38, this);
4766
4807
  }));
4767
4808
 
4768
- function getRecoveryData(_x95) {
4809
+ function getRecoveryData(_x96) {
4769
4810
  return _getRecoveryData.apply(this, arguments);
4770
4811
  }
4771
4812
 
@@ -4823,7 +4864,7 @@ var OroClient = /*#__PURE__*/function () {
4823
4864
  }, _callee39);
4824
4865
  }));
4825
4866
 
4826
- return function (_x97) {
4867
+ return function (_x98) {
4827
4868
  return _ref5.apply(this, arguments);
4828
4869
  };
4829
4870
  }())).then(function (promise) {
@@ -4843,7 +4884,7 @@ var OroClient = /*#__PURE__*/function () {
4843
4884
  }, _callee40, this);
4844
4885
  }));
4845
4886
 
4846
- function getAssignedConsultations(_x96) {
4887
+ function getAssignedConsultations(_x97) {
4847
4888
  return _getAssignedConsultations.apply(this, arguments);
4848
4889
  }
4849
4890
 
@@ -4921,7 +4962,7 @@ var OroClient = /*#__PURE__*/function () {
4921
4962
  }, _callee41);
4922
4963
  }));
4923
4964
 
4924
- return function (_x100) {
4965
+ return function (_x101) {
4925
4966
  return _ref6.apply(this, arguments);
4926
4967
  };
4927
4968
  }()));
@@ -4937,7 +4978,7 @@ var OroClient = /*#__PURE__*/function () {
4937
4978
  }, _callee42, this);
4938
4979
  }));
4939
4980
 
4940
- function getPastConsultationsFromConsultId(_x98, _x99) {
4981
+ function getPastConsultationsFromConsultId(_x99, _x100) {
4941
4982
  return _getPastConsultationsFromConsultId.apply(this, arguments);
4942
4983
  }
4943
4984
 
@@ -4995,7 +5036,7 @@ var OroClient = /*#__PURE__*/function () {
4995
5036
  }, _callee43, this);
4996
5037
  }));
4997
5038
 
4998
- function getPatientConsultationData(_x101, _x102) {
5039
+ function getPatientConsultationData(_x102, _x103) {
4999
5040
  return _getPatientConsultationData.apply(this, arguments);
5000
5041
  }
5001
5042
 
@@ -5029,7 +5070,7 @@ var OroClient = /*#__PURE__*/function () {
5029
5070
  }, _callee44, this);
5030
5071
  }));
5031
5072
 
5032
- function getPatientPrescriptionsList(_x103) {
5073
+ function getPatientPrescriptionsList(_x104) {
5033
5074
  return _getPatientPrescriptionsList.apply(this, arguments);
5034
5075
  }
5035
5076
 
@@ -5063,7 +5104,7 @@ var OroClient = /*#__PURE__*/function () {
5063
5104
  }, _callee45, this);
5064
5105
  }));
5065
5106
 
5066
- function getPatientResultsList(_x104) {
5107
+ function getPatientResultsList(_x105) {
5067
5108
  return _getPatientResultsList.apply(this, arguments);
5068
5109
  }
5069
5110
 
@@ -5097,7 +5138,7 @@ var OroClient = /*#__PURE__*/function () {
5097
5138
  }, _callee46, this);
5098
5139
  }));
5099
5140
 
5100
- function getPatientTreatmentPlans(_x105) {
5141
+ function getPatientTreatmentPlans(_x106) {
5101
5142
  return _getPatientTreatmentPlans.apply(this, arguments);
5102
5143
  }
5103
5144
 
@@ -5133,7 +5174,7 @@ var OroClient = /*#__PURE__*/function () {
5133
5174
  }, _callee47, this);
5134
5175
  }));
5135
5176
 
5136
- function getPatientTreatmentPlanByUuid(_x106, _x107) {
5177
+ function getPatientTreatmentPlanByUuid(_x107, _x108) {
5137
5178
  return _getPatientTreatmentPlanByUuid.apply(this, arguments);
5138
5179
  }
5139
5180
 
@@ -5190,7 +5231,7 @@ var OroClient = /*#__PURE__*/function () {
5190
5231
  }, _callee48);
5191
5232
  }));
5192
5233
 
5193
- return function (_x111) {
5234
+ return function (_x112) {
5194
5235
  return _ref7.apply(this, arguments);
5195
5236
  };
5196
5237
  }()));
@@ -5208,7 +5249,7 @@ var OroClient = /*#__PURE__*/function () {
5208
5249
  }, _callee49, this);
5209
5250
  }));
5210
5251
 
5211
- function getPatientDocumentsList(_x108, _x109, _x110) {
5252
+ function getPatientDocumentsList(_x109, _x110, _x111) {
5212
5253
  return _getPatientDocumentsList.apply(this, arguments);
5213
5254
  }
5214
5255
 
@@ -5270,7 +5311,7 @@ var OroClient = /*#__PURE__*/function () {
5270
5311
  }, _callee50, this);
5271
5312
  }));
5272
5313
 
5273
- function recoverPrivateKeyFromSecurityQuestions(_x112, _x113, _x114, _x115) {
5314
+ function recoverPrivateKeyFromSecurityQuestions(_x113, _x114, _x115, _x116) {
5274
5315
  return _recoverPrivateKeyFromSecurityQuestions.apply(this, arguments);
5275
5316
  }
5276
5317
 
@@ -5318,7 +5359,7 @@ var OroClient = /*#__PURE__*/function () {
5318
5359
  }, _callee51, this);
5319
5360
  }));
5320
5361
 
5321
- function recoverPrivateKeyFromPassword(_x116, _x117) {
5362
+ function recoverPrivateKeyFromPassword(_x117, _x118) {
5322
5363
  return _recoverPrivateKeyFromPassword.apply(this, arguments);
5323
5364
  }
5324
5365
 
@@ -5358,7 +5399,7 @@ var OroClient = /*#__PURE__*/function () {
5358
5399
  }, _callee52, this);
5359
5400
  }));
5360
5401
 
5361
- function recoverPrivateKeyFromMasterKey(_x118, _x119) {
5402
+ function recoverPrivateKeyFromMasterKey(_x119, _x120) {
5362
5403
  return _recoverPrivateKeyFromMasterKey.apply(this, arguments);
5363
5404
  }
5364
5405
 
@@ -5409,7 +5450,7 @@ var OroClient = /*#__PURE__*/function () {
5409
5450
  }, _callee53, this);
5410
5451
  }));
5411
5452
 
5412
- function updateSecurityQuestions(_x120, _x121, _x122, _x123) {
5453
+ function updateSecurityQuestions(_x121, _x122, _x123, _x124) {
5413
5454
  return _updateSecurityQuestions.apply(this, arguments);
5414
5455
  }
5415
5456
 
@@ -5474,7 +5515,7 @@ var OroClient = /*#__PURE__*/function () {
5474
5515
  }, _callee54, this);
5475
5516
  }));
5476
5517
 
5477
- function updatePassword(_x124, _x125, _x126) {
5518
+ function updatePassword(_x125, _x126, _x127) {
5478
5519
  return _updatePassword.apply(this, arguments);
5479
5520
  }
5480
5521
 
@@ -5536,7 +5577,7 @@ var OroClient = /*#__PURE__*/function () {
5536
5577
  }, _callee55, this);
5537
5578
  }));
5538
5579
 
5539
- function updateMasterKey(_x127, _x128, _x129) {
5580
+ function updateMasterKey(_x128, _x129, _x130) {
5540
5581
  return _updateMasterKey.apply(this, arguments);
5541
5582
  }
5542
5583