oro-sdk 3.2.0 → 3.4.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,33 +1804,23 @@ function _registerPatient() {
1804
1804
  return Promise.all([].concat(grantPromises, consultIndexPromises));
1805
1805
 
1806
1806
  case 43:
1807
- _context3.next = 45;
1808
- return buildConsultSearchIndex(consult.uuid, 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:
1817
1807
  if (!(errorsThrown.length > 0)) {
1818
- _context3.next = 47;
1808
+ _context3.next = 45;
1819
1809
  break;
1820
1810
  }
1821
1811
 
1822
1812
  throw errorsThrown;
1823
1813
 
1824
- case 47:
1825
- _context3.next = 49;
1814
+ case 45:
1815
+ _context3.next = 47;
1826
1816
  return oroClient.consultClient.updateConsultByUUID(consult.uuid, {
1827
1817
  statusMedical: MedicalStatus.New
1828
1818
  });
1829
1819
 
1830
- case 49:
1820
+ case 47:
1831
1821
  return _context3.abrupt("return", "break");
1832
1822
 
1833
- case 50:
1823
+ case 48:
1834
1824
  case "end":
1835
1825
  return _context3.stop();
1836
1826
  }
@@ -2148,8 +2138,8 @@ function extractPersonalInfoFromWorkflowData(_x24) {
2148
2138
  return _extractPersonalInfoFromWorkflowData.apply(this, arguments);
2149
2139
  }
2150
2140
  /**
2151
- * Creates the search index for the first and last name of the given consultation
2152
- * @param consultUuid the uuid of the consult to be search indexed
2141
+ * Creates the search index for the first name, last name, and the short id of the given consultation
2142
+ * @param consult the consultation to be search indexed
2153
2143
  * @param workflow the workflow data
2154
2144
  * @param oroClient
2155
2145
  */
@@ -2186,14 +2176,17 @@ function buildConsultSearchIndex(_x25, _x26, _x27) {
2186
2176
  }
2187
2177
 
2188
2178
  function _buildConsultSearchIndex() {
2189
- _buildConsultSearchIndex = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee11(consultUuid, workflow, oroClient) {
2179
+ _buildConsultSearchIndex = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee11(consult, workflow, oroClient) {
2190
2180
  var terms, _yield$extractPersona, personalInfoPopulatedWfData, childPersonalInfoPopulatedWfData, otherPersonalInfoPopulatedWfData, personalInfo, childPersonalInfo, otherPersonalInfo;
2191
2181
 
2192
2182
  return runtime_1.wrap(function _callee11$(_context11) {
2193
2183
  while (1) {
2194
2184
  switch (_context11.prev = _context11.next) {
2195
2185
  case 0:
2196
- terms = [];
2186
+ terms = [{
2187
+ kind: 'consult-shortid',
2188
+ value: consult.shortId
2189
+ }];
2197
2190
  _context11.next = 3;
2198
2191
  return extractPersonalInfoFromWorkflowData(workflow);
2199
2192
 
@@ -2234,7 +2227,7 @@ function _buildConsultSearchIndex() {
2234
2227
  }
2235
2228
 
2236
2229
  _context11.next = 15;
2237
- return oroClient.searchClient.index(consultUuid, terms);
2230
+ return oroClient.searchClient.index(consult.uuid, terms);
2238
2231
 
2239
2232
  case 15:
2240
2233
  case "end":