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