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.
- package/dist/helpers/patient-registration.d.ts +4 -4
- package/dist/oro-sdk.cjs.development.js +13 -20
- 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 +13 -20
- package/dist/oro-sdk.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/helpers/patient-registration.ts +16 -10
package/package.json
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
{
|
2
|
-
"version": "3.
|
2
|
+
"version": "3.4.0",
|
3
3
|
"main": "dist/index.js",
|
4
4
|
"typings": "dist/index.d.ts",
|
5
5
|
"files": [
|
@@ -54,7 +54,7 @@
|
|
54
54
|
"form-data": "^4.0.0",
|
55
55
|
"formdata-node": "^4.3.1",
|
56
56
|
"idb-keyval": "^5.0.6",
|
57
|
-
"oro-sdk-apis": "1.
|
57
|
+
"oro-sdk-apis": "1.40.0",
|
58
58
|
"oro-toolbox": "0.0.6",
|
59
59
|
"uuid": "^8.3.2"
|
60
60
|
}
|
@@ -184,11 +184,12 @@ export async function registerPatient(
|
|
184
184
|
|
185
185
|
await Promise.all([...grantPromises, ...consultIndexPromises])
|
186
186
|
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
187
|
+
// TODO: uncomment when search is deployed in prod
|
188
|
+
// await buildConsultSearchIndex(consult, workflow, oroClient).catch((err) => {
|
189
|
+
// console.error('[SDK: registration] personal information not found or another error occured during search indexing', err)
|
190
|
+
// 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
|
191
|
+
// errorsThrown.push(err)
|
192
|
+
// })
|
192
193
|
|
193
194
|
if (errorsThrown.length > 0)
|
194
195
|
throw errorsThrown
|
@@ -434,13 +435,18 @@ export async function extractPersonalInfoFromWorkflowData(workflow: WorkflowData
|
|
434
435
|
}
|
435
436
|
|
436
437
|
/**
|
437
|
-
* Creates the search index for the first
|
438
|
-
* @param
|
438
|
+
* Creates the search index for the first name, last name, and the short id of the given consultation
|
439
|
+
* @param consult the consultation to be search indexed
|
439
440
|
* @param workflow the workflow data
|
440
441
|
* @param oroClient
|
441
442
|
*/
|
442
|
-
export async function buildConsultSearchIndex(
|
443
|
-
let terms: Terms = [
|
443
|
+
export async function buildConsultSearchIndex(consult: Consult, workflow: WorkflowData, oroClient: OroClient) {
|
444
|
+
let terms: Terms = [
|
445
|
+
<Term> {
|
446
|
+
kind: 'consult-shortid',
|
447
|
+
value: consult.shortId
|
448
|
+
}
|
449
|
+
]
|
444
450
|
|
445
451
|
const {
|
446
452
|
personalInfoPopulatedWfData,
|
@@ -489,5 +495,5 @@ export async function buildConsultSearchIndex(consultUuid: string, workflow: Wor
|
|
489
495
|
})
|
490
496
|
}
|
491
497
|
|
492
|
-
await oroClient.searchClient.index(
|
498
|
+
await oroClient.searchClient.index(consult.uuid, terms)
|
493
499
|
}
|