oro-sdk 3.4.0 → 3.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.
@@ -1804,23 +1804,33 @@ function _registerPatient() {
1804
1804
  return Promise.all([].concat(grantPromises, consultIndexPromises));
1805
1805
 
1806
1806
  case 43:
1807
+ _context3.next = 45;
1808
+ return buildConsultSearchIndex(consult, workflow, oroClient)["catch"](function (err) {
1809
+ console.error('[SDK: registration] personal information not found or another error occured during search indexing', err);
1810
+ 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
1811
+
1812
+ // this statement is to avoid failing the registration due to the failure in search indexing the consult, this practically implements a soft retry
1813
+ errorsThrown.push(err);
1814
+ });
1815
+
1816
+ case 45:
1807
1817
  if (!(errorsThrown.length > 0)) {
1808
- _context3.next = 45;
1818
+ _context3.next = 47;
1809
1819
  break;
1810
1820
  }
1811
1821
 
1812
1822
  throw errorsThrown;
1813
1823
 
1814
- case 45:
1815
- _context3.next = 47;
1824
+ case 47:
1825
+ _context3.next = 49;
1816
1826
  return oroClient.consultClient.updateConsultByUUID(consult.uuid, {
1817
1827
  statusMedical: MedicalStatus.New
1818
1828
  });
1819
1829
 
1820
- case 47:
1830
+ case 49:
1821
1831
  return _context3.abrupt("return", "break");
1822
1832
 
1823
- case 48:
1833
+ case 50:
1824
1834
  case "end":
1825
1835
  return _context3.stop();
1826
1836
  }