API endpoints used with the WebSocket integration flow.
Complete Integration Guide: WebSocket Integration Documentation
Inpatient audio: IPD WebSocket Integration Guide
Interactive sample: IPD WebSocket and REST API Tester
Complete form catalogue, exact body fields, chart categories and response envelopes: IPD forms reference. Read operations, generation and writes have different responses. TODOs use separate software routes. The hospital_id is required in the JSON body; no duplicate query field is required.
| hospital_id required | string Required HMS hospital identifier. |
| hospital_inpatient_id required | string Required HMS admission identifier, not internal inpatient_id. |
| form_name required | string Case-sensitive operation. Known names: raw_doctor_notes, raw_nurse_notes, doctor_notes, nurse_notes, initial_assessment, progress_notes, surgery_notes, nurse_care_plan, discharge_summary, case_sheet, get_drug_chart, drug_chart, blood_glucose_monitoring_chart, get_blood_glucose_monitoring_chart, get_all_ipd_notes_grouped_by_date, ipd_notes_grouped_by_date, IPD_VITALS, IPD_INTAKE_OUTTAKE, IPD_CAUTI_BUNDLE, cauti_bundle, cautiBundle, IPD_CLABSI_BUNDLE, clabsi_bundle, clabsiBundle, IPD_VASCULAR_BUNDLE, IPD_BLOOD_GLUCOSE_MONITORING, IPD_VENTI_FORM, IPD_BLOOD_TRANSFUSION, IPD_NUTRITION_FORM, IPD_ICU_FORM, IPD_GENERAL_OBSERVATIONS, IPD_ASSESSMENT_DETAILS, IPD_PRESCRIPTION_ADMINISTRATIONS, update_ipd_data, ingest_chart_data. Any IPD_* category string up to 80 characters is routed; not every accepted key has stored data. |
| practitioner_id | string External doctor ID. Either this or caregiver_id is required; doctor notes and surgery require this one. |
| caregiver_id | string External nurse ID. Nurse notes and nurse care plan require this one. |
| categories | string One exact category for grouped reads; omit for all defaults. Arrays are not supported by this wrapper. |
| category | string Forwarded on grouped reads; no separate filter is declared upstream. Ignored on drug/glucose reads. |
| start_date | string DD/MM/YYYY. Forwarded from body only for IPD_VITALS and IPD_INTAKE_OUTTAKE. |
| end_date | string DD/MM/YYYY. Same restriction as start_date. |
| interaction_id | string Required for update_ipd_data; retain the returned ID for chart ingestion. Optional for document generation; discharge_summary resolves latest regardless. |
| force_regenerate | boolean |
| stored_signal | boolean |
| data | any Required for update_ipd_data: edited note text or JSON object, serialized and sent for clinical extraction. |
| structured_data | object For ingest_chart_data: one supported category with actual returned records and edits. |
| doctor_id | string Optional internal actor ID for update_ipd_data; not practitioner_id. |
| nurse_id | string Optional internal actor ID for update_ipd_data; not caregiver_id. |
| org_id | string Normally omit; server resolves it. Mismatch returns 403 on update_ipd_data. |
| property name* additional property | any |
{- "hospital_id": "string",
- "hospital_inpatient_id": "string",
- "form_name": "string",
- "practitioner_id": "string",
- "caregiver_id": "string",
- "categories": "string",
- "category": "string",
- "start_date": "string",
- "end_date": "string",
- "interaction_id": "string",
- "force_regenerate": true,
- "stored_signal": true,
- "data": null,
- "structured_data": { },
- "doctor_id": "string",
- "nurse_id": "string",
- "org_id": "string"
}{- "patient_id": "string",
- "inpatient_id": "string",
- "structured_data": {
- "IPD_BLOOD_TRANSFUSION": {
- "blood_transfusion_reaction_report": {
- "date": "string",
- "clinical_diagnosis": "string",
- "product_transfused": "string",
- "time_commenced": "string",
- "donation_pack_number": "string",
- "volume_transfused": "string",
- "patient_id_correct": null,
- "blood_pack_correct": null,
- "blood_transfusion_record_correct": null,
- "febrile": true,
- "afebrile": true,
- "vital_signs": {
- "pre_reaction": {
- "time": "string",
- "temperature": "string",
- "respiratory_rate": "string",
- "bp": "string",
- "pulse_rate": "string"
}, - "post_reaction": {
- "time": "string",
- "temperature": "string",
- "respiratory_rate": "string",
- "bp": "string",
- "pulse_rate": "string"
}
}, - "signs_and_symptoms": {
- "fever": true,
- "chills": true,
- "nausea_vomiting": true,
- "hives_itching": true,
- "lower_back_pain": true,
- "chest_pain": true,
- "anxiety": true,
- "headache": true,
- "skin_pallor": true,
- "dark_urine": true,
- "dyspnoea": true,
- "bleeding_from_wound_or_iv_site": true,
- "others": "string"
}, - "previous_blood_products": [
- {
- "date": "string",
- "donor_unit_no": "string",
- "product_type": "string",
- "reaction": "string",
- "time_units": "string",
- "volume": "string"
}
], - "reviewing_doctors": "string",
- "signature": "string",
- "name": "string",
- "sign_date": "string",
- "note_time": "string",
- "timestamp": "string",
- "interaction_id": "string"
}, - "blood_transfusion_monitoring_sheet": {
- "location_of_blood_transfusion": "string",
- "blood_group": "string",
- "diagnosis": "string",
- "indication": "string",
- "number_of_units": "string",
- "type_of_component": "string",
- "pack_no": "string",
- "blood_group_of_products": "string",
- "date_of_cross_match": "string",
- "expiry_date": "string",
- "checked_by_doctor_name": "string",
- "checked_by_signature": "string",
- "checked_by_date": "string",
- "checked_by_time": "string",
- "time_out_before_transfusion": {
- "correct_patient": null,
- "correct_blood_group": null,
- "correct_component": null
}, - "pre_medication": [
- null
], - "post_medication": [
- null
], - "doctor_name": "string",
- "doctor_signature": "string",
- "bt_nurses_record": {
- "consent_for_transfusion": null,
- "assigned_nurse_signature": "string",
- "cross_checked_by": "string"
}, - "note_time": "string",
- "timestamp": "string",
- "interaction_id": "string",
- "fluid_volume_infused": "string",
- "checklist": {
- "bt_consent_signed": null,
- "patient_voided": null,
- "bowel_emptied": null,
- "validity_of_blood_transfusion_set_checked": null,
- "cannula_potency_checked": null,
- "blood_warmth_checked": null,
- "check_blood_clots_any_visible_particle": null,
- "pre_medication_given": null,
- "ns_100ml_50ml_transfused": null,
- "post_bt_medication_order": null,
- "informed_nursing_supervisor": null,
- "information_to_doctor_concerned": null,
- "updating_billing_sheet": null
}, - "fluid_monitoring": [
- {
- "label": "string",
- "time": "string",
- "temperature": "string",
- "pulse": "string",
- "respiration": "string",
- "bp": "string",
- "observations": "string",
- "urine_output": "string",
- "reaction_detected": null
}
], - "post_transfusion_record": {
- "observe_urine_color_and_quantity": null,
- "assess_chest_and_breath_sounds": null,
- "save_transfusion_bag_for_24hrs": null,
- "send_blood_for_reevaluation_of_hb_percent": null,
- "post_bt_medication_given": null,
- "specify": "string"
}
}, - "note_time": "string",
- "timestamp": "string",
- "interaction_id": "string"
}
}
}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"
}
}
]
}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"
}
]
}
}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. |
{ }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
}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
}
}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",
- "email": "sarahjohnmul123@gmail.com",
- "phone_number": "994056789",
- "floor_id": 2,
- "caregiver_id": "LI7897",
- "role": "nurse,nurse_admin",
- "shift": "day",
- "organization_id": "ORG123"
}
}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",
- "email": "ravi@gmail.com",
- "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": { }
}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
}
]
}
}Fetch generated doctor tasks for review. The service may fall back to database interaction records on failure. Complete task categories, fallback behavior and edit procedure: TODO workflow.
| 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": "string",
- "inpatient_id": "string",
- "todo_data": [
- {
- "interaction_id": "string",
- "gcs_uri": "string",
- "created_at": "string",
- "phonetic_uri": "string",
- "doctor_id": "string",
- "ordered_by": "string",
- "approved_by": "string",
- "todos": [
- {
- "investigations": [
- {
- "investigation_type": "string",
- "details": "string",
- "status": "string",
- "source": {
- "document_id": "string",
- "element_id": "string",
- "segment_id": "string",
- "section": "string",
- "field": "string",
- "text": "string"
}, - "todo_id": "string",
- "todo_version": 0
}
], - "opinions": [
- {
- "specialty": "string",
- "consultant_name": "string",
- "reason": "string",
- "status": "string",
- "source": {
- "document_id": "string",
- "element_id": "string",
- "segment_id": "string",
- "section": "string",
- "field": "string",
- "text": "string"
}, - "todo_id": "string",
- "todo_version": 0
}
], - "prescription_tasks": [
- {
- "medication_name": "string",
- "medication_type": "string",
- "dosage": "string",
- "route": "string",
- "frequency_morning": [
- {
- "frequency": "string",
- "status": "string"
}
], - "frequency_afternoon": [
- {
- "frequency": "string",
- "status": "string"
}
], - "frequency_evening": [
- {
- "frequency": "string",
- "status": "string"
}
], - "frequency_night": [
- {
- "frequency": "string",
- "status": "string"
}
], - "duration": "string",
- "duration_source": "string",
- "continue_until_stopped": true,
- "dosage_time": [
- "string"
], - "scheduled_dates": [
- {
- "current_date": "string",
- "count": "string"
}
], - "actual_medication_name": "string",
- "brand_name": "string",
- "generic_name": "string",
- "auto_correct": true,
- "med_from_llm": true,
- "brand_id": "string",
- "instructions": "string",
- "interval_minutes": 0,
- "med_status": "string",
- "is_stat": true,
- "is_once_only": true,
- "is_sos": true,
- "is_infusion": true,
- "is_status": "string",
- "source": {
- "document_id": "string",
- "element_id": "string",
- "segment_id": "string",
- "section": "string",
- "field": "string",
- "text": "string"
}, - "todo_id": "string",
- "todo_version": 0
}
], - "monitoring_orders": [
- {
- "monitoring_order": "string",
- "instructions": "string",
- "interval_minutes": 0,
- "start_or_stop": "string",
- "status": "string",
- "source": {
- "document_id": "string",
- "element_id": "string",
- "segment_id": "string",
- "section": "string",
- "field": "string",
- "text": "string"
}, - "todo_id": "string",
- "todo_version": 0
}
], - "nursing_care_orders": [
- {
- "nursing_care_order": "string",
- "instructions": "string",
- "status": "string",
- "source": {
- "document_id": "string",
- "element_id": "string",
- "segment_id": "string",
- "section": "string",
- "field": "string",
- "text": "string"
}, - "todo_id": "string",
- "todo_version": 0
}
], - "procedure_orders": [
- {
- "procedure_order": "string",
- "status": "string",
- "source": {
- "document_id": "string",
- "element_id": "string",
- "segment_id": "string",
- "section": "string",
- "field": "string",
- "text": "string"
}, - "todo_id": "string",
- "todo_version": 0
}
], - "deferred_orders": [
- {
- "deferred_order": "string",
- "trigger_condition": "string",
- "order_type": "string",
- "status": "string",
- "source": {
- "document_id": "string",
- "element_id": "string",
- "segment_id": "string",
- "section": "string",
- "field": "string",
- "text": "string"
}, - "todo_id": "string",
- "todo_version": 0
}
]
}
]
}
]
}See complete TODO workflow. Approve the interaction; send {} to use stored tasks or the returned todo_data structure with edits. Upstream network/server failure may return a fallback HTTP 200 without a persisted write. Always read back.
| 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 (IpdContract_TaskRecord) | |
| property name* additional property | any |
{- "patient_id": "string",
- "inpatient_id": "string",
- "todo_data": [
- {
- "interaction_id": "string",
- "gcs_uri": "string",
- "created_at": "string",
- "phonetic_uri": "string",
- "doctor_id": "string",
- "ordered_by": "string",
- "approved_by": "string",
- "todos": [
- {
- "investigations": [
- {
- "investigation_type": "string",
- "details": "string",
- "status": "string",
- "source": {
- "document_id": "string",
- "element_id": "string",
- "segment_id": "string",
- "section": "string",
- "field": "string",
- "text": "string"
}, - "todo_id": "string",
- "todo_version": 0
}
], - "opinions": [
- {
- "specialty": "string",
- "consultant_name": "string",
- "reason": "string",
- "status": "string",
- "source": {
- "document_id": "string",
- "element_id": "string",
- "segment_id": "string",
- "section": "string",
- "field": "string",
- "text": "string"
}, - "todo_id": "string",
- "todo_version": 0
}
], - "prescription_tasks": [
- {
- "medication_name": "string",
- "medication_type": "string",
- "dosage": "string",
- "route": "string",
- "frequency_morning": [
- {
- "frequency": "string",
- "status": "string"
}
], - "frequency_afternoon": [
- {
- "frequency": "string",
- "status": "string"
}
], - "frequency_evening": [
- {
- "frequency": "string",
- "status": "string"
}
], - "frequency_night": [
- {
- "frequency": "string",
- "status": "string"
}
], - "duration": "string",
- "duration_source": "string",
- "continue_until_stopped": true,
- "dosage_time": [
- "string"
], - "scheduled_dates": [
- {
- "current_date": "string",
- "count": "string"
}
], - "actual_medication_name": "string",
- "brand_name": "string",
- "generic_name": "string",
- "auto_correct": true,
- "med_from_llm": true,
- "brand_id": "string",
- "instructions": "string",
- "interval_minutes": 0,
- "med_status": "string",
- "is_stat": true,
- "is_once_only": true,
- "is_sos": true,
- "is_infusion": true,
- "is_status": "string",
- "source": {
- "document_id": "string",
- "element_id": "string",
- "segment_id": "string",
- "section": "string",
- "field": "string",
- "text": "string"
}, - "todo_id": "string",
- "todo_version": 0
}
], - "monitoring_orders": [
- {
- "monitoring_order": "string",
- "instructions": "string",
- "interval_minutes": 0,
- "start_or_stop": "string",
- "status": "string",
- "source": {
- "document_id": "string",
- "element_id": "string",
- "segment_id": "string",
- "section": "string",
- "field": "string",
- "text": "string"
}, - "todo_id": "string",
- "todo_version": 0
}
], - "nursing_care_orders": [
- {
- "nursing_care_order": "string",
- "instructions": "string",
- "status": "string",
- "source": {
- "document_id": "string",
- "element_id": "string",
- "segment_id": "string",
- "section": "string",
- "field": "string",
- "text": "string"
}, - "todo_id": "string",
- "todo_version": 0
}
], - "procedure_orders": [
- {
- "procedure_order": "string",
- "status": "string",
- "source": {
- "document_id": "string",
- "element_id": "string",
- "segment_id": "string",
- "section": "string",
- "field": "string",
- "text": "string"
}, - "todo_id": "string",
- "todo_version": 0
}
], - "deferred_orders": [
- {
- "deferred_order": "string",
- "trigger_condition": "string",
- "order_type": "string",
- "status": "string",
- "source": {
- "document_id": "string",
- "element_id": "string",
- "segment_id": "string",
- "section": "string",
- "field": "string",
- "text": "string"
}, - "todo_id": "string",
- "todo_version": 0
}
]
}
]
}
]
}{- "message": "Doctor approved for this interaction_id=102474 and patient_id=GEN9-202601-00048."
}Fetch approved nurse tasks with todo_data and merged_todo. An upstream outage can return a fallback empty todo_data list. Complete task categories, fallback behavior and edit procedure: TODO workflow.
| 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": "string",
- "inpatient_id": "string",
- "todo_data": [
- {
- "interaction_id": "string",
- "gcs_uri": "string",
- "created_at": "string",
- "phonetic_uri": "string",
- "doctor_id": "string",
- "ordered_by": "string",
- "approved_by": "string",
- "todos": [
- {
- "investigations": [
- {
- "investigation_type": "string",
- "details": "string",
- "status": "string",
- "source": {
- "document_id": "string",
- "element_id": "string",
- "segment_id": "string",
- "section": "string",
- "field": "string",
- "text": "string"
}, - "todo_id": "string",
- "todo_version": 0
}
], - "opinions": [
- {
- "specialty": "string",
- "consultant_name": "string",
- "reason": "string",
- "status": "string",
- "source": {
- "document_id": "string",
- "element_id": "string",
- "segment_id": "string",
- "section": "string",
- "field": "string",
- "text": "string"
}, - "todo_id": "string",
- "todo_version": 0
}
], - "prescription_tasks": [
- {
- "medication_name": "string",
- "medication_type": "string",
- "dosage": "string",
- "route": "string",
- "frequency_morning": [
- {
- "frequency": "string",
- "status": "string"
}
], - "frequency_afternoon": [
- {
- "frequency": "string",
- "status": "string"
}
], - "frequency_evening": [
- {
- "frequency": "string",
- "status": "string"
}
], - "frequency_night": [
- {
- "frequency": "string",
- "status": "string"
}
], - "duration": "string",
- "duration_source": "string",
- "continue_until_stopped": true,
- "dosage_time": [
- "string"
], - "scheduled_dates": [
- {
- "current_date": "string",
- "count": "string"
}
], - "actual_medication_name": "string",
- "brand_name": "string",
- "generic_name": "string",
- "auto_correct": true,
- "med_from_llm": true,
- "brand_id": "string",
- "instructions": "string",
- "interval_minutes": 0,
- "med_status": "string",
- "is_stat": true,
- "is_once_only": true,
- "is_sos": true,
- "is_infusion": true,
- "is_status": "string",
- "source": {
- "document_id": "string",
- "element_id": "string",
- "segment_id": "string",
- "section": "string",
- "field": "string",
- "text": "string"
}, - "todo_id": "string",
- "todo_version": 0
}
], - "monitoring_orders": [
- {
- "monitoring_order": "string",
- "instructions": "string",
- "interval_minutes": 0,
- "start_or_stop": "string",
- "status": "string",
- "source": {
- "document_id": "string",
- "element_id": "string",
- "segment_id": "string",
- "section": "string",
- "field": "string",
- "text": "string"
}, - "todo_id": "string",
- "todo_version": 0
}
], - "nursing_care_orders": [
- {
- "nursing_care_order": "string",
- "instructions": "string",
- "status": "string",
- "source": {
- "document_id": "string",
- "element_id": "string",
- "segment_id": "string",
- "section": "string",
- "field": "string",
- "text": "string"
}, - "todo_id": "string",
- "todo_version": 0
}
], - "procedure_orders": [
- {
- "procedure_order": "string",
- "status": "string",
- "source": {
- "document_id": "string",
- "element_id": "string",
- "segment_id": "string",
- "section": "string",
- "field": "string",
- "text": "string"
}, - "todo_id": "string",
- "todo_version": 0
}
], - "deferred_orders": [
- {
- "deferred_order": "string",
- "trigger_condition": "string",
- "order_type": "string",
- "status": "string",
- "source": {
- "document_id": "string",
- "element_id": "string",
- "segment_id": "string",
- "section": "string",
- "field": "string",
- "text": "string"
}, - "todo_id": "string",
- "todo_version": 0
}
]
}
]
}
], - "merged_todo": {
- "is_merged": true,
- "interaction_ids": [
- "string"
], - "ordered_by": [
- "string"
], - "approved_by": [
- "string"
], - "first_created_at": "string",
- "last_created_at": "string",
- "todos": [
- {
- "investigations": [
- {
- "investigation_type": "string",
- "details": "string",
- "status": "string",
- "source": {
- "document_id": "string",
- "element_id": "string",
- "segment_id": "string",
- "section": "string",
- "field": "string",
- "text": "string"
}, - "todo_id": "string",
- "todo_version": 0
}
], - "opinions": [
- {
- "specialty": "string",
- "consultant_name": "string",
- "reason": "string",
- "status": "string",
- "source": {
- "document_id": "string",
- "element_id": "string",
- "segment_id": "string",
- "section": "string",
- "field": "string",
- "text": "string"
}, - "todo_id": "string",
- "todo_version": 0
}
], - "prescription_tasks": [
- {
- "medication_name": "string",
- "medication_type": "string",
- "dosage": "string",
- "route": "string",
- "frequency_morning": [
- {
- "frequency": "string",
- "status": "string"
}
], - "frequency_afternoon": [
- {
- "frequency": "string",
- "status": "string"
}
], - "frequency_evening": [
- {
- "frequency": "string",
- "status": "string"
}
], - "frequency_night": [
- {
- "frequency": "string",
- "status": "string"
}
], - "duration": "string",
- "duration_source": "string",
- "continue_until_stopped": true,
- "dosage_time": [
- "string"
], - "scheduled_dates": [
- {
- "current_date": "string",
- "count": "string"
}
], - "actual_medication_name": "string",
- "brand_name": "string",
- "generic_name": "string",
- "auto_correct": true,
- "med_from_llm": true,
- "brand_id": "string",
- "instructions": "string",
- "interval_minutes": 0,
- "med_status": "string",
- "is_stat": true,
- "is_once_only": true,
- "is_sos": true,
- "is_infusion": true,
- "is_status": "string",
- "source": {
- "document_id": "string",
- "element_id": "string",
- "segment_id": "string",
- "section": "string",
- "field": "string",
- "text": "string"
}, - "todo_id": "string",
- "todo_version": 0
}
], - "monitoring_orders": [
- {
- "monitoring_order": "string",
- "instructions": "string",
- "interval_minutes": 0,
- "start_or_stop": "string",
- "status": "string",
- "source": {
- "document_id": "string",
- "element_id": "string",
- "segment_id": "string",
- "section": "string",
- "field": "string",
- "text": "string"
}, - "todo_id": "string",
- "todo_version": 0
}
], - "nursing_care_orders": [
- {
- "nursing_care_order": "string",
- "instructions": "string",
- "status": "string",
- "source": {
- "document_id": "string",
- "element_id": "string",
- "segment_id": "string",
- "section": "string",
- "field": "string",
- "text": "string"
}, - "todo_id": "string",
- "todo_version": 0
}
], - "procedure_orders": [
- {
- "procedure_order": "string",
- "status": "string",
- "source": {
- "document_id": "string",
- "element_id": "string",
- "segment_id": "string",
- "section": "string",
- "field": "string",
- "text": "string"
}, - "todo_id": "string",
- "todo_version": 0
}
], - "deferred_orders": [
- {
- "deferred_order": "string",
- "trigger_condition": "string",
- "order_type": "string",
- "status": "string",
- "source": {
- "document_id": "string",
- "element_id": "string",
- "segment_id": "string",
- "section": "string",
- "field": "string",
- "text": "string"
}, - "todo_id": "string",
- "todo_version": 0
}
]
}
]
}
}See complete TODO workflow. Persist execution changes to a returned task record. Preserve all categories and IDs. Upstream network/server failure may return a fallback HTTP 200 without a persisted write. Always read back.
| 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
required | string or integer or (any or null) |
| gcs_uri | string |
required | Array of objects (ToDoList) |
| property name* additional property | any |
{- "interaction_id": "string",
- "gcs_uri": "string",
- "todos": [
- {
- "investigations": [
- {
- "investigation_type": "string",
- "details": "string",
- "status": "string",
- "source": {
- "document_id": "string",
- "element_id": "string",
- "segment_id": "string",
- "section": "string",
- "field": "string",
- "text": "string"
}, - "todo_id": "string",
- "todo_version": 0
}
], - "opinions": [
- {
- "specialty": "string",
- "consultant_name": "string",
- "reason": "string",
- "status": "string",
- "source": {
- "document_id": "string",
- "element_id": "string",
- "segment_id": "string",
- "section": "string",
- "field": "string",
- "text": "string"
}, - "todo_id": "string",
- "todo_version": 0
}
], - "prescription_tasks": [
- {
- "medication_name": "string",
- "medication_type": "string",
- "dosage": "string",
- "route": "string",
- "frequency_morning": [
- {
- "frequency": "string",
- "status": "string"
}
], - "frequency_afternoon": [
- {
- "frequency": "string",
- "status": "string"
}
], - "frequency_evening": [
- {
- "frequency": "string",
- "status": "string"
}
], - "frequency_night": [
- {
- "frequency": "string",
- "status": "string"
}
], - "duration": "string",
- "duration_source": "string",
- "continue_until_stopped": true,
- "dosage_time": [
- "string"
], - "scheduled_dates": [
- {
- "current_date": "string",
- "count": "string"
}
], - "actual_medication_name": "string",
- "brand_name": "string",
- "generic_name": "string",
- "auto_correct": true,
- "med_from_llm": true,
- "brand_id": "string",
- "instructions": "string",
- "interval_minutes": 0,
- "med_status": "string",
- "is_stat": true,
- "is_once_only": true,
- "is_sos": true,
- "is_infusion": true,
- "is_status": "string",
- "source": {
- "document_id": "string",
- "element_id": "string",
- "segment_id": "string",
- "section": "string",
- "field": "string",
- "text": "string"
}, - "todo_id": "string",
- "todo_version": 0
}
], - "monitoring_orders": [
- {
- "monitoring_order": "string",
- "instructions": "string",
- "interval_minutes": 0,
- "start_or_stop": "string",
- "status": "string",
- "source": {
- "document_id": "string",
- "element_id": "string",
- "segment_id": "string",
- "section": "string",
- "field": "string",
- "text": "string"
}, - "todo_id": "string",
- "todo_version": 0
}
], - "nursing_care_orders": [
- {
- "nursing_care_order": "string",
- "instructions": "string",
- "status": "string",
- "source": {
- "document_id": "string",
- "element_id": "string",
- "segment_id": "string",
- "section": "string",
- "field": "string",
- "text": "string"
}, - "todo_id": "string",
- "todo_version": 0
}
], - "procedure_orders": [
- {
- "procedure_order": "string",
- "status": "string",
- "source": {
- "document_id": "string",
- "element_id": "string",
- "segment_id": "string",
- "section": "string",
- "field": "string",
- "text": "string"
}, - "todo_id": "string",
- "todo_version": 0
}
], - "deferred_orders": [
- {
- "deferred_order": "string",
- "trigger_condition": "string",
- "order_type": "string",
- "status": "string",
- "source": {
- "document_id": "string",
- "element_id": "string",
- "segment_id": "string",
- "section": "string",
- "field": "string",
- "text": "string"
}, - "todo_id": "string",
- "todo_version": 0
}
]
}
]
}{- "message": "string",
- "todo_data": [
- {
- "interaction_id": "string",
- "gcs_uri": "string",
- "created_at": "string",
- "phonetic_uri": "string",
- "doctor_id": "string",
- "ordered_by": "string",
- "approved_by": "string",
- "todos": [
- {
- "investigations": [
- {
- "investigation_type": "string",
- "details": "string",
- "status": "string",
- "source": {
- "document_id": "string",
- "element_id": "string",
- "segment_id": "string",
- "section": "string",
- "field": "string",
- "text": "string"
}, - "todo_id": "string",
- "todo_version": 0
}
], - "opinions": [
- {
- "specialty": "string",
- "consultant_name": "string",
- "reason": "string",
- "status": "string",
- "source": {
- "document_id": "string",
- "element_id": "string",
- "segment_id": "string",
- "section": "string",
- "field": "string",
- "text": "string"
}, - "todo_id": "string",
- "todo_version": 0
}
], - "prescription_tasks": [
- {
- "medication_name": "string",
- "medication_type": "string",
- "dosage": "string",
- "route": "string",
- "frequency_morning": [
- {
- "frequency": "string",
- "status": "string"
}
], - "frequency_afternoon": [
- {
- "frequency": "string",
- "status": "string"
}
], - "frequency_evening": [
- {
- "frequency": "string",
- "status": "string"
}
], - "frequency_night": [
- {
- "frequency": "string",
- "status": "string"
}
], - "duration": "string",
- "duration_source": "string",
- "continue_until_stopped": true,
- "dosage_time": [
- "string"
], - "scheduled_dates": [
- {
- "current_date": "string",
- "count": "string"
}
], - "actual_medication_name": "string",
- "brand_name": "string",
- "generic_name": "string",
- "auto_correct": true,
- "med_from_llm": true,
- "brand_id": "string",
- "instructions": "string",
- "interval_minutes": 0,
- "med_status": "string",
- "is_stat": true,
- "is_once_only": true,
- "is_sos": true,
- "is_infusion": true,
- "is_status": "string",
- "source": {
- "document_id": "string",
- "element_id": "string",
- "segment_id": "string",
- "section": "string",
- "field": "string",
- "text": "string"
}, - "todo_id": "string",
- "todo_version": 0
}
], - "monitoring_orders": [
- {
- "monitoring_order": "string",
- "instructions": "string",
- "interval_minutes": 0,
- "start_or_stop": "string",
- "status": "string",
- "source": {
- "document_id": "string",
- "element_id": "string",
- "segment_id": "string",
- "section": "string",
- "field": "string",
- "text": "string"
}, - "todo_id": "string",
- "todo_version": 0
}
], - "nursing_care_orders": [
- {
- "nursing_care_order": "string",
- "instructions": "string",
- "status": "string",
- "source": {
- "document_id": "string",
- "element_id": "string",
- "segment_id": "string",
- "section": "string",
- "field": "string",
- "text": "string"
}, - "todo_id": "string",
- "todo_version": 0
}
], - "procedure_orders": [
- {
- "procedure_order": "string",
- "status": "string",
- "source": {
- "document_id": "string",
- "element_id": "string",
- "segment_id": "string",
- "section": "string",
- "field": "string",
- "text": "string"
}, - "todo_id": "string",
- "todo_version": 0
}
], - "deferred_orders": [
- {
- "deferred_order": "string",
- "trigger_condition": "string",
- "order_type": "string",
- "status": "string",
- "source": {
- "document_id": "string",
- "element_id": "string",
- "segment_id": "string",
- "section": "string",
- "field": "string",
- "text": "string"
}, - "todo_id": "string",
- "todo_version": 0
}
]
}
]
}
]
}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",
- "email": "johndoe@example.com",
- "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",
- "email": "johndoeABC1015@gmail.com",
- "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
}
}
}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.",
}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"
}
]
}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": [ ]
}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": [ ]
}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"
}
]
}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"
}
]
}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"
}
]
}