From fb7d25f53c9a77253b30a0a5c6fa0f9285cf2154 Mon Sep 17 00:00:00 2001 From: Khavin Shankar Date: Mon, 5 Aug 2024 09:29:49 +0530 Subject: [PATCH 1/3] added docs for scheduling model proposal --- docs/care/CEP/Draft/0007-scheduling.md | 176 +++++++++++++++++++++++++ 1 file changed, 176 insertions(+) create mode 100644 docs/care/CEP/Draft/0007-scheduling.md diff --git a/docs/care/CEP/Draft/0007-scheduling.md b/docs/care/CEP/Draft/0007-scheduling.md new file mode 100644 index 0000000..3cb015d --- /dev/null +++ b/docs/care/CEP/Draft/0007-scheduling.md @@ -0,0 +1,176 @@ +# Scheduling in CARE + +## Context + +CARE is a Health Information Management System (HMIS) structured to manage various aspects of healthcare facilities, patient information, consultations, daily rounds, and user details. The core models include: + +- **Facility**: Stores information about medical facilities. +- **Patient**: Stores patient details, including basic information and non-changing health information such as allergies and blood type. Patients belong to a facility and can be transferred to another facility if needed. +- **Consultation**: Stores details of a patient’s visit, including diagnosis, symptoms, and vitals taken. A patient can have multiple consultations, one for each hospital visit. +- **DailyRound**: Stores details of a patient’s vitals and progress over time. Each consultation can have multiple daily rounds. +- **User**: Stores details of hospital staff, including their login information. Users include nurses, doctors, admin staff, etc. + +There are many more models, but at the core, these are the important ones. + +## Requirements + +- To schedule consultation within CARE (In this requirement, when a patient reaches the hospital, at the front desk, an attendant schedules a consultation for the patient). +- To schedule user activities (In this requirement, should be able to schedule user (doctor and nurse) availability and events (operation, patient check) assigned or associated with them). +- To merge sample tests and investigations (should understand this requirement further). +- To schedule visits for palliative care (similar to requirement 1 but additionally patient’s location has to be tracked). +- To schedule one-time consultation (similar to requirement 1 and see no difference wrt scheduling). + +## Features Needed + +- Ability to schedule one-time appointment or recurring appointment. +- Ability to attach all the resources needed for the schedule request. +- Ability to simulate a queue. +- Ability to allow overlaps (shall be decided when to be used by the users). + +## Initial Idea + +To have 2 models, Booking & Slot, which should be generic enough to handle the requirements and should be easy to expand and scale. + +## Modeling + +### Schedule + +- Title +- Description (optional) +- Start time +- End time (optional) +- Recurrence (optional) +- Type (User_Availability | Palliative_Visit | Consultation | Daily Round | Investigation | Event) +- Allows overlap + +### ScheduleParticipant + +- Schedule id +- Participant id +- Participant type (User | Patient) + +### ScheduleResource + +- Schedule id +- Resource id +- Resource type (Consultation | Daily Round | Investigation | Location | Facility) + +## Explanation of Modeling + +The `Schedule` model will be the main entity used to block time, where `start time`, `end time`, and `recurrence` are used to track the timing of the schedule. The `title`, `description`, and `type` fields are used to capture the purpose of the schedule. The `title` and `description` help users understand and differentiate between schedules, while the `type` field is used by the application to enforce participant and resource requirements. The `allows overlap` field is used to determine if time block overlaps are permitted. + +`ScheduleParticipant` and `ScheduleResource` are used to add one or more resources and participants involved or needed for the schedule. Recurring schedules can be achieved using the `recurrence` field in `Schedule`. Additional resources can be added using `ScheduleParticipant` and `ScheduleResource`. Queue simulation can be done on the frontend without changing the models. Overlaps can be managed using the `allows overlap` field in `Schedule`. + +## Implementation wrt Requirements + +### 1. Schedule Consultation + +#### Schedule + +- **Title**: Patient Consultation: [Patient Name] +- **Description**: Brief context of the consultation (e.g., issue description, follow-up). +- **Start Time**: Today’s date and time. +- **End Time**: None (simulated as a queue). +- **Recurrence**: None. +- **Type**: Consultation. +- **Allows Overlap**: True. + +#### ScheduleParticipant + +- **Participant**: Patient requesting consultation (create a patient if new). +- **User**: Doctor in duty (optional and decided on demand). + +#### ScheduleResource + +- **Resource**: Facility. + +### 2. Schedule User Activities (Availability) + +#### Schedule + +- **Title**: Doctor Availability: [Doctor Name] +- **Start Time**: 9:00 AM. +- **End Time**: 5:00 PM. +- **Recurrence**: Monday to Friday. +- **Type**: User_Availability. +- **Allows Overlap**: True. + +#### ScheduleParticipant + +- **Participant**: Respective user. + +#### ScheduleResource + +- **Resource**: Facility (if specific to one facility). + +### Handling User Leave + +When a user (doctor, nurse, etc.) takes leave, a separate `Schedule` record can be created to block their availability during the leave period. + +#### Schedule + +- **Title**: Leave: [User Name] +- **Description**: Reason for the leave (optional). +- **Start Time**: Start date and time of the leave. +- **End Time**: End date and time of the leave. +- **Recurrence**: None (unless the leave is recurring, such as for a specific pattern). +- **Type**: User_Availability. +- **Allows Overlap**: False. + +#### ScheduleParticipant + +- **Participant**: User on leave. + +#### ScheduleResource + +- **Resource**: Facility (if leave is specific to one facility). + +### 3. Schedule User Activities (Events) + +#### Schedule + +- **Title**: Heart Operation: [Patient Name] - [Doctor Name] +- **Start Time**: 10:30 AM. +- **End Time**: 3:30 PM. +- **Recurrence**: None. +- **Type**: Event. +- **Allows Overlap**: False. + +#### ScheduleParticipant + +- **Participant**: Patient having the operation. +- **User**: Doctor performing the operation (multiple if necessary). +- **User**: Nurse assisting in the operation (multiple if necessary). + +#### ScheduleResource + +- **Resource**: Facility. +- **Resource**: Location (operation room). +- **Resource**: Consultation. + +### 4. Schedule Palliative Care Visits + +Same as scheduling a consultation, with an additional consideration for patient location. + +#### Schedule + +- **Title**: Palliative Visit: [Patient Name] +- **Start Time**: Scheduled visit time. +- **End Time**: Expected end time (optional). +- **Recurrence**: As required. +- **Type**: Palliative_Visit. +- **Allows Overlap**: True. + +#### ScheduleParticipant + +- **Participant**: Patient. +- **User**: Assigned caregiver or healthcare professional. + +#### ScheduleResource + +- **Resource**: Facility. +- **Resource**: Location (patient’s address or coordinates from the patient model). + +--- + +This scheduling module for CARE ensures flexibility, scalability, and ease of expansion to meet the diverse requirements of a Health Information Management System. The detailed implementation and examples provide a comprehensive guide to utilizing the scheduling module effectively. From ed6593615f72fe6ddb9c0dc00c902d91c495b8ba Mon Sep 17 00:00:00 2001 From: Khavin Shankar Date: Tue, 10 Sep 2024 10:59:34 +0530 Subject: [PATCH 2/3] added wasa docs --- docs/care/Others/wasa.md | 104 + static/files/ABDM_V3.postman_collection.json | 1668 +++++++++++++++++ static/files/ABDM_V3.postman_environment.json | 117 ++ 3 files changed, 1889 insertions(+) create mode 100644 docs/care/Others/wasa.md create mode 100644 static/files/ABDM_V3.postman_collection.json create mode 100644 static/files/ABDM_V3.postman_environment.json diff --git a/docs/care/Others/wasa.md b/docs/care/Others/wasa.md new file mode 100644 index 0000000..7cf623b --- /dev/null +++ b/docs/care/Others/wasa.md @@ -0,0 +1,104 @@ +# ABDM WASA Documentation + +## Postman Collection +[ABDM WASA Postman Collection](../../../static/files/ABDM_V3.postman_collection.json) +[ABDM WASA Environment](../../../static/files/ABDM_V3.postman_environment.json) + +## Pre-requisite +All the APIs in CARE require authentication and certain permissions to be accessed. Currently, we have role-based permission. There are multiple roles in CARE, but we will focus on three specific roles as they are the most commonly used. + +1. **District Admin** - Has access to all the facilities in their district + - Username: `devdistrictadmin` + - Password: `Coronasafe@123` + +2. **Doctor** - Has access to the facilities assigned to the user (limited access to actions like modifying and viewing certain records) + - Username: `dev-doctor` + - Password: `Coronasafe@123` + +3. **Nurse** - Has access to the facilities assigned to the user (limited access to actions like modifying and viewing certain records) + - Username: `dev-doctor` + - Password: `Coronasafe@123` + +In the context of ABDM, there is no difference between these roles if they have access to the facility. + +Use the login API in the root folder for authentication. + +## Support +Before going to ABDM APIs, it is essential to understand the support APIs. These APIs are crucial for interacting with the CARE system. To use CARE, we need to understand three key entities: **Facility**, **Patient**, and **Consultation**. + +- **Facility**: A hospital that can have one or more patients admitted. +- **Patient**: Can have one or more consultations. +- **Consultation**: A record of a patient’s particular visit. It is opened when a patient visits a facility and closed when the patient is discharged. + +For simplicity, here are the APIs for listing, getting, and creating these three entities, which will be useful while going through ABDM APIs. + +## M1 +M1 contains two flows: **Create ABHA Using Aadhaar OTP** and **Login ABHA Using OTP**. All APIs in M1 are synchronous, meaning they do not have any callback API. + +### Create ABHA Using Aadhaar OTP +This flow has 7 APIs, called sequentially. The transaction ID from the previous API response is passed into the next API request along with other parameters. This flow creates a new ABHA Number using Aadhaar OTP. A real Aadhaar number and phone number are required for testing, as ABDM does not accept dummy values. + +For the last API, `link_abha_number_and_patient`, you need a patient ID, which can be obtained from `get_patient` or `create_patient` from the Support folder. + +### Login ABHA Using OTP +This flow has 4 APIs, called sequentially. The transaction ID from the first API response is passed into the third API request. This flow fetches an existing ABHA Number using Aadhaar OTP or Mobile OTP. The second API is optional. + +There are two ways to perform this flow: +1. Using Aadhaar number to get an OTP. +2. Using a mobile number to get an OTP. + +A real Aadhaar number or phone number linked with an ABHA number is required for testing. For the last API, `link_abha_number_and_patient`, you need a patient ID, which can be obtained from `get_patient` or `create_patient` from the Support folder. + +## Abha Number +ABHA Number is an entity in CARE that stores the ABHA Profile. The following APIs are available: + +1. **get** - Fetch the ABHA Number. +2. **abha_card** - Fetch the ABHA card from ABDM (available for 15 minutes after linking the ABHA number). +3. **create** - Create an ABHA Number manually in CARE (used for ABHA number linking using the ABHA QR code). + +## M2 +M2 consists of four flows: **HIP Initiated Care Context Linking**, **User Initiated Care Context Linking**, **Data Transfer**, and **Scan and Share**. Only the first flow (HIP Initiated Care Context Linking) is initiated by CARE, while the others are initiated by ABDM through callback APIs. M2 APIs are asynchronous, meaning the response is sent via a callback API. + +### Health Facility +Health Facility is an entity that maps CARE’s facility to ABDM’s health facility. This is a pre-requisite for M2 and M3 APIs. Mapping is a simple process—creating a health facility is sufficient. The following APIs are available: + +1. **create** - Create a health facility (requires `facility_id` from the Support folder and `hf_id` from the postman environment). +2. **get** - Fetch a specific Health Facility. +3. **list** - List all Health Facilities. +4. **update** and **partial_update** - Edit a health facility. +5. **register_service** - Register services for a health facility (automatically called when creating, available for utility). + +### HIP Initiated Care Context Linking +This flow has 1 API, which internally triggers multiple API calls to ABDM. It associates care contexts with the patient, requiring consultation IDs from the Support folder. + +### Callback APIs +These callback APIs are used by ABDM to communicate with CARE, initiate flows, send responses, update status, and more. For testing, the callback URL will be set in CARE to a webhook site that can receive and forward callback requests to CARE. Please ensure to forward headers too, as they are used in the logic. + +## M3 +M3 contains one flow: **Raise Consent Request and Request Data**. Like M2, M3 APIs are asynchronous, and responses are sent via callback APIs. + +### Raise Consent Request and Request Data +This flow has 5 APIs, but only `consent__request__init` is mandatory. This API creates a consent request, which is sent to the patient via the ABHA App. Once approved by the patient, the rest of the flow is handled internally. + +Optional APIs include: +- **verify_identity** - Checks if the ABHA ID is still valid. +- **consent_request_status** - Fetches the status (approved or denied). +- **fetch_consent_artefact** - Retrieves consent artefacts (approval for accessing data). +- **request_health_information** - Requests data from facilities based on consent artefacts. + +Some of these APIs require a consent ID or artefact ID, which can be obtained from the Consent folder in M3. + +### Consent +Consent is an entity in CARE that stores Consent Requests and Consent Artefacts. The following APIs are available: + +1. **create** - Manually create a Consent Request (same as `consent__request__init`). +2. **get** - Fetch Consent Requests and respective artefacts. +3. **list** - List all Consent Requests and artefacts. + +### Health Information +Health Information is an entity in CARE that stores references to the health information obtained from the above flow. It is mapped against the Artefact ID. + +1. **get** - Fetch health information by artefact ID (from Consent APIs). + +### Callback APIs +These callback APIs are used by ABDM to communicate with CARE, initiate flows, send responses, update status, and more. For testing, the callback URL will be set in CARE to a webhook site that can receive and forward callback requests to CARE. Please ensure to forward headers too, as they are used in the logic. diff --git a/static/files/ABDM_V3.postman_collection.json b/static/files/ABDM_V3.postman_collection.json new file mode 100644 index 0000000..56d69d9 --- /dev/null +++ b/static/files/ABDM_V3.postman_collection.json @@ -0,0 +1,1668 @@ +{ + "info": { + "_postman_id": "07eeb69c-4308-4e21-b7a4-0cf972bb4aaf", + "name": "Care ABDM 2.0", + "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", + "_exporter_id": "4681660", + "_collection_link": "https://coronasafe.postman.co/workspace/CARE~4bdb78ad-8153-4103-8e9b-0b1f5c6e2df9/collection/4681660-07eeb69c-4308-4e21-b7a4-0cf972bb4aaf?action=share&source=collection_link&creator=4681660" + }, + "item": [ + { + "name": "M1", + "item": [ + { + "name": "Create ABHA Using Aadhaar Otp", + "item": [ + { + "name": "abha_create__send_aadhaar_otp", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "if(pm.response.code == 200){", + " pm.environment.set(\"TRANSACTION_ID\",pm.response.json().transaction_id);", + "}" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"aadhaar\": \"927625613322\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{CARE_ABDM_BASE_URL}}/v3/health_id/create/send_aadhaar_otp", + "host": [ + "{{CARE_ABDM_BASE_URL}}" + ], + "path": [ + "v3", + "health_id", + "create", + "send_aadhaar_otp" + ] + } + }, + "response": [] + }, + { + "name": "abha_create__verify_aadhaar_otp", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "if(pm.response.code == 200){", + " pm.environment.set(\"TRANSACTION_ID\",pm.response.json().transaction_id);", + "}" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"transaction_id\": \"{{TRANSACTION_ID}}\",\n \"otp\": \"534549\",\n \"mobile\": \"7639899448\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{CARE_ABDM_BASE_URL}}/v3/health_id/create/verify_aadhaar_otp", + "host": [ + "{{CARE_ABDM_BASE_URL}}" + ], + "path": [ + "v3", + "health_id", + "create", + "verify_aadhaar_otp" + ] + } + }, + "response": [] + }, + { + "name": "abha_create__link_mobile_number", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "if(pm.response.code == 200){", + " pm.environment.set(\"TRANSACTION_ID\",pm.response.json().transaction_id);", + "}" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"transaction_id\": \"{{TRANSACTION_ID}}\",\n \"mobile\": \"7639899448\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{CARE_ABDM_BASE_URL}}/v3/health_id/create/link_mobile_number", + "host": [ + "{{CARE_ABDM_BASE_URL}}" + ], + "path": [ + "v3", + "health_id", + "create", + "link_mobile_number" + ] + } + }, + "response": [] + }, + { + "name": "abha_create__verify_mobile_otp", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "if(pm.response.code == 200){", + " pm.environment.set(\"TRANSACTION_ID\",pm.response.json().transaction_id);", + "}" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"transaction_id\": \"{{TRANSACTION_ID}}\",\n \"otp\": \"549878\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{CARE_ABDM_BASE_URL}}/v3/health_id/create/verify_mobile_otp", + "host": [ + "{{CARE_ABDM_BASE_URL}}" + ], + "path": [ + "v3", + "health_id", + "create", + "verify_mobile_otp" + ] + } + }, + "response": [] + }, + { + "name": "abha_create__abha_address_suggestion", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "if(pm.response.code == 200){", + " pm.environment.set(\"TRANSACTION_ID\",pm.response.json().transaction_id);", + "}" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"transaction_id\": \"{{TRANSACTION_ID}}\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{CARE_ABDM_BASE_URL}}/v3/health_id/create/abha_address_suggestion", + "host": [ + "{{CARE_ABDM_BASE_URL}}" + ], + "path": [ + "v3", + "health_id", + "create", + "abha_address_suggestion" + ] + } + }, + "response": [] + }, + { + "name": "abha_create__enrol_abha_address", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "if(pm.response.code == 200){", + " pm.environment.set(\"TRANSACTION_ID\",pm.response.json().transaction_id);", + "}" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"transaction_id\": \"{{TRANSACTION_ID}}\",\n \"abha_address\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{CARE_ABDM_BASE_URL}}/v3/health_id/create/enrol_abha_address", + "host": [ + "{{CARE_ABDM_BASE_URL}}" + ], + "path": [ + "v3", + "health_id", + "create", + "enrol_abha_address" + ] + } + }, + "response": [] + }, + { + "name": "link_abha_number_and_patient", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"abha_number\": \"1eddb607-e2c6-4f5a-846d-551dabe744e3\",\n \"patient\": \"0f9552bd-1498-4b92-8f62-a83ad6f493b6\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{CARE_ABDM_BASE_URL}}/v3/health_id/link_patient", + "host": [ + "{{CARE_ABDM_BASE_URL}}" + ], + "path": [ + "v3", + "health_id", + "link_patient" + ] + } + }, + "response": [] + } + ] + }, + { + "name": "Login ABHA Using Otp", + "item": [ + { + "name": "abha_login__send_otp", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "if(pm.response.code == 200){", + " pm.environment.set(\"TRANSACTION_ID\",pm.response.json().transaction_id);", + "}" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "// {\n// \"type\": \"aadhaar\",\n// \"value\": \"927625613322\",\n// \"otp_system\": \"aadhaar\"\n// }\n\n// {\n// \"type\": \"mobile\",\n// \"value\": \"7639899448\",\n// \"otp_system\": \"abdm\"\n// }", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{CARE_ABDM_BASE_URL}}/v3/health_id/login/send_otp", + "host": [ + "{{CARE_ABDM_BASE_URL}}" + ], + "path": [ + "v3", + "health_id", + "login", + "send_otp" + ] + } + }, + "response": [] + }, + { + "name": "abha_login__check_auth_methods", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "if(pm.response.code == 200){", + " pm.environment.set(\"TRANSACTION_ID\",pm.response.json().transaction_id);", + "}" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"abha_address\": \"khavinshankar@sbx\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{CARE_ABDM_BASE_URL}}/v3/health_id/login/check_auth_methods", + "host": [ + "{{CARE_ABDM_BASE_URL}}" + ], + "path": [ + "v3", + "health_id", + "login", + "check_auth_methods" + ] + } + }, + "response": [] + }, + { + "name": "abha_login__verify_otp", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "if(pm.response.code == 200){", + " pm.environment.set(\"TRANSACTION_ID\",pm.response.json().transaction_id);", + "}" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "// {\n// \"type\": \"aadhaar\",\n// \"otp\": \"753447\",\n// \"transaction_id\": \"{{TRANSACTION_ID}}\",\n// \"otp_system\": \"aadhaar\"\n// }\n\n// {\n// \"type\": \"mobile\",\n// \"otp\": \"527022\",\n// \"transaction_id\": \"{{TRANSACTION_ID}}\",\n// \"otp_system\": \"abdm\"\n// }", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{CARE_ABDM_BASE_URL}}/v3/health_id/login/verify_otp", + "host": [ + "{{CARE_ABDM_BASE_URL}}" + ], + "path": [ + "v3", + "health_id", + "login", + "verify_otp" + ] + } + }, + "response": [] + }, + { + "name": "link_abha_number_and_patient", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"abha_number\": \"1eddb607-e2c6-4f5a-846d-551dabe744e3\",\n \"patient\": \"0f9552bd-1498-4b92-8f62-a83ad6f493b6\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{CARE_ABDM_BASE_URL}}/v3/health_id/link_patient", + "host": [ + "{{CARE_ABDM_BASE_URL}}" + ], + "path": [ + "v3", + "health_id", + "link_patient" + ] + } + }, + "response": [] + } + ] + }, + { + "name": "Abha Number", + "item": [ + { + "name": "get", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{CARE_ABDM_BASE_URL}}/abha_number/{{PATIENT_ID}}", + "host": [ + "{{CARE_ABDM_BASE_URL}}" + ], + "path": [ + "abha_number", + "{{PATIENT_ID}}" + ] + } + }, + "response": [] + }, + { + "name": "abha_card", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{CARE_ABDM_BASE_URL}}/v3/health_id/abha_card?abha_id=91-3485-3638-4236", + "host": [ + "{{CARE_ABDM_BASE_URL}}" + ], + "path": [ + "v3", + "health_id", + "abha_card" + ], + "query": [ + { + "key": "abha_id", + "value": "91-3485-3638-4236" + } + ] + } + }, + "response": [] + }, + { + "name": "create", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"address\": \"C/O Gopalsamy NO 33 A WESTSTREET ODANILAI KASTHURIBAI GRAMAM ARACHALUR Erode\",\n \"district\": \"Erode\",\n \"state\": \"TAMIL NADU\",\n \"health_id\": \"khavinshankar@sbx\",\n \"mobile\": \"7639899448\",\n \"gender\": \"M\",\n \"date_of_birth\": \"18-1-1999\",\n \"name\": \"KhavinShankar G\",\n \"abha_number\": \"91-3485-3638-4236\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{CARE_ABDM_BASE_URL}}/abha_number", + "host": [ + "{{CARE_ABDM_BASE_URL}}" + ], + "path": [ + "abha_number" + ] + } + }, + "response": [] + } + ] + } + ] + }, + { + "name": "M2", + "item": [ + { + "name": "Health Facility", + "item": [ + { + "name": "list", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{CARE_ABDM_BASE_URL}}/health_facility", + "host": [ + "{{CARE_ABDM_BASE_URL}}" + ], + "path": [ + "health_facility" + ] + } + }, + "response": [] + }, + { + "name": "get", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{CARE_ABDM_BASE_URL}}/health_facility/{{FACILITY_ID}}", + "host": [ + "{{CARE_ABDM_BASE_URL}}" + ], + "path": [ + "health_facility", + "{{FACILITY_ID}}" + ] + } + }, + "response": [] + }, + { + "name": "create", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"facility\": \"{{FACILITY_ID}}\",\n \"hf_id\": \"{{HIP_ID}}\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{CARE_ABDM_BASE_URL}}/health_facility", + "host": [ + "{{CARE_ABDM_BASE_URL}}" + ], + "path": [ + "health_facility" + ] + } + }, + "response": [] + }, + { + "name": "update", + "request": { + "method": "PUT", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"facility\": \"{{FACILITY_ID}}\",\n \"hf_id\": \"{{HIP_ID}}\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{CARE_ABDM_BASE_URL}}/health_facility/{{FACILITY_ID}}", + "host": [ + "{{CARE_ABDM_BASE_URL}}" + ], + "path": [ + "health_facility", + "{{FACILITY_ID}}" + ] + } + }, + "response": [] + }, + { + "name": "partial_update", + "request": { + "method": "PATCH", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"hf_id\": \"{{HIP_ID}}\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{CARE_ABDM_BASE_URL}}/health_facility/{{FACILITY_ID}}", + "host": [ + "{{CARE_ABDM_BASE_URL}}" + ], + "path": [ + "health_facility", + "{{FACILITY_ID}}" + ] + } + }, + "response": [] + }, + { + "name": "register_service", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{CARE_ABDM_BASE_URL}}/health_facility/{{FACILITY_ID}}/register_service", + "host": [ + "{{CARE_ABDM_BASE_URL}}" + ], + "path": [ + "health_facility", + "{{FACILITY_ID}}", + "register_service" + ] + } + }, + "response": [] + } + ] + }, + { + "name": "HIP Initiated Care Context Linking", + "item": [ + { + "name": "link__carecontext", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"consultations\": [\"6bb5143b-eb4e-48fc-a9dc-1ef5c4598d96\"]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "https://work.khavinshankar.dev/v3/hip/link__carecontext", + "protocol": "https", + "host": [ + "work", + "khavinshankar", + "dev" + ], + "path": [ + "v3", + "hip", + "link__carecontext" + ] + } + }, + "response": [] + } + ] + }, + { + "name": "Callback APIs", + "item": [ + { + "name": "hip__token__on_generate_token", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{CARE_ABDM_BASE_URL}}/api/v3/hip/token/on-generate-token", + "host": [ + "{{CARE_ABDM_BASE_URL}}" + ], + "path": [ + "api", + "v3", + "hip", + "token", + "on-generate-token" + ] + } + }, + "response": [] + }, + { + "name": "link__on_carecontext", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{CARE_ABDM_BASE_URL}}/api/v3/link/on_carecontext", + "host": [ + "{{CARE_ABDM_BASE_URL}}" + ], + "path": [ + "api", + "v3", + "link", + "on_carecontext" + ] + } + }, + "response": [] + }, + { + "name": "hip__patient__care_context__discover", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{CARE_ABDM_BASE_URL}}/api/v3/hip/patient/care-context/discover", + "host": [ + "{{CARE_ABDM_BASE_URL}}" + ], + "path": [ + "api", + "v3", + "hip", + "patient", + "care-context", + "discover" + ] + } + }, + "response": [] + }, + { + "name": "hip__link__care_context__init", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{CARE_ABDM_BASE_URL}}/api/v3/hip/link/care-context/init", + "host": [ + "{{CARE_ABDM_BASE_URL}}" + ], + "path": [ + "api", + "v3", + "hip", + "link", + "care-context", + "init" + ] + } + }, + "response": [] + }, + { + "name": "hip__link__care_context__confirm", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{CARE_ABDM_BASE_URL}}/api/v3/hip/link/care-context/confirm", + "host": [ + "{{CARE_ABDM_BASE_URL}}" + ], + "path": [ + "api", + "v3", + "hip", + "link", + "care-context", + "confirm" + ] + } + }, + "response": [] + }, + { + "name": "consent__request__hip__notify", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{CARE_ABDM_BASE_URL}}/api/v3/consent/request/hip/notify", + "host": [ + "{{CARE_ABDM_BASE_URL}}" + ], + "path": [ + "api", + "v3", + "consent", + "request", + "hip", + "notify" + ] + } + }, + "response": [] + }, + { + "name": "hip__health_information__request", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{CARE_ABDM_BASE_URL}}/api/v3/hip/health-information/request", + "host": [ + "{{CARE_ABDM_BASE_URL}}" + ], + "path": [ + "api", + "v3", + "hip", + "health-information", + "request" + ] + } + }, + "response": [] + }, + { + "name": "hip__patient__share", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"intent\": \"PROFILE_SHARE\",\n \"metaData\": {\n \"hipId\": \"IN3210000018\",\n \"context\": \"12345\",\n \"hprId\": \"abdulkalam@hpr.abdm\",\n \"latitude\": \"11.1234843\",\n \"longitude\": \"77.6898631\"\n },\n \"profile\": {\n \"patient\": {\n \"abhaNumber\": \"91-3753-8417-4542\",\n \"abhaAddress\": \"mohammed_258@sbx\",\n \"name\": \"Mohammed Nihal\",\n \"gender\": \"M\",\n \"dayOfBirth\": \"25\",\n \"monthOfBirth\": \"8\",\n \"yearOfBirth\": \"1999\",\n \"address\": {\n \"line\": \"Baith Al Mabrooq, Chandera, Maniyat, Kasargod, Kerala\",\n \"district\": null,\n \"state\": \"KERALA\",\n \"pincode\": null\n },\n \"phoneNumber\": \"7736592618\"\n }\n }\n}\n", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{CARE_ABDM_BASE_URL}}/api/v3/hip/patient/share", + "host": [ + "{{CARE_ABDM_BASE_URL}}" + ], + "path": [ + "api", + "v3", + "hip", + "patient", + "share" + ] + } + }, + "response": [] + } + ], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "Bearer {{AUTH_TOKEN}}", + "type": "string" + } + ] + }, + "event": [ + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "packages": {}, + "exec": [ + "" + ] + } + }, + { + "listen": "test", + "script": { + "type": "text/javascript", + "packages": {}, + "exec": [ + "" + ] + } + } + ] + } + ] + }, + { + "name": "M3", + "item": [ + { + "name": "Raise Consent Request and Request Data", + "item": [ + { + "name": "verify_identity", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"patient\": \"{{PATIENT_ID}}\"\n}\n\n// {\n// \"abha_number\": \"{{ABHA_NUMBER}}\"\n// }", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{CARE_ABDM_BASE_URL}}/v3/hiu/verify_identity", + "host": [ + "{{CARE_ABDM_BASE_URL}}" + ], + "path": [ + "v3", + "hiu", + "verify_identity" + ] + } + }, + "response": [] + }, + { + "name": "consent__request__init", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"hi_types\": [\n \"Prescription\",\n \"DiagnosticReport\",\n \"OPConsultation\",\n \"DischargeSummary\",\n \"ImmunizationRecord\",\n \"HealthDocumentRecord\",\n \"WellnessRecord\"\n ],\n \"from_time\": \"2024-07-17T18:42:25.125Z\",\n \"to_time\": \"2024-08-18T18:42:25.125Z\",\n \"expiry\": \"2024-09-17T18:42:25.125Z\",\n \"patient_abha\": \"khavinshankar_1999@sbx\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{CARE_ABDM_BASE_URL}}/v3/hiu/create_consent_request", + "host": [ + "{{CARE_ABDM_BASE_URL}}" + ], + "path": [ + "v3", + "hiu", + "create_consent_request" + ] + } + }, + "response": [] + }, + { + "name": "consent_request_status", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"consent_request\": \"{{CONSENT_ID}}\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{CARE_ABDM_BASE_URL}}/v3/hiu/consent_request_status", + "host": [ + "{{CARE_ABDM_BASE_URL}}" + ], + "path": [ + "v3", + "hiu", + "consent_request_status" + ] + } + }, + "response": [] + }, + { + "name": "fetch_consent_artefact", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"consent_request\": \"{{CONSENT_ID}}\"\n}\n\n// {\n// \"consent_artefact\": \"{{ARTEFACT_ID}}\"\n// }", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{CARE_ABDM_BASE_URL}}/v3/hiu/fetch_consent_artefact", + "host": [ + "{{CARE_ABDM_BASE_URL}}" + ], + "path": [ + "v3", + "hiu", + "fetch_consent_artefact" + ] + } + }, + "response": [] + }, + { + "name": "request_health_information", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"consent_artefact\": \"{{ARTEFACT_ID}}\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{CARE_ABDM_BASE_URL}}/v3/hiu/request_health_information", + "host": [ + "{{CARE_ABDM_BASE_URL}}" + ], + "path": [ + "v3", + "hiu", + "request_health_information" + ] + } + }, + "response": [] + } + ] + }, + { + "name": "Consent", + "item": [ + { + "name": "list", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{CARE_ABDM_BASE_URL}}/consent", + "host": [ + "{{CARE_ABDM_BASE_URL}}" + ], + "path": [ + "consent" + ] + } + }, + "response": [] + }, + { + "name": "get", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{CARE_ABDM_BASE_URL}}/consent/{{CONSENT_ID}}", + "host": [ + "{{CARE_ABDM_BASE_URL}}" + ], + "path": [ + "consent", + "{{CONSENT_ID}}" + ] + } + }, + "response": [] + }, + { + "name": "create", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"patient_abha\": \"{{PATIENT_IDENTIFIER}}\",\n \"hi_types\": [\n \"Prescription\",\n \"DiagnosticReport\",\n \"OPConsultation\",\n \"DischargeSummary\",\n \"ImmunizationRecord\",\n \"HealthDocumentRecord\",\n \"WellnessRecord\"\n ],\n \"purpose\": \"CAREMGT\",\n \"from_time\": \"2023-09-10\",\n \"to_time\": \"2024-09-04\",\n \"expiry\": \"2024-11-10\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{CARE_ABDM_BASE_URL}}/consent", + "host": [ + "{{CARE_ABDM_BASE_URL}}" + ], + "path": [ + "consent" + ] + } + }, + "response": [] + } + ] + }, + { + "name": "Health Information", + "item": [ + { + "name": "get", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{CARE_ABDM_BASE_URL}}/health_information/{{ARTEFACT_ID}}", + "host": [ + "{{CARE_ABDM_BASE_URL}}" + ], + "path": [ + "health_information", + "{{ARTEFACT_ID}}" + ] + } + }, + "response": [] + } + ] + }, + { + "name": "Callback APIs", + "item": [ + { + "name": "hiu__consent__request__on_init", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{CARE_ABDM_BASE_URL}}/api/v3/hiu/consent/request/on-init", + "host": [ + "{{CARE_ABDM_BASE_URL}}" + ], + "path": [ + "api", + "v3", + "hiu", + "consent", + "request", + "on-init" + ] + } + }, + "response": [] + }, + { + "name": "hiu__consent__request__on_status", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{CARE_ABDM_BASE_URL}}/api/v3/hiu/consent/request/on-status", + "host": [ + "{{CARE_ABDM_BASE_URL}}" + ], + "path": [ + "api", + "v3", + "hiu", + "consent", + "request", + "on-status" + ] + } + }, + "response": [] + }, + { + "name": "hiu__consent__request__notify", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{CARE_ABDM_BASE_URL}}/api/v3/hiu/consent/request/notify", + "host": [ + "{{CARE_ABDM_BASE_URL}}" + ], + "path": [ + "api", + "v3", + "hiu", + "consent", + "request", + "notify" + ] + } + }, + "response": [] + }, + { + "name": "hiu__consent__on_fetch", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{CARE_ABDM_BASE_URL}}/api/v3/hiu/consent/on-fetch", + "host": [ + "{{CARE_ABDM_BASE_URL}}" + ], + "path": [ + "api", + "v3", + "hiu", + "consent", + "on-fetch" + ] + } + }, + "response": [] + }, + { + "name": "hiu__health_information__on_request", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{CARE_ABDM_BASE_URL}}/api/v3/hiu/health-information/on-request", + "host": [ + "{{CARE_ABDM_BASE_URL}}" + ], + "path": [ + "api", + "v3", + "hiu", + "health-information", + "on-request" + ] + } + }, + "response": [] + }, + { + "name": "hiu__health_information__transfer", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{CARE_ABDM_BASE_URL}}/api/v3/hiu/health-information/transfer", + "host": [ + "{{CARE_ABDM_BASE_URL}}" + ], + "path": [ + "api", + "v3", + "hiu", + "health-information", + "transfer" + ] + } + }, + "response": [] + } + ] + } + ] + }, + { + "name": "Support", + "item": [ + { + "name": "list_facility", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{CARE_BASE_URL}}/api/v1/facility/", + "host": [ + "{{CARE_BASE_URL}}" + ], + "path": [ + "api", + "v1", + "facility", + "" + ] + } + }, + "response": [] + }, + { + "name": "create_facility", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"facility_type\": \"2\",\n \"name\": \"Name\",\n \"district\": \"7\",\n \"state\": \"1\",\n \"address\": \"address\",\n \"pincode\": \"682011\",\n \"local_body\": \"298\",\n \"features\": [\n 1,\n 2,\n 3,\n 4,\n 5,\n 6\n ],\n \"ward\": \"5309\",\n \"kasp_empanelled\": false,\n \"latitude\": null,\n \"longitude\": null,\n \"phone_number\": \"+917777777777\",\n \"oxygen_capacity\": 0,\n \"type_b_cylinders\": 0,\n \"type_c_cylinders\": 0,\n \"type_d_cylinders\": 0,\n \"expected_oxygen_requirement\": 0,\n \"expected_type_b_cylinders\": 0,\n \"expected_type_c_cylinders\": 0,\n \"expected_type_d_cylinders\": 0,\n \"cancelToken\": {\n \"promise\": {}\n }\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{CARE_BASE_URL}}/api/v1/facility/", + "host": [ + "{{CARE_BASE_URL}}" + ], + "path": [ + "api", + "v1", + "facility", + "" + ] + } + }, + "response": [] + }, + { + "name": "get_facility", + "protocolProfileBehavior": { + "disableBodyPruning": true + }, + "request": { + "method": "GET", + "header": [], + "body": { + "mode": "raw", + "raw": "", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{CARE_BASE_URL}}/api/v1/facility/{{FACILITY_ID}}/", + "host": [ + "{{CARE_BASE_URL}}" + ], + "path": [ + "api", + "v1", + "facility", + "{{FACILITY_ID}}", + "" + ] + } + }, + "response": [] + }, + { + "name": "list_patient", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "if(pm.response.code == 200){", + " pm.environment.set(\"PATIENT_ID\",pm.response.json().results[0].id);", + " pm.environment.set(\"FACILITY_ID\",pm.response.json().results[0].facility);", + "}" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{CARE_BASE_URL}}/api/v1/patient/?facility={{FACILITY_ID}}", + "host": [ + "{{CARE_BASE_URL}}" + ], + "path": [ + "api", + "v1", + "patient", + "" + ], + "query": [ + { + "key": "facility", + "value": "{{FACILITY_ID}}" + } + ] + } + }, + "response": [] + }, + { + "name": "create_patient", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "if(pm.response.code == 201){", + " pm.environment.set(\"PATIENT_ID\",pm.response.json().id);", + " pm.environment.set(\"FACILITY_ID\",pm.response.json().facility);", + "}" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"facility\": \"{{FACILITY_ID}}\",\n \"name\": \"{{NAME}}\",\n \"gender\": 1,\n \"is_antenatal\": false,\n \"phone_number\": \"{{MOBILE_NUMBER}}\",\n \"emergency_phone_number\": \"{{MOBILE_NUMBER}}\",\n \"date_of_birth\": \"{{DOB_Y}}-{{DOB_M}}-{{DOB_D}}\",\n \"blood_group\": \"UNK\",\n \"nationality\": \"India\",\n \"address\": \"{{ADDRESS}}\",\n \"pincode\": null,\n \"state\": null,\n \"district\": null,\n \"local_body\": null,\n \"ward\": null\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{CARE_BASE_URL}}/api/v1/patient/", + "host": [ + "{{CARE_BASE_URL}}" + ], + "path": [ + "api", + "v1", + "patient", + "" + ] + } + }, + "response": [] + }, + { + "name": "get_patient", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{CARE_BASE_URL}}/api/v1/patient/{{PATIENT_ID}}/", + "host": [ + "{{CARE_BASE_URL}}" + ], + "path": [ + "api", + "v1", + "patient", + "{{PATIENT_ID}}", + "" + ] + } + }, + "response": [] + }, + { + "name": "list_consultation", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{CARE_BASE_URL}}/api/v1/consultation/?patient={{PATIENT_ID}}", + "host": [ + "{{CARE_BASE_URL}}" + ], + "path": [ + "api", + "v1", + "consultation", + "" + ], + "query": [ + { + "key": "patient", + "value": "{{PATIENT_ID}}" + } + ] + } + }, + "response": [] + }, + { + "name": "get_consultation", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{CARE_BASE_URL}}/api/v1/consultation/{{CONSULTATION_ID}}/", + "host": [ + "{{CARE_BASE_URL}}" + ], + "path": [ + "api", + "v1", + "consultation", + "{{CONSULTATION_ID}}", + "" + ] + } + }, + "response": [] + }, + { + "name": "create_consultation", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"suggestion\": \"A\",\n \"route_to_facility\": 10,\n \"admitted\": true,\n \"encounter_date\": \"2024-09-10T03:17:02.498Z\",\n \"category\": \"Stable\",\n \"is_kasp\": \"false\",\n \"kasp_enabled_date\": null,\n \"examination_details\": \"\",\n \"history_of_present_illness\": \"\",\n \"treatment_plan\": \"\",\n \"discharge_date\": null,\n \"create_diagnoses\": [\n {\n \"diagnosis_object\": {\n \"id\": 107388709,\n \"label\": \"AA03 Otomycosis\",\n \"chapter\": \"ENT\"\n },\n \"diagnosis\": 107388709,\n \"verification_status\": \"unconfirmed\",\n \"is_principal\": true\n }\n ],\n \"create_symptoms\": [],\n \"treating_physician\": \"1\",\n \"investigation\": [],\n \"procedure\": [],\n \"patient\": \"{{PATIENT_ID}}\",\n \"facility\": \"{{FACILITY_ID}}\",\n \"consultation_notes\": \"\",\n \"is_telemedicine\": \"false\",\n \"action\": 10,\n \"review_interval\": -1,\n \"assigned_to\": \"\",\n \"special_instruction\": \"\",\n \"weight\": 0,\n \"height\": 0,\n \"patient_no\": \"1234\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{CARE_BASE_URL}}/api/v1/consultation/", + "host": [ + "{{CARE_BASE_URL}}" + ], + "path": [ + "api", + "v1", + "consultation", + "" + ] + } + }, + "response": [] + } + ] + }, + { + "name": "login", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "if(pm.response.code == 200){", + " pm.environment.set(\"CARE_ACCESS_TOKEN\",pm.response.json().access);", + " pm.environment.set(\"CARE_REFRESH_TOKEN\",pm.response.json().refresh);", + "}" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"username\": \"devdistrictadmin\",\n \"password\": \"Coronasafe@123\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{CARE_BASE_URL}}/api/v1/auth/login/", + "host": [ + "{{CARE_BASE_URL}}" + ], + "path": [ + "api", + "v1", + "auth", + "login", + "" + ] + } + }, + "response": [] + } + ], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{CARE_ACCESS_TOKEN}}", + "type": "string" + } + ] + }, + "event": [ + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "packages": {}, + "exec": [ + "" + ] + } + }, + { + "listen": "test", + "script": { + "type": "text/javascript", + "packages": {}, + "exec": [ + "" + ] + } + } + ] +} \ No newline at end of file diff --git a/static/files/ABDM_V3.postman_environment.json b/static/files/ABDM_V3.postman_environment.json new file mode 100644 index 0000000..00277c3 --- /dev/null +++ b/static/files/ABDM_V3.postman_environment.json @@ -0,0 +1,117 @@ +{ + "id": "50a5b832-1db0-4996-8c6d-45734f7781c1", + "name": "ABDM_V3", + "values": [ + { + "key": "CLIENT_ID", + "value": "SBX_000224", + "type": "default", + "enabled": true + }, + { + "key": "CLIENT_SECRET", + "value": "38614059-2fbb-4d32-8a52-71fb9ff0f07c", + "type": "default", + "enabled": true + }, + { + "key": "ABHA_NUMBER", + "value": "91-3485-3638-4236", + "type": "default", + "enabled": true + }, + { + "key": "ABHA_ADDRESS", + "value": "khavinshankar@sbx", + "type": "default", + "enabled": true + }, + { + "key": "AUTH_TOKEN", + "value": "", + "type": "any", + "enabled": true + }, + { + "key": "NAME", + "value": "Khavin Shankar G", + "type": "default", + "enabled": true + }, + { + "key": "GENDER", + "value": "M", + "type": "default", + "enabled": true + }, + { + "key": "DOB_Y", + "value": "1999", + "type": "default", + "enabled": true + }, + { + "key": "TRANSACTION_ID", + "value": "", + "type": "any", + "enabled": true + }, + { + "key": "CARE_ACCESS_TOKEN", + "value": "", + "type": "any", + "enabled": true + }, + { + "key": "CARE_REFRESH_TOKEN", + "value": "", + "type": "any", + "enabled": true + }, + { + "key": "HIP_ID", + "value": "IN3210000018", + "type": "default", + "enabled": true + }, + { + "key": "CARE_BASE_URL", + "value": "https://work.khavinshankar.dev", + "type": "default", + "enabled": true + }, + { + "key": "CARE_ABDM_BASE_URL", + "value": "https://work.khavinshankar.dev/api/abdm", + "type": "default", + "enabled": true + }, + { + "key": "X_TOKEN", + "value": "eyJhbGciOiJSUzUxMiJ9.eyJpc0t5Y1ZlcmlmaWVkIjp0cnVlLCJzdWIiOiI5MS0zNDg1LTM2MzgtNDIzNiIsImNsaWVudElkIjoiYWJoYS1wcm9maWxlLWFwcC1hcGkiLCJzeXN0ZW0iOiJBQkhBLU4iLCJhY2NvdW50VHlwZSI6InN0YW5kYXJkIiwibW9iaWxlIjoiNzYzOTg5OTQ0OCIsImFiaGFOdW1iZXIiOiI5MS0zNDg1LTM2MzgtNDIzNiIsInByZWZlcnJlZEFiaGFBZGRyZXNzIjoia2hhdmluc2hhbmthckBzYngiLCJ0eXAiOiJUcmFuc2FjdGlvbiIsImV4cCI6MTcyNDMwMjQwNywiaWF0IjoxNzI0MzAwNjA3LCJ0eG5JZCI6ImFmNGU2NmM4LTdhZTMtNGI2NS1hMDhiLWE1NWQ2MGQwMThmYyJ9.SlJvWtKXiakhd5fjh7gp9pjvkbXl29Dmv9K7Ppvf1F0Z5YSDTE_IVujAbopIl8UpW0L2eV7YMnbT6_oMFrakZWjVH2-n7YaPbSsWRggKqp6c9mcNJdp4cYrqibyRW11KqugMMWUoqALrVMWzusEqekZYbY7WNdbZvHY2ZoENWEY8P2qD-TTxgmwxahxFDaiOY1MSg97yweEC2jU8eaBNfBDfczWdrrsta7Ny4H0DbuPNyjoGFnNYuDxQK7R6XtRKqJZenuX6I_A3mkaTLQRlEJK0WJfiIXd2uJ6N6h49AsphxVTg96rZ8CggbQ-S1iSJgRonzUXjyQd1YKG2DOdHzw2PdOfb8fsiKKdFkZHBLhdgeOXi5t-y3RWmfLjXD4HRfPy-qTwX_xoIzr6lneNzm5zhfWiiTe0qAZT9sIDRGWY33MEgqTTo5Y1XThwfMLe86WDcFHjvp8L8Jl5CT3_zgte23UjUr2Tt2SioMfsFULPutVvjrzpFbreKruHeVvZKLGGK16VHrDMVxLLATS1IhT43WEfimizD0Pl5zgQhLEWyV58lUvPmxyR0sJVGOBIty3D_4ULAR-RQUtOz74rO0s6pv9R4ev2x2_SOunLl2SmygNiUnkq2L4iH99LhoBww7qwSK8UFVGIp51UyeQ-SD0rarbGXVxa4sXs47j43CvU", + "type": "default", + "enabled": true + }, + { + "key": "X_REFRESH_TOKEN", + "value": "eyJhbGciOiJSUzUxMiJ9.eyJzdWIiOiI5MS0zNDg1LTM2MzgtNDIzNiIsImNsaWVudElkIjoiYWJoYS1wcm9maWxlLWFwcC1hcGkiLCJzeXN0ZW0iOiJBQkhBLU4iLCJ0eXAiOiJSZWZyZXNoIiwiZXhwIjoxNzI2MjAxMjY4LCJpYXQiOjE3MjQ5MDUyNjh9.N4uXgK8CqI4cvzUkAIOuw8wb1WMsbx4_3hX0x7mdCmODV7NB2rco2ACIXMIe8x3LB2OVO4Vo8SELvs_J__eiGZT3iD0OKtXJriXTYXviL8FtUmyaz0Eymq2DuMPtjp4BhFcqvOFI_fLf9G17wPRN8KC0rOEYCN0rYwVypdCDBahsn9V2MBrfy4UYAnQIeYyEeW56PH75GuhOOsUSljEBGIpwuO319PQfbNNuTdEiIA7aTy1FGv62grJ5T8pthc1VAF50lWo-VNMQVkxP4oVWDtQc34pmlqx23E7hPqiRQGDC_ybsQgThc9tuwqi4JqNWxvQjKO91r3oLmZvdP_v-mYqwXBySZBZyf1hF8vgUFIcLbSMQpKGZppDWdZa2oTownKjvjH9X6osM21cdfWTGM_ybfVxxZ4_YQBecRCAdzFGupBj3M3Mf7gnLta9xg_plNmAQvLcbeQtDHp77YMM1z8pqP9QTiXMKCTFNXgmlAwY4OAiermdRqNZFVf0BqSkTO_xagcjjjgysfUZiHOB1zMxCdYmKKPyVMqwKInI3uYZts4EG8LFWMnK_b8OZEmDCdHuRamLpV-ZqW5TSQFRmpNorE5zc90fZku7TcuyLI2I83OVptAlNfItV8rWsh4OM_G9L2bhD1sJuoiuFOUsa_PpcdDSOED199iPtJwrot98", + "type": "default", + "enabled": true + }, + { + "key": "PATIENT_ID", + "value": "", + "type": "any", + "enabled": true + }, + { + "key": "FACILITY_ID", + "value": "", + "type": "any", + "enabled": true + } + ], + "_postman_variable_scope": "environment", + "_postman_exported_at": "2024-09-10T05:27:37.113Z", + "_postman_exported_using": "Postman/11.11.1" +} \ No newline at end of file From 1135ec35fbb2472d5b843fee68750122bc0b57ac Mon Sep 17 00:00:00 2001 From: Khavin Shankar Date: Tue, 10 Sep 2024 11:08:35 +0530 Subject: [PATCH 3/3] minor spacing adjustment --- docs/care/Others/wasa.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/care/Others/wasa.md b/docs/care/Others/wasa.md index 7cf623b..9fbe301 100644 --- a/docs/care/Others/wasa.md +++ b/docs/care/Others/wasa.md @@ -1,7 +1,7 @@ # ABDM WASA Documentation ## Postman Collection -[ABDM WASA Postman Collection](../../../static/files/ABDM_V3.postman_collection.json) +[ABDM WASA Postman Collection](../../../static/files/ABDM_V3.postman_collection.json) [ABDM WASA Environment](../../../static/files/ABDM_V3.postman_environment.json) ## Pre-requisite @@ -49,7 +49,7 @@ There are two ways to perform this flow: A real Aadhaar number or phone number linked with an ABHA number is required for testing. For the last API, `link_abha_number_and_patient`, you need a patient ID, which can be obtained from `get_patient` or `create_patient` from the Support folder. -## Abha Number +### Abha Number ABHA Number is an entity in CARE that stores the ABHA Profile. The following APIs are available: 1. **get** - Fetch the ABHA Number.