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

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 {
@@ -752,6 +753,36 @@ export declare type TStartRecordingResponse = {
752
753
  uuid?: string;
753
754
  };
754
755
 
756
+ export declare type TSuggestedMedication = {
757
+ extracted: {
758
+ name: string;
759
+ dose: string | null;
760
+ frequency: string | null;
761
+ duration: string | null;
762
+ route: string | null;
763
+ };
764
+ suggestions: Array<{
765
+ coded_name: string;
766
+ coded_generic_name: string | null;
767
+ coded_dose_unit: string | null;
768
+ coded_form: string | null;
769
+ eka_id: string;
770
+ locale_id: string;
771
+ uncoded_name: string;
772
+ source: string;
773
+ is_fhir_confidence: boolean;
774
+ is_brandname_matched: boolean;
775
+ [key: string]: unknown;
776
+ }>;
777
+ };
778
+
779
+ declare type TSuggestedMedicationResponse = {
780
+ code: number;
781
+ message?: string;
782
+ session_id?: string;
783
+ medications?: TSuggestedMedication[];
784
+ };
785
+
755
786
  export declare type TSystemInfo = {
756
787
  platform: string;
757
788
  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() {
@@ -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;
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.28",
4
4
  "description": "EkaScribe TypeScript SDK - Modern ES2020 build",
5
5
  "main": "dist/index.mjs",
6
6
  "module": "dist/index.mjs",