From c1d800517a4cd6e1171336cb6849f688add7b5b3 Mon Sep 17 00:00:00 2001 From: Niharika Chaturvedi <43184138+niha9@users.noreply.github.com> Date: Thu, 27 Feb 2025 16:11:08 +0530 Subject: [PATCH 01/20] voice2rx fetch result --- .gitignore | 4 +- .../medical/voice/retrieve-transcribe.mdx | 4 +- api-reference/user-app/records/records.yaml | 65 +++++++++++++++++++ 3 files changed, 70 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 62c89355..15b778d4 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ -.idea/ \ No newline at end of file +.idea/ +.venv +.venv/* \ No newline at end of file diff --git a/api-reference/general-tools/medical/voice/retrieve-transcribe.mdx b/api-reference/general-tools/medical/voice/retrieve-transcribe.mdx index 165847e6..7c11d34a 100644 --- a/api-reference/general-tools/medical/voice/retrieve-transcribe.mdx +++ b/api-reference/general-tools/medical/voice/retrieve-transcribe.mdx @@ -1,4 +1,4 @@ --- -title: Retrive Transcribe -openapi: GET /health/api/v1/fhir/retrieve +title: Retrieve Result +openapi: GET /voice-record/api/status/{session_id} --- \ No newline at end of file diff --git a/api-reference/user-app/records/records.yaml b/api-reference/user-app/records/records.yaml index 7eaa7b0a..b4a23fff 100644 --- a/api-reference/user-app/records/records.yaml +++ b/api-reference/user-app/records/records.yaml @@ -737,6 +737,71 @@ paths: description: Something went wrong security: - auth: [] + + /voice-record/api/status/{session_id}: + get: + summary: Retrieve voice records result + description: Retrieve a voice record result based on the given session id. + parameters: + - name: session_id + in: query + required: true + description: The unique identifier for the voice record is session id. + schema: + type: string + responses: + "200": + description: Successful response + content: + application/json: + schema: + type: object + properties: + status: + type: string + enum: + - queued + - inprogress + - completed + - deleted + - error + - partial_completed + example: "completed" + error: + type: object + example: {} + data: + type: object + properties: + output: + type: object + properties: + fhir: + type: string + example: "eyJlbnRyeSI6W3sicmVxdWVzdCI6eyJtZXRob2QiOiJQVVQiLCJ1cmwiOiJDb25kaXRpb24vMjMxZWIwMGQt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Q29tcG9zaXRpb24ifX1dLCJ0eXBlIjoiYmF0Y2giLCJyZXNvdXJjZVR5cGUiOiJCdW5kbGUifQ==" + + "404": + description: when request session id has no data + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Not Found + "401": + description: Unauthorized. Invalid or missing authentication. + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Unauthorized + security: + - auth: [] components: schemas: DocumentTypeQueryParam: From 063edadba6e781ff5b56b17b120c04a868a5dd1a Mon Sep 17 00:00:00 2001 From: nadeem-ekacare <134595560+nadeem-ekacare@users.noreply.github.com> Date: Wed, 26 Feb 2025 13:11:14 +0530 Subject: [PATCH 02/20] parked appointment (#198) --- .../appointment-api/parked-appointment.mdx | 3 + api-reference/doc-tool/doc-tool.yaml | 158 ++++++++++++++++++ mint.json | 1 + 3 files changed, 162 insertions(+) create mode 100644 api-reference/doc-tool/appointment-api/parked-appointment.mdx diff --git a/api-reference/doc-tool/appointment-api/parked-appointment.mdx b/api-reference/doc-tool/appointment-api/parked-appointment.mdx new file mode 100644 index 00000000..0f371a27 --- /dev/null +++ b/api-reference/doc-tool/appointment-api/parked-appointment.mdx @@ -0,0 +1,3 @@ +--- +openapi: post /dr/v1/appointment/{appointment_id}/parked +--- \ 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 ad382c9d..7c008994 100644 --- a/api-reference/doc-tool/doc-tool.yaml +++ b/api-reference/doc-tool/doc-tool.yaml @@ -3663,6 +3663,164 @@ paths: code: "SERVER_ERROR" message: "An unexpected error occurred on the server" deprecated: false + /dr/v1/appointment/{appointment_id}/parked: + post: + tags: + - Appointment API + summary: Parked Appointment + description: >- + + ### Overview + + + This API endpoint is used to update an existing appointment to parked state. + + + operationId: ParkAppointment + 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' + responses: + '204': + 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 + '404': + description: Not Found + content: + application/json: + schema: + type: object + properties: + error: + type: object + properties: + code: + type: string + message: + type: string + example: + error: + code: "APPOINTMENT_NOT_FOUND" + message: "The specified appointment ID does not exist" + '403': + description: Forbidden + content: + application/json: + schema: + type: object + properties: + error: + type: object + properties: + code: + type: string + message: + type: string + example: + error: + code: "COMPLETE_NOT_ALLOWED" + message: "You do not have permission to cancel this appointment" + '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" + '500': + description: Internal Server Error + content: + application/json: + schema: + type: object + properties: + error: + type: object + properties: + code: + type: string + message: + type: string + example: + error: + code: "SERVER_ERROR" + message: "An unexpected error occurred on the server" + deprecated: false /dr/v1/appointment/{appointment_id}/cancel: put: tags: diff --git a/mint.json b/mint.json index 1fb56d61..df41a918 100644 --- a/mint.json +++ b/mint.json @@ -227,6 +227,7 @@ "api-reference/doc-tool/appointment-api/get-appointment-details", "api-reference/doc-tool/appointment-api/update-appointment", "api-reference/doc-tool/appointment-api/complete-appointment", + "api-reference/doc-tool/appointment-api/parked-appointment", "api-reference/doc-tool/appointment-api/cancel-appointment" ] }, From 3071d302eb9bc136f68300f363e5ee9feccd59ff Mon Sep 17 00:00:00 2001 From: nadeem-ekacare <134595560+nadeem-ekacare@users.noreply.github.com> Date: Wed, 26 Feb 2025 16:21:14 +0530 Subject: [PATCH 03/20] parked appointment copy (#201) --- api-reference/doc-tool/appointment-api/parked-appointment1.mdx | 3 +++ mint.json | 1 + 2 files changed, 4 insertions(+) create mode 100644 api-reference/doc-tool/appointment-api/parked-appointment1.mdx diff --git a/api-reference/doc-tool/appointment-api/parked-appointment1.mdx b/api-reference/doc-tool/appointment-api/parked-appointment1.mdx new file mode 100644 index 00000000..0f371a27 --- /dev/null +++ b/api-reference/doc-tool/appointment-api/parked-appointment1.mdx @@ -0,0 +1,3 @@ +--- +openapi: post /dr/v1/appointment/{appointment_id}/parked +--- \ No newline at end of file diff --git a/mint.json b/mint.json index df41a918..3eb84b21 100644 --- a/mint.json +++ b/mint.json @@ -228,6 +228,7 @@ "api-reference/doc-tool/appointment-api/update-appointment", "api-reference/doc-tool/appointment-api/complete-appointment", "api-reference/doc-tool/appointment-api/parked-appointment", + "api-reference/doc-tool/appointment-api/parked-appointment1", "api-reference/doc-tool/appointment-api/cancel-appointment" ] }, From f3b0c2a0b6172a296f9219c974162e602d753f26 Mon Sep 17 00:00:00 2001 From: nadeem-ekacare <134595560+nadeem-ekacare@users.noreply.github.com> Date: Wed, 26 Feb 2025 16:26:19 +0530 Subject: [PATCH 04/20] parked appointment copy1 (#202) --- api-reference/doc-tool/appointment-api/parked-appointment1.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-reference/doc-tool/appointment-api/parked-appointment1.mdx b/api-reference/doc-tool/appointment-api/parked-appointment1.mdx index 0f371a27..3c11db7e 100644 --- a/api-reference/doc-tool/appointment-api/parked-appointment1.mdx +++ b/api-reference/doc-tool/appointment-api/parked-appointment1.mdx @@ -1,3 +1,3 @@ --- -openapi: post /dr/v1/appointment/{appointment_id}/parked +openapi: post /dr/v1/appointment/{appointment_id}/complete --- \ No newline at end of file From db03de7d30a68154d379bac4654fda5cab7d3487 Mon Sep 17 00:00:00 2001 From: nadeem-ekacare <134595560+nadeem-ekacare@users.noreply.github.com> Date: Wed, 26 Feb 2025 16:40:32 +0530 Subject: [PATCH 05/20] px url change to test deployment (#203) --- api-reference/doc-tool/doc-tool.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-reference/doc-tool/doc-tool.yaml b/api-reference/doc-tool/doc-tool.yaml index 7c008994..d2747947 100644 --- a/api-reference/doc-tool/doc-tool.yaml +++ b/api-reference/doc-tool/doc-tool.yaml @@ -2971,7 +2971,7 @@ paths: service_name: consultation appointment_type: REGULAR allow_patient_booking: true - prescription_url: "https://prescription-store-s3.eka.care/P-DW-A1E115AA-D9D3-5443-BD82-2663F7D49298.pdf" + prescription_url: "https://prescription-store-s3.eka.care/P-DW-1234.pdf" custom_attributes: label: ["vitals_submitted"] partner_meta: From 2608269abb6a75893627aeeff44da3daed0ca222 Mon Sep 17 00:00:00 2001 From: nadeem-ekacare <134595560+nadeem-ekacare@users.noreply.github.com> Date: Wed, 26 Feb 2025 16:51:31 +0530 Subject: [PATCH 06/20] removed test url (#204) --- api-reference/doc-tool/appointment-api/parked-appointment1.mdx | 3 --- api-reference/doc-tool/doc-tool.yaml | 3 +-- mint.json | 3 +-- 3 files changed, 2 insertions(+), 7 deletions(-) delete mode 100644 api-reference/doc-tool/appointment-api/parked-appointment1.mdx diff --git a/api-reference/doc-tool/appointment-api/parked-appointment1.mdx b/api-reference/doc-tool/appointment-api/parked-appointment1.mdx deleted file mode 100644 index 3c11db7e..00000000 --- a/api-reference/doc-tool/appointment-api/parked-appointment1.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -openapi: post /dr/v1/appointment/{appointment_id}/complete ---- \ 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 d2747947..628f341c 100644 --- a/api-reference/doc-tool/doc-tool.yaml +++ b/api-reference/doc-tool/doc-tool.yaml @@ -2040,8 +2040,7 @@ paths: description: 'End time of the appointment in epoch' custom_attributes: type: object - description: '`Custom attributes` and `value` for each custom attribute are a fixed set of enum defined by our partner at the time of onboarding. `Labels` and `Tags` are `special type` of custom attributes which exist by default for every partner and are visible in appointment queue. - key-value pair within labels and tags can be defined by each repective partner. Position of other custom attributes in appointment queue need to configured by partner.' + description: '`Custom attributes` and `value` for each custom attribute are a fixed set of enum defined by our partner at the time of onboarding. `Labels` and `Tags` are `special type` of custom attributes which exist by default for every partner and are visible in appointment queue. key-value pair within labels and tags can be defined by each repective partner. Position of other custom attributes in appointment queue need to configured by partner.' video_connect: type: object description: 'Configuration of video connect. To be used only when mode is `VIDEO`' diff --git a/mint.json b/mint.json index 3eb84b21..8ad68f30 100644 --- a/mint.json +++ b/mint.json @@ -226,9 +226,8 @@ "api-reference/doc-tool/appointment-api/book-appointment-slot", "api-reference/doc-tool/appointment-api/get-appointment-details", "api-reference/doc-tool/appointment-api/update-appointment", - "api-reference/doc-tool/appointment-api/complete-appointment", "api-reference/doc-tool/appointment-api/parked-appointment", - "api-reference/doc-tool/appointment-api/parked-appointment1", + "api-reference/doc-tool/appointment-api/complete-appointment", "api-reference/doc-tool/appointment-api/cancel-appointment" ] }, From 2b3713261b7aa730c3220f3a68981f0ef3974a80 Mon Sep 17 00:00:00 2001 From: nadeem-ekacare <134595560+nadeem-ekacare@users.noreply.github.com> Date: Wed, 26 Feb 2025 16:58:06 +0530 Subject: [PATCH 07/20] parked-appointment in docs.json (#205) --- docs.json | 1 + 1 file changed, 1 insertion(+) diff --git a/docs.json b/docs.json index 51cf14aa..0faf9910 100644 --- a/docs.json +++ b/docs.json @@ -154,6 +154,7 @@ "api-reference/doc-tool/appointment-api/book-appointment-slot", "api-reference/doc-tool/appointment-api/get-appointment-details", "api-reference/doc-tool/appointment-api/update-appointment", + "api-reference/doc-tool/appointment-api/parked-appointment", "api-reference/doc-tool/appointment-api/complete-appointment", "api-reference/doc-tool/appointment-api/cancel-appointment" ] From ecfe06aea6c3853c1e9215607916e7cc7d2ba2e2 Mon Sep 17 00:00:00 2001 From: vikalp Date: Wed, 26 Feb 2025 20:16:00 +0530 Subject: [PATCH 08/20] Documentation edits made through Mintlify web editor --- abdm-connect.mdx | 131 +++++++++++------- api-reference/authorization/authorization.yml | 4 +- 2 files changed, 81 insertions(+), 54 deletions(-) diff --git a/abdm-connect.mdx b/abdm-connect.mdx index 0de571e6..e95a0261 100644 --- a/abdm-connect.mdx +++ b/abdm-connect.mdx @@ -1,151 +1,178 @@ --- -title: 'ABDM Connect' +title: "ABDM Connect" --- - **ABDM (Ayushman Bharat Digital Mission) Connect** is a crucial component of EKA Connect that integrates your healthcare systems with India’s national digital health infrastructure. The ABDM Connector is designed as a powerful, plug-and-play API suite that simplifies the integration of various healthcare solutions into the Ayushman Bharat Digital Mission (ABDM) ecosystem. Whether you're looking to connect Electronic Health Records (EHR), hospital management systems, or other healthcare platforms, this connector facilitates seamless interoperability. ## Key Features -- **Full Support for All ABDM Functionalities**: -The connector offers a complete range of services required to connect to ABDM, including creating and linking Health IDs (ABHA), handling consent management, sharing health records, and much more. +* **Full Support for All ABDM Functionalities**: + The connector offers a complete range of services required to connect to ABDM, including creating and linking Health IDs (ABHA), handling consent management, sharing health records, and much more. -- **Flexible Infrastructure Options**: -You can choose between using our shared cloud infrastructure—perfect for rapid deployment with minimal overhead—or setting up your own private cloud for greater control and security. +* **Flexible Infrastructure Options**: + You can choose between using our shared cloud infrastructure—perfect for rapid deployment with minimal overhead—or setting up your own private cloud for greater control and security. Whether you are a healthcare provider, technology partner, or hospital network, the ABDM Connector ensures a smooth, compliant, and efficient integration experience with the ABDM framework, empowering you to deliver better healthcare services at scale. - ## How to Onboard in ABDM Connect There are two ways to onboard into ABDM Connect through EKA Connect: ### **Option 1: Use Your Own Client ID and Client Secret (ABDM Credentials)** -- If your healthcare institution or provider is already registered with the ABDM, you can use the Client ID and Client Secret provided by ABDM. -- This allows you to authenticate and start using the ABDM services directly. +* If your healthcare institution or provider is already registered with the ABDM, you can use the Client ID and Client Secret provided by ABDM. + +* This allows you to authenticate and start using the ABDM services directly. ### **Option 2: Onboard as a Hospital or Healthcare Information Provider (HIP)** -- If you are a hospital or healthcare provider looking to integrate with ABDM through EKA, you can onboard directly via the EKA Connect platform. -- EKA will help you obtain the necessary credentials and guide you through the steps of becoming a **Healthcare Information Provider (HIP)** under the ABDM. +* If you are a hospital or healthcare provider looking to integrate with ABDM through EKA, you can onboard directly via the EKA Connect platform. + +* EKA will help you obtain the necessary credentials and guide you through the steps of becoming a **Healthcare Information Provider (HIP)** under the ABDM. ## Registration Process Once you are onboarded to ABDM Connect, the next crucial step is registration, which involves creating an **ABHA Address** and an **ABHA Number**. This process helps link your healthcare information into one system, making it easier for you to manage and access your health data. -- API Reference: [Registration](https://developer.eka.care/api-reference/user-app/abdm-connect/registration/intro) + +* API Reference: [Registration](https://developer.eka.care/api-reference/user-app/abdm-connect/registration/intro) ### What is an ABHA Address and ABHA Number? - #### 1. **ABHA Number**: +#### 1. **ABHA Number**: 1. **What is it?** -- A 14-digit number (e.g., 1241-2312-3123) you get after completing **KYC** (Know Your Customer) verification. -2. **KYC Methods**: -- **Online**: Aadhaar -- **Offline**: PAN Card, Driving License +* A 14-digit number (e.g., 1241-2312-3123) you get after completing **KYC** (Know Your Customer) verification. + +1. **KYC Methods**: + +* **Online**: Aadhaar + +* **Offline**: PAN Card, Driving License + +1. **Why do you need it?** + +* Required for PMJAY insurance (for low-income families). -3. **Why do you need it?** -- Required for PMJAY insurance (for low-income families). -- Some hospitals need this for outpatient services (OPD). +* Some hospitals need this for outpatient services (OPD). -4. **How does it work?** -- When you create an ABHA Number, they also generate an ABHA Address in the background (e.g., `124151351351@abdm`), which is helpful for assisted users. -- Unlike ABHA Addresses, you can only have **one unique ABHA Number**. +1. **How does it work?** + +* When you create an ABHA Number, they also generate an ABHA Address in the background (e.g., `124151351351@abdm`), which is helpful for assisted users. + +* Unlike ABHA Addresses, you can only have **one unique ABHA Number**. #### 2. **ABHA Address**: 1. **What is it?** -- A unique identifier for your digital health records. -- Used for most health-related transactions like consents, document transfers, etc. -2. **Examples**: -- `nisha@abdm` -- `rani@abdm` +* A unique identifier for your digital health records. + +* Used for most health-related transactions like consents, document transfers, etc. + +1. **Examples**: + +* `nisha@abdm` -3. **How many can you have?** -- You can create up to **X** ABHA Addresses for a single mobile number. +* `rani@abdm` -4. **Why would you want more than one?** -- **Privacy**: Keep certain health information, like mental health records, separate with a private ABHA Address. +1. **How many can you have?** + +* You can create up to **X** ABHA Addresses for a single mobile number. + +1. **Why would you want more than one?** + +* **Privacy**: Keep certain health information, like mental health records, separate with a private ABHA Address. #### 3. How to Get an ABHA Number You can create your ABHA Number through two simple methods: 1. Using Aadhaar + 2. Using Mobile Authentication ## Post-Registration Process After registering on ABDM Connect, several key APIs come into play to manage your healthcare data. Here are the main areas you’ll interact with: ---- +*** ### **1. Profile APIs** ([API Reference](https://developer.eka.care/api-reference/user-app/abdm-connect/profile/getting-started)) The Profile API offers a comprehensive set of endpoints designed to help users manage and access their profile information in a user-friendly way. This is essential for Personal Health Record (PHR) applications, as users need a dedicated section to view their demographic details and make updates when necessary. - Key Features: +Key Features: Once registered, you can manage your profile through these APIs, which include: -- **Assets API**: Handles your digital health assets. -- **Details API**: Manages profile details and related operations. +* **Assets API**: Handles your digital health assets. ---- +* **Details API**: Manages profile details and related operations. + +*** ### **2. Care Contexts** ([API Reference](https://developer.eka.care/api-reference/user-app/abdm-connect/care-contexts/getting-started)) A Care Context represents a logical grouping of health records. Each HMIS, LMIS, or PHR system should determine how to organize data into one or more care contexts for a user. Key Features: -- **View Linked Records**: Lets you view all health records linked to your ABHA Number. -- **Link Records**: Provides the ability to add new health records to your profile. ---- +* **View Linked Records**: Lets you view all health records linked to your ABHA Number. + +* **Link Records**: Provides the ability to add new health records to your profile. + +*** ### **3. Providers/Health Information Providers (HIP)** ([API Reference](https://developer.eka.care/api-reference/user-app/abdm-connect/providers/getting-started)) Healthcare Information Providers (HIPs) hold or manage the patient's health records. Through this API, users can retrieve detailed information about healthcare providers, including their care contexts, and search for providers by name to find and link their care contexts/documents. ---- +*** ### **4. Consent Management** ([API Reference](https://developer.eka.care/api-reference/user-app/abdm-connect/consents/getting-started)) When a healthcare provider or organization (known as a Health Information User or HIU) wants to access your health records linked to your ABHA address, they first need to ask for your **consent**. Key Features: -- **Review and Customize**: When you receive a consent request, you can review the details and even customize the request. -- **Granting Consent**: Once satisfied with the request, you can approve it, allowing the HIU to access your health data. -- **Revoking Consent**: If you change your mind, you can revoke the consent, ensuring the HIU deletes any copies of your health data. + +* **Review and Customize**: When you receive a consent request, you can review the details and even customize the request. + +* **Granting Consent**: Once satisfied with the request, you can approve it, allowing the HIU to access your health data. + +* **Revoking Consent**: If you change your mind, you can revoke the consent, ensuring the HIU deletes any copies of your health data. Consent management gives you full control over who can see your health information, ensuring secure and private data sharing. ---- +*** ### **5. Share Profile** ([API Reference](https://developer.eka.care/api-reference/user-app/abdm-connect/scan-and-share/getting-started)) Every Personal Health Record (PHR) app needs to allow users to easily share their ABHA address and profile information with healthcare facilities by scanning a QR code. Key Features: -- **Scan the QR Code**: The app integrates with the phone camera to scan a QR code at a health facility. -- **QR Code Details**: The code contains a link with important details like the facility's ID and specific context to help process user information securely. ---- +* **Scan the QR Code**: The app integrates with the phone camera to scan a QR code at a health facility. + +* **QR Code Details**: The code contains a link with important details like the facility's ID and specific context to help process user information securely. + +*** ### **6. User Session** ([API Reference](https://developer.eka.care/api-reference/user-app/abdm-connect/session/getting-started)) When you create or register an ABHA, a user session is created with the ABHA Gateway. This session is temporary and expires after a certain period. - Key Features: -- **Session Expiry**: After expiry, any action requiring ABHA Gateway authentication will return an error. -- **Session Renewal**: Authenticate using a mobile OTP to create a new session. +Key Features: + +* **Session Expiry**: After expiry, any action requiring ABHA Gateway authentication will return an error. + +* **Session Renewal**: Authenticate using a mobile OTP to create a new session. Steps: + 1. **Generate Mobile OTP** + 2. **Verify Mobile OTP** -This ensures session security while protecting your data. +This ensures session security while protecting your data. \ No newline at end of file diff --git a/api-reference/authorization/authorization.yml b/api-reference/authorization/authorization.yml index 4f9bd546..06db316c 100644 --- a/api-reference/authorization/authorization.yml +++ b/api-reference/authorization/authorization.yml @@ -16,7 +16,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/AccountConnectLoginRequest' + $ref: '#/components/schemas/AccountConnectLoginReques' responses: 4XX: content: @@ -127,7 +127,7 @@ paths: - Auth (OIDC Token APIs) components: schemas: - AccountConnectLoginRequest: + AccountConnectLoginReques: properties: api_key: description: Optional, API Token for business id From 533a13a181b23235f61ba534cd32783a35bf1573 Mon Sep 17 00:00:00 2001 From: vikalp Date: Wed, 26 Feb 2025 20:18:31 +0530 Subject: [PATCH 09/20] again moved authorization connect login to proper spelled Component --- api-reference/authorization/authorization.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api-reference/authorization/authorization.yml b/api-reference/authorization/authorization.yml index 06db316c..52d8f015 100644 --- a/api-reference/authorization/authorization.yml +++ b/api-reference/authorization/authorization.yml @@ -16,7 +16,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/AccountConnectLoginReques' + $ref: '#/components/schemas/AccountConnectLoginRequest' responses: 4XX: content: @@ -127,7 +127,7 @@ paths: - Auth (OIDC Token APIs) components: schemas: - AccountConnectLoginReques: + AccountConnectLoginRequest: properties: api_key: description: Optional, API Token for business id @@ -229,4 +229,4 @@ x-tagGroups: tags: - Connect APIs - Connect Internal - - Auth (OIDC Token APIs) \ No newline at end of file + - Auth (OIDC Token APIs) From a86635e311cde04a52ed6bdf0e38d794786bd8e0 Mon Sep 17 00:00:00 2001 From: divyesh11 <55645570+divyesh11@users.noreply.github.com> Date: Thu, 27 Feb 2025 09:20:24 +0530 Subject: [PATCH 10/20] voice to rx android sdk documentation added. (#200) * voice to rx android sdk documentation added. * changed version --- docs.json | 11 ++++ mint.json | 10 +++ mobile-sdk/android/voice-to-rx.mdx | 100 +++++++++++++++++++++++++++++ 3 files changed, 121 insertions(+) create mode 100644 mobile-sdk/android/voice-to-rx.mdx diff --git a/docs.json b/docs.json index 0faf9910..0b1cf0a9 100644 --- a/docs.json +++ b/docs.json @@ -538,6 +538,17 @@ ] } ] + }, + { + "tab": "Mobile SDKs", + "groups": [ + { + "group": "Android", + "pages": [ + "mobile-sdk/android/voice-to-rx" + ] + } + ] } ] }, diff --git a/mint.json b/mint.json index 8ad68f30..ee1d7146 100644 --- a/mint.json +++ b/mint.json @@ -37,6 +37,10 @@ { "name": "Eka MedAI", "url": "eka-medai" + }, + { + "name": "Mobile SDKs", + "url": "mobile-sdk" } ], "anchors": [ @@ -65,6 +69,12 @@ "api-reference/authorization/oidc-user-refresh" ] }, + { + "group": "Android", + "pages": [ + "mobile-sdk/android/voice-to-rx" + ] + }, { "group": "AI-Technologies", "pages": [ diff --git a/mobile-sdk/android/voice-to-rx.mdx b/mobile-sdk/android/voice-to-rx.mdx new file mode 100644 index 00000000..21399102 --- /dev/null +++ b/mobile-sdk/android/voice-to-rx.mdx @@ -0,0 +1,100 @@ +### Dependency inclusion in app/build.gradle.kts + +```kotlin +implementation("com.github.eka-care:eka-v2rx-android:1.0.5") +``` + +### Initialise SDK + +```kotlin +// Create object which is implementing OkHttpSetUp interface +// to provide auth tokens + +class OkHttpImpl : IOkHttpSetup { + // provide headers which are necessary here + override fun getDefaultHeaders(url: String): Map { + val headers = HashMap() + headers["auth"] = // provide session token here for authentication + } + + override fun refreshAuthToken(url: String): Map? { + // refresh auth token here + } + + override fun onSessionExpire() { + // refresh token expired + } +} + +Voice2Rx.init( + context = context, + config = Voice2RxInitConfig( + onStart = { + + }, + onStop = { sessionId, recordedFiles -> + + }, + onError = { sessionId, errorMsg -> + + }, + docOid = "", + docUuid = "", + ownerId = "", + contextData = ContextData(doctor = null, patient = null, visitid = sessionId), + okHttpSetup = OkHttpImpl(), + callerId = "", + ) +) + +``` + +### Start Voice Session + +```kotlin +// Here any mode can be passed which are specified in SDK +Voice2Rx.startVoice2Rx(mode = Voice2RxType.DICTATION) +// After starting session you will get callback in onStart function +// which is passed in init function +``` + +### Stop Voice Session + +```kotlin +// After stopping the session +// onStop callback will be delivered with sessionId which is passed in init function +Voice2Rx.stopVoice2Rx() +``` + +### Check session is currently running + +```kotlin +// It will return true if session is going on +Voice2Rx.isCurrentlyRecording() +``` + +### Get all sessions history + +```kotlin +// It will return list of sessions taken +Voice2Rx.getSessions() +``` + +### For Retry the session + +```kotlin +Voice2Rx.retrySession( + context = context, + sessionId = sessionId, + onResponse = { responseState -> + // here you will get callback regarding retry was successful or not + }, +) +``` + +### After all the process completion + +```kotlin +// Free up the resources using below function +Voice2Rx.dispose() +``` \ No newline at end of file From f36218212abe531c58b92c8969e294638c1168e7 Mon Sep 17 00:00:00 2001 From: divyesh11 <55645570+divyesh11@users.noreply.github.com> Date: Thu, 27 Feb 2025 15:01:53 +0530 Subject: [PATCH 11/20] data samples added. (#206) * data samples added. * language changed for sample data. --- mobile-sdk/android/voice-to-rx.mdx | 132 ++++++++++++++++++++++++++++- 1 file changed, 131 insertions(+), 1 deletion(-) diff --git a/mobile-sdk/android/voice-to-rx.mdx b/mobile-sdk/android/voice-to-rx.mdx index 21399102..1ec200f9 100644 --- a/mobile-sdk/android/voice-to-rx.mdx +++ b/mobile-sdk/android/voice-to-rx.mdx @@ -1,3 +1,7 @@ +### Github Repo + +[Voice2Rx](https://github.com/eka-care/eka-v2rx-android/tree/voice2rx_sdk) + ### Dependency inclusion in app/build.gradle.kts ```kotlin @@ -77,7 +81,133 @@ Voice2Rx.isCurrentlyRecording() ```kotlin // It will return list of sessions taken -Voice2Rx.getSessions() +val sessions = Voice2Rx.getSessions() +// access any session from the list for e.g below is taken the first element +val session = sessions.first() +// Can access transcript and structured rx in the session object +// Sample responses for both values given below +val transcript = session.transcript +val structuredRx = session.structuredRx +``` + +### Sample parsed data in structured rx + +```json +{ + "prescription": { + "advices": [ + { + "id": "locale-4f1e59b7c71003546b7bb5aadb89280b", + "parsedText": "Take bedrest for at least 7 days", + "text": "Take bedrest for at least 7 days" + }, + { + "id": "locale-b3ca8e9447de58b3738549ec3c8db922", + "parsedText": "Do exercise with physiotherapist", + "text": "Do exercise with physiotherapist" + } + ], + "followup": { + "date": "2025-03-09T00:00:00.000000Z" + }, + "labTests": [ + { + "common_name": "Blood sugar test", + "id": "locale-5686e09a70ffcbc355b372f57b744752", + "name": "Blood sugar test" + }, + { + "common_name": "Liver function test", + "id": "locale-9b501b45359316407782679ce7eeabac", + "name": "Liver function test" + }, + { + "common_name": "X-ray", + "id": "locale-3c51a99d9bbfefde7ba517f3316899f2", + "name": "X-ray" + } + ], + "language": "EN", + "medications": [ + { + "duration": { + "custom": "3 Days", + "unit": "Days", + "value": 3 + }, + "frequency": { + "custom": "1-1-1", + "dose": [ + "1", + "1", + "1" + ], + "frequency": "3", + "pattern_id": "fp-1", + "period": 1, + "period_unit": "day" + }, + "id": "locale-a0fdc63d09d1d255b00796ade40bb3c6", + "name": "Molo 650 tablet", + "original_name": "mdolo 650 tablet", + "linked": { + "eka_id": "b-4974923412" + } + } + ], + "symptoms": [ + { + "id": "locale-f532fde6e2a357af72b9de6aa1f0e65e", + "name": "Fever", + "status": "preliminary" + }, + { + "id": "locale-6a44898c82426d50cb083373d59b155a", + "name": "Headache", + "status": "preliminary" + }, + { + "id": "locale-867fc9a3c94474b3c77ee9a0b5aae022", + "name": "Leg pain", + "status": "preliminary" + }, + { + "id": "locale-a7033cb31b1991cc8f4c9c751a8452b6", + "name": "Neck pain", + "status": "preliminary" + } + ] + } +} +``` + +### Sample parsed data in markdown format + +```markdown +**Chief Complaints** +- Fever +- Headache +- Leg pain +- Neck pain + +**Assessment** +- Symptomatic fever with multiple body pains + +**Plan** +- Medications: + - Mdolo 650 tablet - TID for 3 days +- Investigations advised: + - Blood test + - Blood sugar test + - Liver function test + - X-ray +- Physiotherapy referral + +**Patient Instructions** +- Take complete bed rest for 7 days +- Follow up after 15 days with all investigation reports +- Continue physiotherapy sessions +- Take prescribed medications as directed ``` ### For Retry the session From 227f33568fa4905e453934624a1d52274dc2c765 Mon Sep 17 00:00:00 2001 From: divyesh11 <55645570+divyesh11@users.noreply.github.com> Date: Thu, 27 Feb 2025 15:30:52 +0530 Subject: [PATCH 12/20] updated documentation. (#207) updated_documentation --- mobile-sdk/android/voice-to-rx.mdx | 179 +++++++++++++++++++++-------- 1 file changed, 130 insertions(+), 49 deletions(-) diff --git a/mobile-sdk/android/voice-to-rx.mdx b/mobile-sdk/android/voice-to-rx.mdx index 1ec200f9..93dc4479 100644 --- a/mobile-sdk/android/voice-to-rx.mdx +++ b/mobile-sdk/android/voice-to-rx.mdx @@ -1,96 +1,160 @@ -### Github Repo - -[Voice2Rx](https://github.com/eka-care/eka-v2rx-android/tree/voice2rx_sdk) - -### Dependency inclusion in app/build.gradle.kts +# Voice2Rx Android SDK + +Voice2Rx is an Android SDK that allows voice transcription and structured prescription data generation for healthcare applications. + +## Table of Contents + +- [Prerequisites](/mobile-sdk/android/voice-to-rx#prerequisites) +- [Installation](/mobile-sdk/android/voice-to-rx#installation) +- [Initialization](/mobile-sdk/android/voice-to-rx#initialization) +- [Basic Usage](/mobile-sdk/android/voice-to-rx#basic-usage) + - [Starting a Voice Session](/mobile-sdk/android/voice-to-rx#starting-a-voice-session) + - [Stopping a Voice Session](/mobile-sdk/android/voice-to-rx#stopping-a-voice-session) + - [Checking Session Status](/mobile-sdk/android/voice-to-rx#checking-session-status) +- [Working with Sessions](/mobile-sdk/android/voice-to-rx#working-with-sessions) + - [Retrieving Session History](/mobile-sdk/android/voice-to-rx#retrieving-session-history) + - [Sample Structured Rx Data](/mobile-sdk/android/voice-to-rx#sample-structured-rx-data) + - [Sample Markdown Output](/mobile-sdk/android/voice-to-rx#sample-markdown-output) +- [Advanced Features](/mobile-sdk/android/voice-to-rx#advanced-features) + - [Retrying a Session](/mobile-sdk/android/voice-to-rx#retrying-a-session) +- [Cleanup](/mobile-sdk/android/voice-to-rx#cleanup) +- [Links](/mobile-sdk/android/voice-to-rx#links) + +## Prerequisites + +Before integrating the Voice2Rx SDK, ensure that your Android project meets the following requirements: + +- Android API level 24 or higher +- Kotlin 1.9.0 or higher +- Microphone permission in your AndroidManifest.xml: + + ```xml + + + + ``` + +- Runtime permission handling for microphone access + +## Installation + +Add the following dependency to your `app/build.gradle.kts` file: ```kotlin implementation("com.github.eka-care:eka-v2rx-android:1.0.5") + ``` -### Initialise SDK +## Initialization -```kotlin -// Create object which is implementing OkHttpSetUp interface -// to provide auth tokens +To initialize the SDK, you need to implement the `IOkHttpSetup` interface and provide the necessary configuration: +```kotlin +// Create object implementing IOkHttpSetup interface to provide auth tokens class OkHttpImpl : IOkHttpSetup { - // provide headers which are necessary here - override fun getDefaultHeaders(url: String): Map { - val headers = HashMap() + // Provide headers which are necessary for authentication + override fun getDefaultHeaders(url: String): Map { + val headers = HashMap() headers["auth"] = // provide session token here for authentication + return headers } override fun refreshAuthToken(url: String): Map? { - // refresh auth token here + // refresh auth token here + return null } override fun onSessionExpire() { - // refresh token expired + // handle token expiration } } +// Initialize the SDK Voice2Rx.init( context = context, config = Voice2RxInitConfig( onStart = { - + // Code to execute when recording starts }, onStop = { sessionId, recordedFiles -> - + // Code to execute when recording stops }, onError = { sessionId, errorMsg -> - + // Handle errors }, - docOid = "", - docUuid = "", - ownerId = "", - contextData = ContextData(doctor = null, patient = null, visitid = sessionId), + docOid = "", // Doctor oid + docUuid = "", // Doctor UUID + ownerId = "", // Owner ID + contextData = ContextData( + doctor = null, + patient = null, + visitid = sessionId + ), okHttpSetup = OkHttpImpl(), - callerId = "", + callerId = "", // Caller ID ) ) ``` -### Start Voice Session +## Basic Usage + +### Starting a Voice Session + +To start a voice recording session: ```kotlin -// Here any mode can be passed which are specified in SDK +// Start a voice session in DICTATION or CONSULTATION mode Voice2Rx.startVoice2Rx(mode = Voice2RxType.DICTATION) -// After starting session you will get callback in onStart function -// which is passed in init function +// The onStart callback (defined in init) will be triggered when the session begins + ``` -### Stop Voice Session +### Stopping a Voice Session + +To stop a voice recording session: ```kotlin -// After stopping the session -// onStop callback will be delivered with sessionId which is passed in init function +// Stop the current voice session Voice2Rx.stopVoice2Rx() +// The onStop callback will be triggered with the sessionId + ``` -### Check session is currently running +### Checking Session Status + +To check if a recording session is currently active: ```kotlin -// It will return true if session is going on -Voice2Rx.isCurrentlyRecording() +// Returns true if a recording session is in progress +val isRecording = Voice2Rx.isCurrentlyRecording() + ``` -### Get all sessions history +## Working with Sessions + +### Retrieving Session History + +To access previous recording sessions: ```kotlin -// It will return list of sessions taken +// Get all recording sessions val sessions = Voice2Rx.getSessions() -// access any session from the list for e.g below is taken the first element -val session = sessions.first() -// Can access transcript and structured rx in the session object -// Sample responses for both values given below -val transcript = session.transcript -val structuredRx = session.structuredRx + +// Access a specific session (example using the first session) +val session = sessions.firstOrNull() + +// Access session data +session?.let { + val transcript = it.transcript // Raw transcript text + val structuredRx = it.structuredRx // Structured prescription data +} + ``` -### Sample parsed data in structured rx +### Sample Structured Rx Data + +The SDK returns structured prescription data in JSON format: ```json { @@ -179,9 +243,12 @@ val structuredRx = session.structuredRx ] } } + ``` -### Sample parsed data in markdown format +### Sample Markdown Output + +The SDK can also generate a formatted markdown output: ```markdown **Chief Complaints** @@ -208,23 +275,37 @@ val structuredRx = session.structuredRx - Follow up after 15 days with all investigation reports - Continue physiotherapy sessions - Take prescribed medications as directed + ``` -### For Retry the session +## Advanced Features + +### Retrying a Session + +To retry processing a session: ```kotlin Voice2Rx.retrySession( context = context, sessionId = sessionId, - onResponse = { responseState -> - // here you will get callback regarding retry was successful or not - }, + onResponse = { responseState -> + // Handle the retry response + // Indicates whether retry was successful or not + } ) + ``` -### After all the process completion +## Cleanup + +When you're done using the SDK, free up resources: ```kotlin -// Free up the resources using below function +// Release all resources Voice2Rx.dispose() -``` \ No newline at end of file + +``` + +## Links + +- [GitHub Repository](https://github.com/eka-care/eka-v2rx-android) \ No newline at end of file From fe1ef64078a6fc8f5b6e05323e1a6ebfb77db6df Mon Sep 17 00:00:00 2001 From: sanket Date: Sat, 1 Mar 2025 01:34:20 +0530 Subject: [PATCH 13/20] add patient conflict --- api-reference/doc-tool/doc-tool.yaml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/api-reference/doc-tool/doc-tool.yaml b/api-reference/doc-tool/doc-tool.yaml index 628f341c..8136ebae 100644 --- a/api-reference/doc-tool/doc-tool.yaml +++ b/api-reference/doc-tool/doc-tool.yaml @@ -175,6 +175,28 @@ paths: patient_id: type: string example: "123456789" + '409': + description: Conflict + content: + application/json: + schema: + type: object + properties: + error: + type: object + properties: + code: + type: string + message: + type: string + status_code: + type: integer + success: + type: boolean + example: + error: + code: "PATIENT_ALREADY_EXISTS" + message: "Patient already exists with the same partner_patient_id: abc" '403': description: Forbidden From 4d349fab180bcf8f2381e12a3068a5667d75cb0f Mon Sep 17 00:00:00 2001 From: Ayushi SIngh <107174083+Ayushi20-alt@users.noreply.github.com> Date: Mon, 3 Mar 2025 16:55:32 +0530 Subject: [PATCH 14/20] added markdown for medical records (#211) --- docs.json | 3 +- mint.json | 3 +- mobile-sdk/android/medical-records.mdx | 419 +++++++++++++++++++++++++ 3 files changed, 423 insertions(+), 2 deletions(-) create mode 100644 mobile-sdk/android/medical-records.mdx diff --git a/docs.json b/docs.json index 0b1cf0a9..06a562a7 100644 --- a/docs.json +++ b/docs.json @@ -545,7 +545,8 @@ { "group": "Android", "pages": [ - "mobile-sdk/android/voice-to-rx" + "mobile-sdk/android/voice-to-rx", + "mobile-sdk/android/medical-records" ] } ] diff --git a/mint.json b/mint.json index ee1d7146..6a7209ff 100644 --- a/mint.json +++ b/mint.json @@ -72,7 +72,8 @@ { "group": "Android", "pages": [ - "mobile-sdk/android/voice-to-rx" + "mobile-sdk/android/voice-to-rx", + "mobile-sdk/android/medical-records" ] }, { diff --git a/mobile-sdk/android/medical-records.mdx b/mobile-sdk/android/medical-records.mdx new file mode 100644 index 00000000..08ac99f1 --- /dev/null +++ b/mobile-sdk/android/medical-records.mdx @@ -0,0 +1,419 @@ +# Eka Health Records Android SDK Documentation + +## Table of Contents + +1. [API Reference](#api-reference) +2. [Introduction](#introduction) +3. [Prerequisites](#prerequisites) +4. [Installation](#installation) +5. [SDK Initialization](#sdk-initialization) +6. [Data Models](#data-models) + - [VaultEntity](#vaultentity) + - [RecordModel](#recordmodel) + - [Document Types](#document-types) + - [AvailableDocTypes](#availabledoctypes) + - [DocumentSortEnum](#documentsortEnum) +7. [Core Functionality](#core-functionality) + - [Data Synchronization](#data-synchronization) + - [Document Retrieval](#document-retrieval) + - [Document Management](#document-management) + - [Document Viewing](#document-viewing) + - [File Handling](#file-handling) +8. [Advanced Features](#advanced-features) +9. [Troubleshooting](#troubleshooting) + +## API Reference + +For complete API reference, please refer to the source code documentation in the GitHub repository: +[https://github.com/eka-care/eka-health-records-android](https://github.com/eka-care/eka-health-records-android) + +## Introduction + +The Eka Health Records Android SDK provides comprehensive functionality for managing medical document records in Android applications. This SDK allows integration with the Eka Care platform for storing, retrieving, and managing health documents. + +## Prerequisites + +Before using the Eka Health Records SDK, ensure your development environment meets the following requirements: + +- Android Studio Arctic Fox (2020.3.1) or newer +- Minimum SDK version: 21 (Android 5.0 Lollipop) +- Kotlin version: 1.5.0 or newer +- JDK 8 or newer +- Authentication with Eka platform (tokens required for initialization) + +## Installation + +Add the repository to your project-level `build.gradle` or `settings.gradle` file: + +```groovy +repositories { + maven { url 'https://jitpack.io' } +} +``` + +Include the dependency in your app-level `build.gradle.kts` file: + +```kotlin +implementation("com.github.eka-care:eka-health-records-android:1.2.5") +``` + +Replace `1.2.5` with the latest version as needed. + +## SDK Initialization + +Initialize the SDK by creating an implementation of the `IOkHttpSetup` interface to provide authentication tokens: + +```kotlin +class OkHttpImpl : IOkHttpSetup { + // Provide headers necessary for authentication + override fun getDefaultHeaders(url: String): Map { + val headers = HashMap() + headers["auth"] = "YOUR_SESSION_TOKEN_HERE" + return headers + } + + override fun refreshAuthToken(url: String): Map? { + // Implement token refresh logic + return null + } + + override fun onSessionExpire() { + // Handle session expiration + } +} + +// Initialize the Document class +Document.init( + context = applicationContext, + documentConfiguration = DocumentConfiguration( + okHttpSetup = OkHttpImpl(), + host = "YOUR_API_HOST", + vitalsEnabled = true // Set to true to enable navigation from Smart Report Vitals + ) +) +``` + +## Data Models + +### VaultEntity + +The primary entity for document storage in the Room database. `VaultEntity` represents medical document records. + +```kotlin +@Entity(tableName = "vault_table") +data class VaultEntity( + @PrimaryKey @ColumnInfo(name = "local_id") var localId: String, + @ColumnInfo(name = "doc_id") var documentId: String?, + @ColumnInfo(name = "uuid") var uuid: String?, + @ColumnInfo(name = "owner_id") var ownerId: String? = null, + @ColumnInfo(name = "filter_id") var filterId: String? = null, + @ColumnInfo(name = "file_path") var filePath: List?, + @ColumnInfo(name = "file_type") var fileType: String, + @ColumnInfo(name = "thumbnail") var thumbnail: String?, + @ColumnInfo(name = "created_at") var createdAt: Long, + @ColumnInfo(name = "source") var source: Int?, + @ColumnInfo(name = "is_edited") var isEdited: Boolean = false, + @ColumnInfo(name = "is_deleted") var isDeleted: Boolean = false, + @ColumnInfo(name = "doc_type") var documentType: Int?, + @ColumnInfo(name = "doc_date") var documentDate: Long?, + @ColumnInfo(name = "tags") var tags: String?, + @ColumnInfo(name = "auto_tags") var autoTags : String?, + @ColumnInfo(name = "cta") var cta: String?, + @ColumnInfo(name = "hash_id") var hashId: String?, + @ColumnInfo(name = "is_analyzing") var isAnalyzing: Boolean, + @ColumnInfo(name = "smart_report_field") var smartReportField : String? = null +) +``` + +### RecordModel + +A data transfer object representing document records, used for API communication. + +```kotlin +data class RecordModel( + val localId: String?, + val documentId: String?, + val ownerId : String?, + val documentType: Int?, + val documentDate: Long?, + val createdAt : Long?, + val thumbnail: String?, + val filePath: List?, + val fileType: String?, + val cta: CTA?, + val tags: String?, + val autoTags : String?, + val source: Int?, + val isAnalyzing: Boolean = false +) +``` + +### Document Types + +Constants used to specify document categories: + +| Type ID | Description | +|---------|-------------| +| 1 | Lab Report | +| 2 | Prescription | +| 3 | Discharge Summary | +| 4 | Vaccine Certificate | +| 5 | Insurance | +| 6 | Invoice | +| 7 | Scan | +| 8 | Other | +| -1 | All types (default) | + +### AvailableDocTypes + +A data class representing available document types for filtering: + +```kotlin +@Keep +data class AvailableDocTypes( + val docType: Int, + val count: Int +) +``` + +### DocumentSortEnum + +Enum used for specifying document sort criteria: + +```kotlin +enum class DocumentSortEnum { + UPLOAD_DATE, // Sort by when documents were uploaded + DOCUMENT_DATE // Sort by the date on the document itself +} +``` + +## Core Functionality + +### Data Synchronization + +Initialize background synchronization for patient documents: + +```kotlin +/** + * Initializes background synchronization for patient documents + * + * This function sets up a background worker that handles: + * - Synchronizing documents with the server + * - Managing document changes (edits and deletions) + * + * @param context Application context + * @param ownerId The ID of the document owner (optional) + * @param filterId Additional ID to filter documents (optional) + * @param patientUuid The UUID of the patient whose documents are being synced + */ +Document.initSyncingData( + context: Context, + ownerId: String? = null, + filterId: String? = null, + patientUuid: String +) +``` + +### Document Retrieval + +Retrieve documents with optional filtering and sorting: + +```kotlin +/** + * Retrieves a list of documents with optional filtering and sorting + * Returns a Flow containing a list of documents that match the provided filters. + * The results can be sorted according to the specified criteria. + * + * @param ownerId The ID of the document owner to filter by (optional) + * @param filterId Additional ID to filter documents by (optional) + * @param docType The type of documents to retrieve (default: -1, all types) + * @param sortBy Specifies how to sort the returned documents + * + * @return Flow>? A Flow emitting lists of documents matching the criteria, + * or null if no documents are found or an error occurs + */ +val documentsFlow = Document.getDocuments( + ownerId = "user123", + filterId = "filter456", + docType = 1, // Lab Reports only + sortBy = DocumentSortEnum.DOCUMENT_DATE +) + +// Collect the flow to observe document changes +lifecycleScope.launch { + documentsFlow?.collect { documents -> + // Process the documents + } +} +``` + +Get a single document by ID: + +```kotlin +/** + * Retrieves a single document by its document ID + * @return RecordModel? The document record, or null if not found + */ +val document = Document.getDocumentById(id = "doc123") +``` + +Get available document types: + +```kotlin +/** + * Retrieves a list of available document types with their counts + * This allows the application to see what document types are available for a specific + * + * @param filterId Additional ID to filter documents by (optional) + * @param ownerId The ID of the document owner to filter by (optional) + * @return List? List of document types with their counts, or null if no data is found + */ +lifecycleScope.launch { + val availableTypes = Document.getAvailableDocTypes(filterId = "filter456", ownerId = "user123") + // Process available document types +} +``` + +### Document Management + +Store documents: + +```kotlin +/** + * Stores a list of documents in the vault database + * @param vaultEntityList List of VaultEntity objects to be stored in the database + */ +Document.storeDocuments(vaultEntityList = listOfDocuments) +``` + +Delete a document: + +```kotlin +/** + * Marks a document as deleted in the database + * + * @param filterId Additional ID to identify the document (optional) + * @param localId The localId of the document to delete + */ +Document.deleteDocument(filterId = "filter456", localId = "local123") +``` + +Edit document metadata: + +```kotlin +/** + * Updates document metadata + * + * @param localId The localId of the document to edit + * @param docType The new document type (optional) + * @param docDate The new document date (optional) + * @param filterId The filterId of the document to edit + */ +Document.editDocument( + localId = "local123", + docType = 2, // Change to Prescription + docDate = System.currentTimeMillis(), + filterId = "filter456" +) +``` + +### Document Viewing + +Open a document viewer: + +```kotlin +/** + * Opens the appropriate viewer activity for a document + * This function determines whether to open the standard document viewer or + * the Smart Report viewer based on the document's autoTags. + * + * @param context Application context for starting the activity + * @param model The RecordModel representing the document to view + * @param oid The filter ID (optional) + */ +Document.view(context = requireContext(), model = documentModel, filterId = "filter456") +``` + +### File Handling + +Download document files: + +```kotlin +/** + * Downloads a file from a URL and returns the local file path + * This function handles the downloading and saving of document files to local storage. + * + * @param url The remote URL of the file to download + * @param context Application context for file operations + * @param type The type of file being downloaded (optional) + * @return String The local file path where the document is saved + */ +val localFilePath = Document.downloadFileFromTheAssetUrl( + url = "https://example.com/document.pdf", + context = requireContext(), + type = "pdf" +) +``` + +Download thumbnail images: + +```kotlin +/** + * Downloads a thumbnail image from a URL and returns the local file path + * This function handles the downloading and saving of document thumbnail images. + * + * @param url The remote URL of the thumbnail to download + * @param context Application context for file operations + * @return String The local file path where the thumbnail is saved + */ +val thumbnailPath = Document.downloadThumbNailFromAssetUrl( + url = "https://example.com/thumbnail.jpg", + context = requireContext() +) +``` + +Check if a document exists: + +```kotlin +/** + * Checks if a document already exists in the database + * Returns -1 if the document is not found, otherwise returns 0. + * + * @param documentId The ID of the document to check + * @param ownerId The ID of the document owner (optional) + * @return Int? -1 if not found, 0 if exists, or null if an error occurs + */ +val exists = Document.alreadyExistDocument(documentId = "doc123", ownerId = "user456") +``` + +## Advanced Features + +### Cleanup + +When the SDK is no longer needed or when a user logs out: + +```kotlin +/** + * Clears all data from the database + * This function should be called when the SDK is no longer needed or when + * a user logs out to ensure data privacy. + */ +Document.destroy() +``` + +## Troubleshooting + +### Common Issues + +1. **Authentication Failures** + - Ensure your `IOkHttpSetup` implementation provides valid tokens + - Verify the host URL is correctly specified + +2. **Documents Not Syncing** + - Check network connectivity + - Verify the patient UUID is correct + - Ensure background workers are not restricted by battery optimization + +3. **File Download Issues** + - Check storage permissions + - Verify the device has sufficient storage space From 21fdbd77d17fa4ca3de2c5c58d234edd4eb06595 Mon Sep 17 00:00:00 2001 From: praveenkshah <139435178+praveenkshah@users.noreply.github.com> Date: Wed, 5 Mar 2025 19:18:45 +0530 Subject: [PATCH 15/20] praveen/add mcp server documentation (#209) * add documentation * update eka mcp documentation * add mcp servers * add overview * update eka mcp overview * update interaction response --- .../eka_mcp/medications/interactions.mdx | 3 + api-reference/eka_mcp/medications/search.mdx | 3 + api-reference/eka_mcp/overview.mdx | 29 + .../eka_mcp/protocols/publishers_by_tag.mdx | 3 + api-reference/eka_mcp/protocols/search.mdx | 3 + api-reference/eka_mcp/protocols/tags.mdx | 3 + api-reference/eka_mcp/references.yaml | 534 ++++++++++++++++++ docs.json | 24 + mint.json | 25 + 9 files changed, 627 insertions(+) create mode 100644 api-reference/eka_mcp/medications/interactions.mdx create mode 100644 api-reference/eka_mcp/medications/search.mdx create mode 100644 api-reference/eka_mcp/overview.mdx create mode 100644 api-reference/eka_mcp/protocols/publishers_by_tag.mdx create mode 100644 api-reference/eka_mcp/protocols/search.mdx create mode 100644 api-reference/eka_mcp/protocols/tags.mdx create mode 100644 api-reference/eka_mcp/references.yaml diff --git a/api-reference/eka_mcp/medications/interactions.mdx b/api-reference/eka_mcp/medications/interactions.mdx new file mode 100644 index 00000000..69eaeb88 --- /dev/null +++ b/api-reference/eka_mcp/medications/interactions.mdx @@ -0,0 +1,3 @@ +--- +openapi: post /eka-mcp/medications/v1/interaction +--- \ No newline at end of file diff --git a/api-reference/eka_mcp/medications/search.mdx b/api-reference/eka_mcp/medications/search.mdx new file mode 100644 index 00000000..90794264 --- /dev/null +++ b/api-reference/eka_mcp/medications/search.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /eka-mcp/medications/v1/search +--- \ No newline at end of file diff --git a/api-reference/eka_mcp/overview.mdx b/api-reference/eka_mcp/overview.mdx new file mode 100644 index 00000000..b4daafb1 --- /dev/null +++ b/api-reference/eka_mcp/overview.mdx @@ -0,0 +1,29 @@ +# Eka MCP API Documentation + +## Overview + +The Eka MCP provides a set of APIs to manage protocols search, and medications. +This document provides an overview of the available endpoints and their functionality. + +## API Categories + +### Protocols + +Protocols APIs help manage clinical protocols and related data: + +- **Search Protocols** [(POST)](/api-reference/eka_mcp/protocols/search): Search and filter protocols based on specified criteria +- **Get all Tags** [(GET)](/api-reference/eka_mcp/protocols/tags): Retrieve a comprehensive list of all protocol conditions and tags supported +- **Get Publishers by Tag** [(GET)](/api-reference/eka_mcp/protocols/tags): Retrieve protocol publishers filtered by specific tag + +### Medications + +Medication-related APIs provide access to medication data and interactions: + +- **Search Medications** [(GET)](/api-reference/eka_mcp/medications/search): Find medications based on brand name, generic composition and form +- **Check Drugs Interactions** [(POST)](/api-reference/eka_mcp/protocols/interactions): Evaluate potential interactions between multiple medications +on basis of generic composition + +## Authentication + +All API endpoints require authentication via JWT tokens provided in the Authorization header. + diff --git a/api-reference/eka_mcp/protocols/publishers_by_tag.mdx b/api-reference/eka_mcp/protocols/publishers_by_tag.mdx new file mode 100644 index 00000000..b5472215 --- /dev/null +++ b/api-reference/eka_mcp/protocols/publishers_by_tag.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /eka-mcp/protocols/v1/publishers/tag +--- \ No newline at end of file diff --git a/api-reference/eka_mcp/protocols/search.mdx b/api-reference/eka_mcp/protocols/search.mdx new file mode 100644 index 00000000..cb3450ae --- /dev/null +++ b/api-reference/eka_mcp/protocols/search.mdx @@ -0,0 +1,3 @@ +--- +openapi: post /eka-mcp/protocols/v1/search +--- \ No newline at end of file diff --git a/api-reference/eka_mcp/protocols/tags.mdx b/api-reference/eka_mcp/protocols/tags.mdx new file mode 100644 index 00000000..6fca6f4a --- /dev/null +++ b/api-reference/eka_mcp/protocols/tags.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /eka-mcp/protocols/v1/tags +--- \ No newline at end of file diff --git a/api-reference/eka_mcp/references.yaml b/api-reference/eka_mcp/references.yaml new file mode 100644 index 00000000..f5ff2a1a --- /dev/null +++ b/api-reference/eka_mcp/references.yaml @@ -0,0 +1,534 @@ +openapi: 3.1.0 +info: + title: MCP Eka Assist API + description: Eka Assist documentation + version: 1.0.0 + contact: + name: Nikhil + url: https://eka.care/ + email: nikhil.kasukurthi@eka.care +tags: +- name: protocols +- name: medications +paths: + /eka-mcp/protocols/v1/search: + post: + summary: Search Protocols + description: This endpoint returns a list of all protocols for the given + conditions and publishers. + tags: + - protocols + parameters: [] + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/ProtocolList.a9993e3' + '500': + description: Internal Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/GenericErr.82b01e4' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/GenericErr.82b01e4' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/QueryProtocols.b6c8896' + /eka-mcp/protocols/v1/tags: + get: + summary: Get all Tags + description: This endpoint returns a comprehensive list of all protocol conditions + that are supported. + tags: + - protocols + parameters: [] + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/TagList.a9993e3' + '500': + description: Internal Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/GenericErr.82b01e4' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/GenericErr.82b01e4' + /eka-mcp/protocols/v1/publishers/tag: + get: + summary: Get Publishers by Tag + description: This endpoint returns a list of all protocols publishers for + given tag. + tags: + - protocols + parameters: + - name: tag + in: query + schema: + default: null + description: The tag/condition for which the publisher is being fetched + title: Tag + type: string + required: false + description: The tag/condition for which the publisher is being fetched + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/ProtocolPublishers.e57b7a5' + '500': + description: Internal Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/GenericErr.82b01e4' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/GenericErr.82b01e4' + /eka-mcp/medications/v1/search: + get: + summary: Search Medications + description: This endpoint return all the suggested/similar drugs for given + drug name, generics, form or volume used by server. + tags: + - medications + parameters: + - name: drug_name + in: query + schema: + anyOf: + - type: string + - type: 'null' + default: null + description: The segmented branded name of the medicine like Glim 1mg + title: Drug Name + required: false + description: The segmented branded name of the medicine like Glim 1mg + - name: form + in: query + schema: + anyOf: + - type: string + - type: 'null' + default: null + description: The form of the medicine like Tablet, Syrup + title: Form + required: false + description: The form of the medicine like Tablet, Syrup + - name: generic_names + in: query + schema: + anyOf: + - type: string + - type: 'null' + default: null + description: The generic name of the medicine like 'Glimeperide', 'Metformin'. + In case of compound generics, pass the name only with comma separated + like Glimeperide,Metformin + title: Generic Names + required: false + description: The generic name of the medicine like 'Glimeperide', 'Metformin'. + In case of compound generics, pass the name only with comma separated + like Glimeperide,Metformin + - name: volumes + in: query + schema: + anyOf: + - type: string + - type: 'null' + default: null + description: The volume of the drug name or generic composition like + '650','1000','500' + title: Volumes + required: false + description: The volume of the drug name or generic composition like '650','1000','500' + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/MedicationList.a9993e3' + '500': + description: Internal Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/GenericErr.82b01e4' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/GenericErr.82b01e4' + /eka-mcp/medications/v1/interaction: + post: + summary: Check Drugs Interactions + description: This endpoint is used to check if given the list of drugs interact + with each other. It check drugs interaction on the basis of generics composition. + tags: + - medications + parameters: + - name: drug_names + in: query + schema: + default: null + description: 'List of drug names to check for interactions. Eg: [''Bencid + tablet'', ''Fluvir 75Mg capsule'']' + items: + type: string + title: Drug Names + type: array + required: false + description: 'List of drug names to check for interactions. Eg: [''Bencid + tablet'', ''Fluvir 75Mg capsule'']' + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/Interaction.e57b7a5' + '500': + description: Internal Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/GenericErr.82b01e4' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/GenericErr.82b01e4' +components: + schemas: + TagList.a9993e3: + items: + $ref: '#/components/schemas/TagList.a9993e3.Tag' + title: TagList + type: array + GenericErr.82b01e4: + properties: + error: + title: Error + type: string + required: + - error + title: GenericErr + type: object + ValidationError.6a07bef: + title: ValidationError + description: Model of a validation error response. + type: array + items: + $ref: '#/components/schemas/ValidationError.6a07bef.ValidationErrorElement' + QueryProtocols.b6c8896: + properties: + queries: + description: List of non overlapping distinct queries to search for + protocols + items: + $ref: '#/components/schemas/QueryProtocols.b6c8896.Protocol' + title: Queries + type: array + required: + - queries + title: QueryProtocols + type: object + ProtocolList.a9993e3: + items: + $ref: '#/components/schemas/ProtocolList.a9993e3.Protocol' + title: ProtocolList + type: array + ProtocolPublisher.b6c8896: + properties: + tag: + default: null + description: The tag/condition for which the publisher is being fetched + title: Tag + type: string + title: ProtocolPublisher + type: object + ProtocolPublishers.e57b7a5: + items: + type: string + title: ProtocolPublishers + type: array + MedicationUnderstanding.b6c8896: + properties: + drug_name: + anyOf: + - type: string + - type: 'null' + default: null + description: The segmented branded name of the medicine like Glim 1mg + title: Drug Name + form: + anyOf: + - type: string + - type: 'null' + default: null + description: The form of the medicine like Tablet, Syrup + title: Form + generic_names: + anyOf: + - type: string + - type: 'null' + default: null + description: The generic name of the medicine like 'Glimeperide', 'Metformin'. + In case of compound generics, pass the name only with comma separated + like Glimeperide,Metformin + title: Generic Names + volumes: + anyOf: + - type: string + - type: 'null' + default: null + description: The volume of the drug name or generic composition like + '650','1000','500' + title: Volumes + title: MedicationUnderstanding + type: object + MedicationList.a9993e3: + items: + $ref: '#/components/schemas/MedicationList.a9993e3.Medication' + title: MedicationList + type: array + MedicationInteraction.b6c8896: + properties: + drug_names: + default: null + description: 'List of drug names to check for interactions. Eg: [''Bencid + tablet'', ''Fluvir 75Mg capsule'']' + items: + type: string + title: Drug Names + type: array + title: MedicationInteraction + type: object + Interaction.e57b7a5: + properties: + a: + anyOf: + - items: + items: + type: string + type: array + type: array + - type: 'null' + default: null + title: A + b: + anyOf: + - items: + items: + type: string + type: array + type: array + - type: 'null' + default: null + title: B + c: + anyOf: + - items: + items: + type: string + type: array + type: array + - type: 'null' + default: null + title: C + d: + anyOf: + - items: + items: + type: string + type: array + type: array + - type: 'null' + default: null + title: D + x: + anyOf: + - items: + items: + type: string + type: array + type: array + - type: 'null' + default: null + title: X + title: Interaction + type: object + TagList.a9993e3.Tag: + properties: + tag_id: + title: Tag Id + type: string + text: + title: Text + type: string + detail: + anyOf: + - type: string + - type: 'null' + default: null + title: Detail + required: + - tag_id + - text + title: Tag + type: object + ValidationError.6a07bef.ValidationErrorElement: + title: ValidationErrorElement + description: Model of a validation error response element. + type: object + properties: + loc: + title: Missing field name + type: array + items: + type: string + msg: + title: Error message + type: string + type: + title: Error type + type: string + ctx: + title: Error context + type: object + required: + - loc + - msg + - type + QueryProtocols.b6c8896.Protocol: + properties: + query: + description: Concise and exact sentence to search. Do not use when, + where, how, etc. + title: Query + type: string + tag: + description: The tag/condition basis which the protocols database should + be filtered + title: Tag + type: string + publisher: + description: The name of the publisher. Cannot be assumed unless specified + in the query by the user or selected from output of get_protocol_publishers + title: Publisher + type: string + required: + - query + - tag + - publisher + title: Protocol + type: object + ProtocolList.a9993e3.Protocol: + properties: + url: + anyOf: + - type: string + - type: 'null' + default: null + title: Url + source_url: + anyOf: + - type: string + - type: 'null' + default: null + title: Source Url + type: + anyOf: + - enum: + - image + - pdf + type: string + - type: 'null' + default: null + title: Type + author: + anyOf: + - type: string + - type: 'null' + default: null + title: Author + publication_year: + anyOf: + - type: integer + - type: 'null' + default: null + title: Publication Year + conditions: + anyOf: + - items: + type: string + type: array + - type: 'null' + default: null + title: Conditions + title: Protocol + type: object + MedicationList.a9993e3.Medication: + properties: + name: + title: Name + type: string + generic_name: + anyOf: + - type: string + - type: 'null' + title: Generic Name + manufacturer_name: + anyOf: + - type: string + - type: 'null' + title: Manufacturer Name + product_type: + anyOf: + - type: string + - type: 'null' + title: Product Type + required: + - name + - generic_name + - manufacturer_name + - product_type + title: Medication + type: object + securitySchemes: + BearerAuth: + type: http + scheme: bearer + bearerFormat: JWT + description: Enter JWT token +servers: +- url: https://api.dev.eka.care + description: Staging Server +- url: https://api.eka.care + description: Prod Server +security: +- BearerAuth: [] diff --git a/docs.json b/docs.json index 06a562a7..8878d711 100644 --- a/docs.json +++ b/docs.json @@ -393,6 +393,30 @@ } ] }, + { + "group": "Eka Mcp", + "icon": "book-open-cover", + "pages": [ + { + "group": "Protocols", + "icon": "brain", + "pages": [ + "api-reference/eka_mcp/protocols/search", + "api-reference/eka_mcp/protocols/tags", + "api-reference/eka_mcp/protocols/publishers_by_tag" + ] + }, + { + "group": "Medications", + "icon": "house-medical", + "pages": [ + "api-reference/eka_mcp/medications/search", + "api-reference/eka_mcp/medications/interactions" + + ] + } + ] + }, { "group": "Medical Records", "icon": "book-open-cover", diff --git a/mint.json b/mint.json index 6a7209ff..8c6078a7 100644 --- a/mint.json +++ b/mint.json @@ -524,6 +524,31 @@ } ] }, + { + "group": "Eka Mcp", + "icon": "book-open-cover", + "pages": [ + "api-reference/eka_mcp/overview", + { + "group": "Protocols", + "icon": "brain", + "pages": [ + "api-reference/eka_mcp/protocols/search", + "api-reference/eka_mcp/protocols/tags", + "api-reference/eka_mcp/protocols/publishers_by_tag" + ] + }, + { + "group": "Medications", + "icon": "house-medical", + "pages": [ + "api-reference/eka_mcp/medications/search", + "api-reference/eka_mcp/medications/interactions" + + ] + } + ] + }, { "group": "User App", "pages": [ From 01013447503bf81cc8cebd1000f80c8b4277621a Mon Sep 17 00:00:00 2001 From: praveenkshah <139435178+praveenkshah@users.noreply.github.com> Date: Wed, 5 Mar 2025 22:53:54 +0530 Subject: [PATCH 16/20] add overview and fix details (#213) --- api-reference/eka_mcp/overview.mdx | 10 +++++----- api-reference/eka_mcp/references.yaml | 23 ++++++++++++++++------- docs.json | 3 ++- mint.json | 2 +- 4 files changed, 24 insertions(+), 14 deletions(-) diff --git a/api-reference/eka_mcp/overview.mdx b/api-reference/eka_mcp/overview.mdx index b4daafb1..07f5581d 100644 --- a/api-reference/eka_mcp/overview.mdx +++ b/api-reference/eka_mcp/overview.mdx @@ -11,16 +11,16 @@ This document provides an overview of the available endpoints and their function Protocols APIs help manage clinical protocols and related data: -- **Search Protocols** [(POST)](/api-reference/eka_mcp/protocols/search): Search and filter protocols based on specified criteria -- **Get all Tags** [(GET)](/api-reference/eka_mcp/protocols/tags): Retrieve a comprehensive list of all protocol conditions and tags supported -- **Get Publishers by Tag** [(GET)](/api-reference/eka_mcp/protocols/tags): Retrieve protocol publishers filtered by specific tag +- **[Search Protocols](/api-reference/eka_mcp/protocols/search)** : Search and filter protocols based on specified criteria +- **[Get all Tags](/api-reference/eka_mcp/protocols/tags)**: Retrieve a comprehensive list of all protocol conditions and tags supported +- **[Get Publishers by Tag](/api-reference/eka_mcp/protocols/tags)**: Retrieve protocol publishers filtered by specific tag ### Medications Medication-related APIs provide access to medication data and interactions: -- **Search Medications** [(GET)](/api-reference/eka_mcp/medications/search): Find medications based on brand name, generic composition and form -- **Check Drugs Interactions** [(POST)](/api-reference/eka_mcp/protocols/interactions): Evaluate potential interactions between multiple medications +- **[Search Medications](/api-reference/eka_mcp/medications/search)**: Find medications based on brand name, generic composition and form +- **[Check Drugs Interactions](/api-reference/eka_mcp/protocols/interactions)**: Evaluate potential interactions between multiple medications on basis of generic composition ## Authentication diff --git a/api-reference/eka_mcp/references.yaml b/api-reference/eka_mcp/references.yaml index f5ff2a1a..f3e61526 100644 --- a/api-reference/eka_mcp/references.yaml +++ b/api-reference/eka_mcp/references.yaml @@ -14,8 +14,8 @@ paths: /eka-mcp/protocols/v1/search: post: summary: Search Protocols - description: This endpoint returns a list of all protocols for the given - conditions and publishers. + description: This endpoint returns pages from the protocols based on the + query, publishers and tag. tags: - protocols parameters: [] @@ -46,8 +46,8 @@ paths: /eka-mcp/protocols/v1/tags: get: summary: Get all Tags - description: This endpoint returns a comprehensive list of all protocol conditions - that are supported. + description: This endpoint returns the complete list of tags that are supported + through search tags: - protocols parameters: [] @@ -109,8 +109,13 @@ paths: /eka-mcp/medications/v1/search: get: summary: Search Medications - description: This endpoint return all the suggested/similar drugs for given - drug name, generics, form or volume used by server. + description: 'This endpoint returns suggested/similar drugs from the Eka + medical database for the given parameters - drug name, generics, form + or volume used by server. + + + Suggestions are ranked based on similarity and also popularity (custom + eka metric) of the medicine' tags: - medications parameters: @@ -185,8 +190,12 @@ paths: /eka-mcp/medications/v1/interaction: post: summary: Check Drugs Interactions - description: This endpoint is used to check if given the list of drugs interact + description: 'This endpoint is used to check if given the list of drugs interact with each other. It check drugs interaction on the basis of generics composition. + + + The interactions can be of any of the given categories: x,a,b,c,d or not + have any interactions.' tags: - medications parameters: diff --git a/docs.json b/docs.json index 8878d711..008fc95b 100644 --- a/docs.json +++ b/docs.json @@ -394,9 +394,10 @@ ] }, { - "group": "Eka Mcp", + "group": "Eka MCP", "icon": "book-open-cover", "pages": [ + "api-reference/eka_mcp/overview", { "group": "Protocols", "icon": "brain", diff --git a/mint.json b/mint.json index 8c6078a7..7bd9f786 100644 --- a/mint.json +++ b/mint.json @@ -525,7 +525,7 @@ ] }, { - "group": "Eka Mcp", + "group": "Eka MCP", "icon": "book-open-cover", "pages": [ "api-reference/eka_mcp/overview", From 1b3b6325ba8874fd5e4b0ee7592ce1c878cad5e3 Mon Sep 17 00:00:00 2001 From: Durgesh Mehar Date: Wed, 12 Mar 2025 01:17:12 +0530 Subject: [PATCH 17/20] transaction commit api documentation --- .../medical/voice/end-transcribe.mdx | 4 ++ .../general-tools/medical/voice/voice.yaml | 64 +++++++++++++++++++ docs.json | 4 +- mint.json | 3 +- 4 files changed, 73 insertions(+), 2 deletions(-) create mode 100644 api-reference/general-tools/medical/voice/end-transcribe.mdx diff --git a/api-reference/general-tools/medical/voice/end-transcribe.mdx b/api-reference/general-tools/medical/voice/end-transcribe.mdx new file mode 100644 index 00000000..127747a1 --- /dev/null +++ b/api-reference/general-tools/medical/voice/end-transcribe.mdx @@ -0,0 +1,4 @@ +--- +title: End Transcribe +openapi: POST /api/v1/transaction/commit/{session_id} +--- \ No newline at end of file diff --git a/api-reference/general-tools/medical/voice/voice.yaml b/api-reference/general-tools/medical/voice/voice.yaml index 2c6d7fc1..743f38ff 100644 --- a/api-reference/general-tools/medical/voice/voice.yaml +++ b/api-reference/general-tools/medical/voice/voice.yaml @@ -218,6 +218,70 @@ paths: $ref: "#/components/schemas/Unauthorized" security: - auth: [] + /api/v1/transaction/commit/{session_id}: + post: + description: |- + This API is used to end all audio transmissions for the given session ID. It commits the transaction and finalizes the session. + + parameters: + - name: session_id + in: path + required: true + schema: + type: string + responses: + "200": + description: Successful transaction commit. + content: + application/json: + schema: + type: object + properties: + status: + type: string + example: success + message: + type: string + example: Transaction committed successfully + data: + type: object + example: + { + "c_id": "12345678910111213", + "b_id": "12345678910111213", + "mode": "consultation", + "meta_data": "{'client_version': '2.1.0', 'device_type': 'iPhone 13', 'language': 'en-US', 'priority': 'high', 'message': {'hello': 'there'}}", + "status": "COMMIT", + "c_at": "2025-03-07T10:23:25Z", + "actor": "430b579b-e979-4c90-aa73-02af8fe9rfdad", + "sqs_files": ['1.m4a', '2.m4a'], + "transfer": "Stream", + "files": ['1.m4a', '2.m4a'], + "txn_id": "R-S3-195D5131-D014-56A8-ACCF-2F8F2D230DEC", + "u_at": "2025-03-07T10:23:25Z", + "user_status": "COMMIT" + } + "404": + description: Transaction not found. + content: + application/json: + schema: + type: object + properties: + status: + type: string + example: failed + error: + type: string + example: Transaction not found + "401": + description: Unauthorized. Invalid or missing authentication. + content: + application/json: + schema: + $ref: "#/components/schemas/Unauthorized" + security: + - auth: [] components: schemas: diff --git a/docs.json b/docs.json index 008fc95b..3d695101 100644 --- a/docs.json +++ b/docs.json @@ -101,7 +101,9 @@ "icon": "microphone-lines", "pages": [ "api-reference/general-tools/medical/voice/upload-voice", - "api-reference/general-tools/medical/voice/retrieve-transcribe" + "api-reference/general-tools/medical/voice/retrieve-transcribe", + "api-reference/general-tools/medical/voice/end-transcribe" + ] } ] diff --git a/mint.json b/mint.json index 7bd9f786..3c2b1374 100644 --- a/mint.json +++ b/mint.json @@ -184,7 +184,8 @@ "icon": "microphone-lines", "pages": [ "api-reference/general-tools/medical/voice/upload-voice", - "api-reference/general-tools/medical/voice/retrieve-transcribe" + "api-reference/general-tools/medical/voice/retrieve-transcribe", + "api-reference/general-tools/medical/voice/end-transcribe" ] } ] From 67b154747a038969c56a7e16f9dbddf871b00682 Mon Sep 17 00:00:00 2001 From: rakeshateka Date: Mon, 3 Mar 2025 12:39:21 +0530 Subject: [PATCH 18/20] edited questionnaire_data api --- .../assessment/questionnaire_data.mdx | 24 ++--- .../assessment/questionnaire_data.yml | 100 ++++++++++++------ 2 files changed, 71 insertions(+), 53 deletions(-) diff --git a/api-reference/general-tools/assessment/questionnaire_data.mdx b/api-reference/general-tools/assessment/questionnaire_data.mdx index c7a8c7df..94c7c070 100644 --- a/api-reference/general-tools/assessment/questionnaire_data.mdx +++ b/api-reference/general-tools/assessment/questionnaire_data.mdx @@ -4,34 +4,22 @@ openapi: get /assessment/api/v1/questionnaire_data/{assessment_id}/ The format of the response is as follows: -### Response - ```json { "data": { - "practitioner": { + // practitioner details (who has done the assessment) + "practitioner": { "practitioner_uuid": "" }, - "patient": { + // patient details (for whom the assessment is done) + "patient": { "unique_identifier": "", "patient_uuid": "", "age": "", "gender": "", }, - "questionnaire": [ - { - "question": "", - "answer": "", - "items": [ - { - "question": "", - "answer": "" - "items": [] - } - ] - }, - ] - } + // questionnaire data in fhir format. + "fhir_data": {} } ``` --- \ No newline at end of file diff --git a/api-reference/general-tools/assessment/questionnaire_data.yml b/api-reference/general-tools/assessment/questionnaire_data.yml index 2f32fe91..3f91ada1 100644 --- a/api-reference/general-tools/assessment/questionnaire_data.yml +++ b/api-reference/general-tools/assessment/questionnaire_data.yml @@ -15,7 +15,7 @@ paths: - Get Questionnaire Data summary: Get Questionnaire Data description: >- - This API retrieves the questionnaire data for a given assessment ID. The questionnaire data includes all the available information about `practitioner`, `patient` and `questionnaire`. + This API retrieves the questionnaire data for a given assessment ID. The questionnaire data includes all the available information about `practitioner`, `patient` and `fhir_data`. security: - authApiKey: [] @@ -30,7 +30,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Questionnaire-200' + $ref: '#/components/schemas/QuestionnaireData-200' "400": description: Bad Request content: @@ -84,7 +84,7 @@ components: example: application/json schemas: - Questionnaire-200: + QuestionnaireData-200: type: object properties: data: @@ -113,39 +113,69 @@ components: type: string nullable: true example: "m" - questionnaire: - type: array - items: - type: object - properties: - question: - type: string - example: "What symptoms are you facing?" - answer: - type: string - example: "Fever, Cough" + fhir_data: + type: object + properties: + resourceType: + type: string + example: "Bundle" + type: + type: string + example: "document" + link: + type: array items: - type: array - items: - type: object - properties: - question: - type: string - example: "Fever" - answer: - type: string - example: "99.5" - items: - type: array - items: - type: object - properties: - question: - type: string - example: "When did the fever start?" - answer: - type: string - example: "2 days ago" + type: object + properties: + url: + type: string + example: "https://eka.care/sn_1234567890" + relation: + type: string + example: "object" + entry: + type: array + items: + type: object + properties: + resource: + type: object + fullUrl: + type: string + example: "Composition/f0b76f12-544d-4e40-8153-5e61cajsbca6" + id: + type: string + example: "sn_1234567890" + meta: + type: object + properties: + versionId: + type: string + example: "1" + lastUpdated: + type: string + example: "2025-03-03T06:45:01.416+00:00" + profile: + type: array + items: + type: string + example: "https://nrces.in/ndhm/fhir/r4/StructureDefinition/DocumentBundle" + security: + type: array + items: + type: object + identifier: + type: object + properties: + system: + type: string + example: "https://eka.care" + value: + type: string + example: "sn_1234567890" + timestamp: + type: string + example: "2025-03-03T06:45:01.416+00:00" Generic-Error: type: object properties: From 2eb98a4c8245d48af3d0e446165fecf430741bc0 Mon Sep 17 00:00:00 2001 From: rakeshateka Date: Tue, 18 Mar 2025 18:17:27 +0530 Subject: [PATCH 19/20] added init txn api for v2rx --- .../medical/voice/init-transcribe.mdx | 4 + .../general-tools/medical/voice/voice.yaml | 115 +++++++++++++++++- mint.json | 7 +- 3 files changed, 122 insertions(+), 4 deletions(-) create mode 100644 api-reference/general-tools/medical/voice/init-transcribe.mdx diff --git a/api-reference/general-tools/medical/voice/init-transcribe.mdx b/api-reference/general-tools/medical/voice/init-transcribe.mdx new file mode 100644 index 00000000..8433b493 --- /dev/null +++ b/api-reference/general-tools/medical/voice/init-transcribe.mdx @@ -0,0 +1,4 @@ +--- +title: Initiate Transcribe +openapi: POST /api/v1/transaction/init/{session_id} +--- \ No newline at end of file diff --git a/api-reference/general-tools/medical/voice/voice.yaml b/api-reference/general-tools/medical/voice/voice.yaml index 743f38ff..505e50a0 100644 --- a/api-reference/general-tools/medical/voice/voice.yaml +++ b/api-reference/general-tools/medical/voice/voice.yaml @@ -7,6 +7,8 @@ servers: description: Production server - url: https://api.dev.eka.care description: Development server + + paths: /voice/upload?mode={mode}&txnid={txnid}: post: @@ -34,7 +36,6 @@ paths: schema: type: string format: binary - responses: "200": description: "200 response" @@ -50,6 +51,8 @@ paths: $ref: "#/components/schemas/Unauthorized" security: - auth: [] + + /health/api/v1/fhir/retrieve: get: summary: Retrieve the prased data for the upload audio file @@ -218,6 +221,49 @@ paths: $ref: "#/components/schemas/Unauthorized" security: - auth: [] + + + /api/v1/transaction/init/{session_id}: + post: + description: |- + This API is used to initialize a transaction for audio transcription with the given session ID. + It sets up the session parameters and prepares for audio file processing. + + parameters: + - name: session_id + in: path + required: true + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/InitTransactionRequest" + responses: + "200": + description: Successful transaction initialization. + content: + application/json: + schema: + $ref: "#/components/schemas/InitTransactionSuccessResponse" + "400": + description: Error in transaction initialization. + content: + application/json: + schema: + $ref: "#/components/schemas/InitTransactionErrorResponse" + "401": + description: Unauthorized. Invalid or missing authentication. + content: + application/json: + schema: + $ref: "#/components/schemas/Unauthorized" + security: + - auth: [] + + /api/v1/transaction/commit/{session_id}: post: description: |- @@ -306,6 +352,73 @@ components: Empty: title: "Empty Schema" type: "object" + TransactionModes: + type: string + enum: [consultation, dictation] + TransferMethods: + type: string + enum: [stream, batch, vaded] + TransactionStatus: + type: string + enum: [CREATED, INIT, COMMIT, TRANSCRIPT, COMPLETE] + VadStatus: + type: string + enum: [START, FINISH] + Action: + type: string + enum: [TRANSCRIPT] + InitTransactionRequest: + type: object + required: + - mode + - transfer + properties: + mode: + $ref: "#/components/schemas/TransactionModes" + description: The mode of transcription + example: consultation + transfer: + $ref: "#/components/schemas/TransferMethods" + description: The transfer method for the audio files + example: vaded + meta_data: + type: object + description: Additional metadata about the session + example: + client_version: "2.1.0" + device_type: "iPhone 13" + language: "en-US" + priority: "high" + message: + hello: "there" + InitTransactionSuccessResponse: + type: object + required: + - status + - message + - txn_id + properties: + status: + type: string + example: success + message: + type: string + example: "Transaction initialized successfully, checking for audio files" + txn_id: + type: string + example: "R-S3-195D5131-D014-56A8-ACCF-2F8F2D230DEC" + InitTransactionErrorResponse: + type: object + required: + - status + - message + properties: + status: + type: string + example: error + message: + type: string + example: "Invalid request parameters" securitySchemes: auth: type: http diff --git a/mint.json b/mint.json index 25d798c4..b9d2d17c 100644 --- a/mint.json +++ b/mint.json @@ -187,11 +187,12 @@ }, { "group": "Medical Speech Understanding", - "icon": "microphone-lines", + "icon": "waveform", "pages": [ "api-reference/general-tools/medical/voice/upload-voice", - "api-reference/general-tools/medical/voice/retrieve-transcribe", - "api-reference/general-tools/medical/voice/end-transcribe" + "api-reference/general-tools/medical/voice/init-transcribe", + "api-reference/general-tools/medical/voice/end-transcribe", + "api-reference/general-tools/medical/voice/retrieve-transcribe" ] } ] From a78ab92b4339cfc03381f74150619f06d8b2c356 Mon Sep 17 00:00:00 2001 From: rakeshateka Date: Tue, 18 Mar 2025 20:14:37 +0530 Subject: [PATCH 20/20] added init txn api for v2rx --- api-reference/general-tools/medical/voice/end-transcribe.mdx | 2 +- api-reference/general-tools/medical/voice/init-transcribe.mdx | 2 +- api-reference/general-tools/medical/voice/voice.yaml | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/api-reference/general-tools/medical/voice/end-transcribe.mdx b/api-reference/general-tools/medical/voice/end-transcribe.mdx index 127747a1..7ab02d9f 100644 --- a/api-reference/general-tools/medical/voice/end-transcribe.mdx +++ b/api-reference/general-tools/medical/voice/end-transcribe.mdx @@ -1,4 +1,4 @@ --- title: End Transcribe -openapi: POST /api/v1/transaction/commit/{session_id} +openapi: POST /api/v2/transaction/commit/{session_id} --- \ No newline at end of file diff --git a/api-reference/general-tools/medical/voice/init-transcribe.mdx b/api-reference/general-tools/medical/voice/init-transcribe.mdx index 8433b493..71c38a5f 100644 --- a/api-reference/general-tools/medical/voice/init-transcribe.mdx +++ b/api-reference/general-tools/medical/voice/init-transcribe.mdx @@ -1,4 +1,4 @@ --- title: Initiate Transcribe -openapi: POST /api/v1/transaction/init/{session_id} +openapi: POST /api/v2/transaction/init/{session_id} --- \ No newline at end of file diff --git a/api-reference/general-tools/medical/voice/voice.yaml b/api-reference/general-tools/medical/voice/voice.yaml index 505e50a0..50fac8ee 100644 --- a/api-reference/general-tools/medical/voice/voice.yaml +++ b/api-reference/general-tools/medical/voice/voice.yaml @@ -223,7 +223,7 @@ paths: - auth: [] - /api/v1/transaction/init/{session_id}: + /api/v2/transaction/init/{session_id}: post: description: |- This API is used to initialize a transaction for audio transcription with the given session ID. @@ -264,7 +264,7 @@ paths: - auth: [] - /api/v1/transaction/commit/{session_id}: + /api/v2/transaction/commit/{session_id}: post: description: |- This API is used to end all audio transmissions for the given session ID. It commits the transaction and finalizes the session.