oro-sdk 3.2.0 → 3.3.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.
- 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
package/package.json
CHANGED
@@ -184,7 +184,7 @@ export async function registerPatient(
|
|
184
184
|
|
185
185
|
await Promise.all([...grantPromises, ...consultIndexPromises])
|
186
186
|
|
187
|
-
await buildConsultSearchIndex(consult
|
187
|
+
await buildConsultSearchIndex(consult, workflow, oroClient).catch((err) => {
|
188
188
|
console.error('[SDK: registration] personal information not found or another error occured during search indexing', err)
|
189
189
|
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
|
190
190
|
errorsThrown.push(err)
|
@@ -434,13 +434,18 @@ export async function extractPersonalInfoFromWorkflowData(workflow: WorkflowData
|
|
434
434
|
}
|
435
435
|
|
436
436
|
/**
|
437
|
-
* Creates the search index for the first
|
438
|
-
* @param
|
437
|
+
* Creates the search index for the first name, last name, and the short id of the given consultation
|
438
|
+
* @param consult the consultation to be search indexed
|
439
439
|
* @param workflow the workflow data
|
440
440
|
* @param oroClient
|
441
441
|
*/
|
442
|
-
export async function buildConsultSearchIndex(
|
443
|
-
let terms: Terms = [
|
442
|
+
export async function buildConsultSearchIndex(consult: Consult, workflow: WorkflowData, oroClient: OroClient) {
|
443
|
+
let terms: Terms = [
|
444
|
+
<Term> {
|
445
|
+
kind: 'consult-shortid',
|
446
|
+
value: consult.shortId
|
447
|
+
}
|
448
|
+
]
|
444
449
|
|
445
450
|
const {
|
446
451
|
personalInfoPopulatedWfData,
|
@@ -489,5 +494,5 @@ export async function buildConsultSearchIndex(consultUuid: string, workflow: Wor
|
|
489
494
|
})
|
490
495
|
}
|
491
496
|
|
492
|
-
await oroClient.searchClient.index(
|
497
|
+
await oroClient.searchClient.index(consult.uuid, terms)
|
493
498
|
}
|