Download OpenAPI specification:Download
API for integrating patient, doctor, and vitals data. Note:hospital_id is used in API requests and maps to an internal organization_id.
https://carescribe-app-api-8to2squd.wl.gateway.dev
All API requests must include the following header:
X-API-Key: AIzaSyC7wLQx3-JDf29hYpTgQb8n9kV5uXyZkVo
WebSocket APIs: See the WebSocket Integration Guide, including the multi-source audio protocol.
Retrieves an organization by its hospital ID.
| hospital_id required | string |
{- "message": "Organization fetched successfully",
- "organization": {
- "hospital_id": "9",
- "name": "General Hospital",
- "type": "Private",
- "state": "California",
- "city": "Medcity",
- "country": "USA",
- "pin_code": "90210",
- "phone_number": "+1122334455",
- "fax_no": "+1122334466",
- "tax_id_no": "TAX-123456789",
- "address1": "789 Health St, Medcity",
- "description": "A leading hospital providing a wide range of medical services.",
- "time_zone": "America/Los_Angeles",
}
}Updates an existing organization.
| hospital_id required | string |
| name required | string |
| type required | string |
| state | string |
| city required | string |
| country required | string |
| pin_code | string |
| phone_number | string |
string | |
| website | string |
| fax_no | string |
| tax_id_no | string |
| address1 | string |
| description | string |
| time_zone | string |
| api_url | string |
{- "hospital_id": "9",
- "name": "General Hospital",
- "type": "Private",
- "state": "California",
- "city": "Medcity",
- "country": "USA",
- "pin_code": "90210",
- "phone_number": "+1122334455",
- "fax_no": "+1122334466",
- "tax_id_no": "TAX-123456789",
- "address1": "789 Health St, Medcity",
- "description": "A leading hospital providing a wide range of medical services.",
- "time_zone": "America/Los_Angeles",
}{- "message": "Organization updated successfully",
- "organization": {
- "hospital_id": "9",
- "name": "General Hospital",
- "type": "Private",
- "state": "California",
- "city": "Medcity",
- "country": "USA",
- "pin_code": "90210",
- "phone_number": "+1122334455",
- "fax_no": "+1122334466",
- "tax_id_no": "TAX-123456789",
- "address1": "789 Health St, Medcity",
- "description": "A leading hospital providing a wide range of medical services.",
- "time_zone": "America/Los_Angeles",
}
}Uploads medication master data for a hospital in JSON format and stores it as a CSV file.
Requirements:
hospital_id and a non-empty medications array are required.BRAND NAME and GENERIC NAME.BRAND ID is optional, but if provided in any item, it must be present in all items.Optional Fields:
UOM CODEUOM DESCRIPTION (if provided, UOM CODE is required).ACTIVE FROM (DD/MM/YYYY)ACTIVE TO (DD/MM/YYYY)MEDICATION TYPEValidation:
BRAND ID values in the request are marked invalid.BRAND NAME and GENERIC NAME combinations are marked invalid.The API stores the valid data as a CSV file and returns the processed file URL along with any invalid rows.
| hospital_id required | string Hospital/organization identifier. |
required | Array of objects non-empty Array of medication objects. Supported fields (case-sensitive as shown in examples):
|
{- "hospital_id": "9",
- "medications": [
- {
- "BRAND ID": "13752",
- "BRAND NAME": "OLVANCE 40MG TAB",
- "GENERIC NAME": "OLMESARTAN MEDOXOMIL 40MG",
- "UOM CODE": "mg",
- "UOM DESCRIPTION": "Milligram",
- "ACTIVE FROM": "01/01/2026",
- "ACTIVE TO": "31/12/2026",
- "MEDICATION TYPE": "Tablet"
}
]
}{- "message": "Medication data uploaded successfully",
- "invalid": [
- {
- "BRAND ID": "13752",
- "BRAND NAME": "MERSILK 5062",
- "GENERIC NAME": "MERSILK",
- "UOM CODE": "",
- "UOM DESCRIPTION": "Milligram",
- "error": "BRAND NAME and GENERIC NAME combination already exists"
}
]
}Accepts patient, doctor, hospital, and vitals data for integration.
| hospital_id required | string |
required | object |
required | object |
required | object |
{- "hospital_id": "HOS789",
- "doctor": {
- "practitioner_id": "PRACT789"
}, - "patient": {
- "patient_id": "PAT123",
- "name": "John Doe",
- "age": 30,
- "gender": "Male",
- "language": "English",
- "past_history": [
- {
- "condition": "Hypertension",
- "diagnosed_on": "2023-01-15",
- "status": "Active"
}
], - "family_history": [
- {
- "relation": "Father",
- "condition": "Diabetes"
}
]
}, - "vitals": {
- "height_cm": 170,
- "weight_kg": 70,
- "bmi": 24.2,
- "chest_circumference": null,
- "head_circumference": null,
- "blood_pressure": "120/80",
- "pulse_rate": 72,
- "respiratory_rate": 16,
- "temperature_celsius": 36.6,
- "oxygen_saturation": 98,
- "glucose_mg_dl": 90,
- "spo2": 98,
- "ecg_status": "Normal",
- "abnormal_conditions": [
- {
- "condition": "Arrhythmia",
- "severity": "Mild",
- "note": "Observed during routine checkup"
}
]
}
}{- "message": "New patient created successfully. Vitals uploaded.",
}Creates a new patient record.
| hospital_id required | string |
| practitioner_id required | string |
| speciality_id | string |
| patient_id required | string |
| first_name required | string |
| last_name required | string |
| date_of_birth required | string <date> |
| phone_number | string |
| age | integer |
| gender required | string |
| interaction_status | integer |
| interaction_date | string |
| token_number | string |
| address1 | string |
{- "hospital_id": "ORG123",
- "practitioner_id": "DOC456",
- "speciality_id": "SPEC789",
- "patient_id": "HOSPAT001",
- "first_name": "Jane",
- "last_name": "Doe",
- "date_of_birth": "1990-05-20",
- "phone_number": "+1987654321",
- "age": 34,
- "gender": "Female",
- "interaction_status": 1,
- "interaction_date": "2024-07-29",
- "token_number": "TKN456",
- "address1": "456 Oak Ave, Othertown, USA"
}{- "message": "Patient created successfully",
- "patient": {
- "hospital_id": "ORG123",
- "practitioner_id": "DOC456",
- "speciality_id": "SPEC789",
- "patient_id": "HOSPAT001",
- "first_name": "Jane",
- "last_name": "Doe",
- "date_of_birth": "1990-05-20",
- "phone_number": "+1987654321",
- "age": 34,
- "gender": "Female",
- "interaction_status": 1,
- "interaction_date": "2024-07-29",
- "token_number": "TKN456",
- "address1": "456 Oak Ave, Othertown, USA"
}
}Creates a doctor record and associates it with an organization.
Doctor creation payload
| first_name required | string |
| last_name required | string |
| speciality_id required | integer |
| salutation | string |
| hospital_id required | integer |
| license_no | string |
| phone_number | string |
string | |
| practitioner_id required | string |
{- "first_name": "John",
- "last_name": "Doe",
- "speciality_id": 5,
- "salutation": "Dr.",
- "hospital_id": 101,
- "license_no": "ABC12345",
- "phone_number": "+91-9876543210",
- "practitioner_id": "PRAC-001"
}{- "message": "Doctor created successfully",
- "doctor": {
- "doctor_id": 1,
- "first_name": "John",
- "last_name": "Doe",
- "speciality_id": 5,
- "salutation": "Dr.",
- "organization_id": 101,
- "active_organization_id": 101,
- "license_no": "ABC12345",
- "phone_number": "+91-9876543210",
- "practitioner_id": "PRAC-001",
- "opdassessment": {
- "chief_complaints": true,
- "history_of_presenting_illness": true,
- "patient_history": true,
- "personal_history": true,
- "examination_findings": true,
- "investigations": true,
- "recommendations": true,
- "medications": true,
- "follow_up": true,
- "plan": true
}, - "opdsheet": {
- "sign": true,
- "vital": true,
- "summary": false,
- "medicine": true,
- "diagnosis": true,
- "drawImage": true,
- "assessment": true,
- "investigation": true,
- "datasheetimage": true
}, - "stream": true,
- "debug_mode": false,
- "advanced_settings": {
- "brand": true,
- "generic": true,
- "TNMCRegNo": true,
- "genericFront": true,
- "FrequencyEvng": false,
- "preferredLang": "English",
- "prioritize_accuracy": true
}
}
}Updates a doctor's profile and organization details using practitioner_id and hospital_id.
Doctor update payload
| practitioner_id required | string |
| hospital_id required | integer |
| first_name | string |
| last_name | string |
| speciality_id | integer |
| salutation | string |
| license_no | string |
| phone_number | string |
string |
{- "practitioner_id": "PRAC-001",
- "hospital_id": 101,
- "first_name": "John",
- "last_name": "Doe",
- "speciality_id": 5,
- "salutation": "Dr.",
- "license_no": "ABC12345",
- "phone_number": "+91-9876543210",
- "email": "[email protected]"
}{- "message": "Doctor updated successfully",
- "doctor": {
- "doctor_id": 1,
- "organization_id": 101,
- "speciality_id": 5,
- "salutation": "Dr.",
- "first_name": "John",
- "last_name": "Doe",
- "license_no": "ABC12345",
- "phone_number": "+91-9876543210",
- "opdassessment": { },
- "opdsheet": { },
- "advanced_settings": { },
- "stream": true,
- "debug_mode": false,
- "active_organization_id": 101
}
}Fetches a doctor's details using practitioner_id.
| practitioner_id required | string The practitioner's unique identifier.(example) PRAC-001 |
| hospital_id required | string Hospital identifier that scopes the doctor data. |
{- "message": "Doctor fetched successfully",
- "doctor": {
- "doctor_id": 1,
- "organization_id": 101,
- "speciality_id": 5,
- "salutation": "Dr.",
- "first_name": "John",
- "last_name": "Doe",
- "license_no": "ABC12345",
- "phone_number": "+91-9876543210",
- "opdassessment": { },
- "opdsheet": { },
- "advanced_settings": { },
- "stream": true,
- "debug_mode": false,
- "active_organization_id": 101
}
}Updates a doctor's opdassessment, opdsheet, and advanced_settings based on provided practitioner_id.
Doctor settings update payload
| practitioner_id required | string |
| hospital_id required | string Hospital identifier to scope the settings update. |
| plan | boolean |
| follow_up | boolean |
| investigations | boolean |
| patient_history | boolean |
| recommendations | boolean |
| chief_complaints | boolean |
| personal_history | boolean |
| examination_findings | boolean |
| history_of_presenting_illness | boolean |
| vital | boolean |
| medicine | boolean |
| diagnosis | boolean |
| assessment | boolean |
| investigation | boolean |
| brand | boolean |
| generic | boolean |
| TNMCRegNo | boolean |
| genericFront | boolean |
| FrequencyEvng | boolean |
| preferredLang | string |
| prioritize_accuracy | boolean |
| counsellingMode | boolean |
{- "practitioner_id": "PRAC-001",
- "hospital_id": "9",
- "plan": true,
- "follow_up": false,
- "investigations": true,
- "patient_history": false,
- "recommendations": true,
- "chief_complaints": true,
- "personal_history": false,
- "examination_findings": true,
- "history_of_presenting_illness": false,
- "vital": true,
- "medicine": false,
- "diagnosis": true,
- "assessment": false,
- "investigation": true,
- "brand": true,
- "generic": false,
- "TNMCRegNo": true,
- "genericFront": false,
- "FrequencyEvng": true,
- "preferredLang": "English",
- "prioritize_accuracy": true,
- "counsellingMode": true
}{- "message": "Doctor settings updated successfully",
- "doctor": {
- "doctor_id": 1,
- "practitioner_id": "PRAC-001",
- "opdassessment": {
- "plan": true,
- "follow_up": false,
- "investigations": true,
- "patient_history": false,
- "recommendations": true,
- "chief_complaints": true,
- "personal_history": false,
- "examination_findings": true,
- "history_of_presenting_illness": false
}, - "opdsheet": {
- "sign": false,
- "vital": true,
- "summary": false,
- "medicine": false,
- "diagnosis": true,
- "drawImage": false,
- "assessment": false,
- "investigation": true,
- "datasheetimage": false
}, - "advanced_settings": {
- "brand": true,
- "generic": false,
- "TNMCRegNo": true,
- "genericFront": false,
- "FrequencyEvng": true,
- "preferredLang": "English",
- "prioritize_accuracy": true
}
}
}Fetches a patient's record using their hospital-specific ID and organization ID.
| patient_id required | string |
| hospital_id required | string |
{- "message": "Patient fetch Successful",
- "patient": {
- "hospital_id": "ORG123",
- "practitioner_id": "DOC456",
- "speciality_id": "SPEC789",
- "patient_id": "HOSPAT001",
- "first_name": "Jane",
- "last_name": "Doe",
- "date_of_birth": "1990-05-20",
- "phone_number": "+1987654321",
- "age": 34,
- "gender": "Female",
- "interaction_status": 1,
- "interaction_date": "2024-07-29",
- "token_number": "TKN456",
- "address1": "456 Oak Ave, Othertown, USA"
}
}Retrieves patient details, including inpatient status, by their primary ID.
| id required | string |
{- "message": "Patient fetched successfully",
- "patient": {
- "hospital_id": "ORG123",
- "practitioner_id": "DOC456",
- "speciality_id": "SPEC789",
- "patient_id": "HOSPAT001",
- "first_name": "Jane",
- "last_name": "Doe",
- "date_of_birth": "1990-05-20",
- "phone_number": "+1987654321",
- "age": 34,
- "gender": "Female",
- "interaction_status": 1,
- "interaction_date": "2024-07-29",
- "token_number": "TKN456",
- "address1": "456 Oak Ave, Othertown, USA"
}
}Retrieves all vital sign details for a specific patient.
| patient_id required | string |
| hospital_id required | string ID of the hospital where the patient is registered |
{- "patient": {
- "hospital_id": "ORG123",
- "practitioner_id": "DOC456",
- "speciality_id": "SPEC789",
- "patient_id": "HOSPAT001",
- "first_name": "Jane",
- "last_name": "Doe",
- "date_of_birth": "1990-05-20",
- "phone_number": "+1987654321",
- "age": 34,
- "gender": "Female",
- "interaction_status": 1,
- "interaction_date": "2024-07-29",
- "token_number": "TKN456",
- "address1": "456 Oak Ave, Othertown, USA"
}, - "Interactions": [
- {
- "InteractionDetails": [
- {
- "patient_id": "e53aed9a",
- "first_name": "ragul",
- "last_name": "raj",
- "date_of_birth": "20-08-2003",
- "gender": "M",
- "age": 21,
- "hospital_id": "9",
- "interaction_date": "2024-01-02T10:00:00Z",
- "vitalsData": {
- "temperature": 98.6,
- "bloodPressure": "120/80",
- "pulse": 72,
- "respiratoryRate": 16,
- "oxygenSaturation": 98,
- "weight": 150,
- "height": "5'10\"",
- "otherVital": "Some other Measurement"
}
}
]
}
]
}Retrieves the OPD form configuration and related organization data for a given hospital ID.
The API returns base64-encoded images (left and right), processed URLs for medication and investigation data,
and other key organization settings like inpatient setup, lab model, and upload configurations.
| hospital_id required | string Example: hospital_id=9 Unique hospital identifier (maps to organization) |
{- "message": "Organization data fetched successfully",
- "data": {
- "organization_id": "ORG12345",
- "hospital_id": "9",
- "name": "City Health Clinic",
- "time_zone": "Asia/Kolkata",
- "country": "India",
- "inpatient_setup": true,
- "floor_variable": "Ward",
- "labmodel": "Standard",
- "opd_order": "token",
- "token_by_doctor": false,
- "upload_files": true,
- "leftBase64": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA...",
- "rightBase64": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA...",
- "med_url": "gs://bucket/medications.csv",
- "investigation_data": "gs://bucket/investigations.csv",
}
}This endpoint uploads edited OPD (Outpatient Department) interaction data, stores it in cloud storage,
and triggers ingestion for updated patient records.
It handles both new and previously edited OPD interactions.
If no previous edited OPD record exists, it falls back to using the last audio interaction.
| interaction_id required | string |
required | object Edited OPD fields for the interaction |
| hospital_id required | string Hospital identifier for scoping the edited OPD ingestion. |
{- "interaction_id": "82706",
- "data": {
- "patient_name": "John Doe",
- "age": "35",
- "chief_complaint": "Headache",
- "diagnosis": "Tension headache",
- "treatment": "Paracetamol 500mg",
- "follow_up": "Return if symptoms persist or no",
- "history_of_presenting_illness": "History of Presenting Illness",
- "personal_history": "Patient reports headache for 2 days",
- "examination_findings": "Normal vital signs",
- "plan": "Plan",
- "investigations": "Investigations",
- "patient_history": "Past Medical History",
- "recommendations": "Recommendations",
- "Diet": "Diet"
}, - "hospital_id": "9"
}{- "status": true,
- "message": "Edited opd interaction details created and ingested successfully",
- "interaction_id": "82706",
- "uploadedUrls": "gs://carescribe-editedOpd/82706_9e8c9b.txt",
- "pdfingestIntraction": { }
}Updates the OPD form configuration for a hospital, including optional image uploads for left and right logos via multipart/form-data.
| hospital_id required | string The ID of the hospital example "ORG123" |
| unit | string Unit name for the OPD form |
| footer | string Footer text for the OPD form |
| contact | string Contact information for the OPD form |
| marginTop | string Top margin for the OPD form example, "40" |
| marginLeft | string Left margin for the OPD form example, "71" |
| marginRight | string Right margin for the OPD form example. "40" |
| show_footer | string Whether to show the footer example "false" |
| show_header | string Whether to show the header example, "false" |
| marginBottom | string Bottom margin for the OPD form example, "40" |
| hospital_name | string Name of the hospital |
| outpatient_title | string Title for the outpatient form |
| patientDetailsshow | string Whether to show patient details example, "true" |
| left_image | string <binary> Left logo image file for the OPD form |
| right_image | string <binary> Right logo image file for the OPD form |
{- "message": "OPD form updated successfully",
- "opdform": {
- "unit": "",
- "footer": "",
- "contact": "",
- "marginTop": "40",
- "marginLeft": "71",
- "marginRight": "40",
- "show_footer": "false",
- "show_header": "false",
- "marginBottom": "40",
- "hospital_name": "",
- "outpatient_title": "",
- "patientDetailsshow": "true",
- "left_image_url": "",
- "right_image_url": ""
}
}Sends chatbot interaction data for a hospital session to the CareScribe Simmer API. This endpoint forwards the request to the upstream chatbot engine and returns its response. Accepts a dynamic payload containing user, patient, and session context.
| key required | string API authentication key |
| hospital_id required | string Unique identifier of the hospital. |
| practitioner_id required | string Practitioner identifier used to resolve the doctor in the hospital. |
| session_id required | string Unique chatbot session identifier. |
Chatbot interaction payload.
| user_id | string |
| user_country | string |
| question_text | string |
| patient_id | string |
| interaction_id | string |
| stored_signal | boolean |
| assessment | boolean |
| doctor_id | string |
| nurse_id | string |
| inpatient_id | string |
| patient_type | string |
| opd_question | string |
| specialty_name | string |
| gender | string |
| med_url | string |
| time_zone | string |
| preferred_language | string |
{- "user_id": "9",
- "user_country": "India",
- "question_text": "Generate an outpatient datasheet based on Diagnosis",
- "patient_id": "GEN9-202511-00091",
- "interaction_id": "85695",
- "stored_signal": true,
- "assessment": true,
- "doctor_id": "186",
- "nurse_id": null,
- "inpatient_id": null,
- "patient_type": "opd",
- "opd_question": "gs://medscribe-dev/doctor_186_20250422_104249.json",
- "specialty_name": "GENERAL MEDICINE",
- "gender": null,
- "med_url": "gs://testcase-audio/csv_uploads/9_2025_11_06_07_39_26_filtered.csv",
- "time_zone": "Asia/Kolkata",
- "preferred_language": "Patient Language"
}{- "reply": "Generated outpatient datasheet based on Diagnosis",
- "status": "success"
}Creates a new patient record if not found or adds an interaction if the patient exists.
| organization_id required | integer |
| speciality_id required | integer |
| patient_id required | string |
| date_of_birth | string <date> |
| phone_number | string |
| age | integer |
| gender | string Enum: "M" "F" "O" |
| interaction_date required | string <date-time> |
| token_number required | string |
| address1 | string |
| first_name | string |
| last_name | string |
| hospital_id | string |
{- "organization_id": 101,
- "speciality_id": 5,
- "patient_id": "HOSP-123",
- "date_of_birth": "1985-06-15",
- "phone_number": "919876543210",
- "age": 40,
- "gender": "Male",
- "interaction_date": "2025-08-13T09:30:00Z",
- "token_number": "T-101",
- "address1": "123, Main Street, City",
- "first_name": "John",
- "last_name": "Doe",
- "hospital_id": "9"
}{- "message": "New patient and interaction created successfully.",
- "patient": {
- "patient_id": "ABC101-202508-00001",
- "organization_id": 101,
- "hospital_patient_id": "HOSP-123",
- "first_name": "John",
- "last_name": "Doe",
- "date_of_birth": "1985-06-15",
- "phone_number": "+91-9876543210",
- "age": 40,
- "gender": "Male",
- "address1": "123, Main Street, City",
- "patient_category": "Outpatient"
}, - "interactions": {
- "patient_id": "ABC101-202508-00001",
- "doctor_id": "",
- "speciality_id": 5,
- "interaction_status": "99",
- "interaction_date": "2025-08-13T09:30:00Z",
- "organization_id": 101,
- "token_number": "T-101"
}
}Searches for patients by name, phone number, or patient ID within an organization.
| hospital_id required | string |
| query required | string |
[- {
- "patient_id": "HOSPAT001",
- "doctor_id": "",
- "interaction_id": "",
- "interaction_status": "",
- "token_number": "",
- "Patient": {
- "hospital_id": "ORG123",
- "practitioner_id": "DOC456",
- "speciality_id": "SPEC789",
- "patient_id": "HOSPAT001",
- "first_name": "Jane",
- "last_name": "Doe",
- "date_of_birth": "1990-05-20",
- "phone_number": "+1987654321",
- "age": 34,
- "gender": "Female",
- "interaction_status": 1,
- "interaction_date": "2024-07-29",
- "token_number": "TKN456",
- "address1": "456 Oak Ave, Othertown, USA"
}
}
]Creates a new speciality.
| specialty_name required | string |
| description | string |
| short_prompt_id | integer |
| long_prompt_id | integer |
{- "specialty_name": "Cardiology",
- "description": "Specializes in diagnosing and treating heart conditions.",
- "short_prompt_id": 1,
- "long_prompt_id": 1
}{- "message": "Speciality created successfully",
- "speciality": {
- "specialty_name": "Cardiology",
- "description": "Specializes in diagnosing and treating heart conditions.",
- "short_prompt_id": 1,
- "long_prompt_id": 1
}
}Retrieves a single speciality by its ID.
| id required | integer |
{- "message": "Speciality retrieved successfully",
- "speciality": {
- "specialty_name": "Cardiology",
- "description": "Specializes in diagnosing and treating heart conditions.",
- "short_prompt_id": 1,
- "long_prompt_id": 1
}
}Updates an existing speciality.
| id required | integer |
| specialty_name required | string |
| description | string |
| short_prompt_id | integer |
| long_prompt_id | integer |
{- "specialty_name": "Cardiology",
- "description": "Specializes in diagnosing and treating heart conditions.",
- "short_prompt_id": 1,
- "long_prompt_id": 1
}{- "message": "Speciality updated successfully",
- "speciality": {
- "specialty_name": "Cardiology",
- "description": "Specializes in diagnosing and treating heart conditions.",
- "short_prompt_id": 1,
- "long_prompt_id": 1
}
}Creates a new assessment template for a given practitioner.
Assessment template creation details
| practitioner_id required | string |
| assessment_template required | string |
| template_tests required | string |
| hospital_id required | string Hospital identifier for the assessment template. |
{- "practitioner_id": "PRAC-123",
- "assessment_template": "General Health Checkup",
- "template_tests": "Blood Test, X-Ray",
- "hospital_id": "9"
}{- "message": "Assessment template created successfully",
- "assessment": {
- "assessment_id": "ASMT-12345",
- "doctor_id": "DOC-001",
- "organization_id": "ORG-001",
- "assessment_template": "General Health Checkup",
- "template_tests": "Blood Test, ECG",
- "createdAt": "2025-08-13T10:15:30Z",
- "updatedAt": "2025-08-13T10:15:30Z"
}
}| practitioner_id required | string |
| hospital_id required | string Hospital identifier to scope the assessment list. |
| assessment_template required | string |
{- "exists": true,
- "message": "The template name already exists."
}Retrieves all assessment templates for a given practitioner.
| practitioner_id required | string |
{- "status": "success",
- "assessments": [
- {
- "assessment_id": 101,
- "assessment_template": "General Physical Exam",
- "template_tests": "BP, SPO2, BMI"
}
]
}Updates an existing assessment by assessment_id for a given practitioner.
Assessment update details
| assessment_id required | string |
| practitioner_id required | string |
| assessment_template | string |
| template_tests | string |
| hospital_id required | string Hospital identifier for scoping the assessment update. |
{- "assessment_id": "ASMT-12345",
- "practitioner_id": "PRAC-123",
- "assessment_template": "General Health Checkup",
- "template_tests": "Blood Test, X-Ray",
- "hospital_id": "9"
}{- "assessment": {
- "assessment_id": "ASMT-12345",
- "practitioner_id": "PRAC-123",
- "assessment_template": "General Health Checkup",
- "template_tests": "Blood Test, ECG",
- "updatedAt": "2025-08-13T10:15:30Z",
- "createdAt": "2025-08-01T08:45:00Z"
}
}Delete an existing assessment by assessment_id for a given practitioner.
| assessment_id required | integer |
| practitioner_id required | string |
| hospital_id required | string Hospital identifier associated with the assessment. |
{- "message": "Assessment deleted successfully.",
- "assessment": 101
}Creates a new medication template for a given practitioner.
| template_name required | string |
| practitioner_id required | string |
| hospital_id required | string Unique identifier for the hospital/organization. |
{- "template_name": "Hypertension A",
- "practitioner_id": "PRAC-123",
- "hospital_id": "9"
}{- "message": "Medication template created successfully.",
- "data": {
- "template_id": 9001,
- "organization_id": "ORG-001",
- "template_name": "Hypertension A",
- "doctor_id": 55
}
}Update medication template for a given practitioner template_id.
| template_id required | integer |
| template_name required | string |
| practitioner_id required | string |
| hospital_id required | string Unique identifier for the hospital/organization. |
{- "template_id": 9001,
- "template_name": "Hypertension A (v2)",
- "practitioner_id": "PRAC-123",
- "hospital_id": "9"
}{- "message": "Medication template updated successfully.",
- "data": {
- "template_id": 9001,
- "organization_id": "ORG-001",
- "template_name": "Hypertension A (v2)",
- "doctor_id": 55
}
}List medication templates by practitioner
| practitioner_id required | string |
{- "data": [
- {
- "template_id": 9001,
- "organization_id": "ORG-001",
- "template_name": "Hypertension A",
- "doctor_id": 55
}
]
}Get medication template by ID & practitioner_id
| template_id required | integer |
| practitioner_id required | string |
| hospital_id required | string Hospital identifier for template scoping. |
{- "data": {
- "template_id": 9001,
- "organization_id": "ORG-001",
- "template_name": "Hypertension A",
- "doctor_id": 55
}
}Create a new medication entry for a template. Required fields: medication_name, route, practitioner_id, template_id, hospital_id Conditional required fields: frequency_morning, frequency_afternoon, frequency_night are required only when is_sos, is_stat, and is_once_only are all false. When any of is_sos, is_stat, or is_once_only is true, frequency fields are optional and will default to "0" if not provided.
| template_id required | string Template ID for the medication |
| medication_name required | string Name of the medication |
| generic_name | string Generic name of the medication |
| brand_name | string Brand name of the medication |
| medication_type | string Type of medication (e.g., Tablet, Syrup) |
| dosage | string Dosage of the medication |
| brand_id | string Brand ID |
| frequency_morning | integer Frequency in the morning (required when not is_sos/is_stat/is_once_only) |
| frequency_afternoon | integer Frequency in the afternoon (required when not is_sos/is_stat/is_once_only) |
| frequency_evening | integer Frequency in the evening |
| frequency_night | integer Frequency at night (required when not is_sos/is_stat/is_once_only) |
| route required | string Route of administration |
| frequency_code | string Frequency code (e.g., BD1) |
| frequency_description | string Description of frequency |
| route_code | string Route code |
| route_description | string Description of route |
| uom_code | string Unit of measure code |
| uom_description | string Unit of measure description |
| is_sos | boolean Default: false Whether medication is SOS (as needed) |
| is_stat | boolean Default: false Whether medication is STAT (immediate) |
| is_once_only | boolean Default: false Whether medication is once only |
| duration | string Duration of medication course |
| instructions | string Additional instructions for medication |
| practitioner_id required | string Practitioner/Doctor ID |
| hospital_id required | string Hospital identifier for scoping the medication |
{- "template_id": "150",
- "medication_name": "Paracetamol (Crocin)",
- "generic_name": "Paracetamol",
- "brand_name": "Crocin",
- "medication_type": "Tablet",
- "dosage": "500 mg",
- "brand_id": "1",
- "frequency_morning": 1,
- "frequency_afternoon": 0,
- "frequency_evening": 0,
- "frequency_night": 0,
- "route": "Oral",
- "frequency_code": "BD1",
- "frequency_description": "Twice daily",
- "route_code": "24",
- "route_description": "Oral",
- "uom_code": "mg",
- "uom_description": "Milligram",
- "is_sos": true,
- "is_stat": true,
- "is_once_only": true,
- "duration": "7 days",
- "instructions": "Take after food",
- "practitioner_id": "0123",
- "hospital_id": "9"
}{- "message": "Medication successfully created",
- "data": {
- "template_id": "150",
- "medication_name": "Paracetamol (Crocin)",
- "generic_name": "Paracetamol",
- "brand_name": "Crocin",
- "medication_type": "Tablet",
- "dosage": "500 mg",
- "frequency_morning": "1",
- "frequency_afternoon": "0",
- "frequency_evening": "0",
- "frequency_night": "0",
- "route": "Oral"
}
}Update medication by medication_id. All fields are optional except medication_id and hospital_id. When is_sos, is_stat, or is_once_only is true, frequency fields will be set to "0" automatically. Only fields provided in the request will be updated; others will retain their existing values.
| medication_id required | integer ID of the medication to update |
| hospital_id required | string Hospital identifier to ensure the medication belongs to the right organization |
| practitioner_id | string Practitioner/Doctor ID (used for permission validation) |
| template_id | integer Template ID |
| medication_name | string Name of the medication |
| generic_name | string Generic name of the medication |
| brand_name | string Brand name of the medication |
| medication_type | string Type of medication (e.g., Tablet, Syrup) |
| dosage | string Dosage of the medication |
| brand_id | string Brand ID |
| frequency_morning | integer Frequency in the morning (set to 0 if is_sos/is_stat/is_once_only is true) |
| frequency_afternoon | integer Frequency in the afternoon (set to 0 if is_sos/is_stat/is_once_only is true) |
| frequency_evening | integer Frequency in the evening (set to 0 if is_sos/is_stat/is_once_only is true) |
| frequency_night | integer Frequency at night (set to 0 if is_sos/is_stat/is_once_only is true) |
| route | string Route of administration |
| frequency_code | string Frequency code (e.g., BD1) |
| frequency_description | string Description of frequency |
| route_code | string Route code |
| route_description | string Description of route |
| uom_code | string Unit of measure code |
| uom_description | string Unit of measure description |
| is_sos | boolean Whether medication is SOS (as needed) |
| is_stat | boolean Whether medication is STAT (immediate) |
| is_once_only | boolean Whether medication is once only |
| duration | string Duration of medication course |
| instructions | string Additional instructions for medication |
{- "medication_id": 438,
- "hospital_id": "9",
- "practitioner_id": "0123",
- "template_id": 150,
- "medication_name": "Paracetamol (Crocin)",
- "generic_name": "Paracetamol",
- "brand_name": "Crocin",
- "medication_type": "Tablet",
- "dosage": "650 mg",
- "brand_id": "1",
- "frequency_morning": 1,
- "frequency_afternoon": 0,
- "frequency_evening": 1,
- "frequency_night": 0,
- "route": "Oral",
- "frequency_code": "BD1",
- "frequency_description": "Twice daily",
- "route_code": "24",
- "route_description": "Oral",
- "uom_code": "mg",
- "uom_description": "Milligram",
- "is_sos": false,
- "is_stat": false,
- "is_once_only": false,
- "duration": "5 days",
- "instructions": "Take after food"
}{- "message": "Medication successfully updated",
- "data": {
- "medication_id": 438,
- "template_id": 150,
- "medication_name": "Paracetamol (Crocin)",
- "generic_name": "Paracetamol",
- "brand_name": "Crocin",
- "medication_type": "Tablet",
- "dosage": "650 mg",
- "frequency_morning": "1",
- "frequency_afternoon": "0",
- "frequency_evening": "1",
- "frequency_night": "0",
- "route": "Oral",
- "frequency_code": "BD1",
- "frequency_description": "Twice daily",
- "route_code": "24",
- "route_description": "Oral",
- "uom_code": "mg",
- "uom_description": "Milligram",
- "duration": "5 days",
- "instructions": "Take after food"
}
}Delete medication template by ID & practitioner_id
| medication_id required | integer |
| practitioner_id required | string |
| hospital_id required | string Hospital identifier to scope the deletion. |
{- "message": "Medication successfully deleted"
}Uploads a medication master CSV for a hospital and replaces the existing stored file (if any). The API validates the CSV, stores only valid rows, and returns the processed file URL.
Supported CSV headers (normalized case-insensitively and kept in this order):
BRAND NAME, GENERIC NAMEBRAND ID, BRAND NAME, GENERIC NAMEBRAND NAME, GENERIC NAME, UOM CODE, UOM DESCRIPTIONBRAND ID, BRAND NAME, GENERIC NAME, UOM CODE, UOM DESCRIPTIONACTIVE FROM, ACTIVE TO, and MEDICATION TYPE columns in that order.Validation rules:
BRAND NAME and GENERIC NAME are required.BRAND ID is required only if the header contains BRAND ID.UOM CODE and UOM DESCRIPTION are optional.UOM DESCRIPTION is provided, UOM CODE must also be provided.ACTIVE FROM and ACTIVE TO, when present, must use DD/MM/YYYY.BRAND ID values are rejected.BRAND NAME + GENERIC NAME combinations are rejected., or . are rejected.Invalid rows are returned in the invalid field of the response.
| hospital_id required | string Hospital/organization identifier. |
| csvFile required | string <binary> Medication CSV file to upload. |
{- "message": "CSV uploaded and saved",
- "invalid": [ ]
}Uploads a medication CSV for the given hospital_id and merges it with the existing medication CSV stored in Google Cloud Storage (GCS).
CSV headers (normalized case-insensitively and kept in this order):
BRAND NAME, GENERIC NAMEBRAND ID, BRAND NAME, GENERIC NAMEBRAND NAME, GENERIC NAME, UOM CODE, UOM DESCRIPTIONBRAND ID, BRAND NAME, GENERIC NAME, UOM CODE, UOM DESCRIPTIONACTIVE FROM, ACTIVE TO, and MEDICATION TYPE columns in that order.Validation rules (applies to both existing CSV and uploaded CSV):
BRAND NAME and GENERIC NAME are required in every row., or . are rejected.BRAND ID values (when BRAND ID exists) are rejected.BRAND NAME + GENERIC NAME combinations are rejected.UOM DESCRIPTION is provided, UOM CODE is required.ACTIVE FROM and ACTIVE TO, when present, must use DD/MM/YYYY.Header mismatch between existing and new CSV.Merge behavior:
BRAND ID, the merge key is BRAND ID.BRAND NAME + GENERIC NAME.| hospital_id required | string Hospital identifier for the organization. |
| csvFile required | string <binary> Medication CSV file to upload (must end with |
{- "message": "Medication data updated successfully (merged, duplicates removed)",
- "invalid": [ ]
}Deletes the medication CSV associated with hospital_id and clears its organization reference. The operation is idempotent and returns 200 even when no file is currently stored.
| hospital_id required | string The ID of the hospital associated with the organization. |
{- "message": "Medication CSV removed successfully"
}Updates the medication master data for a hospital by merging the given JSON medications with the existing stored CSV.
hospital_id and non-empty medications are required.BRAND NAME and GENERIC NAME.BRAND ID is optional, but if used in any item, it must be present in all items.UOM CODE and UOM DESCRIPTION are optional (if UOM DESCRIPTION is provided, UOM CODE is required).ACTIVE FROM, ACTIVE TO, and MEDICATION TYPE are optional; dates use DD/MM/YYYY.medications, rows, data, or items; hospital_id may be supplied in query or body.| hospital_id required | string Hospital/organization identifier. |
required | Array of objects non-empty Array of medication objects to merge into existing data. |
{- "hospital_id": "9",
- "medications": [
- {
- "BRAND ID": "13752",
- "BRAND NAME": "OLVANCE 40MG TAB",
- "GENERIC NAME": "OLMESARTAN MEDOXOMIL 40MG",
- "UOM CODE": "mg",
- "UOM DESCRIPTION": "Milligram",
- "ACTIVE FROM": "01/01/2026",
- "ACTIVE TO": "31/12/2026",
- "MEDICATION TYPE": "Tablet"
}
]
}{- "message": "Medication data updated successfully (merged, duplicates removed)",
- "url": "gs://bucket/csv_uploads/organization_20260916120000.csv",
- "invalid": [ ]
}Get medications by template
| template_id required | integer |
| practitioner_id required | string |
| hospital_id required | string Hospital identifier to scope the template medications. |
{- "data": [
- {
- "medication_id": 7001,
- "medication_name": "Amlodipine",
- "dosage": "5 mg",
- "frequency_morning": 1,
- "frequency_afternoon": 0,
- "frequency_evening": 1,
- "frequency_night": 0,
- "route": "Oral",
- "duration": "30 days",
- "instructions": "Take after breakfast"
}
]
}Get medication by ID
| medication_id required | integer |
| practitioner_id required | string |
| hospital_id required | string Hospital identifier to scope the medication. |
{- "message": "Medication",
- "data": {
- "medication_id": 7001,
- "medication_name": "Amlodipine",
- "dosage": "5 mg",
- "frequency_morning": 1,
- "frequency_afternoon": 0,
- "frequency_evening": 1,
- "frequency_night": 0,
- "route": "Oral",
- "duration": "30 days",
- "instructions": "Take after breakfast"
}
}Authenticates an organization user (e.g., doctor, admin, or staff) based on username and password. Supports MFA verification, multiple organization access, and trusted device recognition. Returns a JWT token upon successful authentication.
| username required | string |
| password_hash required | string |
{- "username": "dr.lakshmi",
- "password_hash": "lakshmi"
}{- "message": "Organization Login successful",
- "status": true,
- "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
- "role": "doctor",
- "activeRole": true,
- "time_zone": "Asia/Kolkata",
- "country": "India",
- "salutation": "Dr.",
- "user_apikey": "AIzaSyBzkIUgnM8mUdHyaBb-DCgCWiX1eX6X"
}Retrieves paginated interaction data for a patient. Includes all interactions with valid statuses (1, 0, "", 3, 4, 5, 2), and falls back to 99 if none found. Each interaction includes its related interaction details, and attachments (audio/drawing) are processed.
| patient_id required | string Unique ID of the patient. |
| page | integer Default: 1 Page number for pagination (default as 1). |
| limit | integer Default: 10 Number of interactions per page (default as 10). |
{- "patient_id": "PAT-001122",
- "first_name": "Ragul",
- "last_name": "Raj",
- "date_of_birth": "2004-02-15",
- "Interactions": [
- {
- "interaction_id": "INT-000123",
- "doctor_id": "DOC-45",
- "interaction_status": "1",
- "updated_at": "2025-10-13T15:30:00Z",
- "InteractionDetails": [
- {
- "interaction_detail_id": "DET-8765",
- "interaction_detail_type": "Audio Notes",
- "processedFileContent": "Transcribed text or base64 data",
- "processedFileContentImage": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUg..."
}
]
}
], - "totalPages": 5,
- "currentPage": 2
}Retrieves a list of appointments (interactions) for a specific doctor within an optional date range.
| practitioner_id required | string Example: practitioner_id=PRAC-001 Public practitioner identifier used to resolve the doctor. |
| hospital_id required | string Example: hospital_id=9 Hospital identifier to scope the appointments. |
| start_date | string <date> Example: start_date=2025-10-01 Filter appointments starting from this date (inclusive). |
| end_date | string <date> Example: end_date=2025-10-08 Filter appointments up to this date (inclusive). |
{- "count": 3,
- "appointments": [
- {
- "interaction_id": 9876,
- "patient_id": "SUNRISE101-202510-00001",
- "doctor_id": 101,
- "interaction_date": "2025-10-07T10:30:00Z",
- "interaction_status": "99"
}
]
}Creates a new organization record along with an associated admin user account. Validates required fields and ensures unique hospital_id.
| name required | string |
| type | string |
| state | string |
| city | string |
| country required | string |
| pin_code | string |
| phone_number | string |
string | |
| website | string |
| fax_no | string |
| tax_id_no | string |
| address1 | string |
| description | string |
| role | string |
| first_name | string |
| last_name | string |
| username | string |
| adminemail | string |
| password_hash | string |
| time_zone required | string |
| hospital_id required | string |
| api_url required | string |
{- "name": "Sunrise Hospital",
- "type": "hospital",
- "state": "California",
- "city": "Los Angeles",
- "country": "USA",
- "pin_code": "90001",
- "phone_number": "+1-310-555-1234",
- "fax_no": "+1-310-555-5678",
- "tax_id_no": "TAX123456789",
- "address1": "1234 Sunset Blvd",
- "description": "A state-of-the-art healthcare facility providing top-quality services.",
- "role": "admin",
- "first_name": "John",
- "last_name": "Doe",
- "username": "johndoe_admin",
- "password_hash": "lakshmi",
- "time_zone": "America/Los_Angeles",
- "hospital_id": "HOSP123",
}{- "message": "Organization and User created successfully",
- "organization": {
- "organization_id": 101,
- "name": "Sunrise Hospital",
- "type": "hospital",
- "state": "California",
- "city": "Los Angeles",
- "country": "USA",
- "hospital_id": "HOSP123",
- "time_zone": "America/Los_Angeles",
- "phone_number": "+1-310-555-1234",
- "address1": "1234 Sunset Blvd"
}, - "user": {
- "user_id": 501,
- "username": "johndoe_admin",
- "role": "admin",
- "first_name": "John",
- "last_name": "Doe",
- "organization_id": 101
}
}Creates a new outpatient token for a hospital patient. If the patient already exists, a new interaction record is created. If the patient is new, both a patient record and an interaction record are created.
| hospital_id required | string |
| practitioner_id required | string |
| speciality_id required | string |
| hospital_patient_id | string |
| date_of_birth | string <date> |
| phone_number | string |
| first_name required | string |
| last_name required | string |
| age | integer |
| gender required | string Enum: "Male" "Female" "Other" |
| interaction_status | string |
| interaction_date required | string <date-time> |
| token_number required | string |
| address1 | string |
| patientCategory required | string |
| org_name required | string |
| timeZone required | string |
string <email> | |
| marital_status | string Enum: "Single" "Married" "Divorced" "Widowed" |
| aadhar_number | string |
{- "hospital_id": "HOSP123",
- "practitioner_id": "PRAC12345",
- "speciality_id": "3",
- "hospital_patient_id": "GEN9-202510-07148",
- "date_of_birth": "1990-05-15",
- "phone_number": "+919876543210",
- "first_name": "apitesting",
- "last_name": "1",
- "age": 35,
- "gender": "Male",
- "interaction_status": "99",
- "interaction_date": "2025-10-07T10:30:00Z",
- "token_number": "121",
- "address1": "123 Main Street, City, State, PIN",
- "patientCategory": "Outpatient",
- "org_name": "Sunrise Hospital",
- "timeZone": "Asia/Kolkata",
- "marital_status": "Married",
- "aadhar_number": "123456789012"
}{- "message": "New patient and interaction created successfully.",
- "patient": {
- "patient_id": "Sunrise Hospital101-202510-00001",
- "first_name": "apitesting",
- "last_name": "1",
- "gender": "Male",
- "phone_number": "+919876543210",
- "date_of_birth": "1990-05-15",
- "age": 35,
- "patient_category": "Outpatient"
}, - "interactions": {
- "interaction_id": 1001,
- "interaction_date": "2025-10-07T10:30:00Z",
- "token_number": "121"
}
}Sends clinical data, diagnoses, and prescribed medications to the Drug Interaction API to check for potential drug interactions and related insights.
| answer required | string Stringified JSON containing diagnosis, vitals, assessments, and medication templates. (Sent as a single string to preserve formatting.) |
| patientAge | integer |
| patientDob | string |
| patientGender required | string Enum: "M" "F" "O" |
| patientId required | string |
| hospital_id required | string Hospital identifier used for the interaction. |
{- "answer": "{\n \"response\": \"**Diagnosis:** **Fever**, **? Malaria**, **? Dengue fever**, **? Rabies**\",\n \"vitals\": [],\n \"assessment\": [\n {\"template_tests\": \"Complete blood count\", \"template_id\": \"57021-8\"},\n {\"template_tests\": \"Hepatitis B surface antigen\", \"template_id\": \"5196-1\"}\n ],\n \"medication_templates\": [\n {\n \"medication_id\": 148,\n \"medication_name\": \"((DOLOFORCE 2ML INJECTION) PIROXICAM 20 MG /ML)\",\n \"dosage\": \"2ml\",\n \"frequency_morning\": \"1\",\n \"frequency_afternoon\": \"2\",\n \"frequency_evening\": \"1\",\n \"frequency_night\": \"1\",\n \"route\": \"oral\",\n \"medication_type\": \"injection\",\n \"duration\": \"7\",\n \"instructions\": \"take this\",\n \"actual_medication_name\": \"(DOLOFORCE 2ML Injection) PIROXICAM 20 MG /ML\",\n \"brand_name\": \"(doloforce 2ml injection) piroxicam 20 mg /ml\"\n },\n {\n \"medication_id\": 79,\n \"medication_name\": \"PARACETAMOL (250MG) (P-250 MG TABLETS)\",\n \"dosage\": \"250mg\",\n \"frequency_morning\": \"1\",\n \"frequency_afternoon\": \"1\",\n \"frequency_evening\": \"0\",\n \"frequency_night\": \"1\",\n \"route\": \"Oral\",\n \"medication_type\": \"tablet\",\n \"duration\": \"7 days\",\n \"instructions\": \"take after meals\",\n \"brand_name\": \"p-250 mg tablets\",\n \"generic_name\": \"paracetamol (250mg)\"\n }\n ],\n \"additional_response\": \"**Chief Complaints:** Fever for 3 days...\",\n \"lab_data\": {\"lab_abnormal_data\": \"\"}\n}\n",
- "patientAge": 45,
- "patientDob": "",
- "patientGender": "F",
- "patientId": "GEN9-202510-00186",
- "hospital_id": "9"
}{- "response": "**Drug Interaction Result:** No significant interactions found.",
- "drug_interactions": [
- {
- "drug1": "Piroxicam",
- "drug2": "Paracetamol",
- "severity": "Moderate",
- "recommendation": "Monitor liver function if co-administered."
}
]
}Fetches clinical dashboard data (diagnosis, investigations, medications, etc.) for a specific patient and doctor.
| patient_id required | string Unique identifier for the patient. |
| specialty required | string The medical specialty to retrieve dashboard data for. |
| practitioner_id required | string Practitioner identifier used to resolve the doctor. |
| list_headings required | Array of strings List of data categories to fetch for the dashboard view. |
| combine_dr_status | boolean Whether to combine data from multiple doctors. |
| combine_dr_id | Array of integers List of doctor IDs to include when combining data. |
| interaction_id | string Unique identifier for the clinical interaction. |
| stored_signal | boolean Whether the dashboard data was retrieved from cached storage. |
| hospital_id required | string Hospital identifier used to scope the dashboard. |
{- "patient_id": "GEN9-202510-00186",
- "specialty": "GENERAL MEDICINE",
- "practitioner_id": "PRAC-186",
- "list_headings": [
- "Diagnosis",
- "Investigations",
- "medication"
], - "combine_dr_status": true,
- "combine_dr_id": [
- 186
], - "interaction_id": "80519",
- "stored_signal": false,
- "hospital_id": "9"
}{- "status": true,
- "specialty": "GENERAL MEDICINE",
- "patient_id": "GEN9-202510-00186",
- "data": {
- "Diagnosis": [
- "Fever",
- "Dengue fever suspected"
], - "Investigations": [
- "Complete blood count",
- "LFT",
- "Urine routine"
], - "medication": [
- "Paracetamol 500mg",
- "ORS Solution"
]
}
}Generates a PDF file from the given HTML content. The API uses Puppeteer to render the HTML and returns the generated PDF as a downloadable file.
| html required | string HTML content to convert into a PDF. |
| header | string Optional header HTML to include on each page. |
| footer | string Optional footer HTML to include on each page. |
| marginT | string Top margin (e.g., "20mm", "50px"). |
| marginB | string Bottom margin (minimum 22mm enforced). |
| marginL | string Left margin. |
| marginR | string Right margin. |
| hospital_id required | string Hospital identifier used to validate access before PDF creation. |
| practitioner_id required | string Practitioner identifier APT for the requesting doctor. |
{- "html": "string",
- "header": "string",
- "footer": "string",
- "marginT": "20mm",
- "marginB": "25mm",
- "marginL": "10mm",
- "marginR": "10mm",
- "hospital_id": "9",
- "practitioner_id": "PRAC-186"
}Retrieves the list of unique patients (interactions) for a specific practitioner and date. Supports combined doctor logic via the advanced_settings field. Requires practitioner_id, hospital_id, date, and zone.
| practitioner_id required | string Unique practitioner identifier tied to the organization. |
| hospital_id required | string Hospital identifier used to resolve organization and doctor scopes. |
| date required | string <date> The target date (YYYY-MM-DD) for fetching patients. |
| zone required | string Time zone (e.g., Asia/Kolkata). Use underscore |
[- {
- "interaction_id": "INT-000245",
- "doctor_id": "102",
- "patient_id": "PAT-001122",
- "interaction_status": "1",
- "token_number": 15,
- "interaction_date": "2025-10-14T10:30:00Z",
- "Patient": {
- "patient_id": "PAT-001122",
- "first_name": "Ragul",
- "last_name": "Raj",
- "date_of_birth": "2004-02-15",
- "patient_category": "Outpatient",
- "organization_id": "9"
}
}
]Sends a WhatsApp message using the WhatsApp Business API via Facebook Graph API. Supports sending text, template, and document messages. The API validates phone numbers and message payloads before sending to WhatsApp.
| to required | string Recipient phone number in E.164 format (must be +91XXXXXXXXXX for India) |
| type required | string Enum: "text" "template" "document" Type of WhatsApp message |
| body | string Text body for simple text messages |
| messageType | string Optional flag for message mode (e.g. 'template') |
| templateName | string Template name (required if type is 'template') |
| languageCode | string Template language code (required if type is 'template') |
object Document details for sending PDF or file messages | |
| messaging_product | string Always 'whatsapp' |
| recipient_type | string Recipient type (default 'individual') |
object Template data for advanced messageType = 'template' |
{- "to": "+919876543210",
- "type": "text",
- "body": "Your appointment is confirmed for tomorrow at 10 AM.",
- "messageType": "template",
- "templateName": "appointment_confirmation",
- "languageCode": "en_US",
- "messaging_product": "whatsapp",
- "recipient_type": "individual",
- "template": {
- "name": "patient_opd_sheet",
- "language": {
- "code": "en_US"
}, - "components": [
- {
- "type": "body",
- "parameters": [
- {
- "type": "text",
- "text": "John Doe"
}
]
}
]
}
}{- "success": true,
- "message": "Message sent successfully",
- "data": {
- "messaging_product": "whatsapp",
- "messages": [
- {
- "id": "wamid.HBgLNzk5NzE0MjM1NjU3FQIAEhgUM0JCMzE1Q0JCRkNFQzA4RDI2NjEA"
}
]
}
}Retrieves all approved WhatsApp message templates for the organization. These templates can be used with the WhatsApp Business API to send standardized messages. Templates include various components like headers (text/document), body text with parameters, and footers.
{- "data": [
- {
- "name": "data_sheet",
- "parameter_format": "POSITIONAL",
- "components": [
- {
- "type": "HEADER",
- "format": "DOCUMENT",
- "example": {
}
}, - {
- "type": "BODY",
- "text": "Hello {{1}},\nHere is your outpatient data sheet.",
- "example": {
- "body_text": [
- [
- "John"
]
]
}
}, - {
- "type": "FOOTER",
- "text": "Thanking you"
}
], - "language": "en_US",
- "status": "APPROVED",
- "category": "UTILITY",
- "sub_category": "CUSTOM",
- "id": "1053447682846470"
}, - {
- "name": "hello_world",
- "parameter_format": "POSITIONAL",
- "components": [
- {
- "type": "HEADER",
- "format": "TEXT",
- "text": "Hello World"
}, - {
- "type": "BODY",
- "text": "Welcome and congratulations!!"
}, - {
- "type": "FOOTER",
- "text": "WhatsApp Business Platform sample message"
}
], - "language": "en_US",
- "status": "APPROVED",
- "category": "UTILITY",
- "id": "702298498849932"
}
]
}Retrieves the medication data CSV file for a given hospital ID.
The API reads the CSV from Google Cloud Storage (GCS), validates the headers,
and returns it as a JSON array of rows.
| hospital_id required | string Example: hospital_id=9 Unique hospital identifier (maps to organization) |
[- {
- "BRAND ID": "B001",
- "BRAND NAME": "Paracetamol",
- "GENERIC NAME": "Acetaminophen"
}, - {
- "BRAND ID": "B002",
- "BRAND NAME": "Augmentin",
- "GENERIC NAME": "Amoxicillin + Clavulanic acid"
}
]Retrieves the investigation CSV data for a given hospital. Returns a JSON array of investigations with "SERVICE ID", "STANDARD LAB TEST NAME", and "ALIAS NAME".
| hospital_id required | string The unique hospital ID to fetch investigation CSV for |
[- {
- "SERVICE ID": "INV001",
- "STANDARD LAB TEST NAME": "Complete Blood Count",
- "ALIAS NAME": "CBC"
}
]Uploads and replaces the organization's investigation CSV. Required headers are Service ID and Standard Lab Test Name. Optional headers are Alias Name, Service Type, Hospital ID, ACTIVE FROM, and ACTIVE TO. Headers are matched case-insensitively. Dates, when supplied, must use DD/MM/YYYY. Invalid rows are returned while valid rows are stored; an empty Alias Name is populated from Standard Lab Test Name.
| hospital_id required | string The ID of the hospital associated with the organization. |
| csvFile required | string <binary> CSV with required columns Service ID and Standard Lab Test Name, and optional Alias Name, Service Type, Hospital ID, ACTIVE FROM, and ACTIVE TO. |
{- "message": "CSV updated and saved",
- "invalid": [
- {
- "Service ID": "INV001",
- "Standard Lab Test Name": "Complete Blood Count",
- "Alias Name": "CBC",
- "error": "Service ID is required"
}
]
}Merges the uploaded CSV with stored investigation data using the case-insensitive Service ID and Service Type pair as the key. The same Service ID may therefore be stored in multiple rows when Service Type differs, while duplicate Service ID and Service Type pairs are rejected. Required headers are Service ID and Standard Lab Test Name; optional headers are Alias Name, Service Type, Hospital ID, ACTIVE FROM, and ACTIVE TO. Dates must use DD/MM/YYYY.
| hospital_id required | string The ID of the hospital associated with the organization. |
| csvFile required | string <binary> Investigation CSV to merge. Service ID and Standard Lab Test Name are required; Alias Name, Service Type, Hospital ID, ACTIVE FROM, and ACTIVE TO are optional. |
{- "message": "CSV uploaded and saved",
- "invalid": [
- {
- "Service ID": "INV001",
- "Standard Lab Test Name": "Complete Blood Count",
- "Alias Name": "CBC",
- "error": "Service ID is required"
}
]
}Replaces stored investigation data using either a direct JSON array or { data: [...] }. Service ID and Standard Lab Test Name are required. Alias Name, Service Type, Hospital ID, ACTIVE FROM, and ACTIVE TO are optional. Field names are normalized case-insensitively and dates must use DD/MM/YYYY.
| hospital_id required | string The ID of the hospital associated with the organization. |
Investigation rows wrapped in data; the controller also accepts a direct array.
required | Array of objects |
{- "data": [
- {
- "Service ID": "INV001",
- "Standard Lab Test Name": "Complete Blood Count",
- "Alias Name": "CBC",
- "Service Type": "Laboratory",
- "Hospital ID": "HOSP123",
- "ACTIVE FROM": "01/01/2026",
- "ACTIVE TO": "31/12/2026"
}
]
}{- "message": "Investigation data uploaded successfully",
- "invalid": [
- {
- "Service ID": "INV001",
- "error": "Service ID is required"
}
]
}Merges a direct JSON array or { data: [...] } into stored investigation data using the case-insensitive Service ID and Service Type pair as the key. The same Service ID may be used for different Service Types. Service ID and Standard Lab Test Name are required; all other supported columns are optional. Dates must use DD/MM/YYYY.
| hospital_id required | string The ID of the hospital associated with the organization. |
Array of investigation objects to merge with existing data
required | Array of objects |
{- "data": [
- {
- "Service ID": "INV001",
- "Standard Lab Test Name": "Complete Blood Count",
- "Alias Name": "CBC",
- "Service Type": "Laboratory",
- "Hospital ID": "HOSP123",
- "ACTIVE FROM": "01/01/2026",
- "ACTIVE TO": "31/12/2026"
}
]
}{- "message": "Investigation data updated successfully",
- "invalid": [
- {
- "Service ID": "INV001",
- "error": "Service ID is required"
}
]
}Creates and ingests edited OPD interaction details. The API uploads a text file to cloud storage (GCS) and triggers an ingestion process to update the interaction record.
| interaction_id required | string Unique interaction ID for the patient encounter. |
required | object Edited OPD details to be ingested. |
| hospital_id required | string Hospital identifier for scoping the interaction. |
{- "interaction_id": "80519",
- "senddataingest": {
- "chief_complaint": "Fever and headache",
- "diagnosis": "Viral infection",
- "prescription": "Paracetamol 500mg",
- "vitals": {
- "temperature": "101°F",
- "blood_pressure": "120/80"
}, - "notes": "Advised rest and plenty of fluids"
}, - "hospital_id": "9"
}{- "status": true,
- "message": "Edited opd interaction details created and ingested successfully",
- "interaction_id": "80519",
- "uploadedUrls": "gs://medscribe-dev/editedOpd/80519_a4ac98c8-e3f3-448e-b774-85064ed3a96a.txt",
- "pdfingestIntraction": {
- "patient_id": "GEN9-202510-00186",
- "interaction_date": "2025-10-08T09:09:29.000Z",
- "interaction_status": "0",
- "doctor_id": 186,
- "organization_id": "9",
- "InteractionDetails": [
- {
- "interaction_id": "80519",
- "interaction_detail_type": "Edited opd",
- "attachment_url": "gs://medscribe-dev/editedOpd/80519_a4ac98c8-e3f3-448e-b774-85064ed3a96a.txt",
- "processedFileContent": "{\n \"chief_complaint\": \"Fever and headache\",\n \"diagnosis\": \"Viral infection\",\n \"prescription\": \"Paracetamol 500mg\",\n \"vitals\": {\n \"temperature\": \"101°F\",\n \"blood_pressure\": \"120/80\"\n },\n \"notes\": \"Advised rest and plenty of fluids\"\n}\n"
}
]
}
}Accepts vitals data for a patient, stores it, uploads the file to cloud storage, creates related interaction records, and triggers the ingestion pipeline.
Patient details and vitals data payload.
| patient_id required | string |
| hospital_id required | string |
| interaction_date | string <date-time> |
| first_name | string |
| last_name | string |
| date_of_birth | string |
| gender | string Enum: "M" "F" "O" |
| age | integer |
required | object |
{- "patient_id": "e53aed9ae",
- "hospital_id": "9",
- "interaction_date": "2024-01-02T10:00:00Z",
- "first_name": "ragul",
- "last_name": "raj",
- "date_of_birth": null,
- "gender": "M",
- "age": 21,
- "vitalsData": {
- "temperature": 98.6,
- "bloodPressure": "120/80",
- "pulse": 72,
- "respiratoryRate": 16,
- "oxygenSaturation": 98,
- "weight": 150,
- "height": "5'10\"",
- "lab_report": {
- "fbs": "123",
- "hba1c": "160",
- "bloodSugar": "170",
- "tg": "45",
- "ldl": "145",
- "hdl": "234",
- "totalChol": "180",
- "thyroidDate": "2004-01-09",
- "t3": "145",
- "t4": "160",
- "tsh": "120",
- "bUrea": "117"
}
}
}Retrieves interaction tokens based on doctor and specialization configuration. Determines whether to fetch tokens by doctor or by specialty based on organization and speciality settings.
| key required | string API authentication key |
| practitioner_id required | string Unique identifier for the practitioner. |
| created_at required | string <date> Date (YYYY-MM-DD) for which interactions should be fetched. |
| zone required | string Time zone offset (e.g. |
| hospital_id required | string Hospital identifier associated with the practitioner. |
{- "message": "Interaction get successfull",
- "interaction": [
- {
- "interaction_id": 12345,
- "interaction_status": "2",
- "interaction_date": "2025-11-05T10:00:00Z",
- "token_number": 5,
- "doctor_id": 101,
- "speciality_id": 7,
- "patient": {
- "patient_id": 4001,
- "first_name": "John",
- "last_name": "Doe",
- "hospital_patient_id": "HSP12345",
- "phone_number": "+911234567890",
- "patient_category": "Outpatient"
}
}
]
}Retrieves a list of doctors associated with a hospital. The hospital ID is used to locate the corresponding organization, and all doctors under that organization are returned.
| key required | string API authentication key |
| hospital_id required | string Unique identifier for the hospital. |
{- "message": "Doctor list fetched successfully",
- "doctor": [
- {
- "doctor_id": 102,
- "first_name": "Priya",
- "last_name": "Menon",
- "speciality_id": 5,
- "practitioner_id": "PRAC12345"
}
]
}Retrieves the list of specialities for a given hospital that have doctor-based token configuration enabled. Returns all active (is_active = 1) specialities associated with the hospital’s organization.
| key required | string API authentication key |
| hospital_id required | string Unique identifier for the hospital. |
[- {
- "speciality_id": 12,
- "speciality_name": "Cardiology",
- "organization_id": 101,
- "doctor_based_token": true,
- "is_active": 1
}
]Returns a list of active inpatients for the given hospital_id. hospital_id is first mapped to an organization_id, and then all inpatients under that organization are fetched along with: - Patient details - Assigned doctors - Assigned nurses - Bed details - Primary doctor info
| hospital_id required | string Example: hospital_id=9 |
| x-api-key required | string Example: your-api-key-here |
{- "hospital_id": "9",
- "data": [
- {
- "inpatient_id": "INP102",
- "patient_id": "PAT56789",
- "in_date": "2024-01-15",
- "out_date": null,
- "Patient": {
- "patient_id": "PAT56789",
- "first_name": "John",
- "last_name": "Doe",
- "phone_number": "9876543210",
- "gender": "Male"
}, - "assignedDoctors": [
- {
- "doctor_id": "DOC123",
- "doctor_name": "Dr. Sarah Watson"
}
], - "assignedNurses": [
- {
- "nurse_id": "NRS789",
- "caregiver_id": "CG789",
- "nurse": "Jane Smith",
- "shift": "day"
}
], - "bed": {
- "bed_no": "B12",
- "ward": "Ward A",
- "status": "occupied",
- "inpatient_id": "INP102"
}
}
]
}Returns the total number of doctors for a given hospital_id.
| hospital_id required | integer Example: hospital_id=9 |
| x-api-key required | string Example: your-api-key-here |
{- "message": "Doctors list fetched successfully",
- "data": {
- "hospital_id": 9,
- "organization_id": 3,
- "total_doctors": 12,
- "doctors": [
- {
- "first_name": "John",
- "last_name": "Doe",
- "hospital_id": 9,
- "practitioner_id": "100",
- "speciality_id": 7
}
]
}
}Starts a new interaction for a patient by uploading one or more files ( PDFs, documents, or text files). The endpoint accepts multipart/form-data requests with patient and file details.
| hospital_id required | string Hospital ID where the interaction is being created |
| patient_id required | string Patient identifier |
| practitioner_id | string Practitioner identifier |
| caregiver_id | string Caregiver identifier |
| files required | string <binary> Upload one or more files (send multiple fields named 'files'). Allowed types: jpg, jpeg, png, gif, avif, heic, pdf, docx, txt Max size: 15MB per file. |
{- "status": true,
- "message": "Interaction started",
- "interaction": {
- "interaction_id": 12045,
- "patient_id": "GEN9-202510-07148",
- "hospital_id": "9",
- "interaction_date": "2025-11-26T10:20:00Z",
- "interaction_type": "docs",
- "doctor_id": "100",
- "caregiver_id": "carescribe-nurse001"
}, - "details": [
- {
- "interaction_detail_id": 501,
- "interaction_detail_type": "image",
}
], - "pubsubPayload": {
- "interaction_id": 12045,
}
}Upload a patient document file and patient details using multipart/form-data.
| hospital_id required | string Example: hospital_id=9 Hospital ID used to resolve the organization. |
| patient_id required | string Patient identifier. |
| name required | string Patient name. |
| age required | integer Patient age. |
| gender required | string Patient gender. |
| language required | string Patient preferred language. |
| practitioner_id required | string Practitioner identifier. |
| caregiver_id required | string Caregiver identifier. |
| patient_type required | string Enum: "opd" "ipd" Patient type for the upload flow. |
| hospital_inpatient_id required | string Inpatient identifier from the HMS. |
| file required | string File(s) to upload. Send up to 10 document files using the file field. The total upload size must not exceed 30MB. Supported file types include PDF, DOC, DOCX, TXT, JPG, JPEG, PNG, GIF, AVIF, and HEIC. |
{- "message": "Document uploaded successfully."
}Updates the OPD section display order for a hospital. The endpoint expects the hospital_id and a valid opd_order object in the request body.
Opd order update payload
| hospital_id required | string |
| opd_order required | object |
{- "hospital_id": "9",
- "opd_order": {
- "diagnosis": 5,
- "medicine": 2,
- "investigation": 3,
- "vital": 4,
- "assessment": 1,
- "summary": 6,
- "datasheet": 7,
- "signature": 8
}
}{- "message": "OPD order updated successfully",
- "opd_order": {
- "diagnosis": 5,
- "medicine": 2,
- "investigation": 3,
- "vital": 4,
- "assessment": 1,
- "summary": 6,
- "datasheet": 7,
- "signature": 8
}
}Updates patient demographic details, contact info, category changes (Outpatient/Inpatient),
and automatically handles inpatient record activation/deactivation.
| patient_id required | string Unique patient ID |
| hospital_id required | string Hospital ID to validate organization |
| first_name | string |
| last_name | string |
| date_of_birth | string <date> |
| phone_number | string |
string | |
| age | integer |
| gender | string |
| patient_category | string |
| address1 | string |
| address2 | string |
| city | string |
| state | string |
| zip_code | string |
| language | string |
| marital_status | string |
| occupation | string |
| aadhar_number | string |
| insurance_no | string |
| provider_id | string |
| emergency_contact_name | string |
| emergency_contact_phone_no | string |
| hospital_patient_id | string |
| Referred_by_doctor | string |
| primarydoctor | integer |
| timeZone | string |
| org_name | string |
| hospital_inpatient_id | string |
{- "first_name": "John",
- "last_name": "Doe",
- "date_of_birth": "1990-01-15",
- "phone_number": "+919876543210",
- "age": 34,
- "gender": "Male",
- "patient_category": "Outpatient",
- "address1": "123 Main Street",
- "address2": "Apt 4B",
- "city": "Mumbai",
- "state": "Maharashtra",
- "zip_code": "400001",
- "language": "English",
- "marital_status": "Single",
- "occupation": "Engineer",
- "aadhar_number": "123456789012",
- "insurance_no": "INS123456",
- "provider_id": "PROV001",
- "emergency_contact_name": "Jane Doe",
- "emergency_contact_phone_no": "+919876543211",
- "hospital_patient_id": "HOSP-001",
- "Referred_by_doctor": "Dr. Smith",
- "primarydoctor": 151,
- "timeZone": "Asia/Kolkata",
- "org_name": "GEN",
- "hospital_inpatient_id": "INPAT-001"
}{- "message": "Patient updated successfully",
- "patient": { }
}Sends a 6-digit OTP to the user's registered email address for password reset flow. Requires a valid user's email in the request body.
| mailid required | string <email> |
{- "mailid": "[email protected]"
}{- "message": "OTP sent successfully to [email protected]"
}Verifies the 6-digit OTP sent to the user's email address during the password reset process. If the OTP is valid, a temporary password reset token (JWT) will be generated with a 15-minute expiry.
| mailid required | string <email> |
| enteredOtp required | string |
{- "enteredOtp": "333598"
}{- "message": "OTP verified successfully!",
- "verifycode": true,
- "password_reset_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
- "status": true
}Resets the user's password using a valid password reset access token. The access token must be generated from the OTP verification flow and must contain the purpose password_reset. The email provided in the request must match the email inside the token.
| email required | string <email> |
| password_hash required | string New password (will be hashed on the server) |
| access_token required | string Password reset JWT token obtained after OTP verification |
{- "password_hash": "987",
- "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}{- "message": "Password updated successfully",
- "verifycode": true,
- "status": true
}Fetches all release notes stored in the system. Results are ordered by release_date (DESC) and created_at (DESC). Requires a valid API Key for authentication.
[- {
- "id": 12,
- "title": "Version 2.5.1 – Bug Fix Release",
- "description": "Fixed OPD merging issue and improved UI performance.",
- "release_date": "2025-12-01",
- "created_at": "2025-12-01T10:20:33Z",
- "updated_at": "2025-12-01T10:20:33Z"
}
]Returns today's appointments OR appointments within a date range for a given doctor (practitioner_id) in a specific hospital.
| practitioner_id required | string Practitioner ID of the doctor. |
| hospital_id required | string Hospital ID. |
| start_date | string <date-time> Start date for filtering appointments (ISO date format). |
| end_date | string <date-time> End date for filtering appointments (ISO date format). |
{- "pending_count": 5,
- "visited_count": 12,
- "appointed": [
- {
- "interaction_id": 0,
- "patient_id": "string",
- "doctor_id": 0,
- "speciality_id": 0,
- "interaction_date": "2019-08-24T14:15:22Z",
- "interaction_status": "string",
- "token_number": 0,
- "Patient": {
- "patient_id": "string",
- "first_name": "string",
- "last_name": "string",
- "hospital_patient_id": "string",
- "phone_number": "string",
- "patient_category": "string",
- "gender": "string",
- "age": 0
}
}
], - "visited": [
- {
- "interaction_id": 0,
- "patient_id": "string",
- "doctor_id": 0,
- "speciality_id": 0,
- "interaction_date": "2019-08-24T14:15:22Z",
- "interaction_status": "string",
- "token_number": 0,
- "Patient": {
- "patient_id": "string",
- "first_name": "string",
- "last_name": "string",
- "hospital_patient_id": "string",
- "phone_number": "string",
- "patient_category": "string",
- "gender": "string",
- "age": 0
}
}
]
}Updates the settings of a nurse and the linked user record.
| caregiver_id required | string Unique identifier of the nurse |
| hospital_id required | string Hospital ID is required to validate organization access |
| first_name | string Optional - Nurse's first name |
| last_name | string Optional - Nurse's last name |
string <email> Optional - User email | |
| phone_number | string Optional - Nurse contact number |
| floor_id | integer Optional - Floor assignment |
object Optional - Advanced user settings. Restricted fields are ignored. |
{- "first_name": "bala",
- "last_name": "bala",
- "phone_number": "+919788612345",
- "floor_id": 2,
- "advancedSettings": {
- "drug_interaction": false,
- "counselling": true
}
}{- "message": "Nurse settings updated successfully",
- "nurse": { },
- "user": {
- "user_id": "string",
- "first_name": "string",
- "last_name": "string",
- "email": "string",
- "contact_number": "string",
- "floor_id": "string",
- "advanced_settings": { }
}
}Updates doctor OPD sheet, assessment, and advanced settings. Requires practitioner_id and hospital_id as query parameters.
| practitioner_id required | string |
| hospital_id required | string |
| plan | boolean |
| follow_up | boolean |
| investigations | boolean |
| patient_history | boolean |
| recommendations | boolean |
| chief_complaints | boolean |
| personal_history | boolean |
| examination_findings | boolean |
| history_of_presenting_illness | boolean |
| vital | boolean |
| medicine | boolean |
| diagnosis | boolean |
| assessment | boolean |
| investigation | boolean |
| brand | boolean |
| generic | boolean |
| TNMCRegNo | boolean |
| genericFront | boolean |
| FrequencyEvng | boolean |
| preferredLang | string |
| counsellingMode | boolean |
{- "plan": true,
- "follow_up": true,
- "investigations": true,
- "patient_history": true,
- "recommendations": true,
- "chief_complaints": true,
- "personal_history": true,
- "examination_findings": true,
- "history_of_presenting_illness": true,
- "vital": true,
- "medicine": true,
- "diagnosis": true,
- "assessment": true,
- "investigation": true,
- "brand": true,
- "generic": true,
- "TNMCRegNo": true,
- "genericFront": true,
- "FrequencyEvng": true,
- "preferredLang": "string",
- "counsellingMode": true
}Updates OPD assessment configuration using practitioner_id and hospital_id as query parameters.
| practitioner_id required | string |
| hospital_id required | string |
| chief_complaints required | boolean |
| history_of_presenting_illness required | boolean |
| patient_history required | boolean |
| personal_history required | boolean |
| examination_findings required | boolean |
| investigations required | boolean |
| recommendations required | boolean |
| medications required | boolean |
| follow_up required | boolean |
| plan required | boolean |
required | object |
{- "chief_complaints": true,
- "history_of_presenting_illness": true,
- "patient_history": true,
- "personal_history": true,
- "examination_findings": true,
- "investigations": true,
- "recommendations": true,
- "medications": true,
- "follow_up": true,
- "plan": true,
- "patient": {
- "chief_complaints": true,
- "history_of_presenting_illness": true,
- "patient_history": true,
- "personal_history": true,
- "examination_findings": true,
- "investigations": true,
- "recommendations": true,
- "medications": true,
- "follow_up": true,
- "plan": true
}
}Updates OPD-related configuration for a doctor using practitioner_id and hospital_id as query parameters.
| practitioner_id required | string Practitioner ID of the doctor |
| hospital_id required | string Hospital ID associated with the doctor |
| medicine required | boolean |
| vital required | boolean |
| investigation required | boolean |
| assessment required | boolean |
| datasheetimage required | boolean |
| diagnosis required | boolean |
| drawImage required | boolean |
| sign required | boolean |
| summary required | boolean |
required | object |
{- "medicine": true,
- "vital": true,
- "investigation": true,
- "assessment": true,
- "datasheetimage": true,
- "diagnosis": true,
- "drawImage": true,
- "sign": true,
- "summary": false,
- "patient": {
- "medicine": true,
- "vital": true,
- "investigation": true,
- "assessment": true,
- "datasheetimage": true,
- "diagnosis": true,
- "drawImage": true,
- "sign": true,
- "summary": false
}
}Updates dashboard setup using practitioner_id and hospital_id as query parameters.Example values:investigation,diagnosis
| practitioner_id required | string |
| hospital_id required | string |
| dashboard_setup_values | Array of strings |
{- "dashboard_setup_values": [
- "string"
]
}Generates a PDF OPD (Outpatient Department) sheet for a patient interaction. The endpoint accepts either interaction_id or patient_id to find the interaction. Accepts WSS (WebSocket Service) processed data in the request body to include assessment, diagnosis, medications, and other clinical data in the PDF
| interaction_id | integer Example: interaction_id=98860 Interaction ID to generate PDF for. Either interaction_id or patient_id is required. |
| patient_id | string Example: patient_id=GEN9-202511-00465 Patient ID as fallback if interaction_id not found. Either interaction_id or patient_id is required. |
| hospital_id required | string Example: hospital_id=9 Hospital ID for the interaction (mandatory) |
| practitioner_id | string Example: practitioner_id=0123 Practitioner ID of the doctor. If provided, uses ONLY this doctor's OPD settings, ignoring interaction doctor. |
| data | string Example: data={"diagnosis":"Fever","medication_templates":[]} WSS data as JSON string (for GET requests) |
Optional WSS processed data. Supports multiple formats - allData.processedText (new format), processedText, answer, or direct fields.
| status | string |
object New WSS response format with processedText | |
| processedText | object Alternative format - processedText directly in body |
| answer | object Alternative format - answer field (common in session/chat responses) |
| data | object Alternative format - nested data structure |
| response | string Old format - diagnosis response text |
| additional_response | string Old format - additional assessment response |
| medication_templates | Array of objects Medication prescriptions (old format) |
| assessment | Array of objects Assessment templates (old format) |
| vitals | Array of objects Vitals data (old format) |
| diagnosis | string Direct diagnosis field |
| chief_complaints | string Direct chief complaints field |
| history_of_presenting_illness | string Direct history of presenting illness field |
| past_medical_history | string Direct past medical history field |
| personal_history | string Direct personal history field |
| examination_findings | string Direct examination findings field |
| recommendations | string Direct recommendations field |
| diet | string Direct diet field |
| follow_up | string Direct follow-up field |
| plan | string Direct plan field |
{- "status": "processed",
- "allData": {
- "interaction_id": "100307",
- "patient_id": "GEN9-202511-00465",
- "attachment_url": "gs://medscribe-dev/webm_files/get-opd/record-notes-9_9004_8049a402-2852-42ae-b06e-e8eb6af4a1c5.txt",
- "processedText": {
- "chief_complaints": "Fever and cough for 2 days.",
- "history_of_presenting_illness": "Patient presents with a 2-day history of fever and cough. Fever not reduced after 2 days of medication.",
- "past_medical_history": "",
- "personal_history": "",
- "examination_findings": "",
- "investigations": "CBC, Blood Test",
- "diagnosis": "Fever, Cough",
- "recommendations": "Avoid junk foods and oily foods.",
- "diet": "**Diet:** Consume porridge and rasam.",
- "follow_up": "Follow-up: Follow up after 2 days.",
- "plan": "",
- "assessment": [
- {
- "assessment_template": "string",
- "template_tests": "CBC",
- "template_id": "string",
- "service_type": "Laboratory",
- "hospital_id": "HOSP123"
}
], - "medication_templates": [
- {
- "medication_name": "(CETIRIZINE TABLET)",
- "medication_type": "tablet",
- "dosage": "string",
- "route": "Oral",
- "frequency_morning": "0",
- "frequency_afternoon": "0",
- "frequency_evening": "0",
- "frequency_night": "0",
- "duration": "2 days",
- "instructions": "After Food",
- "vaccine": false,
- "auto_correct": false,
- "actual_medication_name": "cetirizine",
- "brand_name": "cetirizine tablet",
- "generic_name": "",
- "med_from_llm": true
}
], - "additional_response": "",
- "vitals": [ ],
- "lab_data": { }
}
}, - "processedText": { },
- "answer": { },
- "data": { },
- "response": "**Diagnosis:** **Fever**, **? Malaria**",
- "additional_response": "string",
- "medication_templates": [
- { }
], - "assessment": [
- { }
], - "vitals": [
- { }
], - "diagnosis": "Fever, Cough",
- "chief_complaints": "string",
- "history_of_presenting_illness": "string",
- "past_medical_history": "string",
- "personal_history": "string",
- "examination_findings": "string",
- "recommendations": "string",
- "diet": "string",
- "follow_up": "string",
- "plan": "string"
}Enables or disables the inpatient setup configuration for a hospital. The hospital is identified using the hospital_id query parameter.
| hospital_id required | string Example: hospital_id=9 Hospital ID for which inpatient setup needs to be toggled |
| inpatientSetup required | boolean |
{- "inpatientSetup": true
}{- "success": true,
- "message": "Inpatient setup has been turned ON",
- "inpatientSetup": true
}Updates the floor variable configuration for a hospital. The floor variable determines how inpatient areas are categorized, such as Floors, Blocks, or Buckets.
| hospital_id required | string Example: hospital_id=9 Hospital ID for which floor variable needs to be updated |
| floor_variable required | string Enum: "Floors" "Blocks" "Buckets" Floor classification type |
{- "floor_variable": "Floors"
}{- "message": "floor_variable updated successfully.",
- "data": "Floors"
}Retrieves all floors for a given hospital. The hospital_id is used to identify the organization.
| hospital_id required | string Example: hospital_id=9 Hospital ID to validate the organization |
{- "message": "Floors fetched successfully.",
- "data": [
- {
- "floor_id": 1,
- "floor_name": "Ground Floor",
- "organization_id": 3
}
]
}Creates a new floor for a given hospital. The hospital_id is used to identify the organization. Floor name must be unique within the organization.
| floor_name required | string |
| hospital_id required | string |
{- "floor_name": "First Floor",
- "hospital_id": "9"
}{- "message": "Floor created successfully.",
- "data": {
- "floor_id": 12,
- "floor_name": "First Floor",
- "organization_id": 3
}
}Updates an existing floor for a given hospital. The hospital_id is used to identify the organization. Prevents duplicate floor names within the same organization.
| hospital_id required | string Example: hospital_id=9 Hospital ID to validate the organization |
| floor_id required | integer |
| floor_name | string |
{- "floor_id": 2,
- "floor_name": "New Floor"
}{- "message": "Floor updated successfully.",
- "data": {
- "floor_id": 2,
- "floor_name": "New Floor",
- "organization_id": 3
}
}Deletes an existing floor for a given hospital. The hospital_id is used to identify the organization and ensures the floor belongs to the organization before deletion.
| hospital_id required | string Example: hospital_id=9 Hospital ID to validate the organization |
| floor_id required | integer Example: floor_id=2 Floor ID to be deleted |
{- "message": "Floor deleted successfully."
}Fetches the complete list of beds for a given hospital. The API validates the hospital_id, retrieves the associated organization, and returns all beds linked to that organization, including floor details.
| hospital_id required | string Example: hospital_id=9 |
{- "message": "Beds fetched successfully.",
- "beds": [
- {
- "bed_id": "BED12345",
- "bed_no": "101",
- "ward": "General Ward",
- "bed_type": "General",
- "is_occupied": false,
- "status": "Available",
- "floor": {
- "floor_id": "FLOOR01",
- "floor_name": "First Floor"
}, - "created_at": "2025-10-15T12:30:00Z"
}
]
}Creates a new bed record for the specified hospital. Fields like status, need_maintenance, last_cleaned_at, patient_id, inpatient_id, and admitted_at are optional.
| hospital_id required | integer |
| bed_no required | string |
| bed_type required | string |
| ward required | string |
| floor required | string Floor number or floor ID |
| is_occupied | boolean |
| status | string |
| need_maintenance | boolean |
| last_cleaned_at | string <date> |
| patient_id | string |
| inpatient_id | string |
| admitted_at | string <date-time> |
{- "hospital_id": 9,
- "bed_no": "3",
- "bed_type": "general",
- "ward": "general",
- "floor": "2",
- "is_occupied": false,
- "status": "available",
- "need_maintenance": false,
- "last_cleaned_at": "2025-11-26",
- "patient_id": null,
- "inpatient_id": null,
- "admitted_at": "2026-01-15T10:30:00Z"
}{- "message": "Bed created successfully.",
- "bed": { }
}Updates the details of a bed such as ward, bed number, status, floor, etc.
| bed_id required | string Example: bed_id=d21e4d69-c3b9-4eed-a7eb-2d402daaaa42 UUID of the bed to update |
| hospital_id required | integer |
| bed_no required | string |
| ward required | string |
| bed_type | string |
| is_occupied | boolean |
| status required | string |
| floor required | string Floor name from Floor table |
| need_maintenance | boolean |
| last_cleaned_at | string <date> |
{- "hospital_id": 9,
- "bed_no": "3",
- "ward": "general",
- "bed_type": "ICU",
- "is_occupied": false,
- "status": "occupied",
- "floor": "floor-2",
- "need_maintenance": false,
- "last_cleaned_at": "2025-11-26"
}{- "message": "Bed updated successfully.",
- "bed": { }
}Adds a new ward to the organization based on hospital_id.
| hospital_id required | string Hospital identifier used to find the organization. |
| ward required | string Name of the ward to be added. |
{- "ward": "Ward 15"
}{- "message": "Ward added successfully.",
- "data": {
- "wards": [
- "Ward 1",
- "Ward 2",
- "Ward 15"
]
}
}Updates an existing ward name for an organization using hospital_id.
| hospital_id required | string Hospital identifier used to find the organization. |
| old_ward required | string Existing ward name to be updated. |
| new_ward required | string New ward name. |
{- "old_ward": "ward 15",
- "new_ward": "ward 17"
}{- "message": "Ward updated successfully.",
- "data": {
- "organization_id": 101,
- "hospital_id": "9",
- "wards": [
- "Ward 1",
- "Ward 2",
- "Ward 17"
]
}
}Removes an existing ward from the organization using hospital_id.
| hospital_id required | string Hospital identifier used to find the organization. |
| ward required | string Name of the ward to be removed. |
{- "ward": "ward 17"
}{- "message": "Ward removed successfully.",
- "data": {
- "wards": [
- "Ward 1",
- "Ward 2"
]
}
}Uploads a CSV file (Base64 encoded) to configure floors, bed types, and wards for a hospital.
| hospital_id required | string Hospital identifier used to find the organization. |
| fileName required | string Original CSV file name. |
| csvBase64 required | string Base64 encoded CSV file content. |
{- "fileName": "partition_setup.csv",
- "csvBase64": "Rmxvb3IgTmFtZSxCZ..."
}{- "message": "CSV uploaded and processed successfully.",
- "data": {
- "floorsCreated": 3,
- "floorsSkipped": 1,
- "bedTypesAdded": 2,
- "bedTypesSkipped": 1,
- "wardsAdded": 2,
- "wardsSkipped": 1,
- "totalFloors": 5,
- "totalBedTypes": 4,
- "totalWards": 6
}, - "invalidRows": [
- {
- "row": 5,
- "reason": "Row is empty"
}
], - "duplicateRows": [
- { }
], - "skippedRows": [
- { }
]
}Retrieves bed types and wards configured for a hospital. Data is returned as arrays even if stored as JSON strings.
| hospital_id required | string Example: hospital_id=9 Hospital identifier |
{- "bedtypes": [
- "ICU",
- "General",
- "Semi-Private"
], - "wards": [
- "Ward A",
- "Ward B",
- "Emergency"
]
}Creates a new inpatient record for a given hospital. Validates hospital, practitioner, floor, and organization details. Generates unique patient_id and inpatient_id automatically.
| hospital_id required | string Example: hospital_id=9 Hospital ID to validate the organization |
| first_name | string |
| last_name | string |
| hospital_inpatient_id required | string |
| practitioner_id required | string |
| patient_category required | string |
| floor_id required | integer |
| speciality_id | integer |
| hospital_patient_id | string |
| date_of_birth | string <date> |
| phone_number | string |
| age | integer |
| gender | string |
| address1 | string |
string <email> | |
| marital_status | string |
| aadhar_number | string |
| Referred_by_doctor | string |
| in_date | string <date> |
| bed_id | integer |
| ward | string |
| timeZone | string |
{- "first_name": "Ravi",
- "last_name": "Kumar",
- "hospital_inpatient_id": "IN-GEN9-202601-00025",
- "practitioner_id": "0123",
- "patient_category": "Inpatient",
- "floor_id": 29,
- "speciality_id": 5,
- "hospital_patient_id": "HSP123",
- "date_of_birth": "1995-06-15",
- "phone_number": "9876543210",
- "age": 30,
- "gender": "Male",
- "address1": "Chennai",
- "marital_status": "Single",
- "aadhar_number": "123412341234",
- "Referred_by_doctor": "Dr. Suresh",
- "in_date": "2026-01-05",
- "bed_id": 12,
- "ward": "Ward-A",
- "timeZone": "Asia/Kolkata"
}{- "message": "Inpatient created successfully.",
- "patient": { },
- "inpatient": { }
}Retrieves all active inpatients for a given hospital. The hospital_id is used to identify the organization and fetch associated patient, doctor, bed, and floor details.
| hospital_id required | string Example: hospital_id=9 Hospital ID to validate the organization |
{- "inpatients": [
- {
- "inpatient_id": "IN-ORG1-202601-00001",
- "patient_id": "ORG1-202601-00001",
- "in_date": "2026-01-05",
- "out_date": null,
- "primarydoctor": 12,
- "floor_id": 3,
- "active": true,
- "Patient": {
- "patient_id": "string",
- "patient_category": "Inpatient",
- "first_name": "string",
- "last_name": "string",
- "phone_number": "string",
- "gender": "string"
}, - "primaryDoctor": {
- "doctor_id": 0,
- "first_name": "string",
- "last_name": "string"
}, - "Bed": { },
- "floor": {
- "floor_id": 0,
- "floor_name": "string"
}
}
]
}Updates an inpatient record using hospital_inpatient_id for a given hospital. Supports assigning a doctor via practitioner_id, updating floor, bed, ward, admission date, and handling bed and doctor linkage. Patient category is always stored as Inpatient by the server.
| hospital_id required | string Example: hospital_id=9 Hospital ID to validate the organization |
| hospital_inpatient_id required | string |
| practitioner_id required | string Practitioner ID to resolve doctor assignment |
| floor_id required | integer |
| bed_no | string or null An empty or null value clears the bed assignment |
| ward | string or null An empty or null value clears the ward |
| patient_id required | string |
| in_date | string or null <date-time> Omitted, empty, or null defaults to the current date and time |
{- "hospital_inpatient_id": "IN-GEN9-202601-00025",
- "practitioner_id": "108",
- "floor_id": 29,
- "bed_no": "B123",
- "ward": "General",
- "patient_id": "GEN9-202601-00025",
- "in_date": "2025-01-06T10:00:00Z"
}{- "message": "Inpatient updated successfully",
- "inpatient": {
- "inpatient_id": "IN-GEN9-202601-00025",
- "in_date": "2019-08-24T14:15:22Z",
- "out_date": "2026-01-16T10:30:00Z",
- "active": true,
- "Patient": {
- "patient_id": "string",
- "hospital_patient_id": "string",
- "first_name": "string",
- "last_name": "string",
- "phone_number": "string",
- "gender": "string"
}, - "primaryDoctor": {
- "doctor_id": 0,
- "first_name": "string",
- "last_name": "string"
}, - "Bed": { },
- "floor": {
- "floor_id": 0,
- "floor_name": "string"
}
}
}Resolves hospital-facing patient and inpatient identifiers to internal IDs and resolves caregiver_id to the hospital nurse's internal nurse_id before calling get_handover. The upstream time zone is read from the hospital organization and defaults to Asia/Kolkata.
| hospital_id required | string Example: hospital_id=9 |
| patient_id required | string Example: patient_id=HOSP-PAT-007 Hospital patient identifier resolved through Patient.hospital_patient_id |
| hospital_inpatient_id required | string Example: hospital_inpatient_id=INP-HOSP-PAT-007 Hospital inpatient identifier resolved through Inpatients.hospital_inpatient_id |
| caregiver_id required | string Example: caregiver_id=CG-001 Caregiver identifier resolved to the hospital nurse's internal nurse_id |
| type | string Default: "all" |
{ }Returns the speciality dashboard, laboratory data, and inpatient vitals generated by the patient-summary service. The patient and inpatient admission are validated against the hospital. When practitioner_id is supplied, the doctor is resolved from it; otherwise the inpatient admission's primary doctor is used.
| hospital_id required | string Example: hospital_id=9 Hospital identifier used for tenant validation |
| patient_id required | string Example: patient_id=HOSP-PAT-007 Hospital patient identifier resolved through Patient.hospital_patient_id |
| hospital_inpatient_id required | string Example: hospital_inpatient_id=INP-HOSP-PAT-007 Hospital inpatient identifier resolved through Inpatients.hospital_inpatient_id |
| practitioner_id | string Example: practitioner_id=1001 Optional practitioner identifier; overrides the inpatient primary doctor |
| list_headings | Array of strings Optional dashboard headings to include in the generated summary |
{- "list_headings": [
- "Diagnosis",
- "Medication",
- "Vitals"
]
}{- "speciality_dashboard": { },
- "lab_data": { },
- "ipd_vitals": [
- { }
]
}Updates an inpatient record using hospital_inpatient_id for a given hospital, or creates the inpatient admission when it does not exist. This endpoint can assign or change the primary doctor using practitioner_id, and can also update floor, bed, ward, admission date, attender details, and insurance details. When bed_no changes, bed occupancy linkage is updated as part of the same request. Patient category is always stored as Inpatient by the server.
| hospital_id required | string Example: hospital_id=9 Hospital ID used to resolve and validate the organization |
| hospital_inpatient_id required | string HMS inpatient identifier used to locate the inpatient record |
| practitioner_id required | string Practitioner ID of the doctor to assign as the inpatient's primary doctor |
| floor_id required | integer Floor to assign to the inpatient |
| bed_no | string or null Bed number to assign; an empty or null value clears the bed assignment |
| ward | string or null Ward name to assign; an empty or null value clears the ward |
| patient_id required | string Hospital patient identifier; an existing Patient is reused or a new Patient is created |
| in_date | string or null <date-time> Admission date/time; omitted, empty, or null defaults to the current date and time |
| attender_mobile_no | string or null Optional attender mobile number; empty or null clears the value |
| insurance_type | string or null Optional insurance type; empty or null clears the value |
| attender_name | string or null Optional attender name; empty or null clears the value |
| attender_relation | string or null Optional relation of the attender to the patient; empty or null clears the value |
{- "hospital_inpatient_id": "IN-GEN9-202601-00025",
- "practitioner_id": "108",
- "floor_id": 29,
- "bed_no": "B123",
- "ward": "General",
- "patient_id": "HOSP-PAT-007",
- "in_date": "2025-01-06T10:00:00Z",
- "attender_mobile_no": "+919876543210",
- "insurance_type": "Cash",
- "attender_name": "Suresh Kumar",
- "attender_relation": "Brother"
}{- "message": "Inpatient updated successfully",
- "patient_created": false,
- "inpatient_created": false,
- "inpatient": {
- "inpatient_id": "IN-GEN9-202601-00025",
- "hospital_inpatient_id": "IN-GEN9-202601-00025",
- "patient_id": "GEN9-202601-00025",
- "ward": "General",
- "bed_no": "B123",
- "in_date": "2019-08-24T14:15:22Z",
- "out_date": "2026-01-16T10:30:00Z",
- "active": true,
- "Patient": {
- "patient_id": "string",
- "hospital_patient_id": "string",
- "first_name": "string",
- "last_name": "string",
- "phone_number": "string",
- "gender": "string"
}, - "primaryDoctor": {
- "doctor_id": 0,
- "first_name": "string",
- "last_name": "string"
}, - "Bed": { },
- "floor": {
- "floor_id": 0,
- "floor_name": "string"
}
}
}Retrieves all active inpatients assigned to a specific doctor. The doctor is resolved using practitioner_id and filtered by hospital_id. Returns patient, doctor, nurse, and bed details.
| practitioner_id required | string |
| hospital_id required | string |
{- "practitioner_id": "0123",
- "hospital_id": "9"
}[- {
- "inpatient_id": "IN-ORG1-202601-00001",
- "patient_id": "ORG1-202601-00001",
- "in_date": "2026-01-05",
- "out_date": null,
- "patient": {
- "patient_id": "string",
- "hospital_patient_id": "string",
- "first_name": "string",
- "last_name": "string",
- "phone_number": "string",
- "gender": "string"
}, - "assignedDoctors": [
- {
- "doctor_id": 12,
- "doctor_name": "Dr. Ravi Kumar"
}
], - "assignedNurses": [
- {
- "nurse_id": 5,
- "nurse_name": "Anitha S",
- "shift": "Day"
}
], - "bed": {
- "bed_no": "B12",
- "ward": "Ward-A",
- "status": "occupied",
- "inpatient_id": "IN-ORG1-202601-00001"
}
}
]Returns the list of nurses associated with the given hospital_id. The hospital_id is used to fetch the corresponding organization, and then all nurses under that organization are returned.
| hospital_id required | string Example: hospital_id=9 |
| x-api-key required | string Example: your-api-key-here |
{- "message": "Nurse list fetched successfully",
- "count": 3,
- "data": [
- {
- "nurse_id": "NURSE001",
- "first_name": "Priya",
- "last_name": "K",
- "phone_number": "+919876543210",
- "organization_id": "ORG123"
}
]
}Creates a new nurse for the specified hospital_id. The hospital_id is mapped to an organization and the nurse is created under that organization. Email is optional—if not provided, a unique email is auto-generated based on the nurse name and organization.
| hospital_id required | string Example: hospital_id=9 |
| x-api-key required | string Example: your-api-key-here |
| firstname required | string |
| lastname required | string |
string <email> | |
| phone | string |
| floor_id required | integer |
| caregiver_id required | string |
| nurse_category | string Enum: "Ward Nurse" "ICU Nurse" "ER Nurse" Optional nurse category. A blank value is stored as null. |
{- "firstname": "Sarah",
- "lastname": "John",
- "email": "",
- "phone": "994056789",
- "floor_id": 2,
- "caregiver_id": "LI7897",
- "nurse_category": "Ward Nurse"
}{- "message": "Nurse created successfully",
- "data": {
- "nurse_id": "NURSE102",
- "first_name": "Sarah",
- "last_name": "John",
- "phone_number": "994056789",
- "floor_id": 2,
- "caregiver_id": "LI7897",
- "role": "nurse,nurse_admin",
- "shift": "day",
- "organization_id": "ORG123"
}
}This API assigns nurses (via caregiver_id) and doctors (via practitioner_id)
to an inpatient.
It accepts single or multiple IDs for both caregivers and practitioners.
| hospital_id required | string Hospital ID |
| inpatient_id required | string |
| caregiver_id | string Caregiver ID (nurse) - can be a single string or array of strings |
| practitioner_id | string Practitioner ID (doctor) - can be a single string or array of strings |
{- "inpatient_id": "IN-GEN9-202508-00004",
- "caregiver_id": "carescribe-nurse001",
- "practitioner_id": "123"
}{- "message": "Inpatient assignment processed",
- "data": {
- "inpatient_id": "string",
- "assigned_nurses": [
- {
- "caregiver_id": "string",
- "nurse_id": 0
}
], - "assigned_doctors": [
- {
- "practitioner_id": "string",
- "doctor_id": 0
}
]
}
}Returns the list of inpatients assigned to a nurse (caregiver_id) in a given hospital. - Verifies caregiver_id and hospital_id. - Finds nurse using caregiver_id. - Finds organization using hospital_id. - Fetches all inpatient_ids assigned to that nurse. - Applies optional date filter to fetch inpatients active on that date. - Includes details of patient, assigned doctors, assigned nurses, and bed information.
| x-api-key required | string Example: your-api-key-here |
| caregiver_id | string |
| date | string |
| timeZone | string |
| hospital_id | string |
{- "caregiver_id": "carescribe-nurse001",
- "date": "2025-11-19",
- "timeZone": "Asia/Kolkata",
- "hospital_id": "9"
}{- "caregiver_id": "carescribe-nurse001",
- "hospital_id": 9,
- "data": [
- {
- "inpatient_id": "IN-GEN9-202511-00463",
- "patient_id": "P-10023",
- "in_date": "2025-11-18T10:00:00Z",
- "out_date": null,
- "Patient": {
- "patient_id": "P-10023",
- "hospital_patient_id": "HP-09-221",
- "first_name": "Sneha",
- "last_name": "Rao",
- "phone_number": "9876543210",
- "gender": "Female"
}, - "assignedDoctors": [
- {
- "doctor_id": "100",
- "doctor_name": "Dr. Arjun Sharma"
}
], - "assignedNurses": [
- {
- "nurse_id": "N-22",
- "caregiver_id": "carescribe-nurse001",
- "nurse": "Priya Das",
- "shift": "Night"
}
], - "bed": {
- "bed_no": "B12",
- "ward": "General",
- "status": "Occupied",
- "inpatient_id": "IN-GEN9-202511-00463"
}
}
]
}Fetch nurse details by caregiver_id. Requires hospital_id and caregiver_id as query parameters.
| hospital_id required | string Hospital ID |
| caregiver_id required | string Caregiver ID linked to nurse |
{- "message": "Nurse fetched successfully",
- "data": { }
}Fetches the To-Do details for a doctor using hospital_inpatient_id and hospital_id. The API first attempts to retrieve data from the chatbot service. If the chatbot fails, it falls back to fetching interaction records from the database.
| hospital_inpatient_id required | string Example: hospital_inpatient_id=IN-GEN9-202601-00008 Hospital inpatient identifier |
| hospital_id required | string Example: hospital_id=9 Hospital ID |
{- "patient_id": "GEN9-202601-00048",
- "inpatient_id": "IN-GEN9-202601-00008",
- "todo_data": [
- {
- "interaction_id": "102463",
- "created_at": "2026-01-15T10:30:00Z",
- "gcs_uri": "gs://medscribe-dev/webm_files/todos/record-notes-9_GEN9-202601-00048_2382db3c-13e2-4746-aa21-cbfd7d8ce2a0.txt",
- "todos": [
- {
- "investigations": [ ],
- "opinions": [ ],
- "prescription_tasks": [
- {
- "medication_name": "(CALPOL TABLET)",
- "medication_type": "Tablet",
- "route": "Oral",
- "dosage": "",
- "dosage_time": [
- "6:00 AM",
- "6:00 PM"
], - "duration": "1 week",
- "instructions": "Take one in the morning and one at night. Follow up in one week.",
- "med_status": "continue",
- "scheduled_date": "2026-01-22T09:00:00Z",
- "frequency_morning": [
- {
- "frequency": "1",
- "status": "Pending"
}
], - "frequency_afternoon": [
- {
- "frequency": "string",
- "status": "string"
}
], - "frequency_evening": [
- {
- "frequency": "string",
- "status": "string"
}
], - "frequency_night": [
- {
- "frequency": "1",
- "status": "Pending"
}
]
}
]
}
]
}
]
}Approves a doctor's todo item using hospital_inpatient_id. Fetches patient_id and inpatient_id from the database. Calls chatbot service (doc_approved) if available, otherwise uses fallback.
| hospital_id required | string Example: hospital_id=9 Hospital ID |
| hospital_inpatient_id required | string Example: hospital_inpatient_id=IN-GEN9-202601-00008 Hospital inpatient identifier |
| interaction_id required | string Example: interaction_id=102463 Interaction ID to approve |
Todo data to be approved
| patient_id | string |
| inpatient_id | string |
Array of objects |
{- "patient_id": "GEN9-202601-00048",
- "inpatient_id": "IN-GEN9-202601-00008",
- "todo_data": [
- {
- "interaction_id": "102463",
- "created_at": "2026-01-15T10:30:00Z",
- "gcs_uri": "gs://medscribe-dev/webm_files/todos/record-notes-9_GEN9-202601-00048_2382db3c-13e2-4746-aa21-cbfd7d8ce2a0.txt",
- "todos": [
- {
- "investigations": [ ],
- "opinions": [ ],
- "prescription_tasks": [
- {
- "medication_name": "(CALPOL TABLET)",
- "medication_type": "Tablet",
- "route": "Oral",
- "dosage": "",
- "dosage_time": [
- "6:00 AM",
- "6:00 PM"
], - "duration": "1 week",
- "instructions": "Take one in the morning and one at night. Follow up in one week.",
- "med_status": "continue",
- "scheduled_date": "2026-01-22T09:00:00Z",
- "frequency_morning": [
- {
- "frequency": "1",
- "status": "Pending"
}
], - "frequency_afternoon": [
- {
- "frequency": "string",
- "status": "string"
}
], - "frequency_evening": [
- {
- "frequency": "string",
- "status": "string"
}
], - "frequency_night": [
- {
- "frequency": "1",
- "status": "Pending"
}
]
}
]
}
]
}
]
}{- "message": "Doctor approved for this interaction_id=102474 and patient_id=GEN9-202601-00048."
}Fetches the approved todo list for a nurse using hospital_inpatient_id. The API first queries the chatbot service (approved-todo-list). If the chatbot is unreachable or fails, the system returns an empty fallback response.
| hospital_id required | string Example: hospital_id=9 Hospital ID |
| hospital_inpatient_id required | string Example: hospital_inpatient_id=IN-GEN9-202601-00008 Hospital inpatient identifier |
{- "patient_id": "GEN9-202601-00048",
- "inpatient_id": "IN-GEN9-202601-00008",
- "todo_data": [
- {
- "interaction_id": "102456",
- "created_at": "2026-01-07 11:17:07",
- "gcs_uri": "gs://duckdb-carescribe/duckdb/database/patient/GEN9-202601-00048/GEN9-202601-00048-102456_todos-lab_data.parquet",
- "todos": [
- {
- "investigations": [ ],
- "opinions": [ ],
- "prescription_tasks": [
- {
- "medication_name": "(CALPOL TABLET)",
- "medication_type": "Tablet",
- "route": "Oral",
- "dosage": "",
- "dosage_time": [
- "6:00 AM",
- "6:00 PM"
], - "duration": "1 week",
- "instructions": "Take one in the morning and one at night. Follow up in one week.",
- "med_status": "continue",
- "scheduled_date": "2026-01-07",
- "frequency_morning": [
- {
- "frequency": "1",
- "status": "Pending"
}
], - "frequency_afternoon": [
- {
- "frequency": "1",
- "status": "Pending"
}
], - "frequency_evening": [
- {
- "frequency": "1",
- "status": "Pending"
}
], - "frequency_night": [
- {
- "frequency": "1",
- "status": "Pending"
}
]
}
]
}
]
}
]
}Updates the status of a nurse's todo item using hospital_inpatient_id. The API first attempts to update status using the chatbot (nurse-status-update). If the chatbot fails, a fallback success response is returned.
| hospital_id required | string Example: hospital_id=9 Hospital ID |
| hospital_inpatient_id required | string Example: hospital_inpatient_id=IN-GEN9-202601-00008 Hospital inpatient identifier |
Todo update payload with interaction_id, gcs_uri, and todos array
| interaction_id | string |
| gcs_uri | string |
Array of objects |
{- "interaction_id": "102456",
- "gcs_uri": "gs://duckdb-carescribe/duckdb/database/patient/GEN9-202601-00048/GEN9-202601-00048-102456_todos-lab_data.parquet",
- "todos": [
- {
- "investigations": [ ],
- "opinions": [ ],
- "prescription_tasks": [
- {
- "medication_name": "(CALPOL TABLET)",
- "medication_type": "Tablet",
- "route": "Oral",
- "dosage": "",
- "dosage_time": [
- "6:00 AM",
- "6:00 PM"
], - "duration": "1 week",
- "instructions": "Take one in the morning and one at night. Follow up in one week.",
- "med_status": "continue",
- "scheduled_date": "2026-01-07",
- "frequency_morning": [
- {
- "frequency": "1",
- "status": "Pending"
}
], - "frequency_afternoon": [
- {
- "frequency": "1",
- "status": "Pending"
}
], - "frequency_evening": [
- {
- "frequency": "1",
- "status": "Pending"
}
], - "frequency_night": [
- {
- "frequency": "1",
- "status": "Completed"
}
]
}
]
}
]
}{- "message": "Successfully updated"
}Creates or updates a Master Health Checkup (MHC) patient, assigns doctor, and optionally uploads vitals.
MHC integration payload
| hospital_id required | string |
| package_name required | string |
required | object |
required | object |
Array of objects |
{- "hospital_id": "9",
- "package_name": "Executive Health Checkup",
- "doctor": {
- "practitioner_id": "123"
}, - "patient": {
- "patient_id": "HPID1001",
- "name": "Ravi Kumar",
- "age": 42,
- "gender": "Male",
- "language": "English",
- "date_of_birth": "1984-01-15",
- "phone_number": "9876543210",
- "address1": "12 MG Road, Bengaluru",
- "marital_status": "Married",
- "occupation": "Engineer",
- "past_history": "Diabetes,Hypertension"
}, - "vitals": [
- {
- "height": 172,
- "weight": 78,
- "bmi": 26.4,
- "systolic_bp": 130,
- "diastolic_bp": 85,
- "pulse_rate": 78,
- "temperature": 98.6,
- "spo2": 98
}
]
}{- "message": "MHC patient updated successfully.",
- "patient_id": "GEN9-202605-00010",
- "hospital_patient_id": "HPID1001",
- "mhc_id": "MHC-GEN9-202605-00011",
- "package_name": "Executive Health Checkup",
- "doctor_list": [
- 403
], - "vitals_uploaded": true
}Retrieves generated Master Health Checkup (MHC) form data for a patient by calling the OPD chatbot upstream service.
Use this GET endpoint after creating or updating an MHC patient via POST /patient/softwareintegrationmhc.
The API resolves the patient (by internal patient_id or hospital_patient_id), locates the active MHC record,
and returns the generated form payload for the requested form_name.
Response form_name uses internal keys (eye_checkup, dental_checkup, gynaec_checkup,
history_physical_examination, ent_checkup). The matching question_text field echoes the requested label.
| hospital_id required | string Example: hospital_id=9 Unique hospital identifier (maps to organization) |
| patient_id required | string Example: patient_id=ragulID1002 Patient identifier (internal patient_id or hospital_patient_id) |
| form_name required | string Enum: "Generate Eye Checkup" "Generate Dental Checkup" "Generate Gynecology checkup Report" "Generate History and Physical Examination" "Generate ENT Checkup" Example: form_name=Generate ENT Checkup MHC form to generate. |
| mhc_id | string Example: mhc_id=MHC-GEN9-202606-00002 Optional MHC record identifier. When omitted, the most recently updated active MHC record is used. |
{- "status": true,
- "hospital_id": "9",
- "patient_id": "ragulID1002",
- "internal_patient_id": "GEN9-202606-00221",
- "hospital_patient_id": "ragulID1002",
- "mhc_id": "MHC-GEN9-202606-00002",
- "form_name": "eye_checkup",
- "question_text": "Generate Eye Checkup",
- "interaction_id": 119880,
- "force_regenerate": 119880,
- "data": {
- "response": { }
}
}Creates or updates a patient and inpatient record. Generates a secure session URL for clinician access.
| hospital_id required | string |
object | |
object | |
required | object |
required | object |
{- "hospital_id": "9",
- "doctor": {
- "practitioner_id": "1001"
}, - "nurse": {
- "caregiver_id": "LI7987"
}, - "patient": {
- "patient_id": "HOSP-PAT-001",
- "name": "John Doe",
- "age": 45,
- "gender": "Male",
- "language": "English"
}, - "inpatient": {
- "hospital_inpatient_id": "INP-HOSP-PAT-001",
- "in_date": "2026-02-06T10:00:00.000Z",
- "floor_id": "2"
}
}{- "message": "Patient already exists. Inpatient record updated.",
- "path": "Doctor flow: /session_id?...&practitioner_id=1001\nNurse flow: /session_id?...&caregiver_id=LI7987\n",
- "patient_id": "4435c603-a0b8-48a6-9766-4ca911770fac",
- "inpatient_id": "INP-HOSP-PAT-001",
- "interaction_id": 105574
}Retrieves the latest patient interactions for a given hospital and hospital_patient_id.
The API fetches interaction details (Edited OPD or Audio URL), reads the associated file from Google Cloud Storage (if available), and returns parsed interaction notes.
If data is not yet generated, the API returns a retry message.
| hospital_id required | string Example: hospital_id=9 Unique hospital identifier (maps to organization) |
| patient_id required | string Example: patient_id=GEN9-202602-00133 Hospital patient identifier (hospital_patient_id) |
| limit | integer Example: limit=3 Number of latest interactions to return (min 1, max 3) |
{- "count": 1,
- "data": [
- {
- "interaction_id": 108055,
- "patient_id": "QAT70-202603-00157",
- "doctor_id": 318,
- "patient": {
- "patient_id": "QAT70-202603-00157",
- "first_name": "zuu",
- "last_name": "",
- "hospital_patient_id": "QAT70-202603-00157",
- "date_of_birth": null,
- "gender": null,
- "age": null
}, - "interaction_date": "2026-03-04T16:34:52.000Z",
- "interaction_detail_type": "Audio url",
- "created_at": "2026-03-04T16:35:06.068Z",
- "data": {
- "vitals": [ ],
- "dashboard_notes": { },
- "dermatology_notes": { },
- "assessment": [ ],
- "past_medications_templates": [ ],
- "phonetic_uri": "gs://medscribe-dev/70/GENERAL AND LAPAROSCOPIC SURGERY/318/medication_autocorrect.csv",
- "vaccines": [ ],
- "medication_templates": [
- {
- "medication_name": "PARACETAMOL 500MG (CALPOL 500MG TAB)",
- "brand_name": "CALPOL 500MG TAB",
- "brand_id": "9141",
- "generic_name": "PARACETAMOL 500MG",
- "strength": "500 mg",
- "uom": "mg",
- "frequency_morning": "1",
- "frequency_afternoon": "1",
- "frequency_evening": "1",
- "frequency_night": "0",
- "days": null,
- "quantity": null,
- "dosage_value": "500",
- "prn": "",
- "route": "Oral",
- "drug_type": "tablet",
- "vaccine": false,
- "duration": "",
- "instructions": "Take on alternative days, three times a day.",
- "frequency_code": "ATHTMAE",
- "frequency_description": "Alternate Days Thrice Time (Morn,Noon,Eve)(1-1-1-0)",
- "route_code": "24",
- "route_description": "Oral",
- "uom_code": "NUMBR",
- "uom_description": "No(s)"
}
], - "Diagnosis": "**Fever**",
- "chief_complaints": "**Fever**.",
- "history_of_presenting_illness": "Patient presents with complaints of **fever**.",
- "follow_up": "Follow up after **one week**."
}
}
]
}Retrieves the latest visit data for a patient in a single organization. The organization is resolved from hospital_id and the patient is resolved from patient_id (the hospital_patient_id).
If generated visit data is not yet available, the response indicates that processing is pending and can include a retry interval.
| hospital_id required | string Example: hospital_id=9 Unique hospital identifier used to resolve the organization |
| patient_id required | string Example: patient_id=GEN9-202602-00133 Hospital patient identifier (hospital_patient_id) |
| limit | integer [ 1 .. 3 ] Default: 1 Number of latest visits to return (min 1, max 3; defaults to 1) |
{- "count": 0,
- "data": [ ],
- "message": "Response not yet generated. Please wait 30 seconds and try again.",
- "code": "RESPONSE_NOT_GENERATED",
- "retry_after_seconds": 30
}Retrieves route master data for the given hospital_id.
This API:
If the organization is not found, or route data is unavailable, the API returns an error.
| hospital_id required | string Example: hospital_id=9 Unique hospital identifier used to find the organization |
[- {
- "ROUTE CODE": "IV",
- "ROUTE DESCRIPTION": "Intravenous"
}
]Uploads a Route master CSV for the specified hospital_id (query parameter). The CSV requires ROUTE CODE and ROUTE DESCRIPTION. ACTIVE FROM and ACTIVE TO are optional and must use DD/MM/YYYY. Header matching is case-insensitive; unknown or duplicate headers are rejected. Use the uploadRouteCsv API only for the initial upload of Route master data. If this API is called again for appending data, the existing Route list will be completely deleted and replaced with the newly uploaded CSV data. For any modifications, additions, or updates to the existing Route list, please use the updateRouteCsvs API.
| hospital_id required | string Hospital ID used to resolve organization |
| csvFile required | string <binary> CSV file containing route data (ROUTE CODE, ROUTE DESCRIPTION) |
{- "message": "CSV uploaded and saved",
- "invalid": [
- {
- "ROUTE CODE": "",
- "ROUTE DESCRIPTION": "Oral",
- "error": "ROUTE CODE is empty"
}
]
}Uploads a Route CSV file for the specified hospital_id and merges it with the existing Route data (if available) stored for the organization.
Requirements: - ROUTE CODE and ROUTE DESCRIPTION are required headers. - ACTIVE FROM and ACTIVE TO are optional headers using DD/MM/YYYY. - Header matching is case-insensitive; unknown or duplicate headers are rejected.
Validation: - If duplicate ROUTE CODE values are found in the uploaded CSV, those rows will be
reported in the invalid field of the response.
Merge Behavior: - ROUTE CODE is used as the unique key. - If a ROUTE CODE already exists in the stored Route data, the uploaded value overwrites the existing one.
| hospital_id required | string Hospital ID used to resolve organization |
| csvFile required | string <binary> CSV file containing route data (ROUTE CODE, ROUTE DESCRIPTION) |
{- "message": "Route data updated successfully (merged, duplicates removed)",
- "invalid": [
- {
- "ROUTE CODE": "24",
- "ROUTE DESCRIPTION": "Oral",
- "error": "ROUTE CODE already exists"
}
]
}Uploads Route master data from a direct array or an object containing routes, rows, data, or items, then stores it as CSV. ROUTE CODE and ROUTE DESCRIPTION are required; ACTIVE FROM and ACTIVE TO are optional dates in DD/MM/YYYY format. This API should be used only for the initial upload of Route data. If this API is called again, the existing Route list will be completely deleted and replaced with the newly uploaded data. For any modifications or additions to the existing Route list, please use the updateRouteJson API.
| hospital_id required | string The ID of the hospital/organization |
Array of objects Array of route objects |
{- "data": [
- {
- "ROUTE CODE": "string",
- "ROUTE DESCRIPTION": "string"
}
]
}{- "message": "JSON uploaded and saved as CSV",
- "invalid": [
- {
- "index": 1,
- "error": "ROUTE DESCRIPTION is empty"
}
], - "totalItems": 2,
- "invalidItemsCount": 0
}Merges a direct JSON array, or an object containing routes, rows, data, or items, into stored route data using ROUTE CODE as the key. ACTIVE FROM and ACTIVE TO are optional dates in DD/MM/YYYY format.
The uploaded Route json will be merged with the existing route data (if available) stored for the organization and saved as a CSV file.
| hospital_id required | string Hospital ID used to identify the organization |
Array of objects |
{- "data": [
- {
- "ROUTE CODE": "string",
- "ROUTE DESCRIPTION": "string"
}
]
}{- "status": "success",
- "message": "Route data updated successfully (merged, stored as CSV)",
- "invalid": [
- {
- "ROUTE CODE": "24",
- "ROUTE DESCRIPTION": "Oral",
- "error": "ROUTE CODE already exists"
}
]
}Deletes the route CSV file associated with the given hospital_id.
This API:
| hospital_id required | string Example: hospital_id=9 Unique hospital identifier used to find the organization |
{- "message": "Route CSV removed successfully"
}Retrieves frequency master data for the given hospital_id.
This API:
If the organization is not found, or frequency data is unavailable, the API returns an error.
| hospital_id required | string Example: hospital_id=9 Unique hospital identifier used to find the organization |
[- {
- "FREQUENCY CODE": "OD",
- "FREQUENCY DESCRIPTION": "Once Daily"
}
]Uploads a Frequency master CSV for the given hospital_id (query param) and stores it for the organization. The CSV requires FREQUENCY CODE and FREQUENCY DESCRIPTION. ACTIVE FROM and ACTIVE TO are optional and must use DD/MM/YYYY. Header matching is case-insensitive; unknown or duplicate headers are rejected.
Validation:
invalid.invalid.| hospital_id required | string Hospital ID used to resolve organization |
| csvFile required | string <binary> CSV file with headers FREQUENCY CODE and FREQUENCY DESCRIPTION |
{- "message": "CSV uploaded and saved",
- "invalid": [
- {
- "FREQUENCY CODE": "",
- "FREQUENCY DESCRIPTION": "Once daily",
- "error": "FREQUENCY CODE is empty"
}
]
}This API uploads or updates Frequency master data for a hospital using JSON input and stores it as a CSV file.
For the initial setup, this API can be used to upload the complete Frequency master list for the organization. If this API is called again, the existing Frequency list will be completely deleted and replaced with the newly uploaded data.
For any modifications or incremental updates to the existing Frequency list, please use the updateFrequencyJson API.
Requirements:
Validation:
invalid.invalid field. A 400 is returned when no valid rows remain.Behavior:
The final dataset is stored as a CSV file and linked to the organization.
| hospital_id required | string The ID of the hospital/organization |
Array of objects Array of frequency objects |
{- "data": [
- {
- "FREQUENCY CODE": "string",
- "FREQUENCY DESCRIPTION": "string"
}
]
}{- "message": "JSON uploaded and saved as CSV",
- "invalid": [
- {
- "index": 1,
- "error": "FREQUENCY DESCRIPTION is empty"
}
], - "totalItems": 2,
- "invalidItemsCount": 0
}This API updates frequency master data for a hospital using JSON input.
The provided Frequency list will be merged with the existing frequency data (if available) stored for the organization and saved as a CSV file.
Requirements:
Validation:
invalid.invalid. A 400 is returned when no valid rows remain.Merge Behavior:
The final merged dataset is stored as a CSV file and linked to the organization.
| hospital_id required | string Hospital ID used to resolve organization |
Array of objects Array of frequency objects. Can be sent directly as an array or wrapped as an object with a data property. |
{- "data": [
- {
- "FREQUENCY CODE": "string",
- "FREQUENCY DESCRIPTION": "string"
}
]
}{- "status": "success",
- "message": "Frequency data updated successfully (merged, stored as CSV)",
- "invalid": [
- {
- "FREQUENCY CODE": "OD",
- "FREQUENCY DESCRIPTION": "Once daily",
- "error": "FREQUENCY CODE already exists"
}
]
}This API updates frequency data for a hospital.
The uploaded Frequency CSV will be merged with the existing frequency data (if available) stored for the organization and saved as a CSV file.
Requirements:
Validation:
invalid field of the response.invalid.invalid.Merge Behavior:
The final merged dataset will be stored as a CSV file and linked to the organization.
| hospital_id required | string Hospital ID used to resolve organization |
| csvFile required | string <binary> CSV file containing frequency data (FREQUENCY CODE, FREQUENCY DESCRIPTION) |
{- "message": "Frequency data updated successfully (merged, duplicates removed)",
- "invalid": [
- {
- "FREQUENCY CODE": "OD",
- "FREQUENCY DESCRIPTION": "Once daily",
- "error": "FREQUENCY CODE already exists"
}
]
}Deletes the frequency CSV file associated with the given hospital_id.
This API:
Returns success message after deletion.
| hospital_id required | string Example: hospital_id=9 Unique hospital identifier used to find the organization |
{- "message": "Frequency CSV removed successfully"
}Updates medication records in the CSV file using BRAND ID as the identifier. Required Query Parameters: - hospital_id Request Body: - medications (array of medication objects with BRAND ID and fields to update) Notes: - Validates hospital_id and organization existence. - Ensures medication CSV exists and contains BRAND ID column. - Updates rows matching BRAND ID. - Prevents duplicate BRAND NAME and GENERIC NAME combinations. - Returns invalid and not found entries if any issues occur.
| hospital_id required | string Example: hospital_id=9 Unique hospital identifier. |
required | Array of objects List of medication records to update. |
{- "medications": [
- {
- "BRAND ID": "L917",
- "BRAND NAME": "LUBIC JELLY {50GM}",
- "GENERIC NAME": "Lubricant Jelly",
- "UOM DESCRIPTION": "No(s)",
- "UOM CODE": "NUMBR"
}
]
}{- "message": "Medication rows updated successfully",
- "updated": [
- { }
], - "url": "gs://bucket/medication/updated_file.csv"
}Deletes medication records from the CSV file using BRAND ID as the identifier. Required Query Parameters: - hospital_id Request Body: - medications (array containing BRAND ID values to delete) Notes: - Validates hospital_id and organization existence. - Ensures medication CSV exists and contains BRAND ID column. - Deletes rows matching provided BRAND IDs. - Returns deleted rows and not_found entries if any IDs do not exist. - If all rows are deleted, the CSV file is removed from storage.
| hospital_id required | string Example: hospital_id=9 Unique hospital identifier. |
required | Array of objects List of medication entries to delete. |
{- "medications": [
- {
- "BRAND ID": "L917"
}
]
}{- "message": "Medication rows deleted successfully",
- "deleted": [
- { }
], - "url": "gs://bucket/medication/updated_file.csv",
- "data": [
- { }
]
}Fetches all Drug Allergy CSV records stored for a hospital. Required Query Parameters: - hospital_id Notes: - Returns all drug allergy rows from the stored CSV - If no CSV exists for the hospital, API returns 404
| hospital_id required | string Example: hospital_id=9 Unique hospital identifier |
[- {
- "DRUGALLERGY CODE": "A001",
- "DRUGALLERGY NAME": "Penicillin Allergy",
- "DRUGALLERGY DESCRIPTION": "Rash and swelling reaction"
}
]Uploads a CSV file containing drug allergy data for a hospital.
Required Query Parameters: - hospital_id
Request: - Multipart form-data with a CSV file field named csvFile
CSV headers: - The CSV must contain the following required column names:
.csv files are accepted - Duplicate DRUGALLERGY CODE values are not allowed - Invalid rows will be returned in the response| hospital_id required | string Example: hospital_id=9 Unique hospital identifier |
| csvFile required | string <binary> CSV file containing drug allergy data |
{- "message": "Drug Allergy CSV uploaded and saved",
- "invalid": [
- { }
]
}Updates existing Drug Allergy CSV data for a hospital.
The uploaded CSV will be merged with the existing stored CSV data using DRUGALLERGY CODE as the unique identifier.
Behavior: - Existing rows with matching DRUGALLERGY CODE will be updated - New DRUGALLERGY CODE rows will be added - Duplicate DRUGALLERGY CODE values inside the uploaded CSV are not allowed
Required Query Parameters: - hospital_id
Request: - Multipart form-data with a CSV file field named csvFile
CSV headers: - The CSV must contain the following required column names:
.csv files are accepted - Duplicate DRUGALLERGY CODE values are not allowed within upload file - Invalid rows will be returned in the response - Existing CSV data will be preserved and merged| hospital_id required | string Example: hospital_id=9 Unique hospital identifier |
| csvFile required | string <binary> CSV file containing updated drug allergy data |
{- "message": "Drug Allergy CSV updated successfully",
- "invalid": [
- { }
]
}Uploads Drug Allergy master data in JSON format for a hospital.
Required Query Parameters: - hospital_id
Request Body: - JSON payload containing an allergies array
Accepted alternatives: - Direct array, or drugAllergies, drug_allergies, rows, data, or items
Validation Rules: - Each allergy object requires DRUGALLERGY CODE and DRUGALLERGY NAME - DRUGALLERGY DESCRIPTION, ACTIVE FROM, and ACTIVE TO are optional - DRUGALLERGY CODE values must be unique within the request - Required values cannot be empty - Duplicate DRUGALLERGY CODE entries will result in validation errors Notes: - hospital_id can be passed either in query params or request body - Invalid rows will be returned separately in the response - Data is stored and converted internally into CSV format
| hospital_id required | string Example: hospital_id=9 Unique hospital identifier |
| hospital_id | string |
required | Array of objects |
{- "hospital_id": "9",
- "allergies": [
- {
- "DRUGALLERGY CODE": "A001",
- "DRUGALLERGY NAME": "Penicillin Allergy",
- "DRUGALLERGY DESCRIPTION": "Rash and swelling reaction"
}
]
}{- "message": "Drug Allergy JSON uploaded and saved",
- "invalid": [
- { }
]
}Updates existing Drug Allergy master data using JSON payload.
The uploaded allergy records are merged with existing stored data using DRUGALLERGY CODE as the unique identifier.
Behavior: - Existing allergy rows with matching DRUGALLERGY CODE will be updated - New DRUGALLERGY CODE rows will be added - Duplicate DRUGALLERGY CODE values inside request payload are not allowed
Required Query Parameters: - hospital_id
Request Body: - JSON payload containing an allergies array
Accepted alternatives: - Direct array, or drugAllergies, drug_allergies, rows, data, or items
Validation Rules: - Each allergy object requires DRUGALLERGY CODE and DRUGALLERGY NAME - DRUGALLERGY DESCRIPTION, ACTIVE FROM, and ACTIVE TO are optional - Required values cannot be empty - Duplicate DRUGALLERGY CODE values are not allowed within request payload
Notes: - hospital_id can be passed either in query params or request body - Existing allergy data will be preserved and merged - Invalid rows will be returned separately in the response
| hospital_id required | string Example: hospital_id=9 Unique hospital identifier |
| hospital_id | string |
required | Array of objects |
{- "hospital_id": "9",
- "allergies": [
- {
- "DRUGALLERGY CODE": "A001",
- "DRUGALLERGY NAME": "Updated Penicillin Allergy",
- "DRUGALLERGY DESCRIPTION": "Severe rash and swelling reaction"
}
]
}{- "message": "Drug Allergy JSON updated successfully",
- "invalid": [
- { }
]
}Updates specific Drug Allergy rows in the existing CSV data using DRUGALLERGY CODE as the unique identifier.
Behavior: - Only rows with matching DRUGALLERGY CODE values will be updated - DRUGALLERGY CODE itself cannot be modified - Partial updates are supported for other fields - Duplicate DRUGALLERGY CODE values within request payload are not allowed
Required Query Parameters: - hospital_id
Validation Rules: - Each allergy object must contain:
code in query/body or DRUGALLERGY CODE in the body| hospital_id required | string Example: hospital_id=9 Unique hospital identifier |
| hospital_id | string |
required | Array of objects |
{- "hospital_id": "9",
- "allergies": [
- {
- "DRUGALLERGY CODE": "A0023569",
- "DRUGALLERGY NAME": "Updated Peanut Allergy",
- "DRUGALLERGY DESCRIPTION": "Updated allergy description"
}
]
}{- "message": "Drug Allergy rows updated successfully",
- "updated": [
- { }
],
}Deletes specific drug allergy rows from the existing Drug Allergy CSV using DRUGALLERGY CODE values.
Required Query Parameters: - hospital_id
Request Body: - allergies array containing DRUGALLERGY CODE values
The body may contain one code or use drugAllergies, drug_allergies, allergies, rows, data, or items. A single code may also be supplied with the code query parameter.
Notes: - Matching is case-insensitive - DRUGALLERGY CODE is mandatory - If any code is not found, API returns 404 - If all rows are deleted, the CSV file will be removed from storage
| hospital_id required | string Example: hospital_id=9 Unique hospital identifier |
| hospital_id | string |
required | Array of objects List of allergy rows to delete |
{- "hospital_id": "9",
- "allergies": [
- {
- "DRUGALLERGY CODE": "A0023569"
}
]
}{- "message": "Drug Allergy rows deleted successfully",
- "deleted": [
- {
- "DRUGALLERGY CODE": "A0023569",
- "DRUGALLERGY NAME": "Peanut Allergy",
- "DRUGALLERGY DESCRIPTION": "Severe allergic reaction to peanuts"
}
],
}Fetches all Food Allergy CSV records stored for a hospital. Required Query Parameters: - hospital_id Notes: - Returns all food allergy rows from the stored CSV - If no CSV exists for the hospital, API returns 404
| hospital_id required | string Example: hospital_id=9 Unique hospital identifier |
[- {
- "FOODALLERGY CODE": "F001",
- "FOODALLERGY NAME": "Peanut Allergy",
- "FOODALLERGY DESCRIPTION": "Severe allergic reaction to peanuts"
}
]Uploads a CSV file containing food allergy data for a hospital.
Required Query Parameters: - hospital_id
Request: - Multipart form-data with a CSV file field named csvFile
CSV headers: - The CSV must contain the following required column names:
| hospital_id required | string Example: hospital_id=9 Unique hospital identifier |
| csvFile required | string <binary> CSV file containing food allergy data |
{- "message": "Food Allergy CSV uploaded and saved",
- "invalid": [
- { }
]
}Updates the existing Food Allergy CSV data for a hospital by merging uploaded CSV rows with existing records using FOODALLERGY CODE.
Required Query Parameters: - hospital_id
Request: - Multipart form-data with a CSV file field named csvFile
CSV headers: - The CSV must contain the following required column names:
.csv files are accepted - Existing rows are updated using FOODALLERGY CODE - New FOODALLERGY CODE rows are added - Duplicate FOODALLERGY CODE values are not allowed - Invalid rows will be returned in the response| hospital_id required | string Example: hospital_id=9 Unique hospital identifier |
| csvFile required | string <binary> CSV file containing updated food allergy data |
{- "message": "Food Allergy CSV updated successfully",
- "invalid": [
- { }
]
}Uploads Food Allergy data in JSON format for a hospital.
Required Query Parameters: - hospital_id
Request Body: - JSON object containing a data array of food allergy records
Accepted body: - A direct array or foodAllergies, food_allergies, allergies, rows, data, or items - Each row requires:
| hospital_id required | string Example: hospital_id=9 Unique hospital identifier |
| hospital_id | string |
required | Array of objects List of food allergy records |
{- "hospital_id": "9",
- "data": [
- {
- "FOODALLERGY CODE": "ORDCN0277",
- "FOODALLERGY NAME": "Curd Allergy",
- "FOODALLERGY DESCRIPTION": "Curd Allergy"
}
]
}{- "message": "Food Allergy JSON uploaded and saved",
- "invalid": [
- { }
]
}Updates existing Food Allergy records using JSON payload for a hospital. New records are added and existing ones are updated.
Required Query Parameters: - hospital_id
Request Body: - JSON object containing a data array of food allergy records
Accepted body: - A direct array or foodAllergies, food_allergies, allergies, rows, data, or items - Each row requires:
| hospital_id required | string Example: hospital_id=9 Unique hospital identifier |
| hospital_id | string |
required | Array of objects List of food allergy records to update |
{- "hospital_id": "9",
- "data": [
- {
- "FOODALLERGY CODE": "ORDCN0277",
- "FOODALLERGY NAME": "Curdedd Allergy",
- "FOODALLERGY DESCRIPTION": "Curd Allergy"
}
]
}{- "message": "Food Allergy JSON updated successfully",
- "invalid": [
- { }
]
}Updates existing food allergy rows in the Food Allergy CSV using FOODALLERGY CODE as the unique identifier.
Required Query Parameters: - hospital_id
Request Body: - JSON payload containing a data array
Notes: - FOODALLERGY CODE must already exist in the CSV - Duplicate FOODALLERGY CODE values in request are not allowed - Only provided fields will be updated - FOODALLERGY CODE cannot be modified - Invalid or missing rows will be returned in the response
Required JSON Fields: - FOODALLERGY CODE
The body may be a direct array or use foodAllergies, food_allergies, allergies, rows, data, or items. A single row may instead use the code query/body field.
Updatable fields include FOODALLERGY NAME, FOODALLERGY DESCRIPTION, ACTIVE FROM, and ACTIVE TO. A single row may instead use the code query/body field.
| hospital_id required | string Example: hospital_id=9 Unique hospital identifier |
| hospital_id | string |
required | Array of objects |
{- "hospital_id": "9",
- "data": [
- {
- "FOODALLERGY CODE": "ORDCN0277",
- "FOODALLERGY NAME": "Updated Curd Allergy",
- "FOODALLERGY DESCRIPTION": "Updated curd allergy description"
}
]
}{- "message": "Food Allergy rows updated successfully",
- "updated": [
- {
- "FOODALLERGY CODE": "ORDCN0277",
- "FOODALLERGY NAME": "Updated Curd Allergy",
- "FOODALLERGY DESCRIPTION": "Updated curd allergy description"
}
],
}Deletes food allergy rows from the Food Allergy CSV using FOODALLERGY CODE as the unique identifier.
Required Query Parameters: - hospital_id
Request Body: - JSON payload containing a data array
Notes: - FOODALLERGY CODE must already exist in the CSV - Duplicate FOODALLERGY CODE values are ignored internally - If all rows are deleted, the CSV file will be removed - Missing or invalid codes will be returned in not_found
Required JSON Fields: - FOODALLERGY CODE
The body may be a direct array or use foodAllergies, food_allergies, allergies, rows, data, or items. A single row may instead use the code query/body field.
| hospital_id required | string Example: hospital_id=9 Unique hospital identifier |
| hospital_id | string |
required | Array of objects |
{- "hospital_id": "9",
- "data": [
- {
- "FOODALLERGY CODE": "ORDCN0279"
}
]
}{- "message": "Food Allergy rows deleted successfully",
- "deleted": [
- {
- "FOODALLERGY CODE": "ORDCN0279",
- "FOODALLERGY NAME": "Sunflower Seeds Allergy",
- "FOODALLERGY DESCRIPTION": "Sunflower Seed Allergy"
}
],
}Fetches all Other Allergy CSV records configured for a hospital. Required Query Parameters: - hospital_id Notes: - Returns all rows from the stored Other Allergy CSV - If no CSV data exists for the hospital, a 404 response is returned
| hospital_id required | string Example: hospital_id=9 Unique hospital identifier |
[- {
- "OTHERALLERGY CODE": "OTH001",
- "OTHERALLERGY NAME": "Dust Allergy",
- "OTHERALLERGY DESCRIPTION": "Sneezing and breathing irritation due to dust"
}
]Uploads a CSV file containing Other Allergy data for a hospital.
Required Query Parameters: - hospital_id
Request: - Multipart form-data with a CSV file field named csvFile
CSV headers: - The CSV must contain the following required column names:
Notes: - Only .csv files are accepted - Duplicate OTHERALLERGY CODE values are not allowed - Invalid rows will be returned in the response
| hospital_id required | string Example: hospital_id=9 Unique hospital identifier |
| csvFile required | string <binary> CSV file containing Other Allergy data |
{- "message": "Other Allergy CSV uploaded and saved",
- "invalid": [
- { }
]
}Updates the existing Other Allergy CSV data for a hospital by merging records from the uploaded CSV file using OTHERALLERGY CODE as the unique identifier.
Required Query Parameters: - hospital_id
Request: - Multipart form-data with a CSV file field named csvFile
CSV headers: - The CSV must contain the following required column names:
Notes: - Only .csv files are accepted - Existing rows with matching OTHERALLERGY CODE will be updated - New OTHERALLERGY CODE values will be added - Duplicate OTHERALLERGY CODE values in request are not allowed - Invalid rows will be returned in the response
| hospital_id required | string Example: hospital_id=9 Unique hospital identifier |
| csvFile required | string <binary> CSV file containing Other Allergy data |
{- "message": "Other Allergy CSV updated successfully",
- "invalid": [
- { }
]
}Uploads Other Allergy data in JSON format for a hospital.
Required Query Parameters: - hospital_id
Request Body: - JSON payload containing a data array
JSON fields: - OTHERALLERGY CODE - OTHERALLERGY NAME - OTHERALLERGY DESCRIPTION, ACTIVE FROM, and ACTIVE TO are optional
The body may be a direct array or use otherAllergies, other_allergies, allergies, rows, data, or items. Field names are normalized case-insensitively.
Notes: - Duplicate OTHERALLERGY CODE values are not allowed - Invalid rows will be returned in the response - If all rows are invalid, the API returns 400
| hospital_id required | string Example: hospital_id=9 Unique hospital identifier |
| hospital_id | string |
required | Array of objects |
{- "hospital_id": "9",
- "data": [
- {
- "OTHERALLERGY CODE": "ORDCN0290",
- "OTHERALLERGY NAME": "Grass Pollen Allergy",
- "OTHERALLERGY DESCRIPTION": "Grass Pollen Allergy"
}
]
}{- "message": "Other Allergy JSON uploaded and saved",
- "invalid": [
- { }
]
}Updates existing Other Allergy records using JSON payload data. Existing rows are matched and updated using OTHERALLERGY CODE as the unique identifier. New codes will be added if they do not already exist.
Required Query Parameters: - hospital_id
Request Body: - JSON payload containing a data array
JSON fields: - OTHERALLERGY CODE - OTHERALLERGY NAME - OTHERALLERGY DESCRIPTION, ACTIVE FROM, and ACTIVE TO are optional
The body may be a direct array or use otherAllergies, other_allergies, allergies, rows, data, or items. Field names are normalized case-insensitively.
Notes: - Duplicate OTHERALLERGY CODE values in request are not allowed - Invalid rows will be returned in the response
| hospital_id required | string Example: hospital_id=9 Unique hospital identifier |
| hospital_id | string |
required | Array of objects |
{- "hospital_id": "9",
- "data": [
- {
- "OTHERALLERGY CODE": "ORDCN0290",
- "OTHERALLERGY NAME": "Updated Grass Pollen Allergy",
- "OTHERALLERGY DESCRIPTION": "Updated Grass Pollen Allergy"
}
]
}{- "message": "Other Allergy JSON updated successfully",
- "invalid": [
- { }
]
}Updates existing Other Allergy rows in the Other Allergy CSV using OTHERALLERGY CODE as the unique identifier.
Required Query Parameters: - hospital_id
Request Body: - JSON payload containing a data array
Notes: - OTHERALLERGY CODE must already exist in the CSV - Duplicate OTHERALLERGY CODE values in request are not allowed - Only provided fields will be updated - OTHERALLERGY CODE cannot be modified - Invalid or missing rows will be returned in the response
Required JSON Fields: - OTHERALLERGY CODE
Updatable fields include OTHERALLERGY NAME, OTHERALLERGY DESCRIPTION, ACTIVE FROM, and ACTIVE TO. A single row may instead use the code query/body field.
| hospital_id required | string Example: hospital_id=9 Unique hospital identifier |
| hospital_id | string |
required | Array of objects |
{- "hospital_id": "9",
- "data": [
- {
- "OTHERALLERGY CODE": "ORDCN0290",
- "OTHERALLERGY NAME": "Updated Grass Pollen Allergy",
- "OTHERALLERGY DESCRIPTION": "Updated allergy description"
}
]
}{- "message": "Other Allergy rows updated successfully",
- "updated": [
- {
- "OTHERALLERGY CODE": "ORDCN0290",
- "OTHERALLERGY NAME": "Updated Grass Pollen Allergy",
- "OTHERALLERGY DESCRIPTION": "Updated allergy description"
}
],
}Deletes Other Allergy rows from the Other Allergy CSV using OTHERALLERGY CODE as the unique identifier.
Required Query Parameters: - hospital_id
Request Body: - JSON payload containing a data array
Notes: - OTHERALLERGY CODE must already exist in the CSV - Missing or invalid codes will be returned in not_found - If all rows are deleted, the CSV file will be removed
Required JSON Fields: - OTHERALLERGY CODE
The body may be a direct array or use otherAllergies, other_allergies, allergies, rows, data, or items. A single row may instead use the code query/body field.
| hospital_id required | string Example: hospital_id=9 Unique hospital identifier |
| hospital_id | string |
required | Array of objects |
{- "hospital_id": "9",
- "data": [
- {
- "OTHERALLERGY CODE": "ORDCN0290"
}
]
}{- "message": "Other Allergy rows deleted successfully",
- "deleted": [
- {
- "OTHERALLERGY CODE": "ORDCN0290",
- "OTHERALLERGY NAME": "Grass Pollen Allergy",
- "OTHERALLERGY DESCRIPTION": "Grass Pollen Allergy"
}
],
}Updates existing Investigation CSV rows using Service ID and, when supplied, Service Type as a case-insensitive composite identifier.
Required Query Parameters: - hospital_id
Request Body: - JSON payload containing an investigations, rows, data, or items array; one row may instead use service_id in query/body or Service ID in the body
Notes: - Service ID must already exist in the CSV - Duplicate Service ID and Service Type pairs in the request are not allowed - Service Type is required when multiple stored rows share the Service ID - Only provided fields will be updated - Service ID cannot be modified - Invalid or missing rows will be returned in the response
Required JSON Fields: - Service ID
Supported optional fields are Standard Lab Test Name, Alias Name, Service Type, Hospital ID, ACTIVE FROM, and ACTIVE TO. Dates use DD/MM/YYYY.
| hospital_id required | string Example: hospital_id=9 Unique hospital identifier |
| service_id | string Service ID for a single-row update. |
| service_type | string Service Type used with service_id to select one row when the Service ID is shared. |
| hospital_id | string |
| service_id | string |
| service_type | string |
Array of objects |
{- "hospital_id": "9",
- "service_id": "ITC9492",
- "service_type": "Laboratory",
- "investigations": [
- {
- "Service ID": "ITC9492",
- "Service Type": "Laboratory",
- "STANDARD LAB TEST NAME": "ASCITIC FLUID - AMYLASE UPDATED",
- "ALIAS NAME": "ASCITIC FLUID - AMYLASE UPDATED",
- "Hospital ID": "HOSP123",
- "ACTIVE FROM": "01/01/2026",
- "ACTIVE TO": "31/12/2026"
}
]
}{- "message": "Investigation rows updated successfully",
- "updated": [
- {
- "Service ID": "ITC9492",
- "STANDARD LAB TEST NAME": "ASCITIC FLUID - AMYLASE UPDATED",
- "ALIAS NAME": "ASCITIC FLUID - AMYLASE UPDATED"
}
],
}Deletes investigation rows using Service ID and, when supplied, Service Type as a case-insensitive composite identifier.
Required Query Parameters: - hospital_id
Request Body: - investigations, rows, data, or items array containing Service ID values; one row may instead use service_id in query/body or Service ID in the body
Notes: - SERVICE ID is mandatory for deletion - Service Type is required when multiple stored rows share the Service ID - Matching is case-insensitive - If all rows are deleted, the CSV file will be removed - If any SERVICE ID is not found, the API returns 404 - Multiple investigation rows can be deleted in a single request
| hospital_id required | string Example: hospital_id=9 Unique hospital identifier |
| service_id | string Service ID for a single-row deletion. |
| service_type | string Service Type used with service_id to select one row when the Service ID is shared. |
| hospital_id | string |
| service_id | string |
| service_type | string |
Array of objects List of investigation rows to delete |
{- "hospital_id": "9",
- "service_id": "ITC9492",
- "service_type": "Laboratory",
- "investigations": [
- {
- "Service ID": "ITC9492",
- "Service Type": "Laboratory"
}
]
}{- "message": "Investigation rows deleted successfully",
- "deleted": [
- { }
], - "data": [
- { }
]
}Updates existing route rows in the Route CSV using ROUTE CODE.
Required Query Parameters: - hospital_id
Request Body: - routes array containing ROUTE CODE and fields to update
Notes: - ROUTE CODE is mandatory - Matching is case-insensitive - Only provided fields will be updated - Multiple route rows can be updated in a single request - Duplicate ROUTE CODE values in the request are not allowed
Header Restrictions: - ROUTE CODE - ROUTE DESCRIPTION - ACTIVE FROM (optional; DD/MM/YYYY) - ACTIVE TO (optional; DD/MM/YYYY)
A single row may alternatively be selected with code in the query/body or ROUTE CODE in the body.
| hospital_id required | string Example: hospital_id=9 Unique hospital identifier |
| hospital_id | string |
required | Array of objects List of route rows to update |
{- "hospital_id": "9",
- "routes": [
- {
- "ROUTE CODE": "17",
- "ROUTE DESCRIPTION": "Intrathecal"
}
]
}{- "message": "Route rows updated successfully",
- "updated": [
- { }
],
}Deletes route rows from the Route CSV using ROUTE CODE.
Required Query Parameters: - hospital_id
Request Body: - routes array containing ROUTE CODE values, or one code/ROUTE CODE
Notes: - ROUTE CODE is mandatory for deletion - Matching is case-insensitive - Multiple route rows can be deleted in a single request - If all rows are deleted, the CSV file will be removed - If any ROUTE CODE is not found, the API returns 404
| hospital_id required | string Example: hospital_id=9 Unique hospital identifier |
| hospital_id | string |
required | Array of objects List of route rows to delete |
{- "hospital_id": "9",
- "routes": [
- {
- "ROUTE CODE": "17"
}
]
}{- "message": "Route rows deleted successfully",
- "deleted": [
- { }
], - "data": [
- { }
]
}Updates existing frequency rows in the Frequency CSV using FREQUENCY CODE.
Required Query Parameters: - hospital_id
Request Body: - frequencies array containing FREQUENCY CODE and fields to update
Notes: - FREQUENCY CODE is mandatory - Matching is case-insensitive - Only provided fields will be updated - Multiple frequency rows can be updated in a single request - Duplicate FREQUENCY CODE values in the request are not allowed
Header Restrictions: - FREQUENCY CODE - FREQUENCY DESCRIPTION - ACTIVE FROM (optional; DD/MM/YYYY) - ACTIVE TO (optional; DD/MM/YYYY)
A single row may alternatively be selected with code in the query/body or FREQUENCY CODE in the body.
| hospital_id required | string Example: hospital_id=9 Unique hospital identifier |
| hospital_id | string |
required | Array of objects List of frequency rows to update |
{- "hospital_id": "9",
- "frequencies": [
- {
- "FREQUENCY CODE": "AOTA",
- "FREQUENCY DESCRIPTION": "Alternate Days One Times (Noon)(0-1-0-0)"
}
]
}{- "message": "Frequency rows updated successfully",
- "updated": [
- { }
],
}Deletes frequency rows from the Frequency CSV using FREQUENCY CODE.
Required Query Parameters: - hospital_id
Request Body: - frequencies array containing FREQUENCY CODE values, or one code/FREQUENCY CODE
Notes: - FREQUENCY CODE is mandatory for deletion - Matching is case-insensitive - Multiple frequency rows can be deleted in a single request - If all rows are deleted, the CSV file will be removed - If any FREQUENCY CODE is not found, the API returns 404
Header Restrictions: - FREQUENCY CODE - FREQUENCY DESCRIPTION
| hospital_id required | string Example: hospital_id=9 Unique hospital identifier |
| hospital_id | string |
required | Array of objects List of frequency rows to delete |
{- "hospital_id": "9",
- "frequencies": [
- {
- "FREQUENCY CODE": "AOTA"
}
]
}{- "message": "Frequency rows deleted successfully",
- "deleted": [
- { }
], - "data": [
- { }
]
}Updates the medication autocorrect CSV file in cloud storage for a given hospital_id. The API validates the hospital, reads the existing CSV from storage, merges new mismatched medication items, increments weight for matching actual medications, rewrites the CSV, and uploads the updated file back to cloud storage.
| hospital_id required | string Example: hospital_id=9 Unique hospital identifier (maps to organization) |
required | Array of objects List of mismatched medication items to add into autocorrect mapping. |
| path required | string GCS file path of the medication autocorrect CSV. |
{- "mismatchedItems": [
- {
- "acquired_medication_name": "Calpol",
- "actual_medication_name": "CALPOL T TABLET"
}
], - "path": "9/UROLOGY/404/medication_autocorrect.csv"
}{- "mismatches": [
- {
- "acquired_medication_name": "calpol",
- "actual_medication_name": "calpol t tablet",
- "weight": 4
}
], - "message": "All rows updated - same actual_medication_name now share the same, incremented weight"
}Updates the Referred_by_doctor field for a specific patient using patient_id.
| patient_id required | string Unique patient ID. |
| Referred_by_doctor required | string Name or ID of the referring doctor. |
{- "patient_id": "GEN9-202603-00450",
- "Referred_by_doctor": "Dr. Kumar"
}{- "message": "Referred_by_doctor updated successfully.",
- "data": { }
}Updates vitals data for a patient interaction, uploads vitals file, updates interaction record, and triggers cloud ingestion.
| interaction_id required | string Example: interaction_id=INT-12345 Interaction ID for which vitals are updated |
| patient_id required | string Unique patient ID |
| practitioner_id required | string Doctor / Practitioner ID |
| vitalsData required | object Vitals information object |
{- "patient_id": "GEN9-202603-00450",
- "practitioner_id": "853",
- "vitalsData": {
- "height": 170,
- "weight": 72,
- "bmi": 24.9,
- "temperature": 98.6,
- "pulse": 72,
- "spo2": 98,
- "blood_pressure": "120/80",
- "respRate": 16,
- "bloodSugar": 108,
- "position": "Sitting"
}
}{- "status": true,
- "message": "Vitals updated successfully",
- "interaction": { }
}Generates IPD documents such as initial assessment, progress notes, surgery notes, nurse notes, and nursing care plan based on patient, inpatient, and clinician details. This API supports the following document types: - initial_assessment - progress_notes - surgery_notes - nurse_notes - nurse_care_plan For Doctor Forms: - practitioner_id is required - document_type (form name) - patient_id - inpatient_id For Nurse Forms: - caregiver_id is required - document_type (form name) - patient_id - inpatient_id For doctor forms, practitioner_id must be provided, and for nurse forms, caregiver_id must be provided. Only one of these fields should be passed based on the selected document type.
| hospital_id required | string Example: hospital_id=9 Unique hospital identifier. |
| hospital_id | integer |
| patient_id required | string Unique patient ID. |
| inpatient_id required | string Unique inpatient ID. |
| practitioner_id | string Doctor ID (required for doctor documents). |
| document_type required | string Enum: "initial_assessment" "progress_notes" "surgery_notes" "nurse_notes" "nurse_care_plan" Type of document to generate. |
{- "hospital_id": 9,
- "patient_id": "string",
- "inpatient_id": "IN-GEN9-202509-00034",
- "practitioner_id": "9871",
- "document_type": "initial_assessment"
}{- "success": true,
- "message": "Document generated successfully",
- "data": { }
}Fetches IPD notes grouped by date for a given patient and inpatient record. Query Parameters: - patient_id - inpatient_id - hospital_id - categories This API supports the following categories: - IPD_PERIPHERAL_CHART (I/O Chart / Vascular Checklist) - IPD_INTAKE_OUTTAKE (Intake Output Chart) - IPD_VITALS (TPR Chart) Important: - Categories must be passed exactly as listed above. - If an incorrect category is provided, the API will return an empty response.
| hospital_id required | string Example: hospital_id=9 Unique hospital identifier. |
| patient_id | string Example: patient_id=GEN9-202509-00435 Unique patient ID. |
| inpatient_id required | string Example: inpatient_id=IN-GEN9-202509-00034 Unique inpatient ID. |
| categories | string Example: categories=IPD_VITALS Category of IPD notes. Must be one of: IPD_PERIPHERAL_CHART, IPD_INTAKE_OUTTAKE, IPD_VITALS. |
{- "patient_id": "GEN9-202509-00435",
- "inpatient_id": "IN-GEN9-202509-00034",
- "structured_data": {
- "IPD_VITALS": [
- {
- "date": "23/02/2026",
- "noOfDays": "",
- "daysPostOp": "",
- "time": "01:25 PM",
- "pulse": null,
- "temperature": null,
- "respiration": null,
- "blood_pressure": null,
- "blood_sugar": null,
- "spo2": null,
- "interaction_id": "106804"
}
]
}
}Generates a discharge summary for an IPD patient based on patient, inpatient, and clinician details. Required Fields: - hospital_id - patient_id - hospital_inpatient_id - practitioner_id
| hospital_id required | string Unique hospital identifier. |
| patient_id required | string Unique patient ID. |
| hospital_inpatient_id required | string Inpatient identifier from the hospital system. |
| practitioner_id required | string Doctor ID (required for doctor flow). |
{- "hospital_id": "9",
- "patient_id": "GEN9-202509-00299",
- "hospital_inpatient_id": "IN-GEN9-202509-00025",
- "practitioner_id": "9871"
}{- "success": true,
- "message": "Discharge summary generated successfully",
- "data": { }
}Fetches the case sheet for a given IPD patient using patient and inpatient details. Required Query Parameters: - hospital_id - patient_id - inpatient_id Optional: - practitioner_id (for doctor access) - caregiver_id (for nurse access)
Either practitioner_id or caregiver_id can be passed to fetch role-based data.
| hospital_id required | string Example: hospital_id=9 Unique hospital identifier. |
| patient_id required | string Example: patient_id=c7f71411-fe49-4c43-852d-61db953fa0c4 Unique patient ID. |
| inpatient_id required | string Example: inpatient_id=INP-newmereal-PAT-0011 Unique inpatient ID. |
| practitioner_id | string Doctor ID (used to resolve doctor context). |
| caregiver_id | string Nurse ID (used to resolve nurse context). |
{ }Fetches the drug chart details for a given IPD patient using patient and inpatient IDs. Required Query Parameters: - hospital_id - inpatient_id Optional: - patient_id Note: - This API retrieves medication/drug administration data associated with the inpatient stay.
| hospital_id required | string Example: hospital_id=9 Unique hospital identifier. |
| inpatient_id required | string Example: inpatient_id=IN-GEN9-202601-00013 Unique inpatient ID. |
| patient_id | string Example: patient_id=GEN9-202601-00106 Unique patient ID. |
{ }Fetches blood glucose monitoring chart data for a given IPD patient using patient and inpatient details. Required Query Parameters: - hospital_id - inpatient_id - patient_id Note: - This API retrieves blood glucose readings and monitoring data recorded during the inpatient stay.
| hospital_id required | string Example: hospital_id=9 Unique hospital identifier. |
| inpatient_id required | string Example: inpatient_id=IN-GEN9-202602-00038 Unique inpatient ID. |
| patient_id required | string Example: patient_id=GEN9-202602-00090 Unique patient ID. |
{ }Updates interaction detail content (edited bot response), uploads it to storage, and triggers ingestion processing. Required Query Parameters: - hospital_id Required Body Fields: - interaction_id - interaction_detail_type - ingestionType - content Notes: - Validates hospital_id and interaction existence. - Stores edited content as a new file in cloud storage. - Updates or creates interaction detail records. - Calls ingestion API to process updated data.
| hospital_id required | string Example: hospital_id=9 Unique hospital identifier. |
| interaction_id required | integer Unique interaction ID. |
| interaction_detail_type required | string Type of interaction detail. |
| ingestionType required | string Type used for ingestion processing. |
| content required | object Edited content to be uploaded and ingested. |
| attachment_url | string Optional attachment URL. |
| role | string Role of the user submitting the data. |
{- "interaction_id": 112174,
- "interaction_detail_type": "initial_assessment",
- "ingestionType": "initial_assessment",
- "content": {
- "basicInformation": { },
- "nutritionalAssessment": {
- "diet": { },
- "fluidsMonitoring": { },
- "mucousMembranes": { },
- "skinTurgor": { },
- "recentWeightChanges": true
}, - "painAssessment": {
- "numericalPainScore": 2,
- "wongBakerPainScore": 4,
- "interventions": [ ]
}
}, - "attachment_url": "",
- "role": "nurse"
}{- "status": true,
- "message": "Interaction details created and ingested successfully",
- "interaction_id": 112174,
- "uploadedUrls": "gs://bucket/webm_files/edited_initial_assessment/file.txt",
- "pdfingestIntraction": { }
}Updates IPD nurse notes or doctor notes for a specific patient interaction. Required Query Parameters: - hospital_id - patient_id - inpatient_id - interaction_id Request Body: - data (string or object) Notes: - Validates hospital_id and maps to organization. - Ensures org_id (if provided) matches hospital_id. - Forwards normalized data to downstream chat service.
| hospital_id required | string Example: hospital_id=9 Unique hospital identifier. |
| patient_id required | string Example: patient_id=GEN9-202602-00009 Unique patient ID. |
| inpatient_id required | string Example: inpatient_id=IN-GEN9-202602-00004 Unique inpatient ID. |
| interaction_id required | string Example: interaction_id=104865 Unique interaction ID. |
| data required | string Nurse notes or chart data (string or JSON object). |
{- "data": "**Assessment:** Patient is experiencing severe pain, described as somewhat unbearable.\n**Medical Administration:** **Paracetamol:** \n"
}{ }Fetches lab data for a given patient based on patient ID and category (e.g., Outpatient or Inpatient). Required Query Parameters: - hospital_id - patient_id - patient_category Notes: - Validates hospital_id and maps it to organization. - Fetches lab data from downstream chat service.
| hospital_id required | string Example: hospital_id=9 Unique hospital identifier. |
| patient_id required | string Example: patient_id=GEN9-202604-00337 Unique patient ID. |
| patient_category required | string Example: patient_category=Outpatient Patient category (e.g., Outpatient or Inpatient). |
{ }Unified API to handle multiple IPD form operations such as: - initial_assessment - progress_notes - doctor_notes - raw_doctor_notes - surgery_notes - nurse_notes - raw_nurse_notes - nurse_care_plan - discharge_summary - case_sheet - cauti_bundle - clabsi_bundle - drug_chart - blood_glucose_monitoring_chart - IPD_VITALS - IPD_INTAKE_OUTTAKE - IPD_CAUTI_BUNDLE - IPD_CLABSI_BUNDLE - IPD_VASCULAR_BUNDLE
Required Body Fields: - hospital_id - hospital_inpatient_id - form_name - Either practitioner_id OR caregiver_id is required
Clinician Validation: - Either practitioner_id OR caregiver_id is required - surgery_notes requires practitioner_id - nurse_notes and nurse_care_plan require caregiver_id
Special Notes: - IPD_VITALS and IPD_INTAKE_OUTTAKE support:
cauti_bundle returns structured_data.IPD_CAUTI_BUNDLE - clabsi_bundle returns structured_data.IPD_CLABSI_BUNDLE - IPD_VASCULAR_BUNDLE returns structured_data.IPD_VASCULAR_BUNDLE
Example: - IPD_VITALS generation for an inpatient| hospital_id required | string Example: hospital_id=9 Hospital identifier |
| hospital_id required | string |
| hospital_inpatient_id required | string |
| form_name required | string Enum: "initial_assessment" "progress_notes" "doctor_notes" "raw_doctor_notes" "surgery_notes" "nurse_notes" "raw_nurse_notes" "nurse_care_plan" "discharge_summary" "case_sheet" "cauti_bundle" "cautiBundle" "clabsi_bundle" "clabsiBundle" "get_all_ipd_notes_grouped_by_date" "get_drug_chart" "blood_glucose_monitoring_chart" "update_ipd_data" "ingest_chart_data" "IPD_VITALS" "IPD_INTAKE_OUTTAKE" "IPD_CAUTI_BUNDLE" "IPD_CLABSI_BUNDLE" "IPD_VASCULAR_BUNDLE" Name of the IPD form/action to process |
| practitioner_id | string Practitioner identifier |
| caregiver_id | string Caregiver or nurse identifier |
| category | string Optional category filter |
| start_date | string Supported only for IPD_VITALS and IPD_INTAKE_OUTTAKE |
| end_date | string Supported only for IPD_VITALS and IPD_INTAKE_OUTTAKE |
{- "hospital_id": "9",
- "hospital_inpatient_id": "IN-GEN9-202602-00038",
- "form_name": "IPD_VITALS",
- "practitioner_id": "98857",
- "caregiver_id": "CG-72",
- "category": "Vitals",
- "start_date": "05/05/2026",
- "end_date": "10/05/2026"
}{- "patient_id": "GUN8-202605-00039",
- "inpatient_id": "IN-GUN8-202605-00014",
- "structured_data": {
- "IPD_CAUTI_BUNDLE": [
- {
- "interaction_id": "116604",
- "note_time": "01:27 PM 01/06/2026",
- "timestamp": "2026-06-01T07:57:19.980386+00:00",
- "nurse_id": 72,
- "caregiver_id": "CG-72",
- "cauti_bundle": {
- "insertion_checklist_form": {
- "diagnosis": "appendectomy",
- "catheter_details": {
- "type_of_catheter": "foley",
- "type_options": {
- "foley": true,
- "suprapubic": false,
- "other": ""
}, - "size": "",
- "date_time_of_insertion": "01/06/2026 01:17 PM"
}, - "indication_for_catheter": { },
- "insertion_bundle_checklist": {
- "patient_identity_confirmed": true,
- "informed_consent_obtained": true,
- "hand_hygiene_performed": true,
- "sterile_gloves_ppe_used": true,
- "perineal_area_cleaned": true,
- "aseptic_technique_maintained": true,
- "sterile_catheter_used": true,
- "closed_drainage_system_maintained": true,
- "catheter_secured_properly": true,
- "drainage_bag_below_bladder_level": true,
- "no_kinks_obstruction_in_tubing": true
}, - "post_insertion_care": { },
- "signatures": { }
}, - "daily_maintenance_checklist_form": {
- "date_of_insertion": "01/06/2026",
- "indication": "",
- "assessments": [
- { }
], - "signs_of_infection": { },
- "culture": "",
- "action_taken": { }
}, - "removal_checklist_form": { },
- "summary_form": {
- "total_catheter_days": "",
- "total_cauti_cases": ""
}, - "is_form_completed": false,
- "form_completed_date_time": ""
}
}
]
}
}This endpoint saves patient, diagnosis, medication, and vitals data. The patient's outpatient data is sent to the client's system using the URL specified in the organization.api_url field. The data transmission includes both the initial and final payloads as part of the client response.
Dermatology specialty: For dermatology users, the payload sent to the client follows this response format: a wrapped object with top-level status (e.g. "complete") and data. The data object contains SessionId, hospitalId, patientId, OpId, IpId, PractitionerId (nullable), type (e.g. "opd"), response, additional_response, medication_templates, vitals, assessment, dermatology_notes (specialty-specific object), and status (e.g. "initial payload" or "end payload").
IPD bundle forms: For IPD client API URL callbacks (for example an organization's configured ipd_api_url), the payload is a wrapped object with top-level status (e.g. "complete") and data. The data object includes SessionId, hospitalId, patientId, OpId, IpId, PractitionerId, type: "ipd", formName, process, structured_data, and inner status ("initial payload" or "end payload"). Supported bundle structures include IPD_CAUTI_BUNDLE, IPD_CLABSI_BUNDLE, and IPD_VASCULAR_BUNDLE.
| SessionId | string |
| patientId | string |
| hospitalId | string |
| OpId | string |
| IpId | string |
| PractitionerId | string or null |
| type | string Visit type (e.g. opd). Included when specialty is dermatology. |
| response | string |
Array of objects | |
Array of objects | |
Array of objects | |
| additional_response | string |
| status | string |
{- "status": "complete",
- "data": {
- "SessionId": "GEN9-202602-00126",
- "hospitalId": "9",
- "patientId": "GEN9-202602-00126",
- "OpId": "106441",
- "IpId": "",
- "PractitionerId": null,
- "type": "opd",
- "response": "**Diagnosis:** **Paresthesia**\n\n",
- "additional_response": "**Chief Complaints:** **Numbness** in both feet.\n\n**History of Presenting Illness:** Patient reports **numbness** in both feet that has persisted for **one year**. The patient has completed a full year's course of treatment.\n\n",
- "medication_templates": [
- { }
], - "vitals": [
- { }
], - "assessment": [
- { }
], - "dermatology_notes": {
- "speciality_notes": "Patient presents with a one-year history of bilateral foot numbness.",
- "symptoms": "Numbness",
- "duration": "1 year",
- "evolution_of_lesion": "",
- "course_of_disease": "",
- "family_history": "",
- "lifestyle_habits": "None",
- "previous_response": "Completed one year course",
- "skin_type": "",
- "body_weight": "",
- "redness": "",
- "number_of_lesions": "",
- "majority_lesion": "",
- "lesion_morphology": "",
- "dermoscopy_findings": "",
- "allergen_exposure": "",
- "affected_area": [
- "left_foot",
- "right_foot"
]
}, - "status": "end payload"
}
}{- "AcknowledgeId": 102,
- "Message": "Data Posted Successfully (Initial Payload)"
}Deletes the stored investigation CSV and clears the organization's investigation data reference.
| hospital_id required | string Example: hospital_id=9 Hospital identifier used to resolve the organization. |
{- "message": "CSV removed successfully"
}Alias of /software/updateInvestigationCsvs. Merges rows into the stored investigation CSV using the case-insensitive Service ID and Service Type pair as the key. The same Service ID may be stored for different Service Types.
| hospital_id required | string Example: hospital_id=9 Hospital identifier used to resolve the organization. |
| csvFile required | string <binary> CSV with required columns |
{- "status": "success",
- "message": "CSV updated",
- "data": "gs://bucket/csv_uploads/example.csv",
- "url": "gs://bucket/csv_uploads/example.csv",
- "invalid": [
- { }
]
}Deletes the stored route CSV and clears the organization's route data reference.
| hospital_id required | string Example: hospital_id=9 Hospital identifier used to resolve the organization. |
{- "message": "CSV removed successfully"
}Deletes the stored frequency CSV and clears the organization's frequency data reference.
| hospital_id required | string Example: hospital_id=9 Hospital identifier used to resolve the organization. |
{- "message": "CSV removed successfully"
}Deletes the stored drug allergy CSV and clears the organization's drug allergy data reference.
| hospital_id required | string Example: hospital_id=9 Hospital identifier used to resolve the organization. |
{- "message": "CSV removed successfully"
}Deletes the stored food allergy CSV and clears the organization's food allergy data reference.
| hospital_id required | string Example: hospital_id=9 Hospital identifier used to resolve the organization. |
{- "message": "CSV removed successfully"
}Returns the rows stored for the selected ICD type.
| hospital_id required | string Example: hospital_id=9 Hospital identifier used to resolve the organization. |
| type required | string Enum: "icd_10" "icd_11" "icd_snomed" "icd_9" "icd_8" Example: type=icd_10 ICD dataset to operate on. |
[- {
- "ICD_CODE": "A00.0",
- "ICD_NAME": "Cholera due to Vibrio cholerae 01, biovar cholerae",
- "ACTIVE FROM": "01/01/2026",
- "ACTIVE TO": "31/12/2026"
}
]Replaces the selected ICD dataset with valid rows from a CSV. Required columns are ICD_CODE and ICD_NAME; ACTIVE FROM and ACTIVE TO are optional.
| hospital_id required | string Example: hospital_id=9 Hospital identifier used to resolve the organization. |
| type required | string Enum: "icd_10" "icd_11" "icd_snomed" "icd_9" "icd_8" Example: type=icd_10 ICD dataset to operate on. |
| csvFile required | string <binary> ICD CSV file. |
{- "status": "success",
- "message": "CSV updated",
- "data": "gs://bucket/csv_uploads/example.csv",
- "url": "gs://bucket/csv_uploads/example.csv",
- "invalid": [
- { }
]
}Deletes the stored CSV for the selected ICD type without removing the other ICD datasets.
| hospital_id required | string Example: hospital_id=9 Hospital identifier used to resolve the organization. |
| type required | string Enum: "icd_10" "icd_11" "icd_snomed" "icd_9" "icd_8" Example: type=icd_10 ICD dataset to operate on. |
{- "message": "CSV removed successfully"
}Merges CSV rows into the selected ICD dataset using ICD_CODE as the unique key.
| hospital_id required | string Example: hospital_id=9 Hospital identifier used to resolve the organization. |
| type required | string Enum: "icd_10" "icd_11" "icd_snomed" "icd_9" "icd_8" Example: type=icd_10 ICD dataset to operate on. |
| csvFile required | string <binary> ICD CSV file to merge. |
{- "status": "success",
- "message": "CSV updated",
- "data": "gs://bucket/csv_uploads/example.csv",
- "url": "gs://bucket/csv_uploads/example.csv",
- "invalid": [
- { }
]
}Replaces the selected ICD dataset. The body may be a direct array or an object containing icdRows, icd_rows, icds, diagnoses, rows, data, or items.
| hospital_id required | string Example: hospital_id=9 Hospital identifier used to resolve the organization. |
| type required | string Enum: "icd_10" "icd_11" "icd_snomed" "icd_9" "icd_8" Example: type=icd_10 ICD dataset to operate on. |
ICD rows, shown using the preferred icds wrapper.
| type | string Enum: "icd_10" "icd_11" "icd_snomed" "icd_9" "icd_8" May be supplied in the body instead of the |
| hospital_id | string May be supplied in the body instead of the query parameter at runtime. |
Array of objects (IcdRow) non-empty |
{- "hospital_id": "9",
- "type": "icd_10",
- "icds": [
- {
- "ICD_CODE": "A00.0",
- "ICD_NAME": "Cholera due to Vibrio cholerae 01, biovar cholerae",
- "ACTIVE FROM": "01/01/2026"
}
]
}{- "status": "success",
- "message": "CSV updated",
- "data": "gs://bucket/csv_uploads/example.csv",
- "url": "gs://bucket/csv_uploads/example.csv",
- "invalid": [
- { }
]
}Merges JSON rows into the selected ICD dataset using ICD_CODE as the unique key. The accepted wrapper keys are the same as for uploadIcdJson.
| hospital_id required | string Example: hospital_id=9 Hospital identifier used to resolve the organization. |
| type required | string Enum: "icd_10" "icd_11" "icd_snomed" "icd_9" "icd_8" Example: type=icd_10 ICD dataset to operate on. |
| type | string Enum: "icd_10" "icd_11" "icd_snomed" "icd_9" "icd_8" May be supplied in the body instead of the |
| hospital_id | string May be supplied in the body instead of the query parameter at runtime. |
Array of objects (IcdRow) non-empty |
{- "hospital_id": "9",
- "type": "icd_10",
- "icds": [
- {
- "ICD_CODE": "A00.0",
- "ICD_NAME": "Cholera due to Vibrio cholerae 01, biovar cholerae",
- "ACTIVE FROM": "01/01/2026"
}
]
}{- "status": "success",
- "message": "CSV updated",
- "data": "gs://bucket/csv_uploads/example.csv",
- "url": "gs://bucket/csv_uploads/example.csv",
- "invalid": [
- { }
]
}Partially updates existing rows in the selected ICD dataset. Supply code for one row or an accepted ICD array wrapper for multiple rows. ICD_CODE cannot be changed.
| hospital_id required | string Example: hospital_id=9 Hospital identifier used to resolve the organization. |
| type required | string Enum: "icd_10" "icd_11" "icd_snomed" "icd_9" "icd_8" Example: type=icd_10 ICD dataset to operate on. |
| code | string ICD code for a single-row update. May instead be supplied as |
| type | string Enum: "icd_10" "icd_11" "icd_snomed" "icd_9" "icd_8" May be supplied in the body instead of the |
| hospital_id | string May be supplied in the body instead of the query parameter at runtime. |
Array of objects (IcdRow) non-empty |
{- "hospital_id": "9",
- "type": "icd_10",
- "icds": [
- {
- "ICD_CODE": "A00.0",
- "ICD_NAME": "Cholera due to Vibrio cholerae 01, biovar cholerae",
- "ACTIVE FROM": "01/01/2026"
}
]
}{- "message": "Rows updated successfully",
- "updated": [
- { }
], - "url": "gs://bucket/csv_uploads/example.csv"
}Deletes rows from the selected ICD dataset. Supply code for one row or an accepted ICD array wrapper for multiple rows. If no rows remain, the selected ICD CSV is removed.
| hospital_id required | string Example: hospital_id=9 Hospital identifier used to resolve the organization. |
| type required | string Enum: "icd_10" "icd_11" "icd_snomed" "icd_9" "icd_8" Example: type=icd_10 ICD dataset to operate on. |
| code | string ICD code for a single-row deletion. May instead be supplied as |
| type | string Enum: "icd_10" "icd_11" "icd_snomed" "icd_9" "icd_8" May be supplied in the body instead of the |
| hospital_id | string May be supplied in the body instead of the query parameter at runtime. |
Array of objects (IcdRow) non-empty |
{- "hospital_id": "9",
- "type": "icd_10",
- "icds": [
- {
- "ICD_CODE": "A00.0",
- "ICD_NAME": "Cholera due to Vibrio cholerae 01, biovar cholerae",
- "ACTIVE FROM": "01/01/2026"
}
]
}{- "message": "Rows deleted successfully",
- "deleted": [
- { }
], - "url": "gs://bucket/csv_uploads/example.csv",
- "data": [
- { }
]
}Deletes the stored other-allergy CSV and clears the organization's other-allergy data reference.
| hospital_id required | string Example: hospital_id=9 Hospital identifier used to resolve the organization. |
{- "message": "CSV removed successfully"
}Replaces the stored medication dataset with a JSON array converted to CSV. Every item requires BRAND NAME and GENERIC NAME; BRAND ID is optional but must be non-empty and unique when present.
| hospital_id required | string Example: hospital_id=9 Hospital identifier used to resolve the organization. |
| BRAND ID | string |
| BRAND NAME required | string |
| GENERIC NAME required | string |
[- {
- "BRAND ID": "13752",
- "BRAND NAME": "OLVANCE 40MG TAB",
- "GENERIC NAME": "OLMESARTAN MEDOXOMIL 40MG"
}
]{- "message": "JSON uploaded and saved as CSV",
- "data": "string",
- "invalid": [
- { }
], - "totalItems": 1,
- "invalidItemsCount": 0
}Merges a JSON array into the stored medication dataset. New values overwrite matching rows by BRAND ID, or by the BRAND NAME and GENERIC NAME pair when no brand ID is supplied.
| hospital_id required | string Example: hospital_id=9 Hospital identifier used to resolve the organization. |
| BRAND ID | string |
| BRAND NAME required | string |
| GENERIC NAME required | string |
[- {
- "BRAND ID": "13752",
- "BRAND NAME": "OLVANCE 40MG TAB",
- "GENERIC NAME": "OLMESARTAN MEDOXOMIL 40MG"
}
]{- "status": "success",
- "message": "CSV updated",
- "data": "gs://bucket/csv_uploads/example.csv",
- "url": "gs://bucket/csv_uploads/example.csv",
- "invalid": [
- { }
]
}Upload one or more PDF files and create a new interaction record without ingestion.
| hospital_id required | string Unique hospital identifier to scope the interaction. |
| patient_id required | string Patient identifier |
| practitioner_id required | string Practitioner identifier used to resolve the internal doctor_id. |
| nurse_id | string Nurse identifier (optional) |
| inpatient_id | string Inpatient identifier (optional) |
| interaction_date | string Interaction date-time in ISO 8601 |
| interaction_type | string |
| interaction_status | string |
| interaction_notes | string |
| interaction_detail_type | string Type of interaction detail |
| file required | string <binary> Upload one or more PDF files (send multiple fields named 'file') |
| file_name | string Target filename/path |
{- "status": true,
- "message": "Interaction created successfully",
- "interaction_id": "INT-12345",
- "pdfIntraction": { }
}This endpoint verifies a given token, assigns a specific role (e.g., doctor, nurse), and returns a new JWT with updated role information. It is typically used after initial login to define or switch roles.
| token required | string JWT token obtained from initial login. |
| role required | string Enum: "doctor" "nurse" "admin" "organization" The role to assign to the user. |
{- "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6InRlc3QiLCJmaXJzdF9uYW1lIjoiSm9obiIsImxhc3RfbmFtZSI6IkRvZSIsImVtYWlsIjoidGVzdEBleGFtcGxlLmNvbSIsIm9yZ2FuaXphdGlvbl9pZCI6IjEyMyIsInNhbHV0YXRpb24iOiJNci4iLCJkb2N0b3JfaWQiOiI0NTYiLCJ1c2VyX2lkIjoiNzg5IiwiY29udGFjdF9udW1iZXIiOiIrMTIzNDU2Nzg5MCIsImNvdW50cnkiOiJJbmRpYSIsImhvc3BpdGFsX2lkIjoiMTIzIiwiUHJhY3RpdGlvbmVyX2lkIjoiNDU2IiwidG9rZW5fYnlfZG9jdG9yIjp0cnVlfQ.example_signature",
- "role": "doctor"
}{- "message": "Organization Login successful",
- "status": true,
- "token": "string",
- "role": "doctor",
- "activeRole": true
}Verifies the 6-digit OTP sent to the user's email for MFA (Multi-Factor Authentication) or account verification.
| user_id | integer Unique ID of the user verifying OTP. |
| doctor_id | integer Optional. Doctor ID if verifying OTP for a doctor instead of a user. |
| otp required | string The 6-digit OTP received by email. |
{- "user_id": 308,
- "doctor_id": 102,
- "otp": "928583"
}{- "success": true,
- "message": "Email OTP verified",
- "user": {
- "doctor_id": 102,
- "user_id": 308,
- "first_name": "John",
- "last_name": "Doe",
- "mail_verification": true,
- "mfa_status": true,
- "sms_verification": true,
- "organization_id": 12,
- "username": "johndoe",
- "default_mfa": "email",
- "app_verification": false
}
}Sends a 6-digit One-Time Password (OTP) to the user's registered email for MFA (Multi-Factor Authentication) verification.
| user_id required | integer Unique ID of the user requesting OTP. |
| doctor_id | integer Optional. Doctor ID if sending OTP for a doctor instead of a user. |
{- "user_id": 308,
- "doctor_id": 102
}{- "success": true,
- "message": "OTP sent to email",
- "user": {
- "doctor_id": 102,
- "user_id": 308,
- "first_name": "John",
- "last_name": "Doe",
- "mail_verification": false,
- "mfa_status": true,
- "sms_verification": true,
- "organization_id": 12,
- "username": "johndoe",
- "default_mfa": "email",
- "app_verification": false
}
}Retrieves the WhatsApp Business phone number details for a specific WhatsApp Business Account. Requires a valid Bearer token in the Authorization header.
| Authorization required | string Bearer token for authentication (format: Bearer |
{- "data": [
- {
- "id": "1234567890",
- "display_phone_number": "+919876543210",
- "verified_name": "My Business",
- "quality_rating": "GREEN",
- "status": "CONNECTED"
}
]
}