diff --git a/.gitignore b/.gitignore
index 13d99561..d834f808 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
-.DS_Store
+git .DS_Store
.idea/
.venv
.venv/*
+node_modules
diff --git a/README.md b/README.md
index f8fa0cce..bcb8389c 100644
--- a/README.md
+++ b/README.md
@@ -16,7 +16,7 @@ Install the [Mintlify CLI](https://www.npmjs.com/package/mintlify) to preview th
npm i -g mintlify
```
-Run the following command at the root of your documentation (where mint.json is)
+Run the following command at the root of your documentation ( where mint.json is )
```
mintlify dev
diff --git a/SDKs/web-sdk/abha-sdk/abha-consent.mdx b/SDKs/web-sdk/abha-sdk/abha-consent.mdx
new file mode 100644
index 00000000..4ff81ff4
--- /dev/null
+++ b/SDKs/web-sdk/abha-sdk/abha-consent.mdx
@@ -0,0 +1,351 @@
+---
+title: ABHA Consent Management
+description: "Complete implementation guide for the ABHA SDK to be used for ABHA Consent Management Flow."
+---
+
+
+# ABHA SDK - Consent Management Implementation
+
+This guide provides everything you need to integrate the ABHA SDK into your application for ABHA Consent Management.
+- **ABHA Consent Management**: Manage Consent requests raised by healthcare providers to share medical records securely.
+
+### Implementation Example
+
+Add the following HTML and script tags to your webpage:
+
+```html
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+```
+## Core Functions
+
+### 1. initAbhaApp
+
+Initializes and renders the ABHA SDK in your specified container.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| ------------- | --------------------------------------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
+| `containerId` | `string` | ✅ | The HTML element ID where the SDK will mount. |
+| `clientId` | `string` | ✅ | Provide clientId as `ext`. |
+| `data` | `{` `identifier: string;` `identifier_type: string;` `consent_id: string;` `flow: string;` `orgIcon?: string;` `linkToOrgIcon?: string;` `}` | ⚙️ Optional | Configuration data for initializing the ABHA flow. - identifier: Pass the identifier value i.e. phr address to get it kyced. - identifier_type: Pass the type of identifier which you passed in `identifier` key i.e. "phr_address". - consent_id: Pass the consent_id of the consent request raised. - flow: Pass the type of flow for which you want to use SDK for i.e. `consent` for Consent flow. - orgIcon: Public CDN URL of your organisation's icon to display inside the SDK url should start with https://. [Example](https://cdn.eka.care/vagus/cl56w6zg3001f0scsaqrh16is.jpg) - linkToOrgIcon: Public CDN URL of the icon representing “Link ABHA to your organisation” url should start with https://. [Example](https://cdn.eka.care/vagus/cm6agrs5000090tfwfz984x5b.webp)
`keys with ? are optional.` |
+| `onConsentSuccess` | `(params: TOnAbhaConsentSuccessParams) => void` | ✅ | Triggered when the consent flow completes successfully.
+| `onError` | `(params: TOnAbhaFailureParams) => void` | ✅ | Triggered when an error occurs during the ABHA flow.
+| `onAbhaClose` | `() => void` | ✅ | Triggered when SDK closes. |
+
+**Example:**
+
+```javascript
+window.initAbhaApp({
+ containerId: "sdk_container",
+ data: {
+ accessToken: "your_access_token_here",
+ identifier: "phr_address_of_the_patient"
+ identifier_type: "phr_address"
+ consent_id: "id_of_the_consent_raised_by_healthcare_provider"
+ flow: "consent"
+ orgIcon: "url_of_your_org_icon",
+ linkToOrgIcon: "url_of_image_to_link_abha_to_your_org",
+ },
+ onConsentSuccess: (params) => {
+ console.log("ABHA consent flow completed successfully!", params);
+ },
+ onError: (error) => {
+ console.error("ABHA flow failed:", error);
+ },
+ onAbhaClose: (error) => {
+ console.error("ABHA SDK closed");
+ },
+});
+```
+
+## Callback Parameters
+
+
+### onConsentSuccess Callback
+
+The onConsentSuccess callback is triggered when the ABHA Consent flow completes successfully.
+It returns a confirmation message indicating that the Consent flow ended successfully.
+
+**Callback Signature:**
+
+```typescript
+onConsentSuccess: (params: TOnAbhaConsentSuccessParams) => void;
+```
+
+**Type Definitions**
+
+```typescript
+type TOnAbhaConsentSuccessParams = string;
+```
+
+**Parameters**
+| | Type | Description |
+| ---------- | ----------------------- | ---------------------------------------------------------------------------------------------------------- |
+| `TOnAbhaConsentSuccessParams` | `string` | A confirmation message from SDK post Consent flow completion |
+
+
+
+**Example:**
+
+```javascript
+const onConsentSuccess = (params) => {
+ console.log("Consent Flow completed:", params);
+
+ alert("Consent flow completed successfully!");
+
+ // Optionally pass data to native bridge if available
+ if (window.EkaAbha) {
+ window.EkaAbha.onAbhaConsentSuccess(params);
+ }
+};
+```
+
+### onError Callback
+The onError callback is triggered whenever an ABHA flow fails or is interrupted.
+It provides details about the failure through structured parameters, allowing you to handle or forward the error appropriately (for example, to native apps or monitoring tools).
+
+**Callback Signature:**
+
+```typescript
+onError: (params: TOnAbhaFailureParams) => void;
+```
+
+**Type Definitions**
+
+```typescript
+type TOnAbhaFailureParams = {
+ error?: string;
+ response?: TAuthVerifyV2Response;
+};
+
+type TAuthVerifyV2Response = {
+ skip_state: number;
+ method: AUTH_METHOD;
+ data?: {
+ tokens: {
+ sess: string;
+ refresh: string;
+ };
+ profile: TProfileRecord;
+ };
+ txn_id: string;
+ error?: {
+ code: number;
+ message: string;
+ };
+};
+
+enum AUTH_METHOD {
+ EMAIL = 1,
+ MOBILE = 2,
+ ABHA = 7,
+}
+
+type TProfileRecord = {
+ fln: string;
+ fn: string;
+ mn?: string;
+ ln?: string;
+ gen?: "M" | "F" | "O" | "U" | undefined; // 'male' | 'female' | 'other' | 'unknown'
+ dob?: string;
+ mobile?: string;
+ email?: string;
+ uuid?: string;
+ bloodgroup?: "" | "A+" | "A-" | "B+" | "B-" | "O+" | "O-" | "AB+" | "AB-";
+ pic?: string;
+ as?: string;
+ "dob-valid"?: boolean;
+ "is-d"?: boolean;
+ "is-d-s"?: boolean;
+ "is-p"?: boolean;
+ oid: string;
+ at: string;
+ type?: 1 | 2 | 3 | 4 | 5 | 6;
+ "health-ids"?: Array;
+ abha_number?: string;
+ kyc_verified?: boolean;
+};
+
+```
+
+**Parameters**
+| Key | Type | Description |
+| ---------- | ------------------------ | ---------------------------------------------------------------- |
+| `error` | `string?` | Short description of the failure or error message. |
+| `response` | `TAuthVerifyV2Response?` | Partial or full API response object returned from ABHA services. |
+
+
+**Example:**
+
+```javascript
+const onError = (params) => {
+ console.error("ABHA Error:", params);
+
+ if (params.response?.error?.code === 1001) {
+ alert("Authentication failed. Please try again.");
+ } else if (params.error === "NETWORK_ERROR") {
+ alert("Please check your internet connection.");
+ } else {
+ alert("Something went wrong. Please retry.");
+ }
+
+ // Forward the error to native handler if available
+ if (window.EkaAbha) {
+ window.EkaAbha.onAbhaFailure(JSON.stringify(params));
+ }
+};
+```
+
+### onAbhaClose Callback
+
+The onAbhaClose callback is triggered when the ABHA SDK flow gets closed.
+
+**Callback Signature:**
+
+```typescript
+onAbhaClose: () => void;
+```
+
+**Example:**
+
+```javascript
+const onAbhaClose = () => {
+ console.log("ABHA SDK Closed");
+};
+```
+
+**Suggest Handling**
+-Always log the full error response (params) for debugging.
+-Display friendly error messages for known error.code values.
+-If params.response is present, inspect response.error.message for more detail.
+-If integrating with native apps, forward the serialized error object:
+```javascript
+window.EkaAbha.onAbhaFailure(JSON.stringify(params));
+```
+
+**Suggest Handling**
+-Always log the full error response (params) for debugging.
+-Display friendly error messages for known error.code values.
+-If params.response is present, inspect response.error.message for more detail.
+-If integrating with native apps, forward the serialized error object:
+```javascript
+window.EkaAbha.onAbhaFailure(JSON.stringify(params));
+```
+
+## Container Styling
+Ensure your container has sufficient space:
+```html
+
+```
+
+## Troubleshooting
+
+### Common Issues
+
+#### 1. SDK Not Rendering
+
+**Problem**: Nothing appears in the container.
+
+**Solution**:
+- Ensure containerId matches an existing HTML element.
+- Verify the SDK JS and CSS are correctly loaded.
+- Check browser console for errors.
+
+#### 2. APIs Not Being Called
+
+**Problem**: API requests are not triggered after the SDK is mounted.
+
+**Solution**:
+- Ensure that the accessToken is passed correctly (do not include the Bearer prefix) and that the token has not expired.
+- To prevent CORS-related issues, ensure that your domain is whitelisted.
+
+#### 3. Callback Not Triggered
+
+**Problem**: onSuccess, onError, onKYCSuccess, onConsentSuccess, onAbhaClose isn’t firing.
+
+**Solution**:
+- Make sure callbacks are passed as valid functions.
+- Avoid race conditions (e.g., calling before SDK fully loads).
+
+#### 4. Styling Issues
+
+**Problem**: SDK content appears misaligned or clipped.
+
+**Solution**:
+- Give your container a fixed height (e.g., 600px).
+- Ensure no parent element uses overflow: hidden.
+
diff --git a/SDKs/web-sdk/abha-sdk/abha-kyc.mdx b/SDKs/web-sdk/abha-sdk/abha-kyc.mdx
new file mode 100644
index 00000000..a9540e39
--- /dev/null
+++ b/SDKs/web-sdk/abha-sdk/abha-kyc.mdx
@@ -0,0 +1,349 @@
+---
+title: ABHA Profile KYC
+description: "Complete implementation guide for the ABHA SDK to be used for ABHA KYC Verification Flow."
+---
+
+# ABHA SDK - Profile KYC Implementation
+
+This guide provides everything you need to integrate the ABHA SDK into your application for ABHA Profile KYC Verification.
+- **ABHA Profile KYC**: Get your ABHA address KYC verified.
+
+### Implementation Example
+
+Add the following HTML and script tags to your webpage:
+
+```html
+
+
+
+ ABHA SDK Integration for ABHA Profile KYC
+
+
+
+
+
+
ABHA SDK Demo
+
+
+
+
+
+
+
+
+
+
+
+
+
+```
+## Core Functions
+
+### 1. initAbhaApp
+
+Initializes and renders the ABHA SDK in your specified container.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| ------------- | --------------------------------------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
+| `containerId` | `string` | ✅ | The HTML element ID where the SDK will mount. |
+| `clientId` | `string` | ✅ | Provide clientId as `ext`. |
+| `data` | `{` `accessToken: string;` `identifier: string;` `identifier_type: string;` `flow: string;` `orgIcon?: string;` `linkToOrgIcon?: string;` `}` | ⚙️ Optional | Configuration data for initializing the ABHA flow.
- accessToken: Pass the access token you have generated from [Connect Login ](https://developer.eka.care/api-reference/authorization/client-login) API without the word `Bearer`. - identifier: Pass the identifier value i.e. phr address to get it kyced. - identifier_type: Pass the type of identifier which you passed in `identifier` key i.e. "phr_address". - flow: Pass the type of flow for which you want to use SDK for i.e. `abha-kyc` for KYC flow. - orgIcon: Public CDN URL of your organisation's icon to display inside the SDK url should start with https://. [Example](https://cdn.eka.care/vagus/cl56w6zg3001f0scsaqrh16is.jpg) - linkToOrgIcon: Public CDN URL of the icon representing “Link ABHA to your organisation” url should start with https://. [Example](https://cdn.eka.care/vagus/cm6agrs5000090tfwfz984x5b.webp)
`keys with ? are optional.` |
+| `onKYCSuccess` | `(params: TOnAbhaKycSuccessParams) => void` | ✅ | Triggered when the user KYC verified successfully.
+| `onError` | `(params: TOnAbhaFailureParams) => void` | ✅ | Triggered when an error occurs during the ABHA flow.
+| `onAbhaClose` | `() => void` | ✅ | Triggered when SDK closes. |
+
+**Example:**
+
+```javascript
+window.initAbhaApp({
+ containerId: "sdk_container",
+ data: {
+ accessToken: "your_access_token_here",
+ identifier: "phr_address_of_the_patient_to_be_kyced"
+ identifier_type: "phr_address"
+ flow: "abha-kyc"
+ orgIcon: "url_of_your_org_icon",
+ linkToOrgIcon: "url_of_image_to_link_abha_to_your_org",
+ },
+ onKYCSuccess: (params) => {
+ console.log("ABHA KYC verification successful!", params);
+ },
+ onError: (error) => {
+ console.error("ABHA flow failed:", error);
+ },
+ onAbhaClose: (error) => {
+ console.error("ABHA SDK closed");
+ },
+});
+```
+
+## Callback Parameters
+
+
+### onKYCSuccess Callback
+
+The onKYCSuccess callback is triggered when the ABHA KYC flow completes successfully.
+It returns a confirmation message indicating that the KYC has been verified.
+
+**Callback Signature:**
+
+```typescript
+onKYCSuccess: (params: TOnAbhaKycSuccessParams) => void;
+```
+
+**Type Definitions**
+
+```typescript
+type TOnAbhaKycSuccess = string;
+```
+
+**Parameters**
+| | Type | Description |
+| ---------- | ----------------------- | ---------------------------------------------------------------------------------------------------------- |
+| `TOnAbhaKycSuccess` | `string` | A confirmation message from SDK post KYC verification |
+
+
+
+**Example:**
+
+```javascript
+const onKYCSuccess = (params) => {
+ console.log("KYC verification Success:", params);
+
+ alert("KYC was verified successfully!");
+
+ // Optionally pass data to native bridge if available
+ if (window.EkaAbha) {
+ window.EkaAbha.onAbhaKYCSuccess(params);
+ }
+};
+```
+
+### onError Callback
+The onError callback is triggered whenever an ABHA flow fails or is interrupted.
+It provides details about the failure through structured parameters, allowing you to handle or forward the error appropriately (for example, to native apps or monitoring tools).
+
+**Callback Signature:**
+
+```typescript
+onError: (params: TOnAbhaFailureParams) => void;
+```
+
+**Type Definitions**
+
+```typescript
+type TOnAbhaFailureParams = {
+ error?: string;
+ response?: TAuthVerifyV2Response;
+};
+
+type TAuthVerifyV2Response = {
+ skip_state: number;
+ method: AUTH_METHOD;
+ data?: {
+ tokens: {
+ sess: string;
+ refresh: string;
+ };
+ profile: TProfileRecord;
+ };
+ txn_id: string;
+ error?: {
+ code: number;
+ message: string;
+ };
+};
+
+enum AUTH_METHOD {
+ EMAIL = 1,
+ MOBILE = 2,
+ ABHA = 7,
+}
+
+type TProfileRecord = {
+ fln: string;
+ fn: string;
+ mn?: string;
+ ln?: string;
+ gen?: "M" | "F" | "O" | "U" | undefined; // 'male' | 'female' | 'other' | 'unknown'
+ dob?: string;
+ mobile?: string;
+ email?: string;
+ uuid?: string;
+ bloodgroup?: "" | "A+" | "A-" | "B+" | "B-" | "O+" | "O-" | "AB+" | "AB-";
+ pic?: string;
+ as?: string;
+ "dob-valid"?: boolean;
+ "is-d"?: boolean;
+ "is-d-s"?: boolean;
+ "is-p"?: boolean;
+ oid: string;
+ at: string;
+ type?: 1 | 2 | 3 | 4 | 5 | 6;
+ "health-ids"?: Array;
+ abha_number?: string;
+ kyc_verified?: boolean;
+};
+
+```
+
+**Parameters**
+| Key | Type | Description |
+| ---------- | ------------------------ | ---------------------------------------------------------------- |
+| `error` | `string?` | Short description of the failure or error message. |
+| `response` | `TAuthVerifyV2Response?` | Partial or full API response object returned from ABHA services. |
+
+
+**Example:**
+
+```javascript
+const onError = (params) => {
+ console.error("ABHA Error:", params);
+
+ if (params.response?.error?.code === 1001) {
+ alert("Authentication failed. Please try again.");
+ } else if (params.error === "NETWORK_ERROR") {
+ alert("Please check your internet connection.");
+ } else {
+ alert("Something went wrong. Please retry.");
+ }
+
+ // Forward the error to native handler if available
+ if (window.EkaAbha) {
+ window.EkaAbha.onAbhaFailure(JSON.stringify(params));
+ }
+};
+```
+
+### onAbhaClose Callback
+
+The onAbhaClose callback is triggered when the ABHA SDK flow gets closed.
+
+**Callback Signature:**
+
+```typescript
+onAbhaClose: () => void;
+```
+
+**Example:**
+
+```javascript
+const onAbhaClose = () => {
+ console.log("ABHA SDK Closed");
+};
+```
+
+**Suggest Handling**
+-Always log the full error response (params) for debugging.
+-Display friendly error messages for known error.code values.
+-If params.response is present, inspect response.error.message for more detail.
+-If integrating with native apps, forward the serialized error object:
+```javascript
+window.EkaAbha.onAbhaFailure(JSON.stringify(params));
+```
+
+**Suggest Handling**
+-Always log the full error response (params) for debugging.
+-Display friendly error messages for known error.code values.
+-If params.response is present, inspect response.error.message for more detail.
+-If integrating with native apps, forward the serialized error object:
+```javascript
+window.EkaAbha.onAbhaFailure(JSON.stringify(params));
+```
+
+## Container Styling
+Ensure your container has sufficient space:
+```html
+
+```
+
+## Troubleshooting
+
+### Common Issues
+
+#### 1. SDK Not Rendering
+
+**Problem**: Nothing appears in the container.
+
+**Solution**:
+- Ensure containerId matches an existing HTML element.
+- Verify the SDK JS and CSS are correctly loaded.
+- Check browser console for errors.
+
+#### 2. APIs Not Being Called
+
+**Problem**: API requests are not triggered after the SDK is mounted.
+
+**Solution**:
+- Ensure that the accessToken is passed correctly (do not include the Bearer prefix) and that the token has not expired.
+- To prevent CORS-related issues, ensure that your domain is whitelisted.
+
+#### 3. Callback Not Triggered
+
+**Problem**: onSuccess, onError, onKYCSuccess, onConsentSuccess, onAbhaClose isn’t firing.
+
+**Solution**:
+- Make sure callbacks are passed as valid functions.
+- Avoid race conditions (e.g., calling before SDK fully loads).
+
+#### 4. Styling Issues
+
+**Problem**: SDK content appears misaligned or clipped.
+
+**Solution**:
+- Give your container a fixed height (e.g., 600px).
+- Ensure no parent element uses overflow: hidden.
+
diff --git a/SDKs/web-sdk/abha-sdk.mdx b/SDKs/web-sdk/abha-sdk/abha-login-create.mdx
similarity index 54%
rename from SDKs/web-sdk/abha-sdk.mdx
rename to SDKs/web-sdk/abha-sdk/abha-login-create.mdx
index 2d63313b..39a3ac7d 100644
--- a/SDKs/web-sdk/abha-sdk.mdx
+++ b/SDKs/web-sdk/abha-sdk/abha-login-create.mdx
@@ -1,29 +1,16 @@
---
-title: ABHA SDK
-description: "Complete implementation guide for the ABHA[Ayushman Bharat Digital Mission] SDK"
+title: ABHA Registration
+description: "Complete implementation guide for the ABHA SDK to be used for ABHA Login or Create."
---
-# ABHA SDK Implementation
+# ABHA SDK Login or Create
-This guide provides everything you need to integrate the ABHA SDK into your application.
+This guide provides everything you need to integrate the ABHA SDK into your application for Create ABHA, Login with ABHA flows into your healthcare applications. It provides:
-## Overview
+- **Create ABHA**: Create a new ABHA using Mobile or Aadhaar.
+- **Login with ABHA**: Login to your exisiting ABHA using PHR Address, ABHA number, Aadhaar number or Mobile number.
-The ABHA SDK allows you to integrate Create ABHA, Login with ABHA flows into your healthcare applications. It provides:
-
-- **Create ABHA**: Create a new ABHA using Mobile or Aadhaar
-- **Login with ABHA**: Login with ABHA address[PHR Address], ABHA number, Adhaar number or Mobile number linked to your ABHA into your healthcare application.
-
-## Installation
-
-### Prerequisites
-
-- A modern web browser.
-- Your domain must be whitelisted with Eka Care to avoid CORS(Cross-Origin Resource Sharing) error.
- (Contact Eka Care to request API access and domain whitelisting.)
-- A valid HTML container element where the SDK will mount.
-
-### Setup
+### Implementation Example
Add the following HTML and script tags to your webpage:
@@ -51,7 +38,6 @@ Add the following HTML and script tags to your webpage:
@@ -59,30 +45,40 @@ Add the following HTML and script tags to your webpage:
function mountABHASDK() {
window.initAbhaApp({
containerId: "sdk_container",
+ clientId: 'ext',
// Pass access token and oid
data: {
accessToken: "", // Pass the access token you have
oid: "", // Pass if you have the OID
+ orgIcon: "", // Pass the url to your organisation icon which starts with for ex: https://cdn.eka.care/vagus/cl56w6zg3001f0scsaqrh16is.jpg
+ linkToOrgIcon: "", // Pass the url of an image which depicts linking abha to your organisation for ex https://cdn.eka.care/vagus/cm6agrs5000090tfwfz984x5b.webp
},
// Success callback
- onSuccess: async (params) => {
- console.log("ABHA flow completed successfully:", params);
+ onSuccess: (params) => {
+ console.log("ABHA Registration flow completed successfully:", params);
+
// Example: Store ABHA data in your app
- dispatch({
- type: "set-only-healthid-data",
- healthIdData: formatter(params.response.data),
- });
+ if (window.EkaAbha) {
+ window.EkaAbha.onAbhaSuccess(JSON.stringify(params));
+ }
},
// Error callback
onError: (params) => {
- console.error("ABHA flow failed:", params);
+ console.error("ABHA SDK failed:", params);
+
+ // Example: Store ABHA data in your app
if (window.EkaAbha) {
window.EkaAbha.onAbhaFailure(JSON.stringify(params));
}
},
+
+ // Abha Close callback
+ onAbhaClose: () => {
+ console.log("ABHA SDK closed");
+ },
});
}
@@ -100,9 +96,11 @@ Initializes and renders the ABHA SDK in your specified container.
| Name | Type | Required | Description |
| ------------- | --------------------------------------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| `containerId` | `string` | ✅ | The HTML element ID where the SDK will mount. |
-| `data` | `{ accessToken: string; oid?: string }` | ⚙️ Optional | Configuration data for secure API integration. - `accessToken`: Pass the access token you have. - `oid`: Pass if available. |
-| `onSuccess` | `(params: AbhaSuccessParams) => void` | ✅ | Triggered when the user successfully creates or logs in to ABHA. |
-| `onError` | `(params: AbhaErrorParams) => void` | ✅ | Triggered when an error occurs during the ABHA flow. |
+| `clientId` | `string` | ✅ | Provide clientId as `ext`. |
+| `data` | `{` `accessToken: string;` `orgIcon?: string;` `linkToOrgIcon?: string;` `}` | ⚙️ Optional | Configuration data for initializing the ABHA flow.
- accessToken: Pass the access token you have generated from [Connect Login ](https://developer.eka.care/api-reference/authorization/client-login) API without the word `Bearer`. - orgIcon: Public CDN URL of your organisation's icon to display inside the SDK url should start with https://. [Example](https://cdn.eka.care/vagus/cl56w6zg3001f0scsaqrh16is.jpg) - linkToOrgIcon: Public CDN URL of the icon representing “Link ABHA to your organisation” url should start with https://. [Example](https://cdn.eka.care/vagus/cm6agrs5000090tfwfz984x5b.webp)
-
-
-
-
-
-
-
-
-
-
-```
-
-## Type Definitions
-
-```typescript
-interface InitAbhaAppParams {
- containerId: string;
- data?: {
- accessToken: string;
- oid?: string;
- };
- onSuccess: (params: AbhaSuccessParams) => void;
- onError: (params: AbhaErrorParams) => void;
-}
-
-interface AbhaSuccessParams {
- response: {
- data: {
- abha_number?: string;
- abha_address?: string;
- name?: string;
- gender?: string;
- yearOfBirth?: string;
- mobile?: string;
- };
- };
- message: string;
- status: "SUCCESS";
-}
-
-interface AbhaErrorParams {
- status: "FAILED";
- message: string;
- error_code?: string;
- details?: any;
-}
-```
-
## Troubleshooting
### Common Issues
@@ -365,19 +373,26 @@ interface AbhaErrorParams {
- Verify the SDK JS and CSS are correctly loaded.
- Check browser console for errors.
-#### 2. Callback Not Triggered
+#### 2. APIs Not Being Called
+
+**Problem**: API requests are not triggered after the SDK is mounted.
+
+**Solution**:
+- Ensure that the accessToken is passed correctly (do not include the Bearer prefix) and that the token has not expired.
+- To prevent CORS-related issues, ensure that your domain is whitelisted.
+
+#### 3. Callback Not Triggered
-**Problem**: onSuccess or onError isn’t firing.
+**Problem**: onSuccess, onError, onKYCSuccess, onConsentSuccess, onAbhaClose isn’t firing.
**Solution**:
-- Make sure both callbacks are passed as valid functions.
+- Make sure callbacks are passed as valid functions.
- Avoid race conditions (e.g., calling before SDK fully loads).
-#### 3. Styling Issues
+#### 4. Styling Issues
**Problem**: SDK content appears misaligned or clipped.
**Solution**:
- Give your container a fixed height (e.g., 600px).
-- Ensure no parent element uses overflow: hidden.
-
+- Ensure no parent element uses overflow: hidden.
\ No newline at end of file
diff --git a/SDKs/web-sdk/abha-sdk/get-started.mdx b/SDKs/web-sdk/abha-sdk/get-started.mdx
new file mode 100644
index 00000000..704f73fb
--- /dev/null
+++ b/SDKs/web-sdk/abha-sdk/get-started.mdx
@@ -0,0 +1,461 @@
+---
+title: Get Started
+description: "Complete implementation guide for the ABHA[Ayushman Bharat Digital Mission] SDK"
+---
+
+# ABHA SDK Implementation
+
+This guide provides everything you need to integrate the ABHA SDK into your application.
+
+## Overview
+
+The ABHA SDK allows you to integrate Create ABHA, Login with ABHA, ABHA Consent Management, ABHA Profile KYC flows into your healthcare applications. It provides:
+
+- **Create ABHA**: Create a new ABHA using Mobile or Aadhaar.
+- **Login with ABHA**: Login to your exisiting ABHA using PHR Address, ABHA number, Aadhaar number or Mobile number.
+- **ABHA Consent Management**: Manage Consent requests raised by healthcare providers to share medical records securely.
+- **ABHA Profile KYC**: Get your ABHA address KYC verified.
+
+## Installation
+
+### Prerequisites
+
+- A modern web browser.
+- Your domain must be whitelisted with Eka Care to avoid CORS(Cross-Origin Resource Sharing) error.
+ (Contact Eka Care to request API access and domain whitelisting.)
+- A valid HTML container element where the SDK will mount.
+
+### Setup
+
+Add the following HTML and script tags to your webpage:
+
+```html
+
+
+
+ ABHA SDK Integration
+
+
+
+
+
+
ABHA SDK Demo
+
+
+
+
+
+
+
+
+
+
+
+
+
+```
+## Core Functions
+
+### 1. initAbhaApp
+
+Initializes and renders the ABHA SDK in your specified container.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| ------------- | --------------------------------------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
+| `containerId` | `string` | ✅ | The HTML element ID where the SDK will mount. |
+| `clientId` | `string` | ✅ | Provide clientId as `ext`. |
+| `data` | `{` `accessToken: string;` `oid?: string;` `identifier?: string;` `identifier_type?: string;` `consent_id?: string;` `flow?: string;` `orgIcon?: string;` `linkToOrgIcon?: string;` `}` | ⚙️ Optional | Configuration data for initializing the ABHA flow.
- accessToken: Pass the access token you have generated from [Connect Login ](https://developer.eka.care/api-reference/authorization/client-login) API without the word `Bearer`. - oid: Pass oid of patient if available / needed in the flow. - identifier: Pass the login identifier value i.e. mobile number / aadhaar number / phr address / abha number. - identifier_type: Pass the type of identifier which you passed in `identifier` key i.e. "mobile" / "aadhaar_number" / "phr_address" / "abha_number" /. If not known pass undefined. - consent_id: Pass the consent_id of the consent request raised. - flow: Pass the type of flow for which you want to use SDK for i.e. `abha-kyc` for KYC flow / `consent` for Consent flow. - orgIcon: Public CDN URL of your organisation's icon to display inside the SDK url should start with https://. [Example](https://cdn.eka.care/vagus/cl56w6zg3001f0scsaqrh16is.jpg) - linkToOrgIcon: Public CDN URL of the icon representing “Link ABHA to your organisation” url should start with https://. [Example](https://cdn.eka.care/vagus/cm6agrs5000090tfwfz984x5b.webp)
`keys with ? are optional and needs to be passed as per flow requirement.` |
+| `onSuccess` | `(params: TOnAbhaSuccessParams) => void` | ✅ | Triggered when the user successfully creates or logs in to ABHA. |
+| `onKYCSuccess` | `(params: TOnAbhaKycSuccessParams) => void` | ⚙️ Optional | Triggered when the user KYC verified successfully.
+| `onConsentSuccess` | `(params: TOnAbhaConsentSuccessParams) => void` | ⚙️ Optional | Triggered when the consent flow completes successfully.
+| `onError` | `(params: TOnAbhaFailureParams) => void` | ✅ | Triggered when an error occurs during the ABHA flow.
+| `onAbhaClose` | `() => void` | ✅ | Triggered when SDK closes. |
+
+
+## Callback Parameters
+
+### onSuccess Callback
+
+The onSuccess callback is triggered when the ABHA flow completes successfully.
+It returns verified user details and tokens, which can be used to log in or continue the user’s session.
+
+**Callback Signature:**
+
+```typescript
+onSuccess: (params: TOnAbhaSuccessParams) => void;
+```
+
+**Type Definitions**
+
+```typescript
+type TOnAbhaSuccessParams = {
+ response: TAuthVerifyV2Response;
+};
+
+type TAuthVerifyV2Response = {
+ skip_state: number;
+ method: AUTH_METHOD;
+ data?: {
+ tokens: {
+ sess: string;
+ refresh: string;
+ };
+ profile: TProfileRecord;
+ };
+ txn_id: string;
+ error?: {
+ code: number;
+ message: string;
+ };
+};
+
+enum AUTH_METHOD {
+ EMAIL = 1,
+ MOBILE = 2,
+ ABHA = 7,
+}
+
+type TProfileRecord = {
+ fln: string;
+ fn: string;
+ mn?: string;
+ ln?: string;
+ gen?: "M" | "F" | "O" | "U" | undefined; // 'male' | 'female' | 'other' | 'unknown'
+ dob?: string;
+ mobile?: string;
+ email?: string;
+ uuid?: string;
+ bloodgroup?: "" | "A+" | "A-" | "B+" | "B-" | "O+" | "O-" | "AB+" | "AB-";
+ pic?: string;
+ as?: string;
+ "dob-valid"?: boolean;
+ "is-d"?: boolean;
+ "is-d-s"?: boolean;
+ "is-p"?: boolean;
+ oid: string;
+ at: string;
+ type?: 1 | 2 | 3 | 4 | 5 | 6;
+ "health-ids"?: Array;
+ abha_number?: string;
+ kyc_verified?: boolean;
+};
+
+```
+
+**Parameters**
+| Key | Type | Description |
+| ---------- | ----------------------- | ---------------------------------------------------------------------------------------------------------- |
+| `response` | `TAuthVerifyV2Response` | The complete ABHA verification response, containing session tokens, user profile, and transaction details. |
+
+
+
+**Example:**
+
+```javascript
+const onSuccess = (params) => {
+ console.log("ABHA Success:", params.response);
+
+ const abhaNumber = params.response.data?.profile?.abha_number;
+ const userName = params.response.data?.profile?.name;
+
+ alert(`Welcome ${userName}! Your ABHA Number: ${abhaNumber}`);
+
+ // Optionally pass data to native bridge if available
+ if (window.EkaAbha) {
+ window.EkaAbha.onAbhaSuccess(JSON.stringify(params));
+ }
+};
+```
+
+### onKYCSuccess Callback
+
+The onKYCSuccess callback is triggered when the ABHA KYC flow completes successfully.
+It returns a confirmation message indicating that the KYC has been verified.
+
+**Callback Signature:**
+
+```typescript
+onKYCSuccess: (params: TOnAbhaKycSuccessParams) => void;
+```
+
+**Type Definitions**
+
+```typescript
+type TOnAbhaKycSuccess = string;
+```
+
+**Parameters**
+| | Type | Description |
+| ---------- | ----------------------- | ---------------------------------------------------------------------------------------------------------- |
+| `TOnAbhaKycSuccess` | `string` | A confirmation message from SDK post KYC verification |
+
+
+
+**Example:**
+
+```javascript
+const onKYCSuccess = (params) => {
+ console.log("KYC verification Success:", params);
+
+ alert("KYC was verified successfully!");
+
+ // Optionally pass data to native bridge if available
+ if (window.EkaAbha) {
+ window.EkaAbha.onAbhaKYCSuccess(params);
+ }
+};
+```
+
+### onConsentSuccess Callback
+
+The onConsentSuccess callback is triggered when the ABHA Consent flow completes successfully.
+It returns a confirmation message indicating that the Consent flow ended successfully.
+
+**Callback Signature:**
+
+```typescript
+onConsentSuccess: (params: TOnAbhaConsentSuccessParams) => void;
+```
+
+**Type Definitions**
+
+```typescript
+type TOnAbhaConsentSuccessParams = string;
+```
+
+**Parameters**
+| | Type | Description |
+| ---------- | ----------------------- | ---------------------------------------------------------------------------------------------------------- |
+| `TOnAbhaConsentSuccessParams` | `string` | A confirmation message from SDK post Consent flow completion |
+
+
+
+**Example:**
+
+```javascript
+const onConsentSuccess = (params) => {
+ console.log("Consent Flow completed:", params);
+
+ alert("Consent flow completed successfully!");
+
+ // Optionally pass data to native bridge if available
+ if (window.EkaAbha) {
+ window.EkaAbha.onAbhaConsentSuccess(params);
+ }
+};
+```
+
+### onError Callback
+The onError callback is triggered whenever an ABHA flow fails or is interrupted.
+It provides details about the failure through structured parameters, allowing you to handle or forward the error appropriately (for example, to native apps or monitoring tools).
+
+**Callback Signature:**
+
+```typescript
+onError: (params: TOnAbhaFailureParams) => void;
+```
+
+**Type Definitions**
+
+```typescript
+type TOnAbhaFailureParams = {
+ error?: string;
+ response?: TAuthVerifyV2Response;
+};
+
+type TAuthVerifyV2Response = {
+ skip_state: number;
+ method: AUTH_METHOD;
+ data?: {
+ tokens: {
+ sess: string;
+ refresh: string;
+ };
+ profile: TProfileRecord;
+ };
+ txn_id: string;
+ error?: {
+ code: number;
+ message: string;
+ };
+};
+
+enum AUTH_METHOD {
+ EMAIL = 1,
+ MOBILE = 2,
+ ABHA = 7,
+}
+
+type TProfileRecord = {
+ fln: string;
+ fn: string;
+ mn?: string;
+ ln?: string;
+ gen?: "M" | "F" | "O" | "U" | undefined; // 'male' | 'female' | 'other' | 'unknown'
+ dob?: string;
+ mobile?: string;
+ email?: string;
+ uuid?: string;
+ bloodgroup?: "" | "A+" | "A-" | "B+" | "B-" | "O+" | "O-" | "AB+" | "AB-";
+ pic?: string;
+ as?: string;
+ "dob-valid"?: boolean;
+ "is-d"?: boolean;
+ "is-d-s"?: boolean;
+ "is-p"?: boolean;
+ oid: string;
+ at: string;
+ type?: 1 | 2 | 3 | 4 | 5 | 6;
+ "health-ids"?: Array;
+ abha_number?: string;
+ kyc_verified?: boolean;
+};
+
+```
+
+**Parameters**
+| Key | Type | Description |
+| ---------- | ------------------------ | ---------------------------------------------------------------- |
+| `error` | `string?` | Short description of the failure or error message. |
+| `response` | `TAuthVerifyV2Response?` | Partial or full API response object returned from ABHA services. |
+
+
+**Example:**
+
+```javascript
+const onError = (params) => {
+ console.error("ABHA Error:", params);
+
+ if (params.response?.error?.code === 1001) {
+ alert("Authentication failed. Please try again.");
+ } else if (params.error === "NETWORK_ERROR") {
+ alert("Please check your internet connection.");
+ } else {
+ alert("Something went wrong. Please retry.");
+ }
+
+ // Forward the error to native handler if available
+ if (window.EkaAbha) {
+ window.EkaAbha.onAbhaFailure(JSON.stringify(params));
+ }
+};
+```
+
+### onAbhaClose Callback
+
+The onAbhaClose callback is triggered when the ABHA SDK flow gets closed.
+
+**Callback Signature:**
+
+```typescript
+onAbhaClose: () => void;
+```
+
+**Example:**
+
+```javascript
+const onAbhaClose = () => {
+ console.log("ABHA SDK Closed");
+};
+```
+
+**Suggest Handling**
+-Always log the full error response (params) for debugging.
+-Display friendly error messages for known error.code values.
+-If params.response is present, inspect response.error.message for more detail.
+-If integrating with native apps, forward the serialized error object:
+```javascript
+window.EkaAbha.onAbhaFailure(JSON.stringify(params));
+```
+
+## Container Styling
+Ensure your container has sufficient space:
+```html
+
+```
+
+## Troubleshooting
+
+### Common Issues
+
+#### 1. SDK Not Rendering
+
+**Problem**: Nothing appears in the container.
+
+**Solution**:
+- Ensure containerId matches an existing HTML element.
+- Verify the SDK JS and CSS are correctly loaded.
+- Check browser console for errors.
+
+#### 2. APIs Not Being Called
+
+**Problem**: API requests are not triggered after the SDK is mounted.
+
+**Solution**:
+- Ensure that the accessToken is passed correctly (do not include the Bearer prefix) and that the token has not expired.
+- To prevent CORS-related issues, ensure that your domain is whitelisted.
+
+#### 3. Callback Not Triggered
+
+**Problem**: onSuccess, onError, onKYCSuccess, onConsentSuccess, onAbhaClose isn’t firing.
+
+**Solution**:
+- Make sure callbacks are passed as valid functions.
+- Avoid race conditions (e.g., calling before SDK fully loads).
+
+#### 4. Styling Issues
+
+**Problem**: SDK content appears misaligned or clipped.
+
+**Solution**:
+- Give your container a fixed height (e.g., 600px).
+- Ensure no parent element uses overflow: hidden.
+
diff --git a/api-reference/doc-tool/appointment-api/change-status.mdx b/api-reference/doc-tool/appointment-api/change-status.mdx
new file mode 100644
index 00000000..cf079d06
--- /dev/null
+++ b/api-reference/doc-tool/appointment-api/change-status.mdx
@@ -0,0 +1,3 @@
+---
+openapi: post /dr/v1/appointment/{appointment_id}/change-status
+---
\ No newline at end of file
diff --git a/api-reference/doc-tool/doc-tool.yaml b/api-reference/doc-tool/doc-tool.yaml
index 649d27be..21c122f5 100644
--- a/api-reference/doc-tool/doc-tool.yaml
+++ b/api-reference/doc-tool/doc-tool.yaml
@@ -2077,6 +2077,9 @@ paths:
properties:
partner_appointment_id:
type: string
+ token:
+ type: integer
+ description: 'A unique number given to each patient to indicate their position in the queue.'
appointment_details:
type: object
properties:
@@ -2238,6 +2241,7 @@ paths:
partner_clinic_id: "642783"
partner_doctor_id: "8423994"
partner_patient_id: "6742984"
+ token: 2
appointment_details:
start_time: 1730189586
end_time: 1730189586
@@ -2409,14 +2413,38 @@ paths:
- **50** → when filtering by (`doctor_id`, `start_date`, `end_date`) OR (`clinic_id`, `start_date`, `end_date`) OR (`doctor_id`, `clinic_id`, `start_date`, `end_date`).
- **30** → when filtering only by (`start_date`, `end_date`).
- ### Appointment Status Codes
- - BK : Booked
- - OG : Ongoing
- - CM : Completed with Prescription
- - CMNP : Completed without a Prescription
- - CN : Cancelled
- - CND : Cancelled by Doctor
- - CNS : Cancelled by Staff
+ ### Appointment_statuses:
+
+ Booked / Queue States:
+ - BK (Booked) : Appointment created/confirmed.
+ - CK (Checked-in) : Booked appointment added to the Queue (Checked-in).
+ - RV (Reserved) : Appointment marked as Reserved, when patient said they will come for the appointment on the follow-up appointment message.
+ - IN (Initiated) : Appointment marked as Initiated, when patient received follow-up appointment message.
+ - PA (Parked) : Appointment moved to Parked state.
+
+ Ongoing States:
+ - OG (Ongoing): Consultation is in progress.
+
+ Completion Statuses:
+ - CM (Completed): Appointment completed with a prescription created.
+ - CMNP (Completed No Prescription) : Appointment marked Exit from Queue / Completed without a prescription.
+ - AB (Aborted) : Appointment was started (Start Visit) but not completed. Automatically marked AB at 12:00 AM next day.
+ - NS (No Show) : Appointment was added to Queue but not started/completed. Automatically marked NS at 12:00 AM next day.
+ - NSD (No Show Doctor) : No-show tagged specifically from a doctor’s action (if implemented).
+ - NSS (No Show Staff) : No-show tagged specifically from a staff action (if implemented).
+
+ Cancellation Statuses:
+ - CN (Cancelled) : Appointment cancelled via API.
+ - CND (Cancelled Doctor) : Cancelled from the doctor’s account in the tool.
+ - CNS (Cancelled Staff) : Cancelled from the staff’s account in the tool.
+ - PC (Provisional Cancelled) : Appointment marked as provisional cancellation, when patient said they will not come for the appointment on the follow-up appointment message.
+ - PNR (Payment Not Received) : Appointment marked as PNR, when patient tried paying for a pre-paid appointment but the payment failed.
+
+ Reschedule Statuses:
+ - RE : Rescheduled via API.
+ - RES : Rescheduled from staff account.
+ - RED : Rescheduled from doctor account.
+
operationId: GetBusinessAppointments
parameters:
- name: Authorization
@@ -3091,14 +3119,39 @@ paths:
appointment status, and related services.
- Appointment_statuses:
- - BK : Booked
- - OG : Ongoing
- - CM : Completed with Prescription
- - CMNP : Completed without a Prescription
- - CN : Cancelled
- - CND : Cancelled by Doctor
- - CNS : Cancelled by Staff
+
+ ### Appointment_statuses:
+
+ Booked / Queue States:
+ - BK (Booked) : Appointment created/confirmed.
+ - CK (Checked-in) : Booked appointment added to the Queue (Checked-in).
+ - RV (Reserved) : Appointment marked as Reserved, when patient said they will come for the appointment on the follow-up appointment message.
+ - IN (Initiated) : Appointment marked as Initiated, when patient received follow-up appointment message.
+ - PA (Parked) : Appointment moved to Parked state.
+
+ Ongoing States:
+ - OG (Ongoing): Consultation is in progress.
+
+ Completion Statuses:
+ - CM (Completed): Appointment completed with a prescription created.
+ - CMNP (Completed No Prescription) : Appointment marked Exit from Queue / Completed without a prescription.
+ - AB (Aborted) : Appointment was started (Start Visit) but not completed. Automatically marked AB at 12:00 AM next day.
+ - NS (No Show) : Appointment was added to Queue but not started/completed. Automatically marked NS at 12:00 AM next day.
+ - NSD (No Show Doctor) : No-show tagged specifically from a doctor’s action (if implemented).
+ - NSS (No Show Staff) : No-show tagged specifically from a staff action (if implemented).
+
+ Cancellation Statuses:
+ - CN (Cancelled) : Appointment cancelled via API.
+ - CND (Cancelled Doctor) : Cancelled from the doctor’s account in the tool.
+ - CNS (Cancelled Staff) : Cancelled from the staff’s account in the tool.
+ - PC (Provisional Cancelled) : Appointment marked as provisional cancellation, when patient said they will not come for the appointment on the follow-up appointment message.
+ - PNR (Payment Not Received) : Appointment marked as PNR, when patient tried paying for a pre-paid appointment but the payment failed.
+
+ Reschedule Statuses:
+ - RE : Rescheduled via API.
+ - RES : Rescheduled from staff account.
+ - RED : Rescheduled from doctor account.
+
operationId: GetappointmentDetails
parameters:
@@ -3469,6 +3522,9 @@ paths:
end_time:
type: integer
description: 'End time of new appointment in epoch. To be used in order to reschedule appointment.'
+ token:
+ type: integer
+ description: 'A unique number given to each patient to indicate their position in the queue.'
video_connect:
type: object
properties:
@@ -3593,7 +3649,7 @@ paths:
city: "Bangalore"
pincode: 560049
partner_patient_id: "6742984"
-
+ token: 2
video_connect:
vendor: 100ms
url: "https://xyz.live/meeting/nfo-necy-cwg"
@@ -3746,6 +3802,9 @@ paths:
schema:
type: object
properties:
+ token:
+ type: integer
+ description: 'A unique number given to each patient to indicate their position in the queue.'
appointment_details:
type: object
properties:
@@ -4827,6 +4886,122 @@ paths:
code: "SERVER_ERROR"
message: "An unexpected error occurred on the server"
deprecated: false
+
+ /dr/v1/appointment/{appointment_id}/change-status:
+ post:
+ tags:
+ - Appointment API
+ summary: No-Show Appointment
+ description: >-
+
+ ### Overview
+
+
+ This API endpoint is used to update an existing appointment to No-Show state.
+
+ operationId: ChangeStatusAppointment
+ parameters:
+ - name: auth
+ in: header
+ description: ''
+ required: true
+ style: simple
+ schema:
+ type: string
+ example: 'auth'
+ - name: appointment_id
+ in: path
+ description: ''
+ required: true
+ style: simple
+ schema:
+ type: string
+
+ - name: partner_id
+ in: query
+ description: 'If set to 1 then appointment_id in path parameter should be partner_appointment_id else eka apppointment_id'
+ required: true
+ style: form
+ explode: true
+ schema:
+ type: string
+ example: '1'
+ requestBody:
+ description: ''
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ status:
+ type: string
+ example: 'NS'
+ responses:
+ '200':
+ description: OK
+ headers:
+ Date:
+ content:
+ text/plain:
+ schema:
+ type: string
+ example: Thu, 16 Apr 2020 08:47:12 GMT
+ Transfer-Encoding:
+ content:
+ text/plain:
+ schema:
+ type: string
+ example: chunked
+ Connection:
+ content:
+ text/plain:
+ schema:
+ type: string
+ example: keep-alive
+ Server:
+ content:
+ text/plain:
+ schema:
+ type: string
+ example: nginx/1.10.3 (Ubuntu)
+ Vary:
+ content:
+ text/plain:
+ schema:
+ type: string
+ example: Accept-Encoding
+ Strict-Transport-Security:
+ content:
+ text/plain:
+ schema:
+ type: string
+ example: max-age=15768000
+ Content-Encoding:
+ content:
+ text/plain:
+ schema:
+ type: string
+ example: gzip
+ '400':
+ description: Bad Request
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ error:
+ type: object
+ properties:
+ code:
+ type: string
+ message:
+ type: string
+ example:
+ error:
+ code: "INVALID_REQUEST"
+ message: "The request is invalid or missing required parameters"
+
+ deprecated: false
/dr/v1/appointment/patient/{patient_id}:
get:
tags:
@@ -5756,7 +5931,265 @@ paths:
conf_id: "25e4acd4eb5fbc0b8523d8de315555a9ee7b5700b0b89a07879daff1be1510e6"
deprecated: false
-
+ /cdr/v1/hipusers/{hip_user_id}:
+ get:
+ tags:
+ - HIP Users API
+ summary: Get HIP User Details by ID
+ description: >
+ This API retrieves detailed information about a specific HIP user
+ registered under a business. The response includes the user's personal
+ details, assigned doctors, and associated clinics.
+
+ > _Use this API to get complete profile details of a single HIP user by their Eka user ID._
+ operationId: GetHIPUserById
+ parameters:
+ - name: auth
+ in: header
+ required: true
+ description: >
+ The authentication token for the business. It is used to verify the business making the request. The token can be fetched from the Auth API.
+ schema:
+ type: string
+ example: >
+ eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJkb2Mtd2ViIiwiYi1pZCI6IjcxNzYzMzgwMzI2NzY4MjQiLCJjYyI6eyJlc2MiOjAsInBleCI6MTc5NDc4NzIwMCwicHN0IjoidHJ1ZSIsInN0eSI6InAifSwiZG9iIjoiMTk2My0wNS0wMyIsImV4cCI6MTc2Mzk4MDc5MSwiZm4iOiJNYW5vaGFyYW4iLCJnZW4iOiJNIiwiaWF0IjoxNzYzOTc4OTkxLCJpZHAiOiJtb2IiLCJpc3MiOiJlbXIuZWthLmNhcmUiLCJqdGkiOiI5NzlhMmM5Yy03ODkwLTQ5NDUtYWU2YS1kZjQzNGQxNjMyOTQiLCJsbiI6Ik1vaGFuIiwib2lkIjoiMTc2MzM4MDMyNjkyMDU3IiwicHJpIjp0cnVlLCJwcyI6IkFEIiwiciI6IklOIiwicyI6IkRyIiwidXVpZCI6IjgyNmEzZDU3LWVkMmUtNDNjYi1iODg0LTc0OGQyOTcwMzI1NyIsInctaWQiOiI3MTc2MzM4MDMyNjc2ODI0Iiwidy1uIjoiTWFudXNocmVlIEhvc3BpdGFsIn0.zFZtvgcNVV0iEEvmmjmCOh79HRHsAcvrc6jff71E7Xo
+ - name: hip_user_id
+ in: path
+ required: true
+ description: The unique Eka Care ID of the HIP user.
+ schema:
+ type: string
+ example: "176338032692057"
+ responses:
+ '200':
+ description: OK
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ status:
+ type: string
+ example: "success"
+ user:
+ type: object
+ properties:
+ id:
+ type: string
+ example: "176338032692057"
+ firstname:
+ type: string
+ example: "Manoharan"
+ lastname:
+ type: string
+ example: "Mohan"
+ mobile:
+ type: string
+ example: "9840254450"
+ email:
+ type: string
+ example: "criticcaredr@gmail.com"
+ is_admin:
+ type: boolean
+ example: true
+ seat_type:
+ type: string
+ description: >
+ Indicates the type of seat or subscription plan assigned to the HIP user.
+ - **p** → Premium user (full access to advanced features)
+ - **b** → Basic user (access to standard features only)
+ example: "p"
+ doctors:
+ type: array
+ items:
+ type: object
+ properties:
+ id:
+ type: string
+ example: "do1763380327031"
+ firstname:
+ type: string
+ example: "Manoharan"
+ lastname:
+ type: string
+ example: "Mohan"
+ clinics:
+ type: array
+ items:
+ type: object
+ properties:
+ id:
+ type: string
+ example: "c-1506ace382e94bf5ba9751fb"
+ name:
+ type: string
+ example: "Manushree Hospital"
+ partner_id:
+ type: string
+ nullable: true
+ example: null
+ '403':
+ description: Forbidden
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ status:
+ type: string
+ example: "error"
+ message:
+ type: string
+ example: "You do not have permission to access this HIP user"
+ '404':
+ description: Not Found
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ error:
+ type: object
+ properties:
+ code:
+ type: string
+ example: "NOT_FOUND"
+ message:
+ type: string
+ example: "User not found. Please check the provided ID."
+
+ '500':
+ description: Internal Server Error
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ status:
+ type: string
+ example: "error"
+ message:
+ type: string
+ example: "An unexpected error occurred on the server"
+ /cdr/v1/hipusers/:
+ get:
+ tags:
+ - HIP Users API
+ summary: Get All HIP Users of a Business
+ description: >
+ This API retrieves the list of all HIP users associated with a business.
+ The response includes each user's details along with their linked doctors
+ and clinics.
+
+ > _Use this API to fetch all HIP users for a business account in one call._
+ operationId: GetAllHIPUsers
+ parameters:
+ - name: auth
+ in: header
+ required: true
+ description: >
+ The authentication token for the business. It is used to verify the business making the request. The token can be fetched from the Auth API.
+ schema:
+ type: string
+ example: >
+ eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJkb2Mtd2ViIiwiYi1pZCI6IjcxNzYzMzgwMzI2NzY4MjQiLCJjYyI6eyJlc2MiOjAsInBleCI6MTc5NDc4NzIwMCwicHN0IjoidHJ1ZSIsInN0eSI6InAifSwiZG9iIjoiMTk2My0wNS0wMyIsImV4cCI6MTc2Mzk4MDc5MSwiZm4iOiJNYW5vaGFyYW4iLCJnZW4iOiJNIiwiaWF0IjoxNzYzOTc4OTkxLCJpZHAiOiJtb2IiLCJpc3MiOiJlbXIuZWthLmNhcmUiLCJqdGkiOiI5NzlhMmM5Yy03ODkwLTQ5NDUtYWU2YS1kZjQzNGQxNjMyOTQiLCJsbiI6Ik1vaGFuIiwib2lkIjoiMTc2MzM4MDMyNjkyMDU3IiwicHJpIjp0cnVlLCJwcyI6IkFEIiwiciI6IklOIiwicyI6IkRyIiwidXVpZCI6IjgyNmEzZDU3LWVkMmUtNDNjYi1iODg0LTc0OGQyOTcwMzI1NyIsInctaWQiOiI3MTc2MzM4MDMyNjc2ODI0Iiwidy1uIjoiTWFudXNocmVlIEhvc3BpdGFsIn0.zFZtvgcNVV0iEEvmmjmCOh79HRHsAcvrc6jff71E7Xo
+ responses:
+ '200':
+ description: OK
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ status:
+ type: string
+ example: "success"
+ users:
+ type: array
+ items:
+ type: object
+ properties:
+ id:
+ type: string
+ example: "176338032692057"
+ firstname:
+ type: string
+ example: "Manoharan"
+ lastname:
+ type: string
+ example: "Mohan"
+ mobile:
+ type: string
+ example: "9840254450"
+ email:
+ type: string
+ example: "criticcaredr@gmail.com"
+ is_admin:
+ type: boolean
+ example: true
+ seat_type:
+ type: string
+ description: >
+ Indicates the type of seat or subscription plan assigned to the HIP user.
+ - **p** → Premium user (full access to advanced features)
+ - **b** → Basic user (access to standard features only)
+ example: "p"
+ doctors:
+ type: array
+ items:
+ type: object
+ properties:
+ id:
+ type: string
+ example: "do1763380327031"
+ firstname:
+ type: string
+ example: "Manoharan"
+ lastname:
+ type: string
+ example: "Mohan"
+ clinics:
+ type: array
+ items:
+ type: object
+ properties:
+ id:
+ type: string
+ example: "c-1506ace382e94bf5ba9751fb"
+ name:
+ type: string
+ example: "Manushree Hospital"
+ partner_id:
+ type: string
+ nullable: true
+ example: null
+ '403':
+ description: Forbidden
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ status:
+ type: string
+ example: "error"
+ message:
+ type: string
+ example: "You do not have permission to access HIP users for this business"
+ '500':
+ description: Internal Server Error
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ status:
+ type: string
+ example: "error"
+ message:
+ type: string
+ example: "An unexpected error occurred on the server"
+
components:
schemas:
AuthLoginRequest:
diff --git a/api-reference/doc-tool/post_webhooks/google-review-webhook.mdx b/api-reference/doc-tool/post_webhooks/google-review-webhook.mdx
new file mode 100644
index 00000000..4bcb3b0d
--- /dev/null
+++ b/api-reference/doc-tool/post_webhooks/google-review-webhook.mdx
@@ -0,0 +1,3 @@
+---
+openapi: post /registered_url_for_google_review_events
+---
\ No newline at end of file
diff --git a/api-reference/doc-tool/post_webhooks/mcert-webhook.mdx b/api-reference/doc-tool/post_webhooks/mcert-webhook.mdx
new file mode 100644
index 00000000..58205ad4
--- /dev/null
+++ b/api-reference/doc-tool/post_webhooks/mcert-webhook.mdx
@@ -0,0 +1,3 @@
+---
+openapi: post /registered_url_for_consent_form
+---
\ No newline at end of file
diff --git a/api-reference/doc-tool/post_webhooks/post_webhook.yaml b/api-reference/doc-tool/post_webhooks/post_webhook.yaml
index 42409609..5c0de81a 100644
--- a/api-reference/doc-tool/post_webhooks/post_webhook.yaml
+++ b/api-reference/doc-tool/post_webhooks/post_webhook.yaml
@@ -1096,6 +1096,363 @@ paths:
description: "Successfully received the schedule event"
headers: {}
deprecated: false
+ /registered_url_for_google_review_events:
+ post:
+ tags:
+ - Doctor Webhooks
+ summary: Google Review Events
+ description: >-
+ When a Google review request event occurs, a webhook is sent to the registered endpoint containing the Doctor ID, Google review link, and Patient ID.
+
+ The receiving system can use these details to update or manage Google review information as needed.
+ operationId: GoogleReviewRequestWebhook
+ parameters: []
+ requestBody:
+ description: ''
+ content:
+ application/json:
+ schema:
+ type: object
+ required:
+ - event
+ - event_time
+ - timestamp
+ - client_id
+ - business_id
+ - data
+ properties:
+ event:
+ type: string
+ enum:
+ - "google_review.request"
+ example: "google_review.request"
+ description: "Type of event"
+ event_time:
+ type: integer
+ example: 1730189586
+ description: "Event occurred timestamp"
+ timestamp:
+ type: integer
+ example: 1730189586
+ description: "Timestamp of the event"
+ client_id:
+ type: string
+ example: "67978400352a61001d64e9fb"
+ description: "Client ID for the schedule"
+ business_id:
+ type: string
+ example: "174159057718553"
+ description: "Business ID for the schedule"
+ data:
+ type: object
+ required:
+ - doctor_id
+ - google_review_link
+ - patient_id
+ properties:
+ doctor_id:
+ type: string
+ example: "174159057723920"
+ description: "Identifier for the respective doctor in Eka"
+ google_review_link:
+ type: string
+ example : "https://g.page/r/CRVNub8JgYWLEA0/review"
+ description: "Google review link"
+ patient_id:
+ type: string
+ example: "174159057723925"
+ description: "Identified for the respective patient in Eka"
+ appointment_id:
+ type: string
+ example: "api-abb67007-1e53-4f0f-b428-a4bc025468a4"
+ description: "Unique identifier for the appointment."
+ clinic_id:
+ type: string
+ example: "67978400352a61001d64e9fb"
+ description: "Unique identifier of the clinic"
+ deprecated: false
+
+ /registered_url_for_consent_form:
+ post:
+ tags:
+ - Doctor Webhooks
+ summary: Consent Form Events
+ description: >-
+ When a consent form or medical certificate is created or updated, a webhook is sent to the registered endpoint containing the Doctor Id, Patient Id, Consent form url, **type(represents whether it is a medical certificate or consent form)** etc.
+
+ The receiving system can use these details as per their need.
+
+ operationId: McertEventsWebhook
+ parameters: []
+ requestBody:
+ description: ''
+ content:
+ application/json:
+ schema:
+ type: object
+ required:
+ - event
+ - event_time
+ - timestamp
+ - client_id
+ - business_id
+ - data
+ properties:
+ event:
+ type: string
+ enum:
+ - "mcert.created"
+ - "mcert.updated"
+ example: "mcert.created"
+ description: "Type of event"
+ event_time:
+ type: integer
+ example: 1730189586
+ description: "Event occurred timestamp"
+ timestamp:
+ type: integer
+ example: 1730189586
+ description: "Timestamp of the event"
+ client_id:
+ type: string
+ example: "67978400352a61001d64e9fb"
+ description: "Client ID for the schedule"
+ business_id:
+ type: string
+ example: "174159057718553"
+ description: "Business ID for the schedule"
+ data:
+ type: object
+ required:
+ - docid
+ - id
+ - owner
+ - patientid
+ - sendurlpdf
+ - url
+ - type
+ properties:
+ docid:
+ type: string
+ example: "174159057723920"
+ description: "Identifier for the respective doctor in Eka"
+ id:
+ type: string
+ example : "eaaf7c24-ebcd-4340-975a-851d6e31478f"
+ description: "Unique identifier for the consent form"
+ owner:
+ type: string
+ example: "174159057723925"
+ description: "Business Id"
+ patientid:
+ type: string
+ example: "175465638609726"
+ description: "Unique identifier for the patient."
+ sendurlpdf:
+ type: string
+ example: "https://mcertificate.dev.eka.care/b-161467756044203/eaaf7c24-ebcd-4340-975a-851d6e31478f.pdf"
+ description: "Consent form url which is sent on whatsapp"
+ url:
+ type: string
+ example: "https://mcertificate.dev.eka.care/b-161467756044203/eaaf7c24-ebcd-4340-975a-851d6e31478f.pdf"
+ description: "Consent form url"
+ type:
+ type: string
+ example: "mcert"
+ description: "Type of document. \nPossible values: **mcert** (for medical certificate), **consent** (for consent form)."
+ deprecated: false
+
+ /registered_url_for_receipt_events:
+ post:
+ tags:
+ - Receipt Webhooks
+ summary: Receipt Events
+ description: >-
+ When a Receipt is created, updated or deleted, a webhook is sent to the registered endpoint containing the Doctor Id, Patient Id, Clinic Id etc.
+
+ The receiving system can use these details as per their need.
+
+ operationId: McertEventsWebhook
+ parameters: []
+ requestBody:
+ description: ''
+ content:
+ application/json:
+ schema:
+ type: object
+ required:
+ - event
+ - event_time
+ - timestamp
+ - client_id
+ - business_id
+ - data
+ properties:
+ event:
+ type: string
+ enum:
+ - "receipt.created"
+ - "receipt.updated"
+ - "receipt.deleted"
+ example: "receipt.created"
+ description: "Type of event"
+ event_time:
+ type: integer
+ example: 1730189586
+ description: "Event occurred timestamp"
+ timestamp:
+ type: integer
+ example: 1730189586
+ description: "Timestamp of the event"
+ client_id:
+ type: string
+ example: "67978400352a61001d64e9fb"
+ description: "Client ID for the schedule"
+ business_id:
+ type: string
+ example: "174159057718553"
+ description: "Business ID for the schedule"
+ data:
+ type: object
+ required:
+ - receipt_id
+ - aid
+ - doctor_oid
+ - clinic_id
+ - patient_oid
+ - created_at
+ - updated_at
+ - receipt_url
+ - receipt_status
+ - receipt_amount
+ - additional_discount_value
+ - additional_discount_type
+ - additional_discount_amount
+ - net_amount
+ - name
+ - mobile
+ - sku_discount_amount
+ - amount_due
+ - archive
+ - receipt_number
+ - flavour
+ - remarks
+ - ref_trx_id
+ - payment_id
+ - payment_link
+ - amount_paid
+ - actor
+ properties:
+ receipt_id:
+ type: integer
+ example: 2579
+ description: "Unique identifier for the receipt"
+ aid:
+ type: string
+ example: "d-75f3dcf1-5de3-40fc-8ccd-f42c8d54e8e8"
+ description: "Appointment Id"
+ doctor_oid:
+ type: string
+ example: "161467756044203"
+ description: "Unique identifier for the doctor"
+ clinic_id:
+ type: string
+ example: "60b0ee0c0b5804795509aefb"
+ description: "Clinic identifier"
+ patient_oid:
+ type: string
+ example: "176345969121476"
+ description: "Unique identifier for the patient"
+ created_at:
+ type: integer
+ example: 1763476917560
+ description: "Timestamp when the receipt was created (in milliseconds)"
+ updated_at:
+ type: integer
+ example: 1763476917560
+ description: "Timestamp when the receipt was last updated (in milliseconds)"
+ receipt_number:
+ type: string
+ example: null
+ description: "Human-readable receipt number"
+ receipt_url:
+ type: string
+ example: "https://doc-receipt.s3.ap-south-1.amazonaws.com/v2/b-161467756044203/161467756044203/60b0ee0c0b5804795509aefb/1763476916985.pdf"
+ description: "URL to download/view the receipt"
+ receipt_status:
+ type: string
+ example: "SUCCESS"
+ description: "Status of the receipt"
+ receipt_amount:
+ type: number
+ example: 120
+ description: "Total amount on the receipt"
+ additional_discount_value:
+ type: number
+ example: 10
+ description: "Value of any additional discount"
+ additional_discount_type:
+ type: string
+ example: "AMOUNT"
+ description: "Type of additional discount"
+ additional_discount_amount:
+ type: number
+ example: 10
+ description: "Amount reduced due to additional discount"
+ net_amount:
+ type: number
+ example: 120
+ description: "Net payable amount after discounts"
+ name:
+ type: string
+ example: "gc baby normal"
+ description: "Name of the patient"
+ mobile:
+ type: string
+ example: "+919008888888"
+ description: "Patient's mobile number"
+ flavour:
+ type: string
+ example: null
+ description: "Flavour or type of receipt/service"
+ sku_discount_amount:
+ type: number
+ example: 10
+ description: "Discount amount applied per SKU/item"
+ amount_due:
+ type: number
+ example: 10
+ description: "Remaining amount to be paid"
+ archive:
+ type: integer
+ example: 0
+ description: "Whether the receipt is archived (0 or 1)"
+ remarks:
+ type: string
+ example: ""
+ description: "Additional remarks about the transaction"
+ ref_trx_id:
+ type: string
+ example: ""
+ description: "Reference transaction ID"
+ payment_id:
+ type: string
+ example: "ret-dfwef-dsfsd-fwefdsf"
+ description: "Unique identifier for the payment"
+ payment_link:
+ type: string
+ example: "https://example.link.com"
+ description: "URL for payment completion"
+ amount_paid:
+ type: number
+ example: 10
+ description: "Amount already paid"
+ actor:
+ type: string
+ example: "doctor"
+ description: "Who performed the action or update"
+ deprecated: false
+
/registered_url_for_appointment_tele_dr_joined_webhook_events:
post:
diff --git a/api-reference/doc-tool/post_webhooks/receipt-webhook.mdx b/api-reference/doc-tool/post_webhooks/receipt-webhook.mdx
new file mode 100644
index 00000000..db331b5d
--- /dev/null
+++ b/api-reference/doc-tool/post_webhooks/receipt-webhook.mdx
@@ -0,0 +1,3 @@
+---
+openapi: post /registered_url_for_receipt_events
+---
\ No newline at end of file
diff --git a/api-reference/doc-tool/user-apis/get-all-users.mdx b/api-reference/doc-tool/user-apis/get-all-users.mdx
new file mode 100644
index 00000000..579e42f9
--- /dev/null
+++ b/api-reference/doc-tool/user-apis/get-all-users.mdx
@@ -0,0 +1,3 @@
+---
+openapi: get /cdr/v1/hipusers/
+---
\ No newline at end of file
diff --git a/api-reference/doc-tool/user-apis/get-user-by-id.mdx b/api-reference/doc-tool/user-apis/get-user-by-id.mdx
new file mode 100644
index 00000000..7d1c0cfd
--- /dev/null
+++ b/api-reference/doc-tool/user-apis/get-user-by-id.mdx
@@ -0,0 +1,3 @@
+---
+openapi: get /cdr/v1/hipusers/{hip_user_id}
+---
\ No newline at end of file
diff --git a/api-reference/health-ai/ekascribe/Eka-FHIR-structure.mdx b/api-reference/health-ai/ekascribe/Eka-FHIR-structure.mdx
new file mode 100644
index 00000000..37f70caa
--- /dev/null
+++ b/api-reference/health-ai/ekascribe/Eka-FHIR-structure.mdx
@@ -0,0 +1,252 @@
+---
+title: "Eka FHIR Structure"
+description: "FHIR resource mappings for Eka Care medical data"
+---
+
+# Eka FHIR Resource Mappings
+
+This document provides the FHIR (Fast Healthcare Interoperability Resources) mappings used by Eka Care for structured medical data. Each section details how Eka properties map to standard FHIR resources.
+
+---
+
+## Symptoms
+
+**FHIR Resource:** `Observation`
+
+Symptoms observed during patient consultations are stored using the FHIR Observation resource.
+
+| Eka Property | FHIR Resource | FHIR Link | Decision to Use |
+|--------------|---------------|-----------|-----------------|
+| symptoms.name, code | Observation.code | [Manifestation or Symptom](https://www.hl7.org/fhir/valueset-manifestation-or-symptom.html) | SNOMED, Eka codes |
+| symptoms.category | Observation.category | [Observation Category](https://terminology.hl7.org/5.1.0/CodeSystem-observation-category.html) | SNOMED: 418799008, MDB: s-8068301606 |
+| symptoms.status | Observation.status | [Observation Status](https://www.hl7.org/fhir/valueset-observation-status.html) | Voice2RX: `preliminary`, Rx: `final` |
+| symptoms.since | Observation.effective | - | effectiveDateTime \| effectivePeriod |
+| symptom.notes | Observation.note | [Annotation](https://www.hl7.org/fhir/datatypes.html#Annotation) | String text |
+| symptom.is-recorded-for | Observation.subject | - | Patient Reference |
+| symptoms.severity | Observation.value | [CodeableConcept](https://www.hl7.org/fhir/datatypes.html#CodeableConcept) | ValueCodeableConcept |
+| symptoms.laterality | Observation.bodySite | [Body Site](https://www.hl7.org/fhir/valueset-body-site.html#expansion) | CodeableConcept.coding.code |
+
+---
+
+## Conditions / Diagnoses
+
+**FHIR Resource:** `Condition`
+
+Medical conditions and diagnoses are stored using the FHIR Condition resource.
+
+| Eka Property | FHIR Resource | FHIR Link | Decision to Use |
+|--------------|---------------|-----------|-----------------|
+| condition.name, code | Condition.code | - | SNOMED |
+| condition.current_status | Condition.clinicalStatus | [Condition Clinical](https://build.fhir.org/valueset-condition-clinical.html) | Ruled-out: `inactive`, Confirmed: `active`, Suspected: `unknown` |
+| condition.verification | Condition.verificationStatus | [Verification Status](https://build.fhir.org/valueset-condition-ver-status.html) | Ruled-out: `refuted`, Confirmed: `confirmed`, Suspected: `unconfirmed` |
+| condition.severity | Condition.severity | [Condition Severity](https://build.fhir.org/valueset-condition-severity.html) | SNOMED: 24484000 (severe), 6736007 (moderate), 255604002 (mild) |
+| condition.category | Condition.category | [Condition Category](https://build.fhir.org/valueset-condition-category.html) | FHIR: `encounter-diagnosis` |
+| condition.since | Condition.onset | - | datetime \| period \| age \| string |
+| condition.is-recorded-for | Condition.subject | - | Patient |
+| condition.first-time-on | Condition.recordedDate | - | - |
+| condition.evidence | Condition.evidence | - | Evidence pointing to condition |
+| condition.where | Condition.bodyStructure | - | Has bodysite + other details |
+| condition.stage | Condition.stage | - | e.g., cancer stages |
+| condition.notes | Condition.note | - | Strings |
+| condition.laterality | Condition.bodySite | [Body Site](https://www.hl7.org/fhir/valueset-body-site.html#expansion) | CodeableConcept.coding.code |
+
+---
+
+## Medical History
+
+**FHIR Resource:** `Condition`
+
+Past medical history is also stored using the FHIR Condition resource with different category.
+
+| Eka Property | FHIR Resource | FHIR Link | Decision to Use |
+|--------------|---------------|-----------|-----------------|
+| condition.name, code | Condition.code | - | SNOMED |
+| condition.current_status | Condition.clinicalStatus | [Condition Clinical](https://build.fhir.org/valueset-condition-clinical.html) | Ruled-out: `inactive`, Confirmed: `active`, Suspected: `unknown` |
+| condition.verification | Condition.verificationStatus | [Verification Status](https://build.fhir.org/valueset-condition-ver-status.html) | Ruled-out: `refuted`, Confirmed: `confirmed`, Suspected: `unconfirmed` |
+| condition.severity | Condition.severity | [Condition Severity](https://build.fhir.org/valueset-condition-severity.html) | SNOMED codes for severity |
+| condition.category | Condition.category | [Condition Category](https://build.fhir.org/valueset-condition-category.html) | `problem-list-item` |
+| condition.since | Condition.onset | - | datetime \| period \| age \| string |
+| condition.is-recorded-for | Condition.subject | - | Patient |
+| condition.first-time-on | Condition.recordedDate | - | - |
+| condition.stage | Condition.stage | - | e.g., cancer stages |
+| condition.notes | Condition.note | - | Strings |
+
+---
+
+## Advices
+
+**FHIR Resource:** `CarePlan`
+
+Doctor's advice to patients is stored using the FHIR CarePlan resource.
+
+| Eka Property | FHIR Resource | FHIR Link | Decision to Use |
+|--------------|---------------|-----------|-----------------|
+| advice.status | CarePlan.status | - | `active` |
+| advice.intent | CarePlan.intent | [Care Plan Intent](https://build.fhir.org/valueset-care-plan-intent.html) | `plan` |
+| advice.category | CarePlan.category | - | Custom: SNOMED for advice |
+| advice.for | CarePlan.subject | - | Patient |
+| advice.details | CarePlan.activity.performedActivity | [CodeableReference](https://build.fhir.org/references.html#CodeableReference) | CodeableReference.concept.text |
+| advice.details | CarePlan.description | [CarePlan Description](https://build.fhir.org/careplan-definitions.html#CarePlan.description) | - |
+
+---
+
+## Notes
+
+**FHIR Resource:** `CarePlan`
+
+Clinical notes are stored using the FHIR CarePlan resource with different intent.
+
+| Eka Property | FHIR Resource | FHIR Link | Decision to Use |
+|--------------|---------------|-----------|-----------------|
+| notes.status | CarePlan.status | - | `active` |
+| notes.intent | CarePlan.intent | [Care Plan Intent](https://build.fhir.org/valueset-care-plan-intent.html) | `proposal` |
+| notes.category | CarePlan.category | - | Custom: for notes |
+| notes.for | CarePlan.subject | - | Patient |
+| notes.details | CarePlan.description | [CodeableReference](https://build.fhir.org/references.html#CodeableReference) | CodeableReference.concept.text |
+
+---
+
+## Examinations
+
+**FHIR Resource:** `Observation`
+
+Physical examination findings are stored using the FHIR Observation resource.
+
+| Eka Property | FHIR Resource | FHIR Link | Decision to Use |
+|--------------|---------------|-----------|-----------------|
+| exam.name, code | Observation.code | [Manifestation or Symptom](https://www.hl7.org/fhir/valueset-manifestation-or-symptom.html) | SNOMED, Eka codes |
+| exam.category | Observation.category | [Observation Category](https://terminology.hl7.org/5.1.0/CodeSystem-observation-category.html) | `exam` |
+| exam.status | Observation.status | [Observation Status](https://www.hl7.org/fhir/valueset-observation-status.html) | `preliminary` \| `final` \| `unknown` |
+| exam.since | Observation.effective | - | effectiveDateTime \| effectivePeriod |
+| exam.notes | Observation.note | [Annotation](https://www.hl7.org/fhir/datatypes.html#Annotation) | String |
+| exam.is-recorded-for | Observation.subject | - | Patient |
+| exam.location | Observation.bodySite | [Body Site](https://www.hl7.org/fhir/valueset-body-site.html#expansion) | - |
+
+---
+
+## Follow-Up
+
+**FHIR Resource:** `Appointment`
+
+Follow-up appointments suggested by doctors are stored using the FHIR Appointment resource.
+
+| Eka Property | FHIR Resource | FHIR Link | Decision to Use |
+|--------------|---------------|-----------|-----------------|
+| followup.status | Appointment.status | [Appointment Status](https://build.fhir.org/valueset-appointmentstatus.html) | `proposed` |
+| followup.type | Appointment.appointmentType | [Appointment Type](https://terminology.hl7.org/6.0.2/ValueSet-v2-0276.html) | `FOLLOWUP` |
+| followup.created | Appointment.created | - | - |
+| followup.start | Appointment.start | - | Instant |
+
+---
+
+## Family History
+
+**FHIR Resource:** `FamilyMemberHistory`
+
+Family medical history is stored using the FHIR FamilyMemberHistory resource.
+
+| Eka Property | FHIR Resource | FHIR Link | Decision to Use |
+|--------------|---------------|-----------|-----------------|
+| dataentry.status | FamilyMemberHistory.status | [History Status](https://build.fhir.org/valueset-history-status.html) | `completed` |
+| relation | FamilyMemberHistory.relationship | [Family Member](https://terminology.hl7.org/6.0.2/ValueSet-v3-FamilyMember.html) | - |
+| relative.name | FamilyMemberHistory.name | - | String |
+| remarks | FamilyMemberHistory.note | - | - |
+| clinical.status | FamilyMemberHistory.condition.outcome | - | CodeableConcept.coding.code |
+
+---
+
+## Vitals ( Trackers )
+
+**FHIR Resource:** `Observation`
+
+Patient vitals and health trackers are stored using the FHIR Observation resource.
+
+| Eka Property | FHIR Resource | FHIR Link | Decision to Use |
+|--------------|---------------|-----------|-----------------|
+| vitals.name, code | Observation.code | [Manifestation or Symptom](https://www.hl7.org/fhir/valueset-manifestation-or-symptom.html) | SNOMED, Eka codes |
+| vitals.category | Observation.category | [Observation Category](https://terminology.hl7.org/5.1.0/CodeSystem-observation-category.html) | SNOMED: s-8068301606, FHIR: `vital-signs` |
+| vitals.status | Observation.status | [Observation Status](https://www.hl7.org/fhir/valueset-observation-status.html) | Voice2RX: `preliminary`, Rx: `final` |
+| vitals.since | Observation.effective | - | effectiveDateTime \| effectivePeriod |
+| vitals.notes | Observation.note | [Annotation](https://www.hl7.org/fhir/datatypes.html#Annotation) | String text |
+| vitals.value | Observation.value | [CodeableConcept](https://www.hl7.org/fhir/datatypes.html#CodeableConcept) | ValueCodeableConcept |
+| vitals.components | Observation.component | - | For vitals like BP with multiple values |
+
+---
+
+## Medications
+
+**FHIR Resource:** `MedicationRequest`
+
+Medication prescriptions are stored using the FHIR MedicationRequest resource.
+
+| Eka Property | FHIR Resource | FHIR Link | Decision to Use |
+|--------------|---------------|-----------|-----------------|
+| medication.name, medication.id | MedicationRequest.medicationCodeableConcept | [Medication Codes](https://www.hl7.org/fhir/valueset-medication-codes.html) | Name : Ibuprofen 200mg; code: MDB/SNOMED |
+| medication.status | MedicationRequest.status | [MedicationRequest Status](https://www.hl7.org/fhir/valueset-medicationrequest-status.html) | `active` |
+| medication.intent | MedicationRequest.intent | [MedicationRequest Intent](https://www.hl7.org/fhir/valueset-medicationrequest-intent.html) | `order` |
+| patient.id, patient.profile.personal.name | MedicationRequest.subject | [Reference](https://www.hl7.org/fhir/references.html) | Patient reference |
+| doctor.id, doctor.profile.personal.name | MedicationRequest.requester | [Reference](https://www.hl7.org/fhir/references.html) | Practitioner reference |
+| date | MedicationRequest.authoredOn | [dateTime](https://www.hl7.org/fhir/datatypes.html#dateTime) | ISO 8601 format |
+| medication.instruction | MedicationRequest.dosageInstruction.text | [Dosage](https://www.hl7.org/fhir/dosage.html) | String |
+| medication.dose.value, dose.unit, dose.id, dose.custom | MedicationRequest.dosageInstruction.doseAndRate.doseQuantity | [Quantity](https://www.hl7.org/fhir/datatypes.html#Quantity) | value, unit, code |
+| medication.dose-rate-type | MedicationRequest.dosageInstruction.doseAndRate.type | [Dose Rate Type](https://www.hl7.org/fhir/valueset-dose-rate-type.html) | `ordered` |
+| medication.frequency.id, frequency.value, frequency.custom | MedicationRequest.dosageInstruction.additionalInstruction | [Additional Instruction](https://www.hl7.org/fhir/valueset-additional-instruction-codes.html) | CodeableConcept |
+| medication.frequency.frequency, frequency.period, frequency.period_unit, duration, duration-unit, when | MedicationRequest.dosageInstruction.timing.repeat | [Timing](https://www.hl7.org/fhir/datatypes.html#Timing) | frequency, period, periodUnit |
+| calculated | MedicationRequest.dispenseRequest.quantity | [Quantity](https://www.hl7.org/fhir/datatypes.html#Quantity) | frequency × duration × dose |
+---
+
+## Lab Tests / Imaging / Surgical Procedures
+**FHIR Resource:** `ServiceRequest`
+
+Lab tests, imaging requests ( radiology) and surgical procedure are stored using the FHIR ServiceRequest resource.
+
+| Eka Property | FHIR Resource | FHIR Link | Decision to Use |
+|-------------|---------------|-----------|-----------------|
+| status | ServiceRequest.status | [Request Status](https://www.hl7.org/fhir/valueset-request-status.html) | `active` |
+| intent | ServiceRequest.intent | [Request Intent](https://www.hl7.org/fhir/valueset-request-intent.html) | `order` |
+| category | ServiceRequest.category | [Service Request Category](https://www.hl7.org/fhir/valueset-servicerequest-category.html) | Supported categories are imaging, lab_test, surgical_procedure |
+| labTests.id, labTests.name | ServiceRequest.code | [Procedure Codes](https://www.hl7.org/fhir/valueset-procedure-code.html) | CodeableConcept from `http://eka.care/mdb`, `http://loinc.org`, `https://parchi.eka.care/local` |
+| patient_oid, patient_name | ServiceRequest.subject | [Reference](https://www.hl7.org/fhir/references.html) | Reference to Patient resource |
+| visitid | ServiceRequest.encounter | [Reference](https://www.hl7.org/fhir/references.html) | Reference to Encounter resource |
+| doctor_oid, doctor_name | ServiceRequest.requester | [Reference](https://www.hl7.org/fhir/references.html) | Reference to Practitioner resource |
+| date | ServiceRequest.authoredOn | [dateTime](https://www.hl7.org/fhir/datatypes.html#dateTime) | ISO 8601 format |
+| remark/notes | ServiceRequest.note | [Annotation](https://www.hl7.org/fhir/datatypes.html#Annotation) | Text note |
+
+---
+
+## DrugAllergy / FoodAllergy Intolerance
+**FHIR Resource:** `AllergyIntolerance`
+
+Food and medication allergies are stored using the FHIR AllergyIntolerance resource.
+
+| Eka Property | FHIR Resource | FHIR Link | Decision to Use |
+|-------------|---------------|-----------|-----------------|
+| doctor_oid, doctor_name | AllergyIntolerance.asserter | [Reference](https://www.hl7.org/fhir/references.html) | Reference to Practitioner resource |
+| category | AllergyIntolerance.category | [Allergy Category](https://www.hl7.org/fhir/valueset-allergy-intolerance-category.html) | `food` or `medication` |
+| clinicalStatus | AllergyIntolerance.clinicalStatus | [Clinical Status](https://www.hl7.org/fhir/valueset-allergyintolerance-clinical.html) | code: `active`, display: `Active` |
+| drugAllergy.id, foodOtherAllergy.id | AllergyIntolerance.code | [Allergy Codes](https://www.hl7.org/fhir/valueset-allergyintolerance-code.html) | CodeableConcept from `http://snomed.info/sct`, `http://eka.care/mdb`, `https://parchi.eka.care/local` |
+| criticality | AllergyIntolerance.criticality | [Allergy Criticality](https://www.hl7.org/fhir/valueset-allergy-intolerance-criticality.html) | `high` |
+| notes | AllergyIntolerance.note | [Annotation](https://www.hl7.org/fhir/datatypes.html#Annotation) | Text note |
+| patient_oid, patient_name | AllergyIntolerance.patient | [Reference](https://www.hl7.org/fhir/references.html) | Reference to Patient resource |
+| type | AllergyIntolerance.type | [Allergy Type](https://www.hl7.org/fhir/valueset-allergy-intolerance-type.html) | `allergy` |
+| recordedDate | AllergyIntolerance.recordedDate | [dateTime](https://www.hl7.org/fhir/datatypes.html#dateTime) | ISO 8601 format (current time) |
+| verificationStatus | AllergyIntolerance.verificationStatus | [Verification Status](https://www.hl7.org/fhir/valueset-allergyintolerance-verification.html) | code: `confirmed`, display: `Confirmed` |
+---
+
+# Summary Table
+
+| Data Type | FHIR Resource | Category/Type |
+|-----------|---------------|---------------|
+| Symptoms | Observation | signs-and-symptoms |
+| Conditions/Diagnoses | Condition | encounter-diagnosis |
+| Medical History | Condition | problem-list-item |
+| Advices | CarePlan | intent: plan |
+| Notes | CarePlan | intent: proposal |
+| Examinations | Observation | exam |
+| Follow-Up | Appointment | FOLLOWUP |
+| Family History | FamilyMemberHistory | - |
+| Vitals | Observation | vital-signs |
+| Medications | MedicationRequest | intent: order |
+| Lab Tests/Imaging/Surgical Procedures | ServiceRequest | imaging/lab_test/surgical_procedure |
+| Food and drug Allergies | AllergyIntolerance | food/medication |
+
diff --git a/api-reference/health-ai/ekascribe/SDKs/TS-sdk.mdx b/api-reference/health-ai/ekascribe/SDKs/TS-sdk.mdx
index 07c71a15..04b36e4f 100644
--- a/api-reference/health-ai/ekascribe/SDKs/TS-sdk.mdx
+++ b/api-reference/health-ai/ekascribe/SDKs/TS-sdk.mdx
@@ -30,24 +30,26 @@ yarn add @eka-care/ekascribe-ts-sdk
### 1. Get Ekascribe Instance
-It will give you the main class instance, use this instance to access all methods
+Get the SDK instance once and use it everywhere in your application to call all methods.
```ts
-getEkaScribeInstance({
+// Create a config variable to manage tokens
+const sdkConfig = {
access_token: '',
-});
-```
+};
-```ts
-const ekaScribe = getEkaScribeInstance({ access_token: 'old_token' });
+// Get instance and use it throughout your application
+const ekascribe = getEkaScribeInstance(sdkConfig);
```
+**Important:** Use this same `ekascribe` instance for all SDK method calls.
+
### 2. Fetch configurations list
Get supported input languages, output formats, and consultation modes.
```ts
-ekascribe.getEkascribeConfig();
+const config = await ekascribe.getEkascribeConfig();
```
- #### Sample Response:
@@ -91,16 +93,14 @@ ekascribe.getEkascribeConfig();
### 3. Init transaction
-Use this method to init a transaction before starting recording.
+Initialize a transaction before starting recording. This sets up the session with your configuration.
```ts
-await ekascribe.initTransaction({
+const response = await ekascribe.initTransaction({
mode: 'consultation',
- input_language: ['te', 'en'],
- output_format_template: [{ template_id: 'eka_emr_template' }],
- txn_id: 'abc-123',
- auto_download: false,
- model_training_consent: false,
+ input_language: ['en-IN'],
+ output_format_template: [{ template_id: 'your_template_id' }],
+ txn_id: 'unique-transaction-id',
transfer: 'vaded' | 'non-vaded',
model_type: 'pro' | 'lite',
system_info: {
@@ -114,29 +114,63 @@ await ekascribe.initTransaction({
biologicalSex: 'M',
},
version: '1.0.0',
- flavour: 'web' | 'extension',
+ additional_data: {},
});
```
+**Key Parameters:**
+
+- `input_language`: Language code array (e.g., `['en-IN']`)
+- `output_format_template`: Array with `template_id` - depends on your end user's template selection
+- `system_info`: Optional - Pass your system configuration to backend
+- `patient_details`: Optional - Patient information
+- `version`: SDK version
+- `additional_data`: Optional - Pass any data you want to receive unchanged in the response
+- `transfer`: Audio mode. Use `vaded` for audio already processed with Voice Activity Detection (SDK does this by default); use `non-vaded` only if you are sending raw audio without VAD.
+- `model_type`: Transcription model choice. `pro` = most accurate; `lite` = lower latency, more performant.
+
- #### Sample Response:
```ts
{
- "status_code": 200,
- "message": "Transaction initialized successfully",
- "business_id": "biz_abc123def456",
- "txn_id": "abc-123",
- "oid": "org_789xyz",
- "uuid": "user_uuid_456"
+ error_code?: ERROR_CODE,
+ status_code: 200,
+ message: "Transaction initialized successfully",
+ business_id: "biz_abc123def456",
+ txn_id: "abc-123",
+ oid: "org_789xyz",
+ uuid: "user_uuid_456"
}
```
+**Error handling:**
+
+Possible Error Codes in `error_code`:
+
+- `txn_limit_exceeded`: Maximum number of transactions exceeded
+- `txn_init_failed`: Something went wrong. Retry with the same method call
+
+**Handling 401 Status Code:**
+
+If you receive a `status_code: 401`, update the tokens in your config and reinitialize the instance:
+
+```ts
+// Update tokens in your config variable
+sdkConfig.access_token = '';
+
+// Update tokens in the instance
+ekascribe.updateAuthTokens({ access_token: sdkConfig.access_token });
+
+// Now you can retry the method call
+const response = await ekascribe.initTransaction({ ... });
+```
+
### 4. Start recording
-Start recording with user-selected options.
+Start recording audio after initializing the transaction.
```ts
-await ekascribe.startRecording();
+const response = await ekascribe.startRecording();
```
- #### Sample Response:
@@ -146,16 +180,19 @@ await ekascribe.startRecording();
"status_code": 200,
"message": "Recording started successfully",
"txn_id": "abc-123",
+ // Possible error codes:
+ // - "microphone" -> microphone permission not granted
+ // - "vad_not_initialized" -> VAD failed to initialize; reinitialize and retry the same function call
error_code?: ERROR_CODE
}
```
### 5. Pause recording
-Use the method to pause voice recording
+Pause the ongoing voice recording.
```ts
-await ekascribe.pauseRecording();
+const response = await ekascribe.pauseRecording();
```
- #### Sample Response:
@@ -171,10 +208,10 @@ await ekascribe.pauseRecording();
### 6. Resume recording
-Use the method to resume voice recording
+Resume a paused recording.
```ts
-await ekascribe.resumeRecording();
+const response = await ekascribe.resumeRecording();
```
- #### Sample Response:
@@ -190,10 +227,15 @@ await ekascribe.resumeRecording();
### 7. End recording
-Use the method to end voice recording
+End the recording session. This method:
+
+- Stops the recording
+- Uploads all audio chunks to the server
+- Automatically retries failed uploads once
+- Calls the commit API to finalize the transaction
```ts
-await ekascribe.endRecording();
+const response = await ekascribe.endRecording();
```
- #### Sample Response:
@@ -202,18 +244,151 @@ await ekascribe.endRecording();
{
"status_code": 200,
"message": "Recording ended and files uploaded successfully",
- failed_files?: ['1.mp3', '2.mp3']; // if there are any failed files
- total_audio_files?: ['1.mp3', '2.mp3', '3.mp3', '4.mp3']; // list of all audio files generated
+ failed_files?: ['1.mp3', '2.mp3'], // Only present if some files failed to upload
+ total_audio_files?: ['1.mp3', '2.mp3', '3.mp3', '4.mp3'], // List of all audio files generated
error_code?: ERROR_CODE;
}
```
-### 8. Retry upload recording
+**Error handling:**
+
+Possible Error Codes in `error_code`:
+
+- `txn_stop_failed`: Call `endRecording` again.
+- `audio_upload_failed`: Use `retryUploadRecording` (step 9).
+- `txn_commit_failed`: Call `commitTransactionCall` (step 11).
+
+**Handling 401 Status Code:**
+
+If you receive a `status_code: 401`, update the tokens in your config and retry:
+
+```ts
+// Update tokens in your config variable
+sdkConfig.access_token = '';
+
+// Update tokens in the instance
+ekascribe.updateAuthTokens({ access_token: sdkConfig.access_token });
+
+// Now retry the method call
+const response = await ekascribe.endRecording();
+```
+
+### 8. Get output recorded prescription
+
+`pollSessionOutput({ txn_id, max_polling_time })`: SDK polls for you and resolves when processing finishes (default max wait: 2 minutes; override via `max_polling_time`, pass time in milliseconds).
+
+Example (SDK-managed polling):
+
+```ts
+// Waits up to 2 minutes by default; override as needed
+const res = await ekascribe.pollSessionOutput({
+ txn_id: 'transaction-id',
+ max_polling_time: 2 * 60 * 1000, // optional
+});
+```
+
+Status codes to handle:
+
+- `200`: Success; all templates processed.
+- `202`: Templates are still processing; poll again (or let `pollSessionOutput` continue).
+- `206`: Partial success; some templates not processed fully.
+- `500`: All template processing failed, or internal server error; stop and surface error.
+
+- #### Response type:
+
+```ts
+{
+ response?: {
+ data: {
+ output: TOutputSummary[];
+ template_results: {
+ integration: TOutputSummary[];
+ custom: TOutputSummary[];
+ transcript: TOutputSummary[];
+ };
+ audio_matrix?: {
+ quality: string;
+ };
+ additional_data?: {};
+ created_at?: string;
+ };
+ error?: {
+ code: string;
+ msg: string;
+ };
+ } | null;
+ status_code: number;
+ message?: string;
+}
+
+type TOutputSummary = {
+ template_id: string;
+ value?: JSON | Array | string;
+ type: string;
+ name: string;
+ status: 'success' | 'partial_success' | 'failure';
+ errors?: Array<{
+ type: 'warning' | 'error';
+ code?: string;
+ msg: string;
+ }>;
+ warnings?: Array<{
+ type: 'warning' | 'error';
+ code?: string;
+ msg: string;
+ }>;
+};
+```
+
+- #### Example Response:
-Use this method to retry uploading failed audio files.
+```ts
+{
+ status_code: 200,
+ response: {
+ data: {
+ output: [
+ {
+ template_id: "template_id_passed_in_initTransaction",
+ value: "Output Data for this template",
+ type: "custom",
+ name: "General Prescription",
+ status: "success"
+ }
+ ],
+ template_results: {
+ custom: [
+ {
+ template_id: "custom_template",
+ value: "Output prescription",
+ type: "custom",
+ name: "Custom Medication Template",
+ status: "partial_success",
+ warnings: [
+ {
+ type: "warning",
+ code: "FIELD_MISSING",
+ msg: "Dosage information not found"
+ }
+ ]
+ }
+ ]
+ },
+ audio_matrix: {
+ quality: "4.5"
+ },
+ created_at: "2024-11-19T10:30:00Z"
+ }
+ }
+}
+```
+
+### 9. Retry upload recording
+
+Retry uploading failed audio files after `endRecording`.
```ts
-await ekascribe.retryUploadRecording({ force_commit: true });
+const response = await ekascribe.retryUploadRecording({ force_commit: true });
```
- #### Sample Response:
@@ -228,22 +403,37 @@ await ekascribe.retryUploadRecording({ force_commit: true });
}
```
-`force_commit` behavior
+**`force_commit` behavior:**
+
+- `force_commit: true` - Model will initiate the processing if some files still fail after retry
+- `force_commit: false` - It will waits until all files are uploaded successfully before processing.
--- If `force_commit` is set to `true`, the SDK will call the commit API even if some audio files still fail to upload after retrying once.
+**Handling 401 Status Code:**
--- If `force_commit` is set to `false`, the SDK will wait until **all audio files** are uploaded successfully before making the commit request.
+If you receive a `status_code: 401`, update the tokens in your config and retry:
+
+```ts
+// Update tokens in your config variable
+sdkConfig.access_token = '';
+
+// Update tokens in the instance
+ekascribe.updateAuthTokens({ access_token: sdkConfig.access_token });
+
+// Now retry the method call
+const response = await ekascribe.retryUploadRecording({ force_commit: true });
+```
-### 9. Patch recording session status
+### 10. Patch recording session status
-Use the method to cancel a recording session.
+Cancel or update the status of a recording session.
```ts
-await ekascribe.patchSessionStatus({
- sessionId: 'abc-123',
- processing_status: 'cancelled',
+const response = await ekascribe.patchSessionStatus({
+ sessionId: 'abc-123', // txn_id of the session you want to cancel
+ processing_status: 'cancelled', // pass exactly this value
processing_error: {
error: {
+ // Pass these exact values without changing them
type: 'user_action',
code: 'cancelled_by_user',
msg: 'Session cancelled by user',
@@ -267,12 +457,27 @@ await ekascribe.patchSessionStatus({
}
```
-### 10. Commit transaction
+**Handling 401 Status Code:**
-Use this method to commit a transaction that is not yet committed or returned a "commit failed" error in a previous step.
+If you receive a `code: 401`, update the tokens in your config and retry:
```ts
-await ekascribe.commitTransactionCall();
+// Update tokens in your config variable
+sdkConfig.access_token = '';
+
+// Update tokens in the instance
+ekascribe.updateAuthTokens({ access_token: sdkConfig.access_token });
+
+// Now retry the method call
+const response = await ekascribe.patchSessionStatus({ ... });
+```
+
+### 11. Commit transaction
+
+Call this if `endRecording` returns `error_code: 'txn_commit_failed'` or the transaction is not yet committed.
+
+```ts
+const response = await ekascribe.commitTransactionCall();
```
- #### Response type:
@@ -285,12 +490,27 @@ await ekascribe.commitTransactionCall();
};
```
-### 11. Stop transaction
+**Handling 401 Status Code:**
+
+If you receive a `status_code: 401`, update the tokens in your config and retry:
+
+```ts
+// Update tokens in your config variable
+sdkConfig.access_token = '';
+
+// Update tokens in the instance
+ekascribe.updateAuthTokens({ access_token: sdkConfig.access_token });
+
+// Now retry the method call
+const response = await ekascribe.commitTransactionCall();
+```
+
+### 12. Stop transaction
-Use this method to stop a transaction that has not yet been stopped or returned a "stop failed" error in a previous step.
+Use this method to stop a transaction that has not yet been stopped or returned a `txn_stop_failed` error in a previous step.
```ts
-await ekascribe.stopTransactionCall();
+const response = await ekascribe.stopTransactionCall();
```
- #### Response type:
@@ -303,20 +523,27 @@ await ekascribe.stopTransactionCall();
};
```
-### 12. Get output template prescriptions
+**Handling 401 Status Code:**
-Use this method to fetch the final generated prescription output for a session.
+If you receive a `status_code: 401`, update the tokens in your config and retry:
```ts
-await ekascribe.getTemplateOutput({ txn_id: 'abc-123' });
+// Update tokens in your config variable
+sdkConfig.access_token = '';
+
+// Update tokens in the instance
+ekascribe.updateAuthTokens({ access_token: sdkConfig.access_token });
+
+// Now retry the method call
+const response = await ekascribe.stopTransactionCall();
```
### 13. Get previous sessions
-Use this method to retrieve all the previous sessions for a specific doctor ID
+Fetch previous sessions. `txn_count` controls how many sessions the API returns.
```ts
-const sessions = await ekascribe.getSessionHistory({ txn_count: 10 });
+const sessions = await ekascribe.getSessionHistory({ txn_count: 10 }); // txn_count = number of sessions to fetch
```
- #### Response type:
@@ -325,24 +552,33 @@ const sessions = await ekascribe.getSessionHistory({ txn_count: 10 });
{
data: [
{
- "created_at": "string",
- "b_id": "string",
- "user_status": "string",
- "processing_status": "string",
- "txn_id": "string",
- "mode": "string",
- "uuid": "string",
- "oid": "string"
+ b_id: "7174661713699045", // business ID
+ created_at: "2025-12-10T10:28:00Z",
+ mode: "consultation",
+ oid: "174661713843153", // logged-in doctor's org ID
+ patient_details: { // present only if sent in initTransaction
+ "age": 18,
+ "biologicalSex": "M",
+ "username": ""
+ },
+ // processing_status can be: success | system_failure | request_failure | cancelled | in-progress
+ processing_status: "in-progress",
+ txn_id: "sc-c2e9be8b-46e5-489a-9473-236ddb5b24fb",
+ // user_status can be: init | commit
+ user_status: "init",
+ uuid: "c44fd76d-8de1-4011-aa54-5ddcca140f0f" // logged-in doctor's user ID
}
],
- status: "string",
- code: "number",
- message: "string",
- retrieved_count: "number"
+ status: "success",
+ code: 200,
+ message: "Sessions fetched",
+ retrieved_count: 1
}
```
-### 14. Get All Templates
+## Templates SDK Methods
+
+### 1. Get All Templates
Use this method to retrieve all available templates for the current user.
@@ -368,7 +604,7 @@ const templates = await ekascribe.getAllTemplates();
}
```
-### 15. Create Template
+### 2. Create Template
Use this method to create a new custom template.
@@ -392,7 +628,7 @@ const newTemplate = await ekascribe.createTemplate({
}
```
-### 16. Edit Template
+### 3. Edit Template
Use this method to update an existing template.
@@ -417,7 +653,7 @@ const updatedTemplate = await ekascribe.updateTemplate({
}
```
-### 17. Delete Template
+### 4. Delete Template
Use this method to delete an existing template.
@@ -437,7 +673,7 @@ const deleteResult = await ekascribe.deleteTemplate('template-123');
}
```
-### 18. Generate Template with AI by giving a prompt
+### 5. Generate Template with AI by giving a prompt
Use this method to generate a template using AI with a text prompt.
@@ -472,7 +708,7 @@ const aiTemplate = await ekascribe.aiGenerateTemplate(formData);
}
```
-### 19. Add templates to list
+### 6. Add templates to list
Use this method to mark templates as favourite templates.
@@ -496,7 +732,7 @@ const configUpdate = await ekascribe.updateConfig({
}
```
-### 20. Get All Sections
+### 7. Get All Sections
Use this method to retrieve all available template sections.
@@ -524,7 +760,7 @@ const sections = await ekascribe.getAllTemplateSections();
}
```
-### 21. Create Section in a template
+### 8. Create Section in a template
Use this method to create a new section that can be used in templates.
@@ -549,7 +785,7 @@ const newSection = await ekascribe.createTemplateSection({
}
```
-### 22. Edit Section in a template
+### 9. Edit Section in a template
Use this method to update an existing template section.
@@ -575,7 +811,7 @@ const updatedSection = await ekascribe.updateTemplateSection({
}
```
-### 23. Delete Section from a template
+### 10. Delete Section from a template
Use this method to delete a template section.
@@ -595,150 +831,90 @@ const deleteResult = await ekascribe.deleteTemplateSection('section-123');
}
```
-### 24. Convert a transaction into another template after prescription generation
-
-Use this method to convert an existing transaction's output to use a different template format.
-
-```ts
-const convertResult = await ekascribe.postTransactionConvertToTemplate({
- txn_id: 'abc-123',
- template_id: 'new-template-456',
-});
-```
-
-- #### Response type:
-
-```ts
-{
- status: 'success' | 'failed';
- message: string;
- txn_id: string;
- template_id: string;
- b_id: string;
- code: number;
- msg: string;
- error?: { code: string; message: string; display_message: string };
-}
-```
-
-### 25. Search past sessions by a patient name
+## Non-vaded flow: Upload raw audio to get output summary
-Use this method to search through previous sessions by patient name.
+Use this method to upload pre-recorded audio files directly and get transcription output without real-time recording. This is useful when you have existing audio files and want to process them.
-```ts
-// First get session history
-const sessions = await ekascribe.getSessionHistory({ txn_count: 50 });
-
-// Then search by patient name
-const filteredSessions = await ekascribe.searchSessionsByPatientName({
- sessions: sessions.data || [],
- patientName: 'John Doe',
-});
-```
+**What this method does:**
-- #### Response type:
-
-```ts
-// Returns filtered array of session history data
-[
- {
- created_at: 'string',
- b_id: 'string',
- user_status: 'string',
- processing_status: 'string',
- txn_id: 'string',
- mode: 'string',
- uuid: 'string',
- oid: 'string',
- patient_details: {
- username: 'string',
- oid: 'string',
- age: number,
- biologicalSex: 'M' | 'F' | 'O',
- mobile: 'string',
- email: 'string',
- },
- },
-];
-```
-
-### 26. Upload audio file to get output summary
-
-Use this method to upload audio files directly and get transcription output without real-time recording.
+- Gets a presigned URL from the server
+- Uploads audio files to S3 via presigned URL
+- Initializes a transaction with the uploaded files
+- Returns the transaction details
```ts
const audioFiles = [file1, file2]; // File or Blob objects
const audioFileNames = ['audio1.mp3', 'audio2.mp3'];
-const uploadResult = await ekascribe.uploadAudioWithPresignedUrl({
- action: 'upload',
+const response = await ekascribe.uploadAudioWithPresignedUrl({
+ action: 'ekascribe-v2', // Pass this exact value without changing
audioFiles,
audioFileNames,
mode: 'consultation',
- txn_id: 'upload-session-123',
- input_language: ['en'],
- output_format_template: [{ template_id: 'eka_emr_template' }],
- transfer: 'non-vaded',
- auto_download: false,
- model_training_consent: false,
+ txn_id: 'unique-transaction-id',
+ input_language: ['en-IN'],
+ output_format_template: [{ template_id: 'your_template_id' }],
+ transfer: 'non-vaded', // Use 'non-vaded' for raw audio files
+ model_type: 'pro' | 'lite',
system_info: {
platform: 'web',
language: 'en',
time_zone: 'Asia/Kolkata',
},
- model_type: 'pro',
+ patient_details: {
+ username: 'John Doe',
+ age: 35,
+ biologicalSex: 'M',
+ },
+ version: '1.0.0',
+ additional_data: {},
});
```
-- #### Response type:
+**Key Parameters:**
+
+- `action`: Pass `ekascribe-v2` exactly as shown
+- `audioFiles`: Array of File or Blob objects
+- `audioFileNames`: Array of file names corresponding to audio files
+- `transfer`: Use `non-vaded` for raw audio files (not processed with VAD)
+- Other parameters: Same as `initTransaction` (see step 3)
+
+- #### Sample Response:
```ts
{
- error_code?: ERROR_CODE;
- status_code: number;
- message: string;
- business_id?: string;
- txn_id?: string;
- oid?: string;
- uuid?: string;
+ error_code?: ERROR_CODE,
+ status_code: 200,
+ message: 'Recording uploaded successfully.',
}
```
-### 27. Edit output summary
+**Error handling:**
-Use this method to edit the generated output summary for a completed transaction.
+Possible Error Codes in `error_code`:
-```ts
-const editResult = await ekascribe.updateResultSummary({
- txnId: 'abc-123',
- data: [
- {
- 'template-id': 'eka_emr_template',
- data: 'Updated prescription content here',
- },
- ],
-});
-```
+- `get_presigned_url_failed`: Failed to get presigned URL from server, retry with the same method
+- `audio_upload_failed`: Failed to upload audio files to S3, retry with the same method
+- `txn_limit_exceeded`: Maximum number of transactions exceeded
+- `txn_init_failed`: Failed to initialize transaction after upload, retry with the same method
-- #### Response type:
+**Handling 401 Status Code:**
+
+If you receive a `status_code: 401`, update the tokens in your config and retry:
```ts
-{
- status: string;
- message: string;
- txn_id: string;
- b_id: string;
- code: number;
- error?: { code: string; message: string; display_message: string };
-}
-```
+// Update tokens in your config variable
+sdkConfig.access_token = '';
-## Utility Methods
+// Update tokens in the instance
+ekascribe.updateAuthTokens({ access_token: sdkConfig.access_token });
-```ts
-const ekaScribe = getEkaScribeInstance({ access_token: 'old_token' });
+// Now retry the method call
+const response = await ekascribe.uploadAudioWithPresignedUrl({ ... });
```
+## Utility Methods
+
### 1. Get total uploaded files
Use this method to retrieve all the audio files generated for a specific session.
@@ -815,84 +991,128 @@ ekaScribe.destroyVad();
### 8. Update Authentication Tokens
-Use this method to update the access token without reinitializing the entire SDK instance.
+Use this method to update the access token when it expires (e.g., when you receive a 401 error).
```ts
-ekaScribe.updateAuthTokens({ access_token: 'new_token' });
+ekascribe.updateAuthTokens({ access_token: 'new_access_token' });
```
-## Generic Callbacks
+**When to use:**
-```ts
-const ekaScribe = getEkaScribeInstance({ access_token: 'your_token' });
-```
+- When any API method returns `status_code: 401`
+- When `eventCallback` returns `error.code: 401` in `file_upload_status`
+- Before token expiration to prevent upload failures
-### 1. Event callback
+## Generic Callbacks
-This is a comprehensive callback that provides information about SDK operations, including success events, errors, progress updates, and system status. Use this callback to monitor all SDK activities and handle events globally in your application.
+### 1. Event callback
-```ts
-ekaScribe.onEventCallback((eventData) => {
- console.log('Event callback triggered:', eventData);
+This callback provides information about SDK operations. Use it to monitor file uploads, transaction status, AWS configuration, and authentication errors.
+
+```ts
+ekascribe.onEventCallback((eventData) => {
+ console.log('Event callback:', eventData);
+
+ // Handle different callback types
+ switch (eventData.callback_type) {
+ case 'file_upload_status':
+ // Track audio chunk upload progress
+ console.log(`Uploaded ${eventData.data?.success}/${eventData.data?.total} chunks`);
+ break;
+ case 'transaction_status':
+ // Monitor transaction lifecycle (init, stop, commit, cancel)
+ console.log('Transaction update:', eventData.message);
+ break;
+ case 'aws_configure_status':
+ // AWS S3 configuration status
+ console.log('AWS config:', eventData.status);
+ break;
+ case 'authentication_status':
+ // API authentication errors
+ console.error('Auth error:', eventData.message);
+ break;
+ }
});
```
-- #### Sample Callback Data:
+- #### Callback Structure:
```ts
{
- callback_type: 'AUDIO_UPLOAD' | 'TRANSACTION_STATUS' | 'VAD_STATUS' | 'RECORDING_STATUS',
- status: 'success' | 'error' | 'progress' | 'info',
- message: 'Audio file uploaded successfully',
+ callback_type: 'file_upload_status' | 'transaction_status' | 'aws_configure_status' | 'authentication_status',
+ status: 'success' | 'error' | 'info',
+ message: string,
+ timestamp: string, // ISO timestamp
error?: {
- code: 500,
- msg: 'Upload failed',
- details: { fileName: 'audio_chunk_1.mp3' }
+ code: number,
+ msg: string,
+ details: any
},
data?: {
- success: 3,
- total: 4,
- is_uploaded: true,
- fileName: 'audio_chunk_1.mp3',
- request: { txn_id: 'abc-123' },
- response: { status: 'uploaded' }
- },
- timestamp: '2024-01-15T10:30:45.123Z',
- metadata?: {
- txn_id: 'abc-123',
- chunk_index: 1
+ success?: number, // Number of successfully uploaded chunks
+ total?: number, // Total number of chunks
+ is_uploaded?: boolean, // Whether current chunk uploaded successfully
+ fileName?: string, // Current file name
+ chunkData?: Uint8Array[], // Audio chunk data for current audiofile
+ request?: any, // API request details
+ response?: any // API response details
}
}
```
-### 2. User speech callback
+- #### Callback Types Explained:
-This callback will return a boolean indicating whether the user is speaking or not.
+**`file_upload_status`** - Track audio chunk upload progress
-```ts
-ekaScribe.onUserSpeechCallback((isSpeech) => {
- console.log(isSpeech ? 'User is speaking' : 'User is not speaking');
-});
-```
+Use this to monitor upload progress of audio chunks:
-### 3. VAD Callback to check if a frame is valid speech or not
+- `status: 'info'` - Audio chunk info
-This callback provides information about voice activity detection frames and audio processing status.
+ - `data.success`: Count of successfully uploaded chunks
+ - `data.total`: Total chunks generated
+ - `data.fileName`: Current chunk file name
+ - `data.chunkData`: Audio data for current chunk
-```ts
-ekaScribe.onVadFramesCallback((vadData) => {
- console.log('VAD frame processed:', vadData);
-});
-```
+- `status: 'success'` - Chunk uploaded successfully
+
+ - `data.success`: Updated successful upload count
+ - `data.total`: Total chunks
+ - `data.is_uploaded`: true
+
+- `status: 'error'` - Chunk upload failed
+
+ - `error.code`: HTTP error code
+ - `error.msg`: Error message
+ - `error.details`: Additional error details
+
+- Status codes to handle:
+
+ If `error.code === 401`, it means your access token has expired. Update tokens immediately:
-- #### Sample Callback Data:
+ ```ts
+ ekascribe.onEventCallback((eventData) => {
+ if (eventData.callback_type === 'file_upload_status' && eventData.status === 'error') {
+ if (eventData.error?.code === 401) {
+ // Token expired - update it
+ sdkConfig.access_token = '';
+ ekascribe.updateAuthTokens({ access_token: sdkConfig.access_token });
+ }
+ }
+ });
+ ```
+
+### 2. User speech callback
+
+Triggered by Voice Activity Detection (VAD) when user starts or stops speaking.
```ts
-{
- status_code: 200,
- message: 'Audio captured. | No audio captured.',
- error_code?: 'speech_detected' | 'no_audio_capture'
-}
+ekascribe.onUserSpeechCallback((isSpeech) => {
+ if (isSpeech) {
+ console.log('User started speaking');
+ } else {
+ console.log('User stopped speaking');
+ }
+});
```
### Error codes
@@ -911,5 +1131,4 @@ ekaScribe.onVadFramesCallback((vadData) => {
| `no_audio_capture` | No audio was captured during the recording session |
| `txn_status_mismatch` | Invalid operation due to mismatched transaction status |
-
Refer [Ekascribe](https://github.com/eka-care/v2rx-extension) for SDK implementations.
diff --git a/api-reference/health-ai/ekascribe/System-Requirements.mdx b/api-reference/health-ai/ekascribe/System-Requirements.mdx
new file mode 100644
index 00000000..1fc3ab34
--- /dev/null
+++ b/api-reference/health-ai/ekascribe/System-Requirements.mdx
@@ -0,0 +1,18 @@
+
+
+Before integrating EkaScribe, ensure your system meets the following requirements:
+
+#### Platform Requirements
+- **Google Chrome (Web)**: Version 100+
+- **Android App**: Android OS version 10+
+- **iOS App**: iOS version 14+
+
+#### Network Requirements
+- **Internet Speed**: Minimum 1 Mbps (recommended: 5+ Mbps)
+
+#### Hardware Requirements
+- **Microphone/Audio Capture Device**: Required
+
+> **Note**: EkaScribe uses audio from doctor-patient interactions. Using a quality external microphone improves audio quality and transcription accuracy.
+
+---
\ No newline at end of file
diff --git a/api-reference/health-ai/ekascribe/ekascribe-v2/ekascribe.yaml b/api-reference/health-ai/ekascribe/ekascribe-v2/ekascribe.yaml
index 980d1808..436bdc69 100644
--- a/api-reference/health-ai/ekascribe/ekascribe-v2/ekascribe.yaml
+++ b/api-reference/health-ai/ekascribe/ekascribe-v2/ekascribe.yaml
@@ -102,12 +102,31 @@ paths:
- "bn"
- "mr"
- "pa"
+ - "or"
example: ["en-IN"]
+
+ output_language:
+ type: string
+ description: Output language for the transcription result
+ enum:
+ - "en-IN"
+ - "en-US"
+ - "hi"
+ - "gu"
+ - "kn"
+ - "ml"
+ - "ta"
+ - "te"
+ - "bn"
+ - "mr"
+ - "pa"
+ - "or"
+ example: "en-IN"
speciality:
type: string
description: Medical speciality context for better transcription accuracy
example: "general_medicine"
-
+
output_format_template:
type: array
description: Array of template configurations for output format
@@ -140,8 +159,9 @@ paths:
visitid: "09e4f00f-d665-4212-b77c-b2dd5f22bd92_1742560488782"
mode: "dictation"
input_language: ["en-IN"]
+ output_language: "en-IN"
speciality: "general_medicine"
- output_format_template: [{"template_id": "eka_emr_template", "language_output": "en-IN", "codification_needed": false}]
+ output_format_template: [{"template_id": "eka_emr_template", "codification_needed": false}]
transfer: "non-vaded"
batch_s3_url: "s3://m-pp-voice2rx/250307/R-S3-195D5131-D014-56A8-ACCF-2F8F2D230DEC/"
security:
diff --git a/api-reference/health-ai/ekascribe/ekascribe-v2/init.mdx b/api-reference/health-ai/ekascribe/ekascribe-v2/init.mdx
index dcf2ae57..85d0e79a 100644
--- a/api-reference/health-ai/ekascribe/ekascribe-v2/init.mdx
+++ b/api-reference/health-ai/ekascribe/ekascribe-v2/init.mdx
@@ -36,3 +36,23 @@ Eka Care supports transcription in multiple languages. Specify the appropriate l
| `bn` | Bengali |
| `mr` | Marathi |
| `pa` | Punjabi |
+| `or` | Oriya |
+
+## Supported Output Languages
+
+Eka Care supports generating transcription output in multiple languages, but only one can be selected at a time. Specify the appropriate language ID in the `output_language` parameter.
+
+| Language ID | Language Name |
+|-------------|---------------|
+| `en-IN` | English (India) |
+| `en-US` | English (United States) |
+| `hi` | Hindi |
+| `gu` | Gujarati |
+| `kn` | Kannada |
+| `ml` | Malayalam |
+| `ta` | Tamil |
+| `te` | Telugu |
+| `bn` | Bengali |
+| `mr` | Marathi |
+| `pa` | Punjabi |
+| `or` | Oriya |
diff --git a/api-reference/health-ai/ekascribe/ip-whitelisting-for-clients.mdx b/api-reference/health-ai/ekascribe/ip-whitelisting-for-clients.mdx
index 71071b78..2e912e57 100644
--- a/api-reference/health-ai/ekascribe/ip-whitelisting-for-clients.mdx
+++ b/api-reference/health-ai/ekascribe/ip-whitelisting-for-clients.mdx
@@ -28,6 +28,7 @@ description: Whitelisting and endpoint information for Eka Scribe APIs & Audio t
```
https://m-prod-voice-record.s3.ap-south-1.amazonaws.com
https://m-prod-voice2rx-batch.s3.ap-south-1.amazonaws.com
+https://m-prod-ekascribe-batch.s3.amazonaws.com
```
### Staging
diff --git a/api-reference/health-ai/ekascribe/overview.mdx b/api-reference/health-ai/ekascribe/overview.mdx
index f8ee0e61..b14f8395 100644
--- a/api-reference/health-ai/ekascribe/overview.mdx
+++ b/api-reference/health-ai/ekascribe/overview.mdx
@@ -99,3 +99,22 @@ Instead of polling for results, you can register a webhook to receive automatic
- Reduced API calls
---
+
+## 💻 System Requirements
+
+Before integrating EkaScribe, ensure your system meets the following requirements:
+
+#### Platform Requirements
+- **Google Chrome (Web)**: Version 100+
+- **Android App**: Android OS version 10+
+- **iOS App**: iOS version 14+
+
+#### Network Requirements
+- **Internet Speed**: Minimum 1 Mbps (recommended: 5+ Mbps)
+
+#### Hardware Requirements
+- **Microphone/Audio Capture Device**: Required
+
+> **Note**: EkaScribe uses audio from doctor-patient interactions. Using a quality external microphone improves audio quality and transcription accuracy.
+
+---
diff --git a/api-reference/user-app/abdm-connect/profile/search/search.mdx b/api-reference/user-app/abdm-connect/profile/search/search.mdx
new file mode 100644
index 00000000..fb422684
--- /dev/null
+++ b/api-reference/user-app/abdm-connect/profile/search/search.mdx
@@ -0,0 +1,4 @@
+---
+openapi: post /abdm/v1/profile/search
+title: Search ABHA
+---
\ No newline at end of file
diff --git a/api-reference/user-app/abdm-connect/registration.yml b/api-reference/user-app/abdm-connect/registration.yml
index 65ca6519..339d4324 100644
--- a/api-reference/user-app/abdm-connect/registration.yml
+++ b/api-reference/user-app/abdm-connect/registration.yml
@@ -1158,7 +1158,7 @@ paths:
description: OK
security:
- authApiKey: []
- /abdm/uhi/v1/physical-consultation/booking/status:
+ /abdm/uhi/v1/physical-consultation/booking/order-status:
get:
description: Retrieve the current status of a physical consultation booking.
parameters:
@@ -3477,6 +3477,88 @@ paths:
description: OK
security:
- authApiKey: []
+ /abdm/v1/profile/search:
+ post:
+ description: Search KYCed ABHA profiles using mobile number
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ProfileDiscoverAbhaRequest'
+ responses:
+ 4XX:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/GenericError'
+ description: ""
+ 5XX:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/GenericError'
+ description: ""
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ProfileSearchKycAbhaResponse'
+ description: OK
+ security:
+ - authApiKey: []
+ /abdm/v1/profile/share:
+ post:
+ description: Fetch the token from a hospital. Get the hip_id and counter_id
+ by reading the QR code of the Hospital/Clinic.Use the device
+ location for the location data
+ parameters:
+ - description: Eka User ID (OID)
+ in: header
+ name: X-Pt-Id
+ schema:
+ type: string
+ - description: Partner User ID
+ in: header
+ name: X-Partner-Pt-Id
+ schema:
+ type: string
+ - description: Partner HIP ID
+ in: header
+ name: X-Hip-Id
+ schema:
+ type: string
+ - description: OID is used to Identify the user.
+ in: query
+ name: oid
+ schema:
+ description: OID is used to Identify the user.
+ type: string
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ScanandshareRequest'
+ responses:
+ 4XX:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/GenericError'
+ description: ""
+ 5XX:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/GenericError'
+ description: ""
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HipQRScanShareProfileResponseV2'
+ description: OK
+ security:
+ - authApiKey: []
/abdm/v1/provider/{hip_id}:
get:
description: Fetches the Providers based on the HIP ID.
@@ -4029,6 +4111,10 @@ components:
type: object
ApproveRequest:
properties:
+ access_mode:
+ enum:
+ - view
+ type: string
consent_artefacts:
description: List of consent artefacts.
items:
@@ -4036,6 +4122,17 @@ components:
type:
- array
- "null"
+ duration:
+ $ref: '#/components/schemas/CommonsDuration'
+ erase_at:
+ format: date-time
+ type: string
+ hi_types:
+ items:
+ type: string
+ type:
+ - array
+ - "null"
id:
description: Unique identifier of a consent, also called the consent ID.
type: string
@@ -4747,6 +4844,33 @@ components:
- "null"
- string
type: object
+ HipQRScanShareProfileResponseV2:
+ properties:
+ address:
+ description: Address associated with the HIP.
+ type: string
+ created_at:
+ format: date-time
+ type: string
+ footer:
+ type: string
+ hip_id:
+ description: Health Information Provider (HIP) identifier
+ type: string
+ hip_name:
+ description: Name of the Health Information Provider (HIP)
+ type: string
+ request_id:
+ description: Unique identifier for the request
+ type: string
+ show_token_screen:
+ type: boolean
+ token_expiry:
+ format: date-time
+ type: string
+ token_number:
+ type: string
+ type: object
InitRequest:
properties:
aadhaar_number:
@@ -4926,8 +5050,9 @@ components:
care_context_id:
type: string
data:
- description: ABDM compliant FHIR bundle (optional, required if not opting
- for webhook based implementation)
+ description: Base64 encoded ABDM compliant FHIR bundle (optional, required
+ if not opting for webhook based implementation)
+ type: string
display:
type: string
hi_type:
@@ -6040,13 +6165,48 @@ components:
- Jharkhand
type: string
type: object
+ ProfileAbha:
+ properties:
+ abha_number:
+ examples:
+ - xx-xxxx-xxxx-1525
+ type: string
+ gender:
+ examples:
+ - M
+ type: string
+ index:
+ examples:
+ - 1
+ type: integer
+ kyc_verified:
+ examples:
+ - "true"
+ type: string
+ name:
+ examples:
+ - John Doe
+ type: string
+ type: object
+ ProfileDiscoverAbhaRequest:
+ properties:
+ mobile:
+ type: string
+ required:
+ - mobile
+ type: object
ProfileResponse:
properties:
abha_address:
- description: ABHA address associated with the user.
+ description: Primary/preferred abha address.
examples:
- shyam@abdm
type: string
+ abha_addresses:
+ description: List of abha addresses associated with aadhaar
+ items:
+ type: string
+ type: array
abha_number:
description: ABHA number assigned to the user.
examples:
@@ -6114,6 +6274,15 @@ components:
- "null"
- integer
type: object
+ ProfileSearchKycAbhaResponse:
+ properties:
+ profiles:
+ items:
+ $ref: '#/components/schemas/ProfileAbha'
+ type:
+ - array
+ - "null"
+ type: object
ProviderHipDetail:
properties:
hip_id:
@@ -6515,6 +6684,24 @@ components:
- hip_id
- counter_id
type: object
+ ScanandshareRequest:
+ properties:
+ counter_id:
+ description: Counter ID from QR Code
+ type: string
+ hip_id:
+ description: HIP ID from QR Code
+ type: string
+ location:
+ $ref: '#/components/schemas/HipLocation'
+ description: Location of the user
+ patient:
+ $ref: '#/components/schemas/ScanandsharePatient'
+ description: Patient details
+ required:
+ - counter_id
+ - hip_id
+ type: object
ScanandshareResponse:
properties:
expiry:
@@ -6664,6 +6851,11 @@ components:
type: object
VerifyResponse:
properties:
+ abha_profiles:
+ description: Abha profiles of the user.
+ items:
+ $ref: '#/components/schemas/VerifyAbhaProfile'
+ type: array
eka:
$ref: '#/components/schemas/RegistrationEkaIds'
description: Eka IDs, will be present if SkipState is abha_end
@@ -6697,6 +6889,11 @@ components:
type: object
VerifyResponseType2:
properties:
+ abha_profiles:
+ description: Abha profiles of the user.
+ items:
+ $ref: '#/components/schemas/VerifyAbhaProfile'
+ type: array
eka:
$ref: '#/components/schemas/RegistrationEkaIds'
hint:
diff --git a/api-reference/user-app/records/records.yaml b/api-reference/user-app/records/records.yaml
index 64087327..03a72494 100644
--- a/api-reference/user-app/records/records.yaml
+++ b/api-reference/user-app/records/records.yaml
@@ -1617,7 +1617,7 @@ components:
tg:
type: array
uniqueItems: true
- description: The tag array can contain a maximum of **10 tags**.
+ description: Tags are treated as SET, and therefore their order is not preserved. The tag array can contain a maximum of **10 tags**.
If more than 10 tags are provided in the request, only the **first 10 tags** will be considered.
items:
type: string
diff --git a/docs.json b/docs.json
index 89f1238f..94cbedb9 100644
--- a/docs.json
+++ b/docs.json
@@ -29,13 +29,50 @@
"tab": "Documentation",
"groups": [
{
- "group": "Eka Care Developer API guide",
+ "group": "Eka Overview",
"pages": [
- "introduction",
- "abdm-connect",
- "getting-started",
- "communication-flow-appointment-clinical-events"
+ "user-guides/get-started",
+ "user-guides/eka-products"
]
+ },
+ {
+ "group": "Integrations",
+ "pages": [
+ {
+ "group": "Core-EMR",
+ "pages": [
+ "integrations/core-emr/patients",
+ "integrations/core-emr/doctor",
+ "integrations/core-emr/appointments",
+ "integrations/core-emr/clinic",
+ "integrations/core-emr/payments",
+ "integrations/core-emr/prescription",
+ "integrations/core-emr/medical-db",
+ "integrations/core-emr/medical-document-parsing"
+ ]
+ },
+ {
+ "group": "Health AI",
+ "pages": [
+ "integrations/health-ai/assessments",
+ "integrations/health-ai/ekascribe",
+ "integrations/health-ai/medassist"
+ ]
+ },
+ {
+ "group": "Interoperability",
+ "pages": [
+ "integrations/interoperability/abdm"
+ ]
+ },
+ {
+ "group": "MCP",
+ "pages": [
+ "integrations/mcp/mcp"
+ ]
+ }
+ ]
+
}
]
},
@@ -118,7 +155,9 @@
"group": "EkaScribe",
"icon": "microphone-lines",
"pages": [
+ "api-reference/health-ai/ekascribe/intro",
"api-reference/health-ai/ekascribe/overview",
+ "api-reference/health-ai/ekascribe/System-Requirements",
{
"group": "EkaScribe APIs",
"icon": "microphone-lines",
@@ -149,7 +188,9 @@
"api-reference/health-ai/ekascribe/ekascribe-v1/retrieve-transcribe"
]
},
+ "api-reference/health-ai/ekascribe/integration-info",
"api-reference/health-ai/ekascribe/audio-transcription",
+ "api-reference/health-ai/ekascribe/Eka-FHIR-structure",
"api-reference/health-ai/ekascribe/ip-whitelisting-for-clients"
]
},
@@ -234,7 +275,7 @@
]
},
{
- "group": "Patient Directory API's",
+ "group": "Patient Directory APIs",
"icon": "hospital-user",
"pages": [
{
@@ -279,6 +320,19 @@
"api-reference/doc-tool/doctor-and-clinic-api/get-doc-service"
]
},
+ {
+ "group": "Config management APIs",
+ "icon": "user-cog",
+ "pages": [
+ {
+ "group": "User APIs",
+ "pages": [
+ "api-reference/doc-tool/user-apis/get-all-users",
+ "api-reference/doc-tool/user-apis/get-user-by-id"
+ ]
+ }
+ ]
+ },
{
"group": "Appointment API",
"icon": "calendar-check",
@@ -292,7 +346,8 @@
"api-reference/doc-tool/appointment-api/parked-appointment",
"api-reference/doc-tool/appointment-api/complete-appointment",
"api-reference/doc-tool/appointment-api/cancel-appointment",
- "api-reference/doc-tool/appointment-api/get-appointments-by-date"
+ "api-reference/doc-tool/appointment-api/get-appointments-by-date",
+ "api-reference/doc-tool/appointment-api/change-status"
]
},
{
@@ -342,7 +397,16 @@
"group": "Doctor",
"icon": "stethoscope",
"pages": [
- "api-reference/doc-tool/post_webhooks/doctor-webhook"
+ "api-reference/doc-tool/post_webhooks/doctor-webhook",
+ "api-reference/doc-tool/post_webhooks/google-review-webhook",
+ "api-reference/doc-tool/post_webhooks/mcert-webhook"
+ ]
+ },
+ {
+ "group": "Receipt",
+ "icon": "indian-rupee-sign",
+ "pages": [
+ "api-reference/doc-tool/post_webhooks/receipt-webhook"
]
}
]
@@ -547,6 +611,7 @@
"icon": "user",
"pages": [
"api-reference/user-app/abdm-connect/profile/getting-started",
+ "api-reference/user-app/abdm-connect/profile/search/search",
"api-reference/user-app/abdm-connect/profile/cards/qr-code",
"api-reference/user-app/abdm-connect/profile/cards/abha-card",
"api-reference/user-app/abdm-connect/profile/details/profile-details",
@@ -875,12 +940,20 @@
]
},
{
- "group": "Web SDK",
- "pages": [
- "SDKs/web-sdk/getting-started",
- "SDKs/web-sdk/self-assessment-sdk",
- "SDKs/web-sdk/abha-sdk"
- ]
+ "group": "Web SDK",
+ "pages": [
+ "SDKs/web-sdk/getting-started",
+ "SDKs/web-sdk/self-assessment-sdk",
+ {
+ "group": "ABHA SDK",
+ "pages": [
+ "SDKs/web-sdk/abha-sdk/get-started",
+ "SDKs/web-sdk/abha-sdk/abha-login-create",
+ "SDKs/web-sdk/abha-sdk/abha-consent",
+ "SDKs/web-sdk/abha-sdk/abha-kyc"
+ ]
+ }
+ ]
},
{
"group": "Backend",
@@ -898,6 +971,27 @@
}
]
},
+ {
+ "tab": "Eka MCP",
+ "groups": [
+ {
+ "group": "Get Started",
+ "icon": "rocket",
+ "pages": [
+ "mcp/introduction",
+ "mcp/supported-tools",
+ "mcp/authentication"
+ ]
+ },
+ {
+ "group": "Integrations",
+ "icon": "plug",
+ "pages": [
+ "mcp/integrations/custom-client"
+ ]
+ }
+ ]
+ },
{
"tab": "CookBook",
"groups": [
@@ -913,12 +1007,6 @@
]
}
]
- },
- {
- "anchor": "Developer Discord",
- "href": "https://discord.gg/THgd5S22EK",
- "icon": "discord",
- "iconType": "brands"
}
]
},
@@ -931,12 +1019,19 @@
{
"label": "Support",
"href": "https://discord.gg/THgd5S22EK"
+ },
+ {
+ "label": "Developer Discord",
+ "anchor": "Developer Discord",
+ "href": "https://discord.gg/THgd5S22EK",
+ "icon": "discord",
+ "iconType": "brands"
}
],
"primary": {
"type": "button",
- "label": "Dashboard",
- "href": "https://eka.care"
+ "label": "Get Started",
+ "href": "https://console.eka.care"
}
},
"footer": {
@@ -946,4 +1041,4 @@
"linkedin": "https://www.linkedin.com/company/ekacare"
}
}
-}
\ No newline at end of file
+}
diff --git a/images/EkascribeProductBasedOnBusinessModelAndIntegrationDecision.png b/images/EkascribeProductBasedOnBusinessModelAndIntegrationDecision.png
new file mode 100644
index 00000000..736b7824
Binary files /dev/null and b/images/EkascribeProductBasedOnBusinessModelAndIntegrationDecision.png differ
diff --git a/images/OIDC.png b/images/OIDC.png
new file mode 100644
index 00000000..67d72fcf
Binary files /dev/null and b/images/OIDC.png differ
diff --git a/images/claude-prompt.png b/images/claude-prompt.png
new file mode 100644
index 00000000..e7c1e14e
Binary files /dev/null and b/images/claude-prompt.png differ
diff --git a/images/eka-remote-mcp.png b/images/eka-remote-mcp.png
new file mode 100644
index 00000000..3fd7236f
Binary files /dev/null and b/images/eka-remote-mcp.png differ
diff --git a/images/ekascribe-integration-flow.png b/images/ekascribe-integration-flow.png
new file mode 100644
index 00000000..f50c0085
Binary files /dev/null and b/images/ekascribe-integration-flow.png differ
diff --git a/integrations/core-emr/appointments.mdx b/integrations/core-emr/appointments.mdx
new file mode 100644
index 00000000..157f404a
--- /dev/null
+++ b/integrations/core-emr/appointments.mdx
@@ -0,0 +1,16 @@
+## Appointment
+
+An Appointment is a scheduled meeting between a patient and a doctor. Appointment details include identifiers, participant information, location, timing, and status.
+
+### Key Fields:
+
+- **appointment_id** (string): Unique identifier for the appointment
+- **doctor_oid** (string): Unique identifier for the doctor
+- **patient_oid** (string): Unique identifier for the patient
+- **clinic_id** (string): Unique identifier for the clinic
+- **status** (string): Status of the appointment (e.g., CM - Completed, BK - Booked)
+- **start_time** (datetime): Start time of the appointment
+- **end_time** (datetime): End time of the appointment
+- **payment** (object): Payment details for the appointment
+
+Read more : ([API Reference - Appointment](https://developer.eka.care/api-reference/doc-tool/Actors/actors)) section.
\ No newline at end of file
diff --git a/integrations/core-emr/clinic.mdx b/integrations/core-emr/clinic.mdx
new file mode 100644
index 00000000..a04faabe
--- /dev/null
+++ b/integrations/core-emr/clinic.mdx
@@ -0,0 +1,12 @@
+## Clinic
+
+A Clinic is a healthcare facility where doctors provide medical services. Clinic profiles include name, address, contact information, specialties, and operating hours.
+
+### Key Fields:
+
+- **id** (string): Unique identifier for the clinic
+- **name** (string): Name of the clinic
+- **address** (object): Clinic's address details
+- **contacts** (array): Contact information for the clinic
+
+Read more : ([API Reference - Clinic](https://developer.eka.care/api-reference/doc-tool/doctor-and-clinic-api/getting-started)) section.
\ No newline at end of file
diff --git a/integrations/core-emr/doctor.mdx b/integrations/core-emr/doctor.mdx
new file mode 100644
index 00000000..832700ce
--- /dev/null
+++ b/integrations/core-emr/doctor.mdx
@@ -0,0 +1,12 @@
+## Doctor
+
+A Doctor is a medical professional registered on the Eka platform. Doctor profiles include personal details, professional credentials, clinic associations, and availability for appointments.
+
+### Key Fields:
+
+- **id** (string): Unique identifier for the doctor
+- **profile** (object): Contains personal and professional information
+ - **personal** (object): Doctor's personal details (name, DOB, gender)
+ - **professional** (object): Doctor's professional information (specialties, degrees, clinics)
+
+Read more : ([API Reference - Doctor](https://developer.eka.care/api-reference/doc-tool/doctor-and-clinic-api/getting-started)) section.
\ No newline at end of file
diff --git a/integrations/core-emr/medical-db.mdx b/integrations/core-emr/medical-db.mdx
new file mode 100644
index 00000000..66e78dd7
--- /dev/null
+++ b/integrations/core-emr/medical-db.mdx
@@ -0,0 +1,3 @@
+## Work in progress
+
+WIP
\ No newline at end of file
diff --git a/integrations/core-emr/medical-document-parsing.mdx b/integrations/core-emr/medical-document-parsing.mdx
new file mode 100644
index 00000000..66e78dd7
--- /dev/null
+++ b/integrations/core-emr/medical-document-parsing.mdx
@@ -0,0 +1,3 @@
+## Work in progress
+
+WIP
\ No newline at end of file
diff --git a/integrations/core-emr/patients.mdx b/integrations/core-emr/patients.mdx
new file mode 100644
index 00000000..82aa9cd3
--- /dev/null
+++ b/integrations/core-emr/patients.mdx
@@ -0,0 +1,16 @@
+## Patient
+
+A Patient is an individual who receives medical care and services. Patient profiles contain personal information, medical history, and other relevant data.
+
+### Key Fields:
+
+- **patient_id** (string): Unique identifier for the patient, created upon registration
+- **first_name** (string): Patient's first name
+- **last_name** (string): Patient's last name
+- **dob** (date): Patient's date of birth (YYYY-MM-DD)
+- **mobile** (string): Patient's mobile phone number
+- **gender** (string): Patient's gender (e.g., M, F)
+- **address** (object): Patient's address details (optional)
+- **metadata** (object): Additional patient information like UHID, Blood Group, medical history (optional)
+
+Read more : ([API Reference - Patients](https://developer.eka.care/api-reference/doc-tool/Actors/actors)) section.
\ No newline at end of file
diff --git a/integrations/core-emr/payments.mdx b/integrations/core-emr/payments.mdx
new file mode 100644
index 00000000..66e78dd7
--- /dev/null
+++ b/integrations/core-emr/payments.mdx
@@ -0,0 +1,3 @@
+## Work in progress
+
+WIP
\ No newline at end of file
diff --git a/integrations/core-emr/prescription.mdx b/integrations/core-emr/prescription.mdx
new file mode 100644
index 00000000..9cd0b25c
--- /dev/null
+++ b/integrations/core-emr/prescription.mdx
@@ -0,0 +1,17 @@
+## Prescription
+
+A Prescription is a medical document provided by a doctor to a patient, including prescribed medications, dosage instructions, and other treatment recommendations.
+
+### Key Fields:
+
+- **rx_id** (string): Unique identifier for the prescription
+- **visit_id** (string): Unique identifier for the associated visit
+- **doctor** (object): Details of the prescribing doctor
+- **patient** (object): Details of the patient
+- **rx_entities** (object): Contains symptoms, diagnosis, medications, and lab tests
+ - **symptoms** (array): List of reported symptoms
+ - **diagnosis** (array): List of diagnoses made
+ - **medications** (array): List of prescribed medications
+ - **labTests** (array): List of prescribed lab tests
+
+Read more : ([API Reference - Prescription](https://developer.eka.care/api-reference/doc-tool/prescription-api/get-prescription-details)) section.
\ No newline at end of file
diff --git a/integrations/health-ai/assessments.mdx b/integrations/health-ai/assessments.mdx
new file mode 100644
index 00000000..66e78dd7
--- /dev/null
+++ b/integrations/health-ai/assessments.mdx
@@ -0,0 +1,3 @@
+## Work in progress
+
+WIP
\ No newline at end of file
diff --git a/integrations/health-ai/ekascribe.mdx b/integrations/health-ai/ekascribe.mdx
new file mode 100644
index 00000000..66e78dd7
--- /dev/null
+++ b/integrations/health-ai/ekascribe.mdx
@@ -0,0 +1,3 @@
+## Work in progress
+
+WIP
\ No newline at end of file
diff --git a/integrations/health-ai/medassist.mdx b/integrations/health-ai/medassist.mdx
new file mode 100644
index 00000000..66e78dd7
--- /dev/null
+++ b/integrations/health-ai/medassist.mdx
@@ -0,0 +1,3 @@
+## Work in progress
+
+WIP
\ No newline at end of file
diff --git a/integrations/interoperability/abdm.mdx b/integrations/interoperability/abdm.mdx
new file mode 100644
index 00000000..66e78dd7
--- /dev/null
+++ b/integrations/interoperability/abdm.mdx
@@ -0,0 +1,3 @@
+## Work in progress
+
+WIP
\ No newline at end of file
diff --git a/integrations/mcp/mcp.mdx b/integrations/mcp/mcp.mdx
new file mode 100644
index 00000000..66e78dd7
--- /dev/null
+++ b/integrations/mcp/mcp.mdx
@@ -0,0 +1,3 @@
+## Work in progress
+
+WIP
\ No newline at end of file
diff --git a/introduction.mdx b/introduction.mdx
index e839345a..4efd94b2 100644
--- a/introduction.mdx
+++ b/introduction.mdx
@@ -38,8 +38,9 @@ Choosing Eka Connect is a smart decision because of its strong focus on security
**Obtain the Client ID and Client Secret**
-- Contact Eka’s support team to request your Client ID and Client Secret via Email.
-- Email - ekaconnect@eka.care
+- Login to your Eka Care Control Panel at [Console](https://console.eka.care) and create client_id and client_secret
+- If you are a developer and are looking to create an app for our doctors and patients you can either follow the end to end OIDC guidelines to connect Eka Accounts with yours, Or you can ask for API Key from your respective healthcare providers workspace to get access using API Key. [Hub](https://hub.eka.care/account/account/apitoken/)
+- For any issue or detailed info you can reach out to us at ekaconnect@eka.care
#### **2. Authentication**
diff --git a/mcp/authentication.mdx b/mcp/authentication.mdx
new file mode 100644
index 00000000..e96bcc69
--- /dev/null
+++ b/mcp/authentication.mdx
@@ -0,0 +1,200 @@
+---
+title: Authentication
+description: Securely connect your AI assistant to Eka.care
+---
+
+## Overview
+
+Eka.care MCP supports two authentication methods to fit different integration needs:
+
+
+
+ **Best for:** Healthcare providers and clinics
+
+ Auto-authenticate with your Eka.care account. No manual credential management needed.
+
+
+ **Best for:** Third-party integrations
+
+ Use API credentials (Client ID, Secret, API Key) for programmatic access.
+
+
+
+---
+
+## Method 1: OIDC Flow (Auto-Authentication)
+
+This is the **easiest and most secure** method. Your AI assistant authenticates using your Eka.care login, just like logging into the dashboard.
+
+### How It Works
+
+
+
+ Claude Desktop or any MCP-compatible client
+
+
+ Opens a secure browser window
+
+
+ Use your existing Eka.care credentials
+
+
+ Your AI assistant now has secure access
+
+
+
+
+
+ {/* Screenshot placeholder: Diagram showing OIDC flow steps */}
+
+
+## Method 2: Client Credentials
+
+Use this method if you have API credentials (Client ID, Client Secret, API Key) from the Eka.care team.
+
+### How It Works
+
+Your MCP server authenticates directly with Eka.care APIs using:
+- **Client ID**: Your application identifier
+- **Client Secret**: Secret key for authentication
+- **API Key**: to connect to a specefic workspace from your client_id / client_secret
+
+### Setup Client Credentials
+
+**1. Get your credentials:**
+
+Get your client id and client secret from Eka developer [console](https://console.eka.care/api-keys/)
+- Client ID
+- Client Secret
+
+If you are a standalone devleoper and wish to access workspaces of Eka Users you can either implement OIDC ( Oauth ) flow or get API Key from users workspace [Hub](https://hub.eka.care/account/account/apitoken/)
+- API Key
+
+
+For any issues you can contact **ekaconnect@eka.care** and request:
+
+**2. Configure your `.env` file:**
+
+```bash .env
+# API Configuration
+EKA_API_BASE_URL=https://api.eka.care
+
+# Client Credentials
+EKA_CLIENT_ID=your_client_id_here
+EKA_CLIENT_SECRET=your_client_secret_here
+EKA_API_KEY=your_api_key_here
+
+# Server Settings (optional)
+EKA_MCP_SERVER_HOST=localhost
+EKA_MCP_SERVER_PORT=8000
+EKA_LOG_LEVEL=INFO
+```
+
+
+**Security Best Practices:**
+- Never commit credentials to version control
+- Use `.gitignore` to exclude `.env` file
+- Rotate credentials periodically
+- Use different credentials for development and production
+
+
+**3. Update Claude Desktop config:**
+
+```json claude_desktop_config.json
+{
+ "mcpServers": {
+ "eka-care": {
+ "command": "/full/path/to/.venv/bin/python",
+ "args": ["-m", "eka_mcp_sdk.server"],
+ "env": {
+ "EKA_CLIENT_ID": "your_client_id_here",
+ "EKA_CLIENT_SECRET": "your_client_secret_here",
+ "EKA_API_KEY": "your_api_key_here",
+ "EKA_API_BASE_URL": "https://api.eka.care"
+ }
+ }
+ }
+}
+```
+
+**4. Test your connection:**
+
+```bash
+# Start the MCP server
+eka-mcp-server
+```
+
+You should see:
+```
+INFO: Authentication successful
+INFO: MCP Server running on http://localhost:8000
+```
+
+### Credential Management Tips
+
+
+
+ **Quick test with curl:**
+ ```bash
+ curl -X POST https://api.eka.care/api/v1/auth/token \
+ -H "Content-Type: application/json" \
+ -H "X-API-KEY: your_api_key" \
+ -d '{
+ "client_id": "your_client_id",
+ "client_secret": "your_client_secret",
+ "grant_type": "client_credentials"
+ }'
+ ```
+
+ Should return an access token if credentials are valid.
+
+
+
+ **Automatic refresh:** The MCP server automatically refreshes tokens before they expire.
+
+ **Default expiration:** Tokens typically last 1 hour and are refreshed automatically.
+
+ **No action needed:** You don't need to manually manage token lifecycle.
+
+
+
+ **Development:**
+ ```bash .env.development
+ EKA_CLIENT_ID=dev_client_id
+ EKA_CLIENT_SECRET=dev_client_secret
+ EKA_API_KEY=dev_api_key
+ EKA_API_BASE_URL=https://api-dev.eka.care
+ ```
+
+ **Production:**
+ ```bash .env.production
+ EKA_CLIENT_ID=prod_client_id
+ EKA_CLIENT_SECRET=prod_client_secret
+ EKA_API_KEY=prod_api_key
+ EKA_API_BASE_URL=https://api.eka.care
+ ```
+
+
+
+ **When to rotate:**
+ - Every 90 days (recommended)
+ - If credentials may be compromised
+ - When team members leave
+
+ **How to rotate:**
+ 1. Contact ekaconnect@eka.care for new credentials
+ 2. Update your `.env` file
+ 3. Restart the MCP server
+ 4. Update Claude Desktop config if needed
+
+
+
+---
+
+
+**Need Credentials?** Contact **ekaconnect@eka.care** with:
+- Your organization name
+- Integration type (OIDC or Client Credentials)
+- Use case description
+- Expected API usage volume
+
diff --git a/mcp/integrations/custom-client.mdx b/mcp/integrations/custom-client.mdx
new file mode 100644
index 00000000..ded20322
--- /dev/null
+++ b/mcp/integrations/custom-client.mdx
@@ -0,0 +1,245 @@
+---
+title: Custom MCP Client
+description: Integrate Eka.care MCP into your own application
+---
+
+## Overview
+
+Want to build your own AI-powered healthcare application? You can integrate Eka.care MCP into any application that supports the Model Context Protocol standard.
+
+
+
+ Create custom healthcare assistants
+
+
+ Automate clinic workflows
+
+
+ Custom admin dashboards
+
+
+ API-powered AI services
+
+
+
+---
+
+## Quick Integration
+
+### Using the MCP SDK
+
+The easiest way is to use the official MCP SDK in your preferred language:
+
+
+
+ ```python
+ from mcp import ClientSession, StdioServerParameters
+ from mcp.client.stdio import stdio_client
+
+ # Create MCP client connection
+ server_params = StdioServerParameters(
+ command="/path/to/.venv/bin/python",
+ args=["-m", "eka_mcp_sdk.server"],
+ env={
+ "EKA_CLIENT_ID": "your_client_id",
+ "EKA_CLIENT_SECRET": "your_client_secret",
+ "EKA_API_KEY": "your_api_key"
+ }
+ )
+
+ async with stdio_client(server_params) as (read, write):
+ async with ClientSession(read, write) as session:
+ # Initialize connection
+ await session.initialize()
+
+ # List available tools
+ tools = await session.list_tools()
+ print(f"Available tools: {[t.name for t in tools]}")
+
+ # Call a tool
+ result = await session.call_tool(
+ "search_patients",
+ arguments={"prefix": "Kumar"}
+ )
+ print(result)
+ ```
+
+
+
+ ```typescript
+ import { Client } from "@modelcontextprotocol/sdk/client/index.js";
+ import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js";
+
+ const transport = new StdioClientTransport({
+ command: "/path/to/.venv/bin/python",
+ args: ["-m", "eka_mcp_sdk.server"],
+ env: {
+ EKA_CLIENT_ID: "your_client_id",
+ EKA_CLIENT_SECRET: "your_client_secret",
+ EKA_API_KEY: "your_api_key"
+ }
+ });
+
+ const client = new Client({
+ name: "my-healthcare-app",
+ version: "1.0.0"
+ }, {
+ capabilities: {}
+ });
+
+ await client.connect(transport);
+
+ // List available tools
+ const tools = await client.listTools();
+ console.log("Available tools:", tools.tools.map(t => t.name));
+
+ // Call a tool
+ const result = await client.callTool({
+ name: "search_patients",
+ arguments: { prefix: "Kumar" }
+ });
+ console.log(result);
+ ```
+
+
+
+ ```go
+ package main
+
+ import (
+ "context"
+ "fmt"
+ "github.com/modelcontextprotocol/sdk-go/client"
+ )
+
+ func main() {
+ // Create MCP client
+ c := client.NewStdioClient(
+ "/path/to/.venv/bin/python",
+ []string{"-m", "eka_mcp_sdk.server"},
+ map[string]string{
+ "EKA_CLIENT_ID": "your_client_id",
+ "EKA_CLIENT_SECRET": "your_client_secret",
+ "EKA_API_KEY": "your_api_key",
+ },
+ )
+
+ // Connect
+ ctx := context.Background()
+ if err := c.Connect(ctx); err != nil {
+ panic(err)
+ }
+ defer c.Close()
+
+ // List tools
+ tools, err := c.ListTools(ctx)
+ if err != nil {
+ panic(err)
+ }
+ fmt.Printf("Available tools: %+v\n", tools)
+
+ // Call a tool
+ result, err := c.CallTool(ctx, "search_patients", map[string]interface{}{
+ "prefix": "Kumar",
+ })
+ if err != nil {
+ panic(err)
+ }
+ fmt.Printf("Result: %+v\n", result)
+ }
+ ```
+
+
+
+---
+
+## HTTP Integration
+
+Prefer REST APIs? Deploy the MCP server with HTTP transport:
+
+### Setup HTTP Server
+
+```python server.py
+from fastmcp import FastMCP
+from eka_mcp_sdk.tools.patient_tools import register_patient_tools
+from eka_mcp_sdk.tools.appointment_tools import register_appointment_tools
+
+# Create FastMCP instance
+mcp = FastMCP("Eka.care MCP")
+
+# Register tools
+register_patient_tools(mcp)
+register_appointment_tools(mcp)
+
+# Run with HTTP transport
+if __name__ == "__main__":
+ import uvicorn
+ uvicorn.run(mcp.get_asgi_app(), host="0.0.0.0", port=8000)
+```
+
+### Call via HTTP
+
+```bash
+# List available tools
+curl http://localhost:8000/tools
+
+# Call a tool
+curl -X POST http://localhost:8000/call_tool \
+ -H "Content-Type: application/json" \
+ -d '{
+ "name": "search_patients",
+ "arguments": {"prefix": "Kumar"}
+ }'
+```
+
+---
+
+## Docker Deployment
+
+Deploy as a containerized service:
+
+```dockerfile Dockerfile
+FROM python:3.11-slim
+
+WORKDIR /app
+
+# Install dependencies
+COPY requirements.txt .
+RUN pip install -r requirements.txt
+
+# Copy MCP server code
+COPY . .
+
+# Install package
+RUN pip install -e .
+
+# Expose port
+EXPOSE 8000
+
+# Run server
+CMD ["python", "-m", "eka_mcp_sdk.server"]
+```
+
+```yaml docker-compose.yml
+version: '3.8'
+
+services:
+ eka-mcp:
+ build: .
+ ports:
+ - "8000:8000"
+ environment:
+ - EKA_CLIENT_ID=${EKA_CLIENT_ID}
+ - EKA_CLIENT_SECRET=${EKA_CLIENT_SECRET}
+ - EKA_API_KEY=${EKA_API_KEY}
+ - EKA_API_BASE_URL=https://api.eka.care
+ restart: unless-stopped
+```
+
+---
+
+
+**Building Something Cool?** We'd love to hear about it!
+- Email us: ekaconnect@eka.care
+- Get featured in our showcase!
+
diff --git a/mcp/introduction.mdx b/mcp/introduction.mdx
new file mode 100644
index 00000000..20f853b4
--- /dev/null
+++ b/mcp/introduction.mdx
@@ -0,0 +1,382 @@
+---
+title: Eka MCP Server
+description: Connect your AI assistant to Eka.care's healthcare platform
+---
+
+
+
+ {/* Screenshot placeholder: Show diagram of AI Assistant <-> MCP <-> Eka.care APIs */}
+
+
+**Model Context Protocol (MCP)** is an open standard that lets AI assistants like Claude connect directly to your applications and data securely. Think of it as a universal adapter that helps AI understand and work with your healthcare systems.
+
+Eka's MCP server follows the authenticated remote [MCP spec](https://modelcontextprotocol.io/specification/2025-03-26), so the server is centrally hosted and managed. Instead of copying and pasting patient data or manually creating appointments, your AI assistant can handle appointment booking, prescription creation, and patient lookups automatically with built in Authentication and HIPAA-compliant data handling.
+
+
+## Setup Instructions
+
+### General
+
+Eka's MCP server is currently supporting Streamable HTTP transport. It uses OAuth 2.0 with OpenID Connect (OIDC) flow for dynamic client registration for authentication at the following address:
+
+- HTTP : `https://mcp.eka.care/mcp`
+
+For setup instructions on specific clients, continue reading ..
+
+
+
+
+
+**Requirements:** VS Code 1.95+ with GitHub Copilot
+
+1. Press `Cmd + Shift + P`
+2. Type and select **MCP: Add Server**
+3. Choose **HTTP** *(HTTP or Server-Sent Events)*
+4. Enter URL: `https://mcp.eka.care/mcp`
+5. Enter server name: `eka-care-mcp`
+6. Authenticate with your Eka.care email
+
+Done! Test by asking Copilot: *"Search for patient Raj Kumar"*
+
+
+
+
+
+**Requirements:** VS Code 1.95+ with GitHub Copilot
+
+1. Press `Ctrl + Shift + P`
+2. Type and select **MCP: Add Server**
+3. Choose **HTTP** *(HTTP or Server-Sent Events)*
+4. Enter URL: `https://mcp.eka.care/mcp`
+5. Enter server name: `eka-care-mcp`
+6. Authenticate with your Eka.care email
+
+Configuration saved to: `%APPDATA%\Code\User\globalStorage\github.copilot-chat\mcp.json`
+
+
+
+
+
+**Requirements:** Claude Paid subscription
+
+1. Open Claude Desktop
+2. Click **Settings** → **Connectors** → **Add custom connector**
+3. Type the name as **Eka-Care-mcp**
+4. Type the URL as **https://mcp.eka.care/mcp**
+5. Tap **Add**
+6. Authenticate with Eka.care
+7. Save and restart
+
+Pro users get higher rate limits and priority access.
+
+Config(macOS): `~/Library/Application Support/Claude/claude_desktop_config.json`
+Config(Windows): `%APPDATA%\Claude\claude_desktop_config.json`
+
+
+
+
+
+**Requirements:** Claude Desktop app (Free tier)
+
+1. Open Claude Desktop
+2. Click **Settings** (bottom-left gear icon)
+3. Navigate to **Developer** → **Edit Config**
+4. Add this configuration:
+
+```json
+{
+ "mcpServers": {
+ "eka-care": {
+ "command": "npx",
+ "args": ["-y", "mcp-remote", "https://mcp.eka.care/mcp"]
+ }
+ }
+}
+```
+
+5. Save and restart Claude Desktop
+6. Authenticate when prompted
+
+Config location: `~/Library/Application Support/Claude/claude_desktop_config.json`
+
+
+
+
+
+**Requirements:** Claude Desktop app (Free tier)
+
+1. Open Claude Desktop
+2. Click **Settings** (gear icon)
+3. Go to **Developer** → **Edit Config**
+4. Add:
+
+```json
+{
+ "mcpServers": {
+ "eka-care": {
+ "command": "npx",
+ "args": ["-y", "mcp-remote", "https://mcp.eka.care/mcp"]
+ }
+ }
+}
+```
+
+5. Save and restart Claude
+6. Authenticate when prompted
+
+Config location: `%APPDATA%\Claude\claude_desktop_config.json`
+
+
+
+
+**Requirements:** Free chatgpt does not provide the remote mcp connectors currently, You should have >Go model.
+
+1. Open https://chatgpt.com/
+2. Go to profile (Left bottom)
+3. Click **Settings**
+4. Navigate to **Apps and Connectors**
+5. Scroll down and inside the Developer mode, switch it on
+6. Inside Apps and Connectors, tap **Create app**
+7. Enter the name **eka-care-mcp**
+8. Enter the URL **https://mcp.eka.care/mcp** and tap **Create**
+9. Authenticate when prompted
+
+
+
+
+**Requirements:** Cursor IDE
+
+1. Open Cursor
+2. Press `Cmd + Shift + P`
+3. Type **Cursor settings**
+4. Select **Tools & MCP**
+5. Tap on **New MCP Server**
+6. Add server configuration:
+
+```json
+{
+ "mcpServers": {
+ "eka-care": {
+ "url": "https://mcp.eka.care/mcp",
+ "transport": {
+ "type": "http"
+ }
+ }
+ }
+}
+```
+
+7. Tap on Connect to Authenticate with Eka.care
+8. Restart Cursor
+
+Config location: `~/Library/Application Support/Cursor/User/globalStorage/mcp.json`
+
+
+
+
+
+**Requirements:** Cursor IDE
+
+1. Open Cursor
+2. Press `Ctrl + Shift + P`
+3. Type **Cursor settings**
+4. Select **Tools & MCP**
+5. Tap on **New MCP Server**
+6. Add server configuration:
+
+```json
+{
+ "mcpServers": {
+ "eka-care": {
+ "url": "https://mcp.eka.care/mcp",
+ "transport": {
+ "type": "http"
+ }
+ }
+ }
+}
+```
+
+7. Restart Cursor
+8. Complete authentication
+
+Config: `%APPDATA%\Cursor\User\globalStorage\mcp.json`
+
+
+
+
+
+
+**Requirements:** Zed Editor with AI features enabled
+
+1. Open Zed
+2. Go to **Zed** → **Settings** → **Language Models**
+3. Scroll to **MCP Servers**
+4. Click **Add Server**
+5. Enter:
+ - Name: `eka-care`
+ - URL: `https://mcp.eka.care/mcp`
+ - Transport: `HTTP`
+
+6. Save and restart Zed
+7. Authenticate when prompted
+
+Config location: `~/.config/zed/settings.json`
+
+
+
+
+
+**Requirements:** Zed Editor with AI features
+
+1. Open Zed
+2. Settings → Language Models
+3. MCP Servers → Add Server
+4. Configure:
+ - Name: `eka-care`
+ - URL: `https://mcp.eka.care/mcp`
+ - Transport: `HTTP`
+
+5. Save and restart
+6. Complete authentication
+
+Config: `%APPDATA%\Zed\settings.json`
+
+
+
+
+
+
+
+
+
+**Requirements:** Windsurf IDE
+
+1. Open Windsurf
+2. Press `Cmd + ,` for Settings
+3. Navigate to **Extensions** → **MCP**
+4. Add server:
+
+```json
+{
+ "mcpServers": {
+ "eka-care": {
+ "url": "https://mcp.eka.care/mcp",
+ "transport": {
+ "type": "http"
+ }
+ }
+ }
+}
+```
+
+5. Restart Windsurf
+6. Authenticate with Eka.care
+
+
+
+
+
+
+
+
+
+**Requirements:** Windsurf IDE
+
+1. Open Windsurf
+2. Press `Ctrl + ,` for Settings
+3. Extensions → MCP
+4. Add configuration:
+
+```json
+{
+ "mcpServers": {
+ "eka-care": {
+ "url": "https://mcp.eka.care/mcp",
+ "transport": {
+ "type": "http"
+ }
+ }
+ }
+}
+```
+
+5. Restart Windsurf
+6. Complete authentication
+
+
+
+
+
+
+
+
+
+You simply tell your AI assistant:
+
+
+```text Natural Language
+"Book an appointment for patient Raj Kumar with Dr. Singh tomorrow at 10 AM,
+and create a prescription for Amoxicillin 500mg, 3 times daily for 7 days"
+```
+
+
+And it's done! ✨
+
+
+
+ {/* Screenshot placeholder: Show actual Claude Desktop conversation doing this task */}
+
+
+## Who Should Use This?
+
+
+
+ Doctors, clinics, and hospitals using Eka.care for patient management
+
+
+ Platforms building healthcare workflows and automation
+
+
+ Staff managing appointments, records, and prescriptions
+
+
+ Engineers building AI-powered healthcare applications
+
+
+
+## What Can You Do?
+
+
+
+ - Search and retrieve patient records
+ - Add new patients
+ - Update patient information
+ - View complete medical history
+
+
+
+ - Check available slots
+ - Book appointments
+ - Reschedule or cancel
+ - View appointment history
+
+
+
+ - Generate digital prescriptions
+ - View prescription history
+ - Access medication details
+
+
+
+ - Retrieve doctor profiles
+ - Access clinic information
+ - View available services
+
+
+
+For more details on supported tools visit - https://developer.eka.care/mcp/supported-tools
+
+
+**Need Help?** Email us at ekaconnect@eka.care
+
diff --git a/mcp/supported-tools.mdx b/mcp/supported-tools.mdx
new file mode 100644
index 00000000..43aa637b
--- /dev/null
+++ b/mcp/supported-tools.mdx
@@ -0,0 +1,127 @@
+---
+title: Supported Tools
+description: Complete list of available MCP tools and their capabilities
+---
+
+# Supported Tools
+
+Eka MCP provides 20+ tools across patient management, appointments, prescriptions, and clinic operations. All tools support natural language queries through your AI assistant.
+
+## Patient Management
+
+| Tool Name | Description | Input Parameters | Returns |
+|-----------|-------------|------------------|---------|
+| `search_patients` | Search for patients by name, mobile, email, or patient ID | `query` (string), `limit` (optional) | List of matching patients with IDs, contact info, and basic details |
+| `get_patient_details` | Retrieve complete patient information | `patient_id` (string) | Full patient profile including medical history, demographics, and appointments |
+| `add_patient` | Register a new patient | `name`, `mobile`, `email` (optional), `dob` (optional), `gender` (optional) | New patient ID and confirmation |
+| `update_patient` | Modify existing patient information | `patient_id`, fields to update | Updated patient details |
+
+## Appointment Management
+
+| Tool Name | Description | Input Parameters | Returns |
+|-----------|-------------|------------------|---------|
+| `get_available_slots` | Check doctor's availability | `doctor_id`, `date`, `clinic_id` (optional) | List of available time slots |
+| `book_appointment` | Schedule a new appointment | `patient_id`, `doctor_id`, `slot_time`, `clinic_id` | Appointment ID and confirmation |
+| `get_appointments` | List appointments by various filters | `patient_id` OR `doctor_id` OR `date`, `status` (optional) | List of appointments with details |
+| `reschedule_appointment` | Change appointment timing | `appointment_id`, `new_slot_time` | Updated appointment details |
+| `cancel_appointment` | Cancel scheduled appointment | `appointment_id`, `reason` (optional) | Cancellation confirmation |
+| `get_appointment_details` | Retrieve specific appointment info | `appointment_id` | Complete appointment information |
+
+## Prescription Management
+
+| Tool Name | Description | Input Parameters | Returns |
+|-----------|-------------|------------------|---------|
+| `create_prescription` | Generate digital prescription | `patient_id`, `medications` (array), `doctor_id`, `advice` (optional) | Prescription ID and details |
+| `get_prescriptions` | View prescription history | `patient_id`, `from_date` (optional), `to_date` (optional) | List of prescriptions |
+| `get_prescription_details` | Retrieve specific prescription | `prescription_id` | Complete prescription with medications and advice |
+| `update_prescription` | Modify existing prescription | `prescription_id`, fields to update | Updated prescription |
+
+## Doctor & Clinic Operations
+
+| Tool Name | Description | Input Parameters | Returns |
+|-----------|-------------|------------------|---------|
+| `get_doctor_profile` | Access doctor information | `doctor_id` | Doctor details, qualifications, specializations |
+| `search_doctors` | Find doctors by name or specialization | `query`, `specialization` (optional) | List of matching doctors |
+| `get_clinic_details` | Retrieve clinic information | `clinic_id` | Clinic address, services, contact info |
+| `get_doctor_clinics` | List clinics associated with doctor | `doctor_id` | Array of clinic details |
+| `get_clinic_services` | View services offered by clinic | `clinic_id` | List of available services |
+
+## Medication Database
+
+| Tool Name | Description | Input Parameters | Returns |
+|-----------|-------------|------------------|---------|
+| `search_medications` | Look up medicine information | `query` (drug name) | Medicine details, dosage forms, manufacturers |
+| `get_medication_details` | Get complete drug information | `medication_id` | Full drug profile with interactions and contraindications |
+
+## Tool Parameters
+
+
+## Usage Examples
+
+### Simple Queries
+```text
+"Search for patient Raj Kumar"
+→ Uses: search_patients
+
+"Show Dr. Singh's available slots tomorrow"
+→ Uses: get_available_slots
+
+"Get prescription history for patient 12345"
+→ Uses: get_prescriptions
+```
+
+### Complex Workflows
+```text
+"Book appointment for Raj Kumar with Dr. Singh tomorrow at 10 AM
+and create prescription for Amoxicillin"
+→ Uses: search_patients → book_appointment → create_prescription
+```
+
+## Rate Limits
+
+| Plan | Requests/Minute | Requests/Day |
+|------|-----------------|--------------|
+| Free | 10 | 1,000 |
+| Pro | 60 | 10,000 |
+| Enterprise | Unlimited | Unlimited |
+
+## Error Handling
+
+All tools return standardized error responses:
+
+```json
+{
+ "error": true,
+ "message": "Patient not found",
+ "code": "PATIENT_NOT_FOUND"
+}
+```
+
+### Common Error Codes
+
+- `PATIENT_NOT_FOUND` - Patient ID doesn't exist
+- `SLOT_UNAVAILABLE` - Appointment slot already booked
+- `INVALID_PARAMETERS` - Missing or incorrect parameters
+- `UNAUTHORIZED` - Authentication required
+- `RATE_LIMIT_EXCEEDED` - Too many requests
+
+## Need More Details?
+
+
+
+ Get started in 5 minutes
+
+
+ See real-world workflows
+
+
+ Complete API documentation
+
+
+ Common issues and fixes
+
+
+
+---
+
+**Questions?** Email ekaconnect@eka.care
\ No newline at end of file
diff --git a/mint_old_deprecated.json b/mint_old_deprecated.json
index a58cb527..f01e406a 100644
--- a/mint_old_deprecated.json
+++ b/mint_old_deprecated.json
@@ -331,6 +331,19 @@
"api-reference/doc-tool/doctor-and-clinic-api/get-doc-service"
]
},
+ {
+ "group": "Config management APIs",
+ "icon": "user-cog",
+ "pages": [
+ {
+ "group": "User APIs",
+ "pages": [
+ "api-reference/doc-tool/user-apis/get-all-users",
+ "api-reference/doc-tool/user-apis/get-user-by-id"
+ ]
+ }
+ ]
+ },
{
"group": "Appointment API",
"icon": "calendar-check",
@@ -343,7 +356,8 @@
"api-reference/doc-tool/appointment-api/update-appointment-v2",
"api-reference/doc-tool/appointment-api/parked-appointment",
"api-reference/doc-tool/appointment-api/complete-appointment",
- "api-reference/doc-tool/appointment-api/cancel-appointment"
+ "api-reference/doc-tool/appointment-api/cancel-appointment",
+ "api-reference/doc-tool/appointment-api/change-status"
]
},
{
diff --git a/snippets/snippet-intro.mdx b/snippets/snippet-intro.mdx
deleted file mode 100644
index c57e7c75..00000000
--- a/snippets/snippet-intro.mdx
+++ /dev/null
@@ -1,4 +0,0 @@
-One of the core principles of software development is DRY (Don't Repeat
-Yourself). This is a principle that apply to documentation as
-well. If you find yourself repeating the same content in multiple places, you
-should consider creating a custom snippet to keep your content in sync.
diff --git a/styles.css b/styles.css
new file mode 100644
index 00000000..15db4ada
--- /dev/null
+++ b/styles.css
@@ -0,0 +1,19 @@
+.eka-card-wrapper {
+ border-radius: 14px;
+ transition: transform 0.15s ease;
+}
+
+.eka-card-wrapper:hover {
+ transform: translateY(-3px);
+}
+
+.eka-card-wrapper:hover > * {
+ box-shadow: 0 12px 28px rgba(80, 66, 189, 0.22);
+ border-color: #5042BD;
+}
+
+.eka-divider {
+ border: none;
+ border-top: 1px solid rgba(80, 66, 189, 0.25);
+ margin: 48px 0;
+}
\ No newline at end of file
diff --git a/user-guides/eka-products.mdx b/user-guides/eka-products.mdx
new file mode 100644
index 00000000..56bebc22
--- /dev/null
+++ b/user-guides/eka-products.mdx
@@ -0,0 +1,141 @@
+---
+title: Eka Products
+description: Explore all Eka platform products across Core EMR, Health AI, Interoperability, and MCP.
+---
+
+import { Columns, Card } from '@mintlify/components'
+
+
+
+
+
Core EMR
+
+
+
+
+
+ Patient profiles, demographics, medical history, and longitudinal records.
+
+
+
+
+
+
+
+ Clinical workflows, charting tools, and physician productivity features.
+
+
+
+
+
+
+
+ Scheduling and appointment lifecycle management.
+
+
+
+
+
+
+
+ Clinic setup, configuration, staff, and operations.
+
+
+
+
+
+
+
+ Billing, invoices, and payment tracking.
+
+
+
+
+
+
+
+ Medication orders and prescription workflows.
+
+
+
+
+
+
+
+ Standardized medical knowledge base.
+
+
+
+
+
+
+
+ Extract structured data from clinical documents.
+
+
+
+
+
+---
+
+
Health AI
+
+
+
+
+
+ AI-powered clinical and health risk assessments.
+
+
+
+
+
+
+
+ Ambient clinical documentation using voice.
+
+
+
+
+
+
+
+ AI assistance for clinical decision support.
+
+
+
+
+
+---
+
+
Interoperability
+
+
+
+
+
+ India’s ABDM integrations for consent-based health data exchange.
+
+
+
+
+
+---
+
+
MCP
+
+
+
+
+
+ Infrastructure for AI-native healthcare workflows and agents.
+
+
+
+
diff --git a/user-guides/get-started.mdx b/user-guides/get-started.mdx
new file mode 100644
index 00000000..42e4fd06
--- /dev/null
+++ b/user-guides/get-started.mdx
@@ -0,0 +1,96 @@
+---
+title: Get Started
+description: SIGN UP. BUILD. DEPLOY. 🚀
+---
+
+import { Columns, Card } from '@mintlify/components'
+
+
+
+---
+
Eka Connect
+
+
+
+ **STEP 1: Sign Up for an API Key**
+
+ To get started, you need to sign up for an API key. This key will authenticate your requests and give you access to our API. Ping us and we will provide you with the required API Keys.
+
+ **Pre-requisites**
+
+
+
+
+ A unique identifier assigned to a third-party application interacting with Eka's API.
+
+
+
+
+
+
+
+ It is a confidential key, similar to a password used alongside the Client ID.
+
+
+
+
+
+ **Obtain the Client ID and Client Secret**
+
+ - Login to your Eka Care Control Panel at [Console](https://console.eka.care) and create client_id and client_secret
+ - If you’re building an app for doctors or patients, you can either integrate Eka Accounts using end-to-end OIDC or request an API key from your healthcare provider’s workspace for access. [Hub](https://hub.eka.care/account/account/apitoken/)
+ - For support or more details, contact us at ekaconnect@eka.care
+
+ **STEP 2: Set Up Your Environment**
+
+ Before making API calls, ensure your environment is properly set up. We recommend using the following tools and libraries:
+ - HTTP Client: Use tools like Postman, cURL, or any HTTP client library in your preferred programming language.
+ - Base URL: All API requests should be directed to https://api.eka.care
+
+
+ Eka Connect’s API authentication securely verifies users and applications, ensuring only authorized access to sensitive healthcare data.
+
+ **How to Authenticate with EKA’s API**
+
+
+
+
+ Authenticate your app using the login API with your Client ID and Client Secret to receive the required access tokens.
+
+
+
+
+
+
+
+ Pass the access token in the Authorization header with each API request to confirm your app’s access to Eka services.
+
+
+
+
+
+
+
+ Access tokens expire for security reasons and return a 401 Unauthorized error, use the Refresh Token API to generate a new access token.
+
+
+
+
+
+ - **Access Token**: A short-lived token (usually 30 minutes) sent with each API request to authorize your app, refreshed using the Refresh Token API.([Access Token API](https://developer.eka.care/api-reference/authorization/client-login))
+ - **Refresh Token**: A longer-lived token that helps you get a new Access Token when the old one expires, without having to log in again. ([Refresh Token API](https://developer.eka.care/api-reference/authorization/refresh-token))
+ - Read more : ([API Reference - Authorization Get Started](https://developer.eka.care/api-reference/authorization/getting-started)) section.
+
+
+ We recommend reviewing our products before starting integration and selecting the one that best fits your use case.
+
+ See you in the ([Eka Products](/user-guides/eka-products)) section.
+
+
+