@eka-care/ekascribe-ts-sdk 2.1.6 → 2.1.8
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/README.md +82 -3
- package/dist/index.d.ts +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1292,7 +1292,86 @@ ekascribe.updateAuthTokens({ access_token: 'new_access_token' });
|
|
|
1292
1292
|
- When `eventCallback` returns `error.code: 401` in `file_upload_status`
|
|
1293
1293
|
- Before token expiration to prevent upload failures
|
|
1294
1294
|
|
|
1295
|
-
### 9.
|
|
1295
|
+
### 9. Get Doctor Header and Footer
|
|
1296
|
+
|
|
1297
|
+
Use this method to retrieve the header and footer images for a doctor's prescription template.
|
|
1298
|
+
|
|
1299
|
+
```ts
|
|
1300
|
+
const headerFooter = await ekascribe.getDoctorHeaderFooter({
|
|
1301
|
+
doctor_oid: '161459684229004',
|
|
1302
|
+
clinic_id: '60532c7fcb46901ba3a3e477', // optional
|
|
1303
|
+
});
|
|
1304
|
+
```
|
|
1305
|
+
|
|
1306
|
+
**Key Parameters:**
|
|
1307
|
+
|
|
1308
|
+
- `doctor_oid`: The doctor's OID (required)
|
|
1309
|
+
- `clinic_id`: The clinic ID (optional) - if provided, returns header/footer for this specific clinic
|
|
1310
|
+
|
|
1311
|
+
**Selection Logic:**
|
|
1312
|
+
|
|
1313
|
+
1. If `clinic_id` is provided and a matching PRINT template exists, returns that template's header/footer
|
|
1314
|
+
2. Otherwise, looks for the doctor's default clinic and returns its header/footer
|
|
1315
|
+
3. If no matching template is found, returns `null`
|
|
1316
|
+
|
|
1317
|
+
- #### Response type:
|
|
1318
|
+
|
|
1319
|
+
```ts
|
|
1320
|
+
{
|
|
1321
|
+
data: {
|
|
1322
|
+
_id: string | null; // Template ID
|
|
1323
|
+
clinic_id: string | null; // Clinic ID
|
|
1324
|
+
doctor_id: string | null; // Doctor ID
|
|
1325
|
+
type: string | null; // Template type (e.g., "PRINT")
|
|
1326
|
+
header_img: string | null; // URL of the header image
|
|
1327
|
+
header_height: string | null; // Height of the header (e.g., "5cm")
|
|
1328
|
+
header_top_margin: string | null; // Top margin for header (e.g., "0.5cm")
|
|
1329
|
+
footer_img: string | null; // URL of the footer image
|
|
1330
|
+
footer_height: string | null; // Height of the footer (e.g., "6.7cm")
|
|
1331
|
+
margin_left: string | null; // Left margin (e.g., "1.27cm")
|
|
1332
|
+
margin_right: string | null; // Right margin (e.g., "1.27cm")
|
|
1333
|
+
page_size: string | null; // Page size (e.g., "A4")
|
|
1334
|
+
show_eka_logo: boolean | null; // Show Eka logo on prescription
|
|
1335
|
+
show_name_in_signature: boolean | null; // Show name in signature
|
|
1336
|
+
show_not_valid_for_medical_legal_purpose_message: boolean | null; // Show disclaimer message
|
|
1337
|
+
show_page_number: boolean | null; // Show page numbers
|
|
1338
|
+
show_prescription_id: boolean | null; // Show prescription ID
|
|
1339
|
+
show_signature: boolean | null; // Show signature
|
|
1340
|
+
} | null;
|
|
1341
|
+
code: number;
|
|
1342
|
+
message?: string;
|
|
1343
|
+
}
|
|
1344
|
+
```
|
|
1345
|
+
|
|
1346
|
+
- #### Example Response:
|
|
1347
|
+
|
|
1348
|
+
```ts
|
|
1349
|
+
{
|
|
1350
|
+
data: {
|
|
1351
|
+
_id: "64b8e093efdee1eaaf052e3e",
|
|
1352
|
+
clinic_id: "60532c7fcb46901ba3a3e477",
|
|
1353
|
+
doctor_id: "161459684229004",
|
|
1354
|
+
type: "PRINT",
|
|
1355
|
+
header_img: "https://rafale-assets.eka.care/161459684229004-60532c7fcb46901ba3a3e477-header.png",
|
|
1356
|
+
header_height: "5cm",
|
|
1357
|
+
header_top_margin: "0.5cm",
|
|
1358
|
+
footer_img: "https://rafale-assets.eka.care/161459684229004-60532c7fcb46901ba3a3e477-footer.png",
|
|
1359
|
+
footer_height: "6.7cm",
|
|
1360
|
+
margin_left: "1.27cm",
|
|
1361
|
+
margin_right: "1.27cm",
|
|
1362
|
+
page_size: "A4",
|
|
1363
|
+
show_eka_logo: true,
|
|
1364
|
+
show_name_in_signature: true,
|
|
1365
|
+
show_not_valid_for_medical_legal_purpose_message: true,
|
|
1366
|
+
show_page_number: true,
|
|
1367
|
+
show_prescription_id: true,
|
|
1368
|
+
show_signature: true
|
|
1369
|
+
},
|
|
1370
|
+
code: 200
|
|
1371
|
+
}
|
|
1372
|
+
```
|
|
1373
|
+
|
|
1374
|
+
### 10. Reset Singleton Instance
|
|
1296
1375
|
|
|
1297
1376
|
Use this method to completely reset the singleton instance. Useful for testing or when you need to reinitialize the SDK with different configuration.
|
|
1298
1377
|
|
|
@@ -1302,7 +1381,7 @@ ekascribe.resetInstance();
|
|
|
1302
1381
|
|
|
1303
1382
|
**Note:** After calling this method, you'll need to call `getEkaScribeInstance()` again to get a new instance.
|
|
1304
1383
|
|
|
1305
|
-
###
|
|
1384
|
+
### 11. Configure VAD Constants
|
|
1306
1385
|
|
|
1307
1386
|
Use this method to customize Voice Activity Detection parameters for your specific use case.
|
|
1308
1387
|
|
|
@@ -1330,7 +1409,7 @@ ekascribe.configureVadConstants({
|
|
|
1330
1409
|
- `short_thsld`: Short silence threshold for clipping decisions (in seconds)
|
|
1331
1410
|
- `long_thsld`: Long silence threshold for clipping decisions (in seconds)
|
|
1332
1411
|
|
|
1333
|
-
###
|
|
1412
|
+
### 12. Destroy Shared Worker
|
|
1334
1413
|
|
|
1335
1414
|
Use this method to terminate the shared worker instance and free up resources.
|
|
1336
1415
|
|
package/dist/index.d.ts
CHANGED