oro-sdk 3.1.2-dev1 → 3.1.2-dev2

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.
@@ -1760,19 +1760,12 @@ function _registerPatient() {
1760
1760
  });
1761
1761
 
1762
1762
  case 30:
1763
- _context3.next = 32;
1764
- return searchIndexConsultation(consult.uuid, oroClient)["catch"](function (err) {
1765
- console.error('[SDK: registration] personal information not found or another error occured during search indexing', err);
1766
- errorsThrown.push(err);
1767
- });
1768
-
1769
- case 32:
1770
1763
  if (!(masterKey && !((_identity = identity) != null && _identity.recoveryMasterKey))) {
1771
- _context3.next = 38;
1764
+ _context3.next = 36;
1772
1765
  break;
1773
1766
  }
1774
1767
 
1775
- _context3.next = 35;
1768
+ _context3.next = 33;
1776
1769
  return oroClient.updateMasterKey(patientUuid, masterKey, lockboxUuid)["catch"](function (err) {
1777
1770
  console.error("[SDK: registration] Error while updating master key", err); /// it's acceptable to continue registration (return old identity)
1778
1771
 
@@ -1782,22 +1775,22 @@ function _registerPatient() {
1782
1775
  return identity;
1783
1776
  });
1784
1777
 
1785
- case 35:
1778
+ case 33:
1786
1779
  identity = _context3.sent;
1787
- _context3.next = 39;
1780
+ _context3.next = 37;
1788
1781
  break;
1789
1782
 
1790
- case 38:
1783
+ case 36:
1791
1784
  // we did not set the master key so we do not return it
1792
1785
  masterKey = undefined;
1793
1786
 
1794
- case 39:
1787
+ case 37:
1795
1788
  if (!(recoveryQA && !((_identity2 = identity) != null && _identity2.recoverySecurityQuestions))) {
1796
- _context3.next = 43;
1789
+ _context3.next = 41;
1797
1790
  break;
1798
1791
  }
1799
1792
 
1800
- _context3.next = 42;
1793
+ _context3.next = 40;
1801
1794
  return oroClient.updateSecurityQuestions(patientUuid, recoveryQA.recoverySecurityQuestions, recoveryQA.recoverySecurityAnswers, 2)["catch"](function (err) {
1802
1795
  console.error("[SDK: registration] Error while updating security questions", err); /// it's acceptable to continue registration (return old identity)
1803
1796
 
@@ -1807,27 +1800,34 @@ function _registerPatient() {
1807
1800
  return identity;
1808
1801
  });
1809
1802
 
1810
- case 42:
1803
+ case 40:
1811
1804
  identity = _context3.sent;
1812
1805
 
1813
- case 43:
1814
- _context3.next = 45;
1806
+ case 41:
1807
+ _context3.next = 43;
1815
1808
  return Promise.all([].concat(grantPromises, consultIndexPromises));
1816
1809
 
1817
- case 45:
1810
+ case 43:
1818
1811
  if (!(errorsThrown.length > 0)) {
1819
- _context3.next = 47;
1812
+ _context3.next = 45;
1820
1813
  break;
1821
1814
  }
1822
1815
 
1823
1816
  throw errorsThrown;
1824
1817
 
1825
- case 47:
1826
- _context3.next = 49;
1818
+ case 45:
1819
+ _context3.next = 47;
1827
1820
  return oroClient.consultClient.updateConsultByUUID(consult.uuid, {
1828
1821
  statusMedical: initApis.MedicalStatus.New
1829
1822
  });
1830
1823
 
1824
+ case 47:
1825
+ _context3.next = 49;
1826
+ return searchIndexConsultation(consult.uuid, oroClient)["catch"](function (err) {
1827
+ console.error('[SDK: registration] personal information not found or another error occured during search indexing', err);
1828
+ errorsThrown.push(err);
1829
+ });
1830
+
1831
1831
  case 49:
1832
1832
  return _context3.abrupt("return", "break");
1833
1833