@eka-care/ekascribe-ts-sdk 2.1.27 → 2.1.29

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/index.d.ts CHANGED
@@ -121,6 +121,7 @@ declare class EkaScribe {
121
121
  destroySharedWorker(): Promise<void>;
122
122
  getDoctorHeaderFooter(request: TGetDoctorHeaderFooterRequest): Promise<TGetDoctorHeaderFooterResponse>;
123
123
  getDoctorClinics(request: TGetDoctorClinicsRequest): Promise<TGetDoctorClinicsResponse>;
124
+ getSuggestedMedications(txnId: string): Promise<TSuggestedMedicationResponse>;
124
125
  }
125
126
 
126
127
  export declare enum ERROR_CODE {
@@ -145,12 +146,11 @@ export declare enum ERROR_CODE {
145
146
 
146
147
  declare type Gender = 'M' | 'F' | 'O';
147
148
 
148
- export declare const getEkaScribeInstance: ({ access_token, env, clientId, flavour, enableSentryLogs, }: {
149
+ export declare const getEkaScribeInstance: ({ access_token, env, clientId, flavour, }: {
149
150
  access_token?: string;
150
151
  env?: "PROD" | "DEV";
151
152
  clientId?: string;
152
153
  flavour?: string;
153
- enableSentryLogs?: boolean;
154
154
  }) => EkaScribe;
155
155
 
156
156
  export declare enum PROCESSING_STATUS {
@@ -752,6 +752,36 @@ export declare type TStartRecordingResponse = {
752
752
  uuid?: string;
753
753
  };
754
754
 
755
+ export declare type TSuggestedMedication = {
756
+ extracted: {
757
+ name: string;
758
+ dose: string | null;
759
+ frequency: string | null;
760
+ duration: string | null;
761
+ route: string | null;
762
+ };
763
+ suggestions: Array<{
764
+ coded_name: string;
765
+ coded_generic_name: string | null;
766
+ coded_dose_unit: string | null;
767
+ coded_form: string | null;
768
+ eka_id: string;
769
+ locale_id: string;
770
+ uncoded_name: string;
771
+ source: string;
772
+ is_fhir_confidence: boolean;
773
+ is_brandname_matched: boolean;
774
+ [key: string]: unknown;
775
+ }>;
776
+ };
777
+
778
+ declare type TSuggestedMedicationResponse = {
779
+ code: number;
780
+ message?: string;
781
+ session_id?: string;
782
+ medications?: TSuggestedMedication[];
783
+ };
784
+
755
785
  export declare type TSystemInfo = {
756
786
  platform: string;
757
787
  language: string;
package/dist/index.mjs CHANGED
@@ -31518,7 +31518,25 @@ const DEFAULT_HEADER_IMAGE = "https://cdn.eka.care/vagus/cmlf0ip4a00000td1dmth2w
31518
31518
  message: `Failed to fetch doctor clinics, ${n}`
31519
31519
  };
31520
31520
  }
31521
- }, _n = class _n {
31521
+ };
31522
+ async function getV1SessionSuggestedMedications(s) {
31523
+ try {
31524
+ const n = await fetchWrapper(
31525
+ `${GET_EKA_HOST()}/voice/v1/session/${s}/suggested-medications`,
31526
+ { method: "GET" }
31527
+ );
31528
+ return {
31529
+ ...await n.json(),
31530
+ code: n.status
31531
+ };
31532
+ } catch (n) {
31533
+ return console.error("Error in export async function getV1SessionSuggestedMedications api: ", n), {
31534
+ code: SDK_STATUS_CODE.INTERNAL_SERVER_ERROR,
31535
+ message: `Failed to fetch initial configurations, ${n}`
31536
+ };
31537
+ }
31538
+ }
31539
+ const _n = class _n {
31522
31540
  // SystemCompatibilityManager Instance
31523
31541
  // Private constructor to prevent direct instantiation
31524
31542
  constructor() {
@@ -31530,7 +31548,7 @@ const DEFAULT_HEADER_IMAGE = "https://cdn.eka.care/vagus/cmlf0ip4a00000td1dmth2w
31530
31548
  env: i,
31531
31549
  clientId: c,
31532
31550
  flavour: l,
31533
- enableSentryLogs: f = !0
31551
+ enableSentryLogs: f = !1
31534
31552
  }) {
31535
31553
  if (EkaScribeStore$1.enableSentryLogs = f, l && (EkaScribeStore$1.flavour = l), _n.instance) {
31536
31554
  const u = i && GET_CURRENT_ENV() !== i, d = c && GET_CLIENT_ID() !== c;
@@ -31869,6 +31887,9 @@ const DEFAULT_HEADER_IMAGE = "https://cdn.eka.care/vagus/cmlf0ip4a00000td1dmth2w
31869
31887
  async getDoctorClinics(n) {
31870
31888
  return await getDoctorClinics(n);
31871
31889
  }
31890
+ async getSuggestedMedications(n) {
31891
+ return getV1SessionSuggestedMedications(n);
31892
+ }
31872
31893
  };
31873
31894
  _n.instance = null;
31874
31895
  let EkaScribe = _n;
@@ -31876,9 +31897,8 @@ const getEkaScribeInstance = ({
31876
31897
  access_token: s,
31877
31898
  env: n,
31878
31899
  clientId: i,
31879
- flavour: c,
31880
- enableSentryLogs: l = !0
31881
- }) => EkaScribe.getInstance({ access_token: s, env: n, clientId: i, flavour: c, enableSentryLogs: l });
31900
+ flavour: c
31901
+ }) => EkaScribe.getInstance({ access_token: s, env: n, clientId: i, flavour: c });
31882
31902
  export {
31883
31903
  API_STATUS,
31884
31904
  CALLBACK_TYPE,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eka-care/ekascribe-ts-sdk",
3
- "version": "2.1.27",
3
+ "version": "2.1.29",
4
4
  "description": "EkaScribe TypeScript SDK - Modern ES2020 build",
5
5
  "main": "dist/index.mjs",
6
6
  "module": "dist/index.mjs",