oro-sdk 3.2.0 → 3.3.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/helpers/patient-registration.d.ts +4 -4
- package/dist/oro-sdk.cjs.development.js +9 -6
- package/dist/oro-sdk.cjs.development.js.map +1 -1
- package/dist/oro-sdk.cjs.production.min.js +1 -1
- package/dist/oro-sdk.cjs.production.min.js.map +1 -1
- package/dist/oro-sdk.esm.js +9 -6
- package/dist/oro-sdk.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/helpers/patient-registration.ts +11 -6
@@ -1,4 +1,4 @@
|
|
1
|
-
import { ConsultRequest, MetadataCategory, PopulatedWorkflowData, Uuid, WorkflowData } from 'oro-sdk-apis';
|
1
|
+
import { Consult, ConsultRequest, MetadataCategory, PopulatedWorkflowData, Uuid, WorkflowData } from 'oro-sdk-apis';
|
2
2
|
import { OroClient, RegisterPatientOutput } from '..';
|
3
3
|
/**
|
4
4
|
* Completes a registration for a user retrying the complete flow a maximum of 15 times
|
@@ -44,9 +44,9 @@ export declare function extractPersonalInfoFromWorkflowData(workflow: WorkflowDa
|
|
44
44
|
otherPersonalInfoPopulatedWfData: PopulatedWorkflowData;
|
45
45
|
}>;
|
46
46
|
/**
|
47
|
-
* Creates the search index for the first
|
48
|
-
* @param
|
47
|
+
* Creates the search index for the first name, last name, and the short id of the given consultation
|
48
|
+
* @param consult the consultation to be search indexed
|
49
49
|
* @param workflow the workflow data
|
50
50
|
* @param oroClient
|
51
51
|
*/
|
52
|
-
export declare function buildConsultSearchIndex(
|
52
|
+
export declare function buildConsultSearchIndex(consult: Consult, workflow: WorkflowData, oroClient: OroClient): Promise<void>;
|
@@ -1809,7 +1809,7 @@ function _registerPatient() {
|
|
1809
1809
|
|
1810
1810
|
case 43:
|
1811
1811
|
_context3.next = 45;
|
1812
|
-
return buildConsultSearchIndex(consult
|
1812
|
+
return buildConsultSearchIndex(consult, workflow, oroClient)["catch"](function (err) {
|
1813
1813
|
console.error('[SDK: registration] personal information not found or another error occured during search indexing', err);
|
1814
1814
|
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
|
1815
1815
|
|
@@ -2152,8 +2152,8 @@ function extractPersonalInfoFromWorkflowData(_x24) {
|
|
2152
2152
|
return _extractPersonalInfoFromWorkflowData.apply(this, arguments);
|
2153
2153
|
}
|
2154
2154
|
/**
|
2155
|
-
* Creates the search index for the first
|
2156
|
-
* @param
|
2155
|
+
* Creates the search index for the first name, last name, and the short id of the given consultation
|
2156
|
+
* @param consult the consultation to be search indexed
|
2157
2157
|
* @param workflow the workflow data
|
2158
2158
|
* @param oroClient
|
2159
2159
|
*/
|
@@ -2190,14 +2190,17 @@ function buildConsultSearchIndex(_x25, _x26, _x27) {
|
|
2190
2190
|
}
|
2191
2191
|
|
2192
2192
|
function _buildConsultSearchIndex() {
|
2193
|
-
_buildConsultSearchIndex = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee11(
|
2193
|
+
_buildConsultSearchIndex = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee11(consult, workflow, oroClient) {
|
2194
2194
|
var terms, _yield$extractPersona, personalInfoPopulatedWfData, childPersonalInfoPopulatedWfData, otherPersonalInfoPopulatedWfData, personalInfo, childPersonalInfo, otherPersonalInfo;
|
2195
2195
|
|
2196
2196
|
return runtime_1.wrap(function _callee11$(_context11) {
|
2197
2197
|
while (1) {
|
2198
2198
|
switch (_context11.prev = _context11.next) {
|
2199
2199
|
case 0:
|
2200
|
-
terms = [
|
2200
|
+
terms = [{
|
2201
|
+
kind: 'consult-shortid',
|
2202
|
+
value: consult.shortId
|
2203
|
+
}];
|
2201
2204
|
_context11.next = 3;
|
2202
2205
|
return extractPersonalInfoFromWorkflowData(workflow);
|
2203
2206
|
|
@@ -2238,7 +2241,7 @@ function _buildConsultSearchIndex() {
|
|
2238
2241
|
}
|
2239
2242
|
|
2240
2243
|
_context11.next = 15;
|
2241
|
-
return oroClient.searchClient.index(
|
2244
|
+
return oroClient.searchClient.index(consult.uuid, terms);
|
2242
2245
|
|
2243
2246
|
case 15:
|
2244
2247
|
case "end":
|