@eka-care/ekascribe-ts-sdk 1.5.70 → 1.5.72

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 CHANGED
@@ -315,6 +315,136 @@ Use this method to fetch the final generated prescription output for a session.
315
315
  await ekascribe.getTemplateOutput({ txn_id: 'abc-123' });
316
316
  ```
317
317
 
318
+ - #### Response type:
319
+
320
+ ```ts
321
+ {
322
+ response?: {
323
+ data: {
324
+ output: TOutputSummary[];
325
+ template_results: {
326
+ integration: TOutputSummary[];
327
+ custom: TOutputSummary[];
328
+ };
329
+ audio_matrix?: {
330
+ quality: string;
331
+ };
332
+ additional_data?: {
333
+ doctor: {
334
+ _id: string;
335
+ profile: {
336
+ personal: {
337
+ name: {
338
+ l: string;
339
+ f: string;
340
+ };
341
+ };
342
+ };
343
+ };
344
+ };
345
+ meta_data?: {
346
+ total_resources?: number;
347
+ total_parsed_resources?: number;
348
+ };
349
+ created_at?: string;
350
+ };
351
+ error?: {
352
+ code: string;
353
+ msg: string;
354
+ };
355
+ } | null;
356
+ status_code: number;
357
+ message?: string;
358
+ }
359
+
360
+ type TOutputSummary = {
361
+ template_id: string;
362
+ value?: string | null; // base64 encoded
363
+ type: string;
364
+ name: string;
365
+ status: 'success' | 'partial_success' | 'failure';
366
+ errors?: Array<{
367
+ type: 'warning' | 'error';
368
+ code?: string;
369
+ msg: string;
370
+ }>;
371
+ warnings?: Array<{
372
+ type: 'warning' | 'error';
373
+ code?: string;
374
+ msg: string;
375
+ }>;
376
+ };
377
+ ```
378
+
379
+ - #### Example Response:
380
+
381
+ ```ts
382
+ {
383
+ status_code: 200,
384
+ response: {
385
+ data: {
386
+ output: [
387
+ {
388
+ template_id: "template_123",
389
+ value: "eyJwYXRpZW50Ijp7Im5hbWUiOiJKb2huIERvZSJ9fQ==",
390
+ type: "custom",
391
+ name: "General Prescription",
392
+ status: "success"
393
+ }
394
+ ],
395
+ template_results: {
396
+ integration: [
397
+ {
398
+ template_id: "integration_template_456",
399
+ value: "eyJkaWFnbm9zaXMiOiJDb21tb24gQ29sZCJ9",
400
+ type: "json",
401
+ name: "Diagnosis Template",
402
+ status: "success"
403
+ }
404
+ ],
405
+ custom: [
406
+ {
407
+ template_id: "custom_template_789",
408
+ value: "eyJtZWRpY2F0aW9ucyI6W119",
409
+ type: "custom",
410
+ name: "Custom Medication Template",
411
+ status: "partial_success",
412
+ warnings: [
413
+ {
414
+ type: "warning",
415
+ code: "FIELD_MISSING",
416
+ msg: "Dosage information not found"
417
+ }
418
+ ]
419
+ }
420
+ ]
421
+ },
422
+ audio_matrix: {
423
+ quality: "4.5"
424
+ },
425
+ additional_data: {
426
+ doctor: {
427
+ _id: "doc_001",
428
+ profile: {
429
+ personal: {
430
+ name: {
431
+ l: "Smith",
432
+ f: "Dr. Jane"
433
+ }
434
+ }
435
+ }
436
+ }
437
+ },
438
+ meta_data: {
439
+ total_resources: 10,
440
+ total_parsed_resources: 9
441
+ },
442
+ created_at: "2024-11-19T10:30:00Z"
443
+ }
444
+ }
445
+ }
446
+ ```
447
+
318
448
  ### 13. Get previous sessions
319
449
 
320
450
  Use this method to retrieve all the previous sessions for a specific doctor ID
@@ -13,7 +13,7 @@ async function postConvertTranscriptionToTemplate({ txn_id, template_id, transcr
13
13
  template_id,
14
14
  }),
15
15
  };
16
- const response = await fetchWrapper(`${GET_EKA_VOICE_HOST_V1()}/transaction/${txn_id}/convert-to-template?transcript=true`, options, 60000);
16
+ const response = await fetchWrapper(`${GET_EKA_VOICE_HOST_V1()}/transaction/${txn_id}/convert-to-template`, options, 60000);
17
17
  let res = await response.json();
18
18
  res = {
19
19
  ...res,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eka-care/ekascribe-ts-sdk",
3
- "version": "1.5.70",
3
+ "version": "1.5.72",
4
4
  "main": "dist/index.js",
5
5
  "repository": "git@github.com:eka-care/eka-js-sdk.git",
6
6
  "author": "Sanikagoyal28 <sanikagoyal9@gmail.com>",