HMS Integration Guide
Comprehensive guide for integrating CareScribe with Hospital Management Systems (HMS) for both OPD and IPD workflows
API Gateway URL
Base URL for all API requests:
https://carescribe-app-api-8to2squd.wl.gateway.dev
- All API endpoints should be prefixed with this gateway URL
- Example:
https://carescribe-app-api-8to2squd.wl.gateway.dev/software/speciality/list - The gateway URL is required for all API calls.
OPD Integration
CareScribe Session Link Integration allows you to integrate CareScribe with your Hospital Management System for Outpatient Department (OPD) workflows. This integration enables seamless data flow between your HMS and CareScribe's AI-powered documentation system.
The integration follows a step-by-step process to set up hospitals, doctors, patients, and handle OPD session data.
Step 1: Create a Hospital
Call the CareScribe team to book an appointment: https://carescribe.health/
Required Hospital Information
When contacting the CareScribe team, please provide the following information for hospital setup:
| Hospital Name: | The official name of your hospital or organization |
|---|---|
| Hospital ID: |
Must be in format "orgname-somenumber" (e.g., carescribe-001, carescribe-002).
If you have multiple hospitals with the same organization, use sequential numbers.
|
| Time Zone: |
Hospital time zone (e.g., Asia/Kolkata, America/Los_Angeles, Europe/London)
|
| Client Endpoint URL: |
The URL endpoint in your HMS system where CareScribe will send POST requests with OPD data.
This should be a publicly accessible HTTPS endpoint (e.g., https://api.yourhospital.com/carescribe/opd)
|
| Location: |
Address details including:
|
Additional Information (Optional)
You may also provide the following optional details:
- Phone Number: Hospital contact number
- Email: Hospital contact email
- Website: Hospital website URL
- Fax Number: Hospital fax number
- Tax ID Number: Hospital tax identification number
Step 2: Get the Specialty List
Summary: Get all specialities
Description: Retrieves a list of all specialities available in the system.
Sample Response (200 OK):
[
{
"speciality_id": 5,
"specialty_name": "Cardiology",
"description": "Deals with heart and cardiovascular system.",
"short_prompt_id": "6",
"long_prompt_id": "6"
},
{
"speciality_id": 6,
"specialty_name": "Dermatology",
"description": "Handles skin health and disorders.",
"short_prompt_id": "7",
"long_prompt_id": "7"
},
{
"speciality_id": 7,
"specialty_name": "Gastroenterology",
"description": "Focuses on digestive system health.",
"short_prompt_id": "8",
"long_prompt_id": "8"
},
{
"speciality_id": 8,
"specialty_name": "Gynaecology",
"description": "Cares for women's reproductive health.",
"short_prompt_id": "9",
"long_prompt_id": "9"
}
]
Responses:
- 200: Successful operation - Returns array of specialty objects
- 500: Internal server error
Step 3: Create a Doctor
Summary: Create a doctor
Description: Creates a new doctor record in the system.
Body
{
"first_name": "Alex",
"last_name": "Patel",
"speciality_id": 1,
"salutation": "Dr",
"hospital_id": "carescribe-001",
"license_no": "TN12345",
"phone_number": "+918883761709",
"email": "alex.patel@example.com",
"practitioner_id": "carescribe-001-dr001"
}
Note:
- hospital_id: Required — Must be in format "orgname-somenumber" (e.g.,
carescribe-001,carescribe-002). If you have multiple hospitals with the same organization, use sequential numbers likecarescribe-001,carescribe-002, etc. - practitioner_id: Required and must be unique — Must be in format "hospital_id-drsomenumber" (e.g.,
carescribe-001-dr001,carescribe-001-dr002). Format: your hospital_id followed by "-dr" and a number. - first_name: Required
- last_name: Required
- speciality_id: Required — fetch from /software/speciality/list endpoint
- license_no: Required — if not available, pass as an empty string (" ")
Responses:
- 201: Doctor created successfully
- 400: Invalid input
- 409: Doctor with practitioner_id or email already exists
- 500: Internal server error
Step 4: Create a Patient and Return the Path URL
Summary: Integrate patient software data
Description: Accepts patient, doctor, hospital, and vitals data for integration. This endpoint creates or updates patient information and prepares the system for OPD session data.
Body
{
"hospital_id": "9",
"doctor": {
"practitioner_id": "1000"
},
"patient": {
"patient_id": "PAT-123",
"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"
}
]
}
}
Note:
- Hospital ID: Required — The hospital identifier
- Doctor Practitioner ID: Required — The practitioner ID of the doctor
- Patient ID: Required — Unique patient identifier
- Past History: Optional — Array of past medical conditions with optional diagnosis date and status
- Family History: Optional — Array of family medical history with relation and condition
- Vitals: Optional — Comprehensive vital signs, including ECG status and abnormal conditions, can be sent as an empty object, and if no vital signs are available, the vitals field may be provided as an empty object ({}).
Response (200 OK):
{
"message": "New patient created successfully. Vitals uploaded.",
"path": "https://app.carescribe.health/session_id?id=c49647ab-b910-4a18-a732-4c87e8167c11&token=U2FsdGVkX19r1xFPiH3OIdX9qS5ZKg8RbUh3l%2F%2FiijsnUPlOuBhdOwEsdd2%2FipMwrUpLQXJL%2BYvdlN4vKycfnA%3D%3D"
}
Note: The path in the response contains the session URL that can be used to access the CareScribe session for this patient. This URL includes a unique session ID and an encrypted token for secure access.
Responses:
- 200: Patient created or already exists and vitals uploaded — Returns success message with session path URL
- 400: The following required field(s) are missing: ${missing.join(", ")}. Please check and try again.
- 404: Organization or doctor not found
- 500: Internal server error
Step 5: Get Patient Interactions by Hospital Patient ID
Summary: Get Patient Interactions by Hospital Patient ID
Description: Returns the latest patient interaction records for a hospital and hospital_patient_id (query param patient_id). Each record can include parsed consultation notes from storage (Edited OPD / audio flow). If notes are still generating, the API may return pending/retry metadata instead of full data.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
hospital_id |
string | Yes | Unique hospital identifier (maps to organization) |
patient_id |
string | Yes | Hospital patient identifier (hospital_patient_id) |
limit |
integer | No | Number of latest interactions to return (min 1, max 3). Default: 1 |
Sample Request
GET /software/patient-interactions-by-id?hospital_id=19&patient_id=ABC19-202603-00010&limit=1
Sample Response (200 OK):
{
"count": 1,
"data": [
{
"interaction_id": 108376,
"patient_id": "ABC19-202603-00010",
"doctor_id": 162,
"patient": {
"patient_id": "ABC19-202603-00010",
"first_name": "Karthik",
"last_name": "",
"hospital_patient_id": "ABC19-202603-00010",
"date_of_birth": null,
"gender": "Male",
"age": 32
},
"interaction_date": "2026-03-13T12:40:10.000Z",
"interaction_detail_type": "Edited opd",
"created_at": "2026-03-13T13:00:25.061Z",
"data": {
"vitals": [
{
"id": 0,
"pulse": "78",
"height": "170",
"weight": "72",
"systolicBP": "120",
"diastolicBP": "80",
"oxygenSaturation": "98",
"temperature": "98.6",
"respRate": "18",
"bloodSugar": "102",
"bmi": "24.9",
"chest_circumference": null,
"head_circumference": null,
"cancer": false,
"epilepsy": false,
"arthritis": false,
"abnormalPulse": false,
"abnormalOxygen": false,
"hyperthyrodism": false,
"kidneyDiseases": false,
"cardiacDiseases": false,
"diabetesMellitus": false,
"asthma": false,
"hypertension": true,
"hypothyroidism": false,
"abnormalSystolic": false,
"dyslipidemia": false,
"allergy": "No known drug allergy",
"cancerDate": "",
"asthmaDate": "",
"allergyDate": "13/03/2026",
"epilepsyDate": "",
"arthritisDate": "",
"dyslipidemiaDate": "",
"hypertensionDate": "13/03/2026",
"hyperthyrodismDate": "",
"hypothyroidismDate": "",
"kidneyDiseasesDate": "",
"cardiacDiseasesDate": "",
"diabetesMellitusDate": "",
"lab_report": {}
}
],
"dermatology_notes": {},
"dermatology_image": null,
"reference_image": [],
"assessment": [
{
"assessment_template": "Complete Blood Count",
"template_tests": "Complete Blood Count fg",
"template_id": null
},
{
"assessment_template": "CO2, Bicarbonate",
"template_tests": "Carbon Dioxide",
"template_id": "1960-8",
"showList": false,
"template_type": null,
"hospital_id": "carescribe-abc19"
}
],
"medication_templates": [
{
"medication_name": "ERYTOP LOTION 25ML",
"brand_name": "ERYTOP LOTION 25ML",
"brand_id": "E18720",
"generic_name": "CLINDAMYCIN PHOSPHATE",
"strength": "25ML",
"uom": "ml",
"frequency_morning": "1",
"frequency_afternoon": "0",
"frequency_evening": "0",
"frequency_night": "1",
"days": 2,
"quantity": 4,
"dosage_value": 25,
"prn": "Apply externally",
"route": "Topical",
"drug_type": "Lotion",
"vaccine": false,
"duration": "2 days",
"instructions": "Apply over affected area twice daily",
"frequency_code": "BD",
"frequency_description": "Twice Daily",
"route_code": "TOP",
"route_description": "Topical",
"uom_code": "1 'S",
"uom_description": "1 'S",
"duration_code": "DAYS",
"duration_description": 2,
"medication_start_date": "17/03/2026",
"medication_end_date": "18/03/2026",
"isactive": true
},
{
"medication_name": "ESOMEPRAZOLE test 40MG + DOMPERIDONE 30MG (NEXPRO RD 40MG CAPS)",
"brand_name": "NEXPRO RD 40MG CAPS",
"brand_id": "NEX40",
"generic_name": "ESOMEPRAZOLE + DOMPERIDONE",
"strength": "40MG + 30MG",
"uom": "capsule",
"frequency_morning": "1",
"frequency_afternoon": "0",
"frequency_evening": "0",
"frequency_night": "1",
"days": 3,
"quantity": 6,
"dosage_value": "40",
"prn": "After food",
"route": "Oral",
"drug_type": "Capsule",
"vaccine": false,
"duration": "3 days",
"instructions": "After food",
"frequency_code": "BD",
"frequency_description": "Twice Daily",
"route_code": "PO",
"route_description": "Oral",
"uom_code": "NUMBR",
"uom_description": "No(s)",
"duration_code": "DAYS",
"duration_description": 3,
"medication_start_date": "17/03/2026",
"medication_end_date": "19/03/2026",
"isactive":false
}
],
"Diagnosis": "*Costochondritis*",
"chief_complaints": "*Pain in the chest wall*.",
"history_of_presenting_illness": "Patient presents for a follow-up regarding chest wall pain.",
"patient_history": "*Non-alcoholic fatty liver disease*.",
"Past_Medications": "Patient was taking Ultracet for pain as needed.",
"personal_history": "Patient denies any night duty work.",
"examination_findings": "Specific point of tenderness on the chest wall.",
"investigations": "Blood tests within normal limits.",
"recommendations": "Patient advised to continue walking.",
"Diet": "Patient advised to maintain a diet.",
"follow_up": "Follow up after three days.",
"plan": "Medical management advised for costochondritis.",
"icd_diagnosis": [
{
"icd_type": "icd_10",
"icd_code": "R50.9",
"icd_name": "Fever"
},
{
"icd_type": "icd_10",
"icd_code": "J00 :",
"icd_name": "Acute nasopharyngitis [common cold]"
},
{
"icd_type": "icd_10",
"icd_code": "CARD5",
"icd_name": "Primary Hypertension"
}
],
"cross_dr_id": [
{
"doctor_id": 161,
"speciality_id": 3,
"speciality_name": "GENERAL MEDICINE",
"practitioner_id": "abc-dr1"
}
]
}
}
]
}
Patient Interaction Response — Field Guide
This GET API returns an EMR-style interaction bundle.
The total number of interaction records is returned in count,
each interaction is listed inside data[], and the full clinical
payload for each interaction is stored inside that item’s nested
data object.
Note: Depending on the interaction type and available clinical
data, some fields may be null, empty strings, empty arrays, or
empty objects.
1. Response Top Level
| Field | Meaning |
|---|---|
count |
Total number of interaction records returned in data. |
data |
Array of interaction records. Each element represents one consultation or visit. |
2. Each Item in data[] (Interaction Header)
| Field | Meaning |
|---|---|
interaction_id |
Internal identifier for the interaction. |
patient_id |
Patient identifier stored in the interaction record. |
doctor_id |
Identifier of the doctor who handled the consultation. |
patient |
Patient demographic details such as name, age, gender, and patient identifiers. |
interaction_date |
Date and time when the consultation occurred. |
interaction_detail_type |
Type or format of the interaction, such as Edited OPD or audio-based data. |
created_at |
Date and time when this interaction record was created in CareScribe. |
data |
Nested clinical payload containing vitals, medications, investigations, diagnosis, notes, coded diagnoses, and referral details. |
3. Patient Object
| Field | Meaning |
|---|---|
patient_id |
Patient identifier as stored in the interaction record. |
hospital_patient_id |
Patient identifier as maintained in the hospital/HMS system. |
first_name, last_name |
Patient name. |
date_of_birth |
Patient date of birth, if available. |
gender |
Patient gender, if available. |
age |
Patient age, if available. |
4. Inner data — Vitals (vitals[])
The vitals array contains one or more vital-sign entries recorded
during the interaction. Common fields include:
pulse, height, weight,
systolicBP, diastolicBP,
oxygenSaturation, temperature,
respRate, bloodSugar, bmi,
chest_circumference, and head_circumference.
It may also include abnormality flags such as abnormalPulse,
abnormalOxygen, and abnormalSystolic.
5. Condition Flags and Related Dates
The vitals payload may also contain condition/history fields such as
hypertension, diabetesMellitus,
asthma, cardiacDiseases,
kidneyDiseases, arthritis,
epilepsy, cancer, and allergy.
Related date fields use the *Date suffix, for example
hypertensionDate, cancerDate, and
diabetesMellitusDate.
6. Lab, Dermatology, and Images
| Field | Meaning |
|---|---|
dashboard_notes |
Optional dashboard-facing notes object, when present. |
lab_report |
Structured lab report or summary object. |
dermatology_notes |
Dermatology-specific notes. |
dermatology_image |
Dermatology image URL or null. |
reference_image |
Array of additional reference image URLs. |
7. assessment[] (Investigations / Tests)
The assessment array contains ordered investigations or test
templates for the interaction.
| Field | Meaning |
|---|---|
assessment_template |
Name of the assessment or test template. |
template_tests |
Test description or linked test name. |
template_id |
Template or test identifier, where available. |
template_type |
Optional template type. |
hospital_id |
Hospital identifier associated with the template, when present. |
showList |
Optional UI/helper flag used by the client. |
8. medication_templates[]
The medication_templates array contains one object per prescribed
medication.
| Field Group | Meaning |
|---|---|
medication_name, brand_name,
brand_id, generic_name
|
Medication identity details. |
strength, uom, dosage_value |
Dosage strength and measurement details. |
frequency_morning, frequency_afternoon,
frequency_evening, frequency_night
|
Time-of-day dosage schedule. |
prn, instructions |
Special instructions or “as needed” usage details. |
route, drug_type, vaccine |
Route of administration, drug form/type, and vaccine flag. |
duration, days, quantity |
Medication duration text, duration in days, and prescribed quantity. |
frequency_code, route_code,
uom_code, duration_code
|
Master-data codes used for medication metadata. |
frequency_description, route_description,
uom_description, duration_description
|
Human-readable descriptions for the corresponding master-data codes. |
medication_start_date, medication_end_date |
Medication schedule start and end dates. |
9. Doctor Narrative (Clinical Notes)
These fields store the doctor’s narrative notes and summary for the interaction.
Common fields include:
Diagnosis, chief_complaints,
history_of_presenting_illness, patient_history,
Past_Medications, personal_history,
examination_findings, investigations,
recommendations, Diet, follow_up,
and plan.
Depending on the case, many of these fields may be empty strings or
null.
10. icd_diagnosis[]
The icd_diagnosis array contains coded diagnoses for the interaction.
| Field | Meaning |
|---|---|
icd_type |
Diagnosis coding standard, such as icd_10. |
icd_code |
Coded diagnosis value. |
icd_name |
Human-readable diagnosis name. |
11. cross_dr_id[] (Referrals / Cross Consultation)
The cross_dr_id array contains referral or cross-consultation
details when the patient is referred to another doctor.
| Field | Meaning |
|---|---|
doctor_id |
Internal identifier of the referred doctor. |
speciality_id |
Internal identifier of the speciality or department. |
speciality_name |
Name of the speciality or department. |
practitioner_id |
External practitioner identifier used by the hospital/system. |
In summary, this response returns one or more patient interactions along with demographic, clinical, medication, diagnosis, and referral data for each interaction.
Important: Response patient_id is the hospital patient id (string). If notes are not ready, inner data may be null with data_status / data_message; top-level message, code, and retry_after_seconds can appear as in the pending examples below.
Response (200 OK) - Data Not Generated Yet:
{
"count": 0,
"data": [],
"message": "Data not generated yet. Please try again after 30 seconds.",
"code": "DATA_NOT_GENERATED",
"retry_after_seconds": 30
}
Response (200 OK) - With Pending Data:
{
"count": 1,
"data": [
{
"interaction_id": 108376,
"patient_id": "ABC19-202603-00010",
"doctor_id": 162,
"patient": { ... },
"interaction_date": "2026-03-13T12:40:10.000Z",
"interaction_detail_type": "Edited opd",
"created_at": "2026-03-13T13:00:25.061Z",
"data": null,
"data_status": "pending",
"data_message": "Response not yet generated. Please wait 30 seconds and try again."
}
],
"message": "Response not yet generated. Please wait 30 seconds and try again.",
"code": "RESPONSE_NOT_GENERATED",
"retry_after_seconds": 30
}
Important: When data is not yet generated, the API returns a 200 status code (not 202) with a message indicating the data is pending. Wait for the specified number of seconds (typically 30 seconds) before retrying the request. The data is still being processed.
Responses:
- 200: Successfully retrieved patient interactions (may include pending data) — Returns count and array of interaction data with parsed notes. If any interaction has pending data, includes
message,code, andretry_after_secondsfields. - 400: Missing required parameters — Examples:
{"message": "hospital_id is required.", "code": "MISSING_PARAMS"}or{"message": "patient_id is required (hospital_patient_id to look up patient).", "code": "MISSING_PARAMS"} - 404: Patient not found —
{"message": "Patient not found for the given hospital_patient_id in this hospital."} - 500: Internal server error —
{"message": "Failed to fetch patient interactions by hospital_patient_id.", "code": "INTERNAL_ERROR"}
Step 6: Upload Medication List
Summary: Upload medication data for your organization
Description: You can upload medication lists in two ways: via JSON payload or via CSV file upload. Both methods allow you to add brand names and generic names for medications that will be used in your hospital setup.
⚠️ Important: Use post medication api call only for the initial upload. If you use upload again for appending data, it will delete the existing list and replace it completely with the new data. For any modifications or additions, always use the update (put) medication api call.
Two Methods Available
Choose the method that best fits your workflow:
JSON JSON Payload Method
Endpoint:
POST /software/post-medication
CSV CSV File Upload Method
Endpoint:
POST /software/uploadMedicationCsv
Method 1: JSON Payload
Summary: Upload medication master data (JSON) and store as CSV
Description: 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.
- Each medication must contain 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 CODE
- UOM DESCRIPTION (if provided, UOM CODE is required).
- ACTIVE FROM
- ACTIVE TO
- MEDICATION TYPE
Validation:
- Duplicate BRAND ID values in the request are marked invalid.
- Duplicate 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.
Body
Example 1: Basic payload (BRAND NAME and GENERIC NAME only)
{
"hospital_id": "9",
"medications": [
{
"BRAND NAME": "Tylenol",
"GENERIC NAME": "Acetaminophen"
},
{
"BRAND NAME": "Advil",
"GENERIC NAME": "Ibuprofen"
}
]
}
Example 2: Complete payload (all possible fields)
{
"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/2024",
"ACTIVE TO": "31/12/2026",
"MEDICATION TYPE": "Tablet"
},
{
"BRAND ID": "13753",
"BRAND NAME": "CROXIN 500MG TAB",
"GENERIC NAME": "PARACETAMOL 500MG",
"UOM CODE": "mg",
"UOM DESCRIPTION": "Milligram",
"ACTIVE FROM": "01/01/2024",
"ACTIVE TO": "31/12/2026",
"MEDICATION TYPE": "Tablet"
}
]
}
Supported fields (case-sensitive as shown in examples):
- BRAND NAME (required)
- GENERIC NAME (required)
- BRAND ID (conditionally required if present in any item)
- UOM CODE (optional)
- UOM DESCRIPTION (optional; if provided, UOM CODE is required)
- ACTIVE FROM (optional)
- ACTIVE TO (optional)
- MEDICATION TYPE (optional)
Response (200 OK):
{
"message": "Medication data uploaded successfully",
"data": "https://storage.googleapis.com/bucket/processed/ORG123_20260305123456.json",
"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"
}
]
}
Responses:
- 200: Medication data uploaded successfully — Returns success message, processed output URL, and list of invalid rows rejected during validation
- 400: Bad Request (validation failure) — Examples:
{"message": "Invalid request body: hospital_id and non-empty medications array are required"},{"message": "Inconsistent data: All medications must include BRAND ID if any include it"},{"message": "No valid medications provided"} - 404: Organization not found —
{"message": "Organization not found"} - 500: Internal server error —
{"message": "Internal server error"}
Method 2: CSV File Upload
Summary: Upload medication CSV
Description: 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.
Query Parameters:
- hospital_id (required): Hospital/organization identifier
Form Data:
- csvFile (required, binary): Medication CSV file to upload
Supported CSV header format (case-sensitive, exact order):
BRAND ID, BRAND NAME, GENERIC NAME, UOM CODE, UOM DESCRIPTION, ACTIVE FROM, ACTIVE TO, MEDICATION TYPE
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.
- If UOM DESCRIPTION is provided, UOM CODE must also be provided.
- Additional supported fields: ACTIVE FROM, ACTIVE TO, MEDICATION TYPE.
- Duplicate BRAND ID values are rejected.
- Duplicate BRAND NAME + GENERIC NAME combinations are rejected.
- Empty values or values containing only
,or.are rejected.
Invalid rows are returned in the invalid field of the response.
Response (200 OK):
{
"message": "CSV uploaded and saved",
"data": "https://storage.googleapis.com/bucket/processed/ORG123_20260305123456.json",
"invalid": []
}
Responses:
- 200: CSV uploaded successfully — Returns success message, processed URL generated from the uploaded CSV, and rows rejected due to validation errors
- 400: Bad request — Examples:
{"message": "No valid rows in CSV"},{"error": "Invalid hospital_id provided.", "invalid": []} - 404: Organization not found —
{"message": "Organization not found"} - 500: Internal server error —
{"message": "Failed to upload", "error": "Error processing CSV file"}
Update Medication List
Description: Update existing medication lists by merging new medication entries with existing data. You can update medication lists in two ways: via JSON payload or via CSV file upload.
Two Methods Available
Choose the method that best fits your workflow:
JSON JSON Payload Method
Endpoint:
PUT /software/updateMedicationCsv
CSV CSV File Upload Method
Endpoint:
PUT /software/updateMedicationCsvList
Method 1: JSON Payload
Summary: Update medication data (merge into existing CSV)
Description: 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.
- Each item must contain 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).
- Additional optional fields: ACTIVE FROM, ACTIVE TO, MEDICATION TYPE.
- If an existing CSV is present, headers must match the current medication header format.
- Final merged data is stored back as a CSV file.
Body
Example 1: Basic payload (BRAND NAME and GENERIC NAME only)
{
"hospital_id": "9",
"medications": [
{
"BRAND NAME": "Amlodipine",
"GENERIC NAME": "Amlodipine Besylate"
},
{
"BRAND NAME": "Metformin",
"GENERIC NAME": "Metformin Hydrochloride"
}
]
}
Example 2: Complete payload (all possible fields)
{
"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/2024",
"ACTIVE TO": "31/12/2026",
"MEDICATION TYPE": "Tablet"
},
{
"BRAND ID": "13753",
"BRAND NAME": "CROXIN 500MG TAB",
"GENERIC NAME": "PARACETAMOL 500MG",
"UOM CODE": "mg",
"UOM DESCRIPTION": "Milligram",
"ACTIVE FROM": "01/01/2024",
"ACTIVE TO": "31/12/2026",
"MEDICATION TYPE": "Tablet"
}
]
}
Response (200 OK):
{
"message": "Medication data updated successfully (delta applied)",
"data": [
{
"BRAND ID": "13752",
"BRAND NAME": "OLVANCE 40MG TAB",
"GENERIC NAME": "OLMESARTAN MEDOXOMIL 40MG",
"UOM CODE": "mg",
"UOM DESCRIPTION": "Milligram"
}
],
"invalid": []
}
Responses:
- 200: Medication data updated successfully — Returns success message, final merged medication rows (stored in CSV), and list of invalid entries (will be empty when update succeeds)
- 400: Bad Request (validation/header mismatch) — Examples:
{"message": "Invalid request body: hospital_id and non-empty medications array are required"},{"message": "Inconsistent data: All medications must include BRAND ID if any include it"},{"message": "Validation errors in medication data"},{"message": "Header mismatch between existing and new medication data", "invalid": [...]} - 404: Organization not found —
{"message": "Organization not found"} - 500: Internal server error —
{"message": "Internal server error", "error": "Unexpected error"}
Method 2: CSV File Upload
Summary: Update medication CSV data
Description: Uploads a medication CSV for the given hospital_id and merges it with the existing medication CSV stored in Google Cloud Storage (GCS).
Query Parameters:
- hospital_id (required): Hospital identifier for the organization
Form Data:
- csvFile (required, binary): Medication CSV file to upload (must end with
.csv)
CSV header format (case-sensitive, must match exactly):
BRAND ID, BRAND NAME, GENERIC NAME, UOM CODE, UOM DESCRIPTION, ACTIVE FROM, ACTIVE TO, MEDICATION TYPE
Validation rules (applies to both existing CSV and uploaded CSV):
- BRAND NAME and GENERIC NAME are required in every row.
- Empty values or values containing only
,or.are rejected. - Duplicate BRAND ID values (when BRAND ID exists) are rejected.
- Duplicate BRAND NAME + GENERIC NAME combinations are rejected.
- If UOM DESCRIPTION is provided, UOM CODE is required.
- Additional supported fields: ACTIVE FROM, ACTIVE TO, MEDICATION TYPE.
- If an existing medication CSV is present, the uploaded CSV must have the same header count (same number of columns), otherwise the API returns 400 with
Header mismatch between existing and new CSV.
Merge behavior:
- If the uploaded header includes BRAND ID, the merge key is BRAND ID.
- Otherwise, the merge key is BRAND NAME + GENERIC NAME.
- Uploaded rows overwrite matching existing rows.
Response (200 OK):
{
"message": "Medication data updated successfully (merged, duplicates removed)",
"url": "https://storage.googleapis.com/bucket/csv_uploads/123_20260305_120102.csv",
"invalid": []
}
Responses:
- 200: Medication data updated successfully (merged and uploaded) — Returns success message, GCS URL of the merged CSV, and rows rejected due to validation errors (may be empty)
- 400: Invalid request (missing hospital_id, invalid CSV, invalid columns, header mismatch, or no valid rows) — Examples:
{"message": "Header mismatch between existing and new CSV", "invalid": []} - 404: Organization not found —
{"message": "Organization not found"} - 500: Internal server error —
{"message": "Internal server error", "error": "Unexpected error"}
Additional Medication APIs
Update Medication Rows by Brand ID
Summary: Update Medication CSV Rows by Brand ID
Description: Updates medication rows in the stored CSV using BRAND ID as the unique identifier.
Query Parameters:
- hospital_id (required): Unique hospital identifier
BRAND IDis required for each row- Rows are updated only when matching
BRAND IDis found - Duplicate
BRAND NAME + GENERIC NAMEcombinations are rejected
{
"medications": [
{
"BRAND ID": "L917",
"BRAND NAME": "LUBIC JELLY {50GM}",
"GENERIC NAME": "Lubricant Jelly",
"UOM DESCRIPTION": "No(s)",
"UOM CODE": "NUMBR"
}
]
}
Example 2:
{
"medications": [
{
"BRAND ID": "L918",
"BRAND NAME": "PARA 650 TAB",
"GENERIC NAME": "Paracetamol 650mg",
"UOM DESCRIPTION": "Tablet",
"UOM CODE": "TAB"
}
]
}
Responses:
- 200: Medication rows updated successfully
- 400: Validation errors or partial failures
- 404: Organization or medication data not found
- 500: Internal server error
Delete Medication Rows by Brand ID
Summary: Delete Medication CSV Rows by Brand ID
Description: Deletes medication rows from the CSV using BRAND ID.
Query Parameters:
- hospital_id (required): Unique hospital identifier
{
"medications": [
{ "BRAND ID": "L917" },
{ "BRAND ID": "L918" }
]
}
Responses:
- 200: Medication rows deleted successfully
- 400: Validation errors in delete request
- 404: Organization not found or BRAND ID not found
- 500: Internal server error
Step 7: Upload Investigation List
Summary: Upload investigation data for your organization
Description: You can upload investigation lists in two ways: via JSON payload or via CSV file upload. Both methods allow you to add investigation data including Service ID, Standard Lab Test Name, and Alias Name that will be used in your hospital setup.
⚠️ Important: Use upload only for the initial upload. If you use upload again, it will delete the existing list and replace it completely with the new data. For any modifications or additions, always use the update call.
Two Methods Available
Choose the method that best fits your workflow:
JSON JSON Payload Method
Endpoint:
POST /software/uploadInvestigationJson
CSV CSV File Upload Method
Endpoint:
POST /software/uploadInvestigationCsv
Method 1: JSON Payload
Summary: Upload investigation data as JSON
Description: Upload investigation data for an organization as a JSON array. The data is converted to CSV format and stored in Google Cloud Storage, replacing any existing investigation data.
Query Parameters:
- hospital_id (required): The ID of the hospital associated with the organization
Body
{
"data": [
{
"Service ID": "INV001",
"Standard Lab Test Name": "Complete Blood Count",
"Alias Name": "CBC",
"Service Type": "Laboratory",
"Hospital ID": "HOSP123"
},
{
"Service ID": "INV002",
"Standard Lab Test Name": "Blood Glucose",
"Alias Name": "BG",
"Service Type": "Laboratory"
}
]
}
Example 2:
{
"data": [
{
"Service ID": "INV010",
"Standard Lab Test Name": "Liver Function Test",
"Alias Name": "LFT",
"Service Type": "Laboratory",
"Hospital ID": "HOSP123"
},
{
"Service ID": "INV011",
"Standard Lab Test Name": "Kidney Function Test",
"Alias Name": "KFT",
"Service Type": "Laboratory"
}
]
}
Note:
- hospital_id: Required — The ID of the hospital/organization (query parameter)
- data: Required — Array of investigation objects
- Service ID: Required — Identifier that forms the row key together with Service Type
- Standard Lab Test Name: Required — Standard name of the lab test
- Alias Name: Optional — Alias or short name for the test; a blank value defaults to Standard Lab Test Name
- Service Type: Optional — Type of service (e.g., "Laboratory")
- Hospital ID: Optional — Hospital identifier
- ACTIVE FROM: Optional — Start date in DD/MM/YYYY format
- ACTIVE TO: Optional — End date in DD/MM/YYYY format
Response (200 OK):
{
"message": "Investigation data uploaded successfully",
"data": "https://storage.googleapis.com/bucket/investigation_csv/org123_2025_09_02_13_30_45_filtered.csv",
"invalid": [
{
"Service ID": "INV001",
"error": "Service ID is required"
}
]
}
Responses:
- 200: Investigation data uploaded successfully — Returns success message, data URL, and list of invalid entries if any
- 400: Invalid request —
{"message": "JSON data is required in request body", "error": "Invalid hospital_id provided."} - 404: Organization not found
- 500: Internal server error —
{"message": "Failed to upload investigation data", "error": "Error message details"}
Method 2: CSV File Upload
Summary: Upload an investigation CSV file
Description: Upload a CSV file containing investigation data for an organization, identified by hospital_id. The file is stored in Google Cloud Storage, and any existing file is deleted.
Query Parameters:
- hospital_id (required): The ID of the hospital associated with the organization
Form Data:
- csvFile (required, binary): CSV with required columns Service ID and Standard Lab Test Name; optional columns are Alias Name, Service Type, Hospital ID, ACTIVE FROM, and ACTIVE TO.
Note: CSV data should contain the following columns:
| SERVICE ID | STANDARD LAB TEST NAME | ALIAS NAME |
|---|---|---|
| INV001 | Complete Blood Count | CBC |
| INV002 | Blood Glucose | BG |
Optional columns: Alias Name, Service Type, Hospital ID, ACTIVE FROM, ACTIVE TO. Active dates must use DD/MM/YYYY. The case-insensitive Service ID + Service Type pair is the merge key.
Response (200 OK):
{
"message": "CSV updated and saved",
"data": "https://storage.googleapis.com/bucket/investigation_csv/org123_2025_09_02_13_30_45_filtered.csv",
"invalid": [
{
"Service ID": "INV001",
"Standard Lab Test Name": "Complete Blood Count",
"Alias Name": "CBC",
"error": "Service ID is required"
}
]
}
Responses:
- 200: CSV updated and saved successfully — Returns success message, data URL, and list of invalid entries with error details
- 400: Invalid request —
{"message": "A valid CSV file is required", "error": "Invalid hospital_id provided."} - 404: Organization not found
- 500: Internal server error —
{"message": "Failed to upload", "error": "Error message details"}
Update Investigation List
Description: You can update existing investigation lists in two ways: via JSON payload or via CSV file upload. Both methods allow you to add new investigations to your existing investigation list.
Two Methods Available
Choose the method that best fits your workflow:
JSON JSON Payload Method
Endpoint:
POST /software/updateInvestigationJson
Note: Merges new investigation data with existing data and stores the updated file.
CSV CSV File Upload Method
Endpoint:
POST /software/updateInvestigationCsvs
Note: New file will be merged with existing file.
Method 1: JSON Payload
Summary: Update investigation data as JSON
Description: Update investigation data for an organization by merging new JSON data with existing data. The merged data is converted to CSV format and stored in Google Cloud Storage.
Query Parameters:
- hospital_id (required): The ID of the hospital associated with the organization
Body
{
"data": [
{
"Service ID": "INV001",
"Standard Lab Test Name": "Complete Blood Count",
"Alias Name": "CBC",
"Service Type": "Laboratory",
"Hospital ID": "HOSP123"
},
{
"Service ID": "INV002",
"Standard Lab Test Name": "Blood Glucose",
"Alias Name": "BG",
"Service Type": "Laboratory"
}
]
}
Example 2:
{
"data": [
{
"Service ID": "INV010",
"Standard Lab Test Name": "Liver Function Test",
"Alias Name": "LFT",
"Service Type": "Laboratory",
"Hospital ID": "HOSP123"
},
{
"Service ID": "INV012",
"Standard Lab Test Name": "Thyroid Profile",
"Alias Name": "TFT",
"Service Type": "Laboratory"
}
]
}
Note:
- hospital_id: Required — The ID of the hospital/organization (query parameter)
- data: Required — Array of investigation objects to merge with existing data
- Service ID: Required — Identifier that forms the row key together with Service Type
- Standard Lab Test Name: Required — Standard name of the lab test
- Alias Name: Optional — Alias or short name for the test
- Service Type: Optional — Type of service (e.g., "Laboratory")
- Hospital ID: Optional — Hospital identifier
- ACTIVE FROM: Optional — Start date in DD/MM/YYYY format
- ACTIVE TO: Optional — End date in DD/MM/YYYY format
- The system will merge new data with existing data
Response (200 OK):
{
"message": "Investigation data updated successfully",
"data": "https://storage.googleapis.com/bucket/investigation_csv/org123_2025_09_02_13_30_45_filtered.csv",
"invalid": [
{
"Service ID": "INV001",
"error": "Service ID is required"
}
]
}
Responses:
- 200: Investigation data updated successfully — Returns success message, data URL, and list of invalid entries if any
- 400: Invalid request —
{"message": "JSON must be an array of objects", "error": "Invalid hospital_id provided."} - 404: Organization not found
- 500: Internal server error —
{"message": "Failed to update investigation data", "error": "Error message details"}
Method 2: CSV File Upload
Summary: Update an investigation CSV file
Description: Update a CSV file containing investigation data for an organization, identified by hospital_id. The file is stored in Google Cloud Storage, and new file will be merged with existing file.
Query Parameters:
- hospital_id (required): The ID of the hospital associated with the organization
Form Data:
- csvFile (required, binary): CSV with required columns Service ID and Standard Lab Test Name; optional columns are Alias Name, Service Type, Hospital ID, ACTIVE FROM, and ACTIVE TO.
Note: CSV data should contain the following columns (same as upload):
| SERVICE ID | STANDARD LAB TEST NAME | ALIAS NAME |
|---|---|---|
| INV001 | Complete Blood Count | CBC |
| INV002 | Blood Glucose | BG |
Optional columns: Alias Name, Service Type, Hospital ID, ACTIVE FROM, ACTIVE TO. Active dates must use DD/MM/YYYY. The case-insensitive Service ID + Service Type pair is the merge key.
Important: The new CSV file will be merged with the existing file, not replaced.
Response (200 OK):
{
"message": "CSV uploaded and saved",
"data": "https://storage.googleapis.com/bucket/investigation_csv/org123_2025_09_02_13_30_45_filtered.csv",
"invalid": [
{
"Service ID": "INV001",
"Standard Lab Test Name": "Complete Blood Count",
"Alias Name": "CBC",
"error": "Service ID is required"
}
]
}
Responses:
- 200: CSV uploaded and saved successfully — Returns success message, data URL, and list of invalid entries with error details
- 400: Invalid request —
{"message": "A valid CSV file is required", "error": "Invalid hospital_id provided."} - 404: Organization not found
- 500: Internal server error —
{"message": "Failed to update", "error": "Error message details"}
Additional Investigation APIs
Get Investigation CSV Data
Summary: Fetch Investigation CSV Data
Query Parameters:
- hospital_id (required): Unique hospital identifier
Responses:
- 200: Investigation CSV fetched successfully
- 400: Missing required query parameter
- 404: Invalid hospital_id or Investigation CSV not found
- 500: Internal server error
Update Investigation Rows by Service ID
Summary: Update selected rows by Service ID
Query Parameters:
- hospital_id (required): Unique hospital identifier
Service IDis mandatory and cannot be changed- Allowed update fields:
STANDARD LAB TEST NAME,ALIAS NAME
{
"investigations": [
{
"Service ID": "ITC9492",
"STANDARD LAB TEST NAME": "ASCITIC FLUID - AMYLASE UPDATED",
"ALIAS NAME": "ASCITIC FLUID - AMYLASE UPDATED"
},
{
"SERVICE ID": "ITC9547",
"STANDARD LAB TEST NAME": "FERRITIN-SERUM",
"ALIAS NAME": "FERRITIN-SERUM"
}
]
}
Responses:
- 200: Investigation rows updated successfully
- 400: Validation error or rows could not be updated
- 404: Investigation CSV not found or invalid hospital_id
- 500: Internal server error
Delete Investigation Rows by Service ID
Summary: Delete selected rows by Service ID
Query Parameters:
- hospital_id (required): Unique hospital identifier
Service IDis mandatory for deletion- Matching is case-insensitive
- If all rows are deleted, the CSV file is removed
{
"investigations": [
{ "Service ID": "ITC9492" },
{ "Service ID": "ITC9493" }
]
}
Responses:
- 200: Investigation rows deleted successfully
- 400: Validation error or missing Service ID
- 404: Service ID or hospital not found
- 500: Internal server error
Step 8: Upload Route List
Summary: Upload route data for your organization
Description: You can upload route lists in two ways: via JSON payload or via CSV file upload. Both methods allow you to add route data including ROUTE CODE and ROUTE DESCRIPTION that will be used in your hospital setup.
⚠️ Important: Use upload route api call only for the initial upload. If you use upload again for appending data, it will delete the existing list and replace it completely with the new data. For any modifications or additions, always use the update (post) route api call.
Two Methods Available
Choose the method that best fits your workflow:
JSON JSON Payload Method
Endpoint:
POST /software/uploadRouteJson
CSV CSV File Upload Method
Endpoint:
POST /software/uploadRouteCsv
Method 1: JSON Payload
Summary: Upload route data
Description: Uploads Route master data for an organization in JSON format and stores it as a CSV file. 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.
Query Parameters:
- hospital_id (required): The ID of the hospital/organization
Body
{
"data": [
{
"ROUTE CODE": "24",
"ROUTE DESCRIPTION": "Oral"
},
{
"ROUTE CODE": "25",
"ROUTE DESCRIPTION": "Intravenous"
}
]
}
Note:
- data: Required — Array of route objects
- ROUTE CODE: Required — Code representing the route of administration
- ROUTE DESCRIPTION: Required — Description of the route of administration
Response (200 OK):
{
"message": "JSON uploaded and saved as CSV",
"data": "https://storage.googleapis.com/bucket/route_csv/ORG123_20250901123000_filtered.csv",
"invalid": [
{
"index": 1,
"error": "ROUTE DESCRIPTION is empty"
}
],
"totalItems": 2,
"invalidItemsCount": 0
}
Responses:
- 200: Route JSON uploaded and converted to CSV successfully — Returns success message, data URL, and list of invalid entries if any
- 400: Invalid request —
{"message": "Request body must be an array or { data: array }"} - 404: Organization not found —
{"message": "Organization not found"} - 500: Internal server error —
{"message": "Failed to upload", "error": "Unexpected server error"}
Method 2: CSV File Upload
Summary: Upload Route CSV
Description: Uploads a Route master CSV for the specified hospital_id (query parameter). ROUTE CODE and ROUTE DESCRIPTION are required; ACTIVE FROM and ACTIVE TO are optional and use DD/MM/YYYY. 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.
Query Parameters:
- hospital_id (required): Hospital ID used to resolve organization
Form Data:
- csvFile (required, binary): CSV file containing route data (ROUTE CODE, ROUTE DESCRIPTION)
CSV Format: ROUTE CODE and ROUTE DESCRIPTION are required. ACTIVE FROM and ACTIVE TO are optional and use DD/MM/YYYY:
| ROUTE CODE | ROUTE DESCRIPTION |
|---|---|
| 24 | Oral |
| 25 | Intravenous |
Response (200 OK):
{
"message": "CSV uploaded and saved",
"data": "https://storage.googleapis.com/bucket/route_csv/ORG_20260304_123000_filtered.csv",
"invalid": [
{
"ROUTE CODE": "",
"ROUTE DESCRIPTION": "Oral",
"error": "ROUTE CODE is empty"
}
]
}
Responses:
- 200: CSV uploaded and saved successfully — Returns success message, data URL, and list of invalid entries with error details
- 400: Bad request — Examples:
{"message": "Hospital ID is required", "error": "Invalid hospital_id provided."} - 404: Organization not found —
{"message": "Organization not found"} - 500: Internal server error —
{"message": "Failed to upload", "error": "Invalid column names. Required: [\"ROUTE CODE\",\"ROUTE DESCRIPTION\"]."}
Update Route List
Description: You can update existing route lists in two ways: via JSON payload or via CSV file upload. Both methods allow you to merge new route entries with existing data.
Two Methods Available
Choose the method that best fits your workflow:
JSON JSON Payload Method
Endpoint:
POST /software/updateRouteJson
CSV CSV File Upload Method
Endpoint:
POST /software/updateRouteCsvs
Method 1: JSON Payload
Summary: Update Route Data using JSON
Description: This API updates route data for a hospital. The uploaded Route json will be merged with the existing route data (if available) stored for the organization and saved as a CSV file.
Query Parameters:
- hospital_id (required): Hospital ID used to identify the organization
Body
{
"data": [
{
"ROUTE CODE": "24",
"ROUTE DESCRIPTION": "Oral"
},
{
"ROUTE CODE": "26",
"ROUTE DESCRIPTION": "Intramuscular"
}
]
}
Requirements:
- ROUTE CODE and ROUTE DESCRIPTION are required; ACTIVE FROM and ACTIVE TO are optional and use DD/MM/YYYY
- Each ROUTE CODE must be unique within the uploaded file
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
- New ROUTE CODE entries are added to the dataset
The final merged dataset is stored as a CSV file and linked to the organization
Response (200 OK):
{
"status": "success",
"message": "Route data updated successfully (merged, stored as CSV)",
"data": "https://storage.googleapis.com/bucket/route_csv/file.csv",
"invalid": [
{
"ROUTE CODE": "24",
"ROUTE DESCRIPTION": "Oral",
"error": "ROUTE CODE already exists"
}
]
}
Responses:
- 200: Route data updated successfully — Returns success message, data URL, and list of invalid entries if any
- 400: Validation error —
{"status": "error", "message": "Validation failed", "invalid": [...]} - 404: Organization not found
- 500: Internal server error —
{"message": "Internal server error", "error": "Failed to process route data"}
Method 2: CSV File Upload
Summary: Update (merge) Route CSV
Description: 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; ACTIVE FROM and ACTIVE TO are optional and use DD/MM/YYYY
- Each ROUTE CODE must be unique within the uploaded file
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
- New ROUTE CODE entries are added to the dataset
The final merged dataset is stored as a CSV file and linked to the organization
Query Parameters:
- hospital_id (required): Hospital ID used to resolve organization
Form Data:
- csvFile (required, binary): CSV file containing route data (ROUTE CODE, ROUTE DESCRIPTION)
Response (200 OK):
{
"message": "Route data updated successfully (merged, duplicates removed)",
"data": "https://storage.googleapis.com/bucket/csv_uploads/route_ORG_20260304_123000.csv",
"invalid": [
{
"ROUTE CODE": "24",
"ROUTE DESCRIPTION": "Oral",
"error": "ROUTE CODE already exists"
}
]
}
Responses:
- 200: Route data updated successfully (merged, duplicates removed) — Returns success message, data URL, and list of invalid entries
- 400: Bad request —
{"message": "Bad request: invalid headers or missing/invalid file", "invalid": [...]} - 404: Organization not found
- 500: Internal server error —
{"message": "Internal server error", "error": "Failed to process CSV file"}
Additional Route APIs
Update Route Rows by Code
Summary: Update Route CSV Rows By Route Code
Query Parameters:
- hospital_id (required): Unique hospital identifier
ROUTE CODEis mandatory- Only provided fields are updated; matching is case-insensitive
- Duplicate
ROUTE CODEvalues in request are not allowed
{
"routes": [
{
"ROUTE CODE": "17",
"ROUTE DESCRIPTION": "Intrathecal"
},
{
"ROUTE CODE": "18",
"ROUTE DESCRIPTION": "Combination"
]
}
Responses:
- 200: Route rows updated successfully
- 400: Validation error or invalid request
- 404: Invalid hospital_id or Route CSV not found
- 500: Internal server error
Delete Route Rows by Code
Summary: Delete Route CSV Rows By Route Code
Query Parameters:
- hospital_id (required): Unique hospital identifier
{
"routes": [
{ "ROUTE CODE": "17" },
{ "ROUTE CODE": "18" }
]
}
Responses:
- 200: Route rows deleted successfully
- 400: Validation error or missing ROUTE CODE
- 404: ROUTE CODE or hospital not found
- 500: Internal server error
Step 9: Upload Frequency List
Summary: Upload frequency data for your organization
Description: You can upload frequency lists in two ways: via JSON payload or via CSV file upload. Both methods allow you to add frequency data including FREQUENCY CODE and FREQUENCY DESCRIPTION that will be used in your hospital setup.
⚠️ Important: Use upload frequency api call only for the initial upload. If you use upload again for appending data, it will delete the existing list and replace it completely with the new data. For any modifications or additions, always use the update (post) frequency api call.
Two Methods Available
Choose the method that best fits your workflow:
JSON JSON Payload Method
Endpoint:
POST /software/uploadFrequencyJson
CSV CSV File Upload Method
Endpoint:
POST /software/uploadFrequencyCsv
Method 1: JSON Payload
Summary: Upload frequency data
Description: 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:
- The request body must be an array of objects or an object in the format { data: array }
- Each object must contain the fields "FREQUENCY CODE" and "FREQUENCY DESCRIPTION"
- Each FREQUENCY CODE must be unique within the request payload
Validation:
- If FREQUENCY CODE or FREQUENCY DESCRIPTION is missing or empty, the item will be reported in the `invalid` field and the API returns a 400 error
- If duplicate FREQUENCY CODE values are found within the request payload, those items will be reported in the `invalid` field and the API returns a 400 error
Behavior:
- FREQUENCY CODE is treated as the unique identifier for frequency records
- During updates, if a FREQUENCY CODE already exists in the stored frequency data, the uploaded value overwrites the existing one
- New FREQUENCY CODE entries will be added to the dataset
The final dataset is stored as a CSV file and linked to the organization
Query Parameters:
- hospital_id (required): The ID of the hospital/organization
Body
{
"data": [
{
"FREQUENCY CODE": "OD",
"FREQUENCY DESCRIPTION": "Once daily"
},
{
"FREQUENCY CODE": "BD",
"FREQUENCY DESCRIPTION": "Twice daily"
}
]
}
Note:
- data: Required — Array of frequency objects
- FREQUENCY CODE: Required — Code representing the frequency of administration
- FREQUENCY DESCRIPTION: Required — Description of the frequency of administration
Response (200 OK):
{
"message": "JSON uploaded and saved as CSV",
"data": "https://storage.googleapis.com/bucket/frequency_csv/ORG123_20250901123000_filtered.csv",
"invalid": [
{
"index": 1,
"error": "FREQUENCY DESCRIPTION is empty"
}
],
"totalItems": 2,
"invalidItemsCount": 0
}
Responses:
- 200: Frequency JSON uploaded and converted to CSV successfully — Returns success message, data URL, and list of invalid entries if any
- 400: Invalid request —
{"message": "Request body must be an array or { data: array }"} - 404: Organization not found
- 500: Internal server error —
{"message": "Failed to upload", "error": "Unexpected server error"}
Method 2: CSV File Upload
Summary: Upload Frequency CSV
Description: Uploads a Frequency master CSV for the given hospital_id (query param) and stores it for the organization. FREQUENCY CODE and FREQUENCY DESCRIPTION are required; ACTIVE FROM and ACTIVE TO are optional and use DD/MM/YYYY. This API should be used only for the initial upload of Frequency data. If this API is called again, the existing Frequency list will completely deleted and replaced with the newly uploaded data. For any modifications or additions to the existing Frequency list, please use the updateFrequencyCsvs API.
Validation:
- If FREQUENCY CODE is empty, the row is reported in `invalid`
- If FREQUENCY DESCRIPTION is empty, the row is reported in `invalid`
Query Parameters:
- hospital_id (required): Hospital ID used to resolve organization
Form Data:
- csvFile (required, binary): CSV file with headers FREQUENCY CODE and FREQUENCY DESCRIPTION
CSV Format: FREQUENCY CODE and FREQUENCY DESCRIPTION are required. ACTIVE FROM and ACTIVE TO are optional and use DD/MM/YYYY:
| FREQUENCY CODE | FREQUENCY DESCRIPTION |
|---|---|
| OD | Once daily |
| BD | Twice daily |
Response (200 OK):
{
"message": "CSV uploaded and saved",
"data": "https://storage.googleapis.com/bucket/frequency_csv/ORG_20260304_123000_filtered.csv",
"invalid": [
{
"FREQUENCY CODE": "",
"FREQUENCY DESCRIPTION": "Once daily",
"error": "FREQUENCY CODE is empty"
}
]
}
Responses:
- 200: Frequency CSV uploaded and saved successfully — Returns success message, data URL, and list of invalid entries with error details
- 400: Bad request — Examples:
{"message": "Hospital ID is required", "error": "Invalid hospital_id provided."} - 404: Organization not found
- 500: Internal server error —
{"message": "Failed to upload", "error": "Invalid column names. Required: [\"FREQUENCY CODE\",\"FREQUENCY DESCRIPTION\"]."}
Update Frequency List
Description: You can update existing frequency lists in two ways: via JSON payload or via CSV file upload. Both methods allow you to merge new frequency entries with existing data.
Two Methods Available
Choose the method that best fits your workflow:
JSON JSON Payload Method
Endpoint:
POST /software/updateFrequencyJson
CSV CSV File Upload Method
Endpoint:
POST /software/updateFrequencyCsvs
Method 1: JSON Payload
Summary: Update (merge) Frequency data using JSON
Description: 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:
- The request body must be an array of objects (or { data: array })
- Each object must contain: "FREQUENCY CODE" and "FREQUENCY DESCRIPTION"
- Each FREQUENCY CODE must be unique within the request payload
Validation:
- If FREQUENCY CODE or FREQUENCY DESCRIPTION is missing/empty, the item will be reported in `invalid` and the API returns 400
- If duplicate FREQUENCY CODE values are found within the request payload, the duplicates will be reported in `invalid` and the API returns 400
Merge Behavior:
- FREQUENCY CODE is used as the unique key
- If a FREQUENCY CODE already exists in the stored frequency data, the uploaded value overwrites it
- New FREQUENCY CODE entries are added to the dataset
The final merged dataset is stored as a CSV file and linked to the organization
Query Parameters:
- hospital_id (required): Hospital ID used to resolve organization
Body
{
"data": [
{
"FREQUENCY CODE": "OD",
"FREQUENCY DESCRIPTION": "Once daily"
},
{
"FREQUENCY CODE": "TID",
"FREQUENCY DESCRIPTION": "Three times daily"
}
]
}
Response (200 OK):
{
"status": "success",
"message": "Frequency data updated successfully (merged, stored as CSV)",
"data": "https://storage.googleapis.com/bucket/frequency_csv/ORG_20260304_123000.csv",
"invalid": [
{
"FREQUENCY CODE": "OD",
"FREQUENCY DESCRIPTION": "Once daily",
"error": "FREQUENCY CODE already exists"
}
]
}
Responses:
- 200: Frequency data updated successfully (merged, stored as CSV) — Returns success message, GCS URL of the merged CSV file, and list of invalid entries
- 400: Validation failed / bad request —
{"status": "error", "message": "Validation failed", "invalid": [...]} - 404: Organization not found
- 500: Internal server error —
{"message": "Internal server error", "error": "Failed to process frequency data"}
Method 2: CSV File Upload
Summary: Update (merge) Frequency CSV
Description: 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:
- FREQUENCY CODE and FREQUENCY DESCRIPTION are required; ACTIVE FROM and ACTIVE TO are optional and use DD/MM/YYYY
- Each FREQUENCY CODE must be unique within the uploaded file
Validation:
- If duplicate FREQUENCY CODE values are found in the uploaded CSV, those rows will be reported in the `invalid` field of the response
- If FREQUENCY CODE is empty, the row will be reported in `invalid`
- If FREQUENCY DESCRIPTION is empty, the row will be reported in `invalid`
Merge Behavior:
- FREQUENCY CODE is used as the unique key
- If a FREQUENCY CODE already exists in the stored frequency data, the uploaded value overwrites the existing one
- New FREQUENCY CODE entries will be added to the dataset
The final merged dataset will be stored as a CSV file and linked to the organization
Query Parameters:
- hospital_id (required): Hospital ID used to resolve organization
Form Data:
- csvFile (required, binary): CSV file containing frequency data (FREQUENCY CODE, FREQUENCY DESCRIPTION)
Response (200 OK):
{
"message": "Frequency data updated successfully (merged, duplicates removed)",
"data": "https://storage.googleapis.com/bucket/csv_uploads/frequency_ORG_20260304_123000.csv",
"invalid": [
{
"FREQUENCY CODE": "OD",
"FREQUENCY DESCRIPTION": "Once daily",
"error": "FREQUENCY CODE already exists"
}
]
}
Responses:
- 200: Frequency data updated successfully (merged, duplicates removed) — Returns success message, data URL, and list of invalid entries
- 400: Bad request —
{"message": "Bad request: invalid headers or missing/invalid file", "invalid": [...]} - 404: Organization not found
- 500: Internal server error —
{"message": "Internal server error", "error": "Failed to process CSV file"}
Additional Frequency APIs
Update Frequency Rows by Code
Summary: Update Frequency CSV Rows By Frequency Code
Query Parameters:
- hospital_id (required): Unique hospital identifier
{
"frequencies": [
{
"FREQUENCY CODE": "AOTA",
"FREQUENCY DESCRIPTION": "Alternate Days One Times (Noon)(0-1-0-0)"
},
{
"FREQUENCY CODE": "MO",
"FREQUENCY DESCRIPTION": "Monthly Once"
}
]
}
Responses:
- 200: Frequency rows updated successfully
- 400: Validation error or invalid request
- 404: Invalid hospital_id or Frequency CSV not found
- 500: Internal server error
Delete Frequency Rows by Code
Summary: Delete Frequency CSV Rows By Frequency Code
Query Parameters:
- hospital_id (required): Unique hospital identifier
{
"frequencies": [
{ "FREQUENCY CODE": "AOTA" },
{ "FREQUENCY CODE": "ATHTMAE" }
]
}
Responses:
- 200: Frequency rows deleted successfully
- 400: Validation error or missing FREQUENCY CODE
- 404: FREQUENCY CODE or hospital not found
- 500: Internal server error
Step 10: Upload Drug List
Summary: Upload and manage Drug Allergy list for your organization
Description: You can upload Drug Allergy data in two ways (JSON or CSV) and update it later using merge APIs. You also get row-level update and delete APIs using DRUGALLERGY CODE.
⚠️ Important: Use upload APIs only for initial setup. Calling upload again replaces existing Drug Allergy data. For incremental changes, use update or by-code APIs.
Two Methods Available (Initial Upload)
Choose the method that best fits your workflow:
JSON JSON Payload Method
Endpoint:
POST /software/uploadDrugAllergyJson
CSV CSV File Upload Method
Endpoint:
POST /software/uploadDrugAllergyCsv
Method 1: JSON Payload
Summary: Upload Drug Allergy data as JSON
Description: Uploads Drug Allergy master data in JSON format for the given hospital. Data is validated and stored as CSV internally.
Query Parameters:
- hospital_id (required): Unique hospital identifier
Body
{
"allergies": [
{
"DRUGALLERGY CODE": "A001",
"DRUGALLERGY NAME": "Penicillin Allergy",
"DRUGALLERGY DESCRIPTION": "Rash and swelling reaction"
},
{
"DRUGALLERGY CODE": "A002",
"DRUGALLERGY NAME": "Sulfa Allergy",
"DRUGALLERGY DESCRIPTION": "Skin reaction to sulfa drugs"
}
]
}
Validation:
- Each item must include
DRUGALLERGY CODE,DRUGALLERGY NAME, andDRUGALLERGY DESCRIPTION DRUGALLERGY CODEvalues must be unique within the payload- Empty values are not allowed
Response (200 OK):
{
"message": "Drug Allergy JSON uploaded and saved",
"data": "https://storage.googleapis.com/bucket/file.csv",
"invalid": []
}
Responses:
- 200: Drug Allergy JSON uploaded successfully
- 400: Invalid payload or validation failure
- 404: Invalid hospital_id
- 500: Internal server error
Method 2: CSV File Upload
Summary: Upload Drug Allergy CSV
Description: Uploads a Drug Allergy CSV for the specified hospital. Use this API for initial upload only.
CSV Header Rules (Strict):
- Required headers:
DRUGALLERGY CODE,DRUGALLERGY NAME,DRUGALLERGY DESCRIPTION - Optional headers:
ACTIVE FROM,ACTIVE TO(DD/MM/YYYY) - Header names are matched case-insensitively; unknown or duplicate headers are rejected
- Duplicate
DRUGALLERGY CODEvalues are not allowed
Query Parameters:
- hospital_id (required): Unique hospital identifier
Form Data:
- csvFile (required, binary): Drug Allergy CSV file
Response (200 OK):
{
"message": "Drug Allergy CSV uploaded and saved",
"data": "https://storage.googleapis.com/bucket/file.csv",
"invalid": []
}
Responses:
- 200: CSV uploaded and processed successfully
- 400: Invalid headers, file, or validation errors
- 404: Invalid hospital_id
- 500: Internal server error
Update Drug Allergy List
Description: You can update existing Drug Allergy data in two ways: JSON merge or CSV merge.
Two Methods Available (Update/Merge)
JSON Merge
POST /software/updateDrugAllergyJson
CSV Merge
POST /software/updateDrugAllergyCsv
Method 1: JSON Merge Update
Summary: Update (merge) Drug Allergy JSON
Description: Merges payload with existing data using DRUGALLERGY CODE as the unique key.
Query Parameters:
- hospital_id (required): Unique hospital identifier
- Matching codes are updated
- New codes are added
- Duplicate codes in payload are rejected
{
"allergies": [
{
"DRUGALLERGY CODE": "A001",
"DRUGALLERGY NAME": "Updated Penicillin Allergy",
"DRUGALLERGY DESCRIPTION": "Severe rash and swelling reaction"
},
{
"DRUGALLERGY CODE": "A003",
"DRUGALLERGY NAME": "Aspirin Allergy",
"DRUGALLERGY DESCRIPTION": "Breathing difficulty after aspirin"
}
]
}
Responses:
- 200: Drug Allergy JSON updated successfully
- 400: Invalid request payload or validation failure
- 404: Invalid hospital_id
- 500: Internal server error
Method 2: CSV Merge Update
Summary: Update (merge) Drug Allergy CSV
Description: Merges uploaded CSV with existing Drug Allergy records using DRUGALLERGY CODE.
Query Parameters:
- hospital_id (required): Unique hospital identifier
Form Data:
- csvFile (required, binary): CSV file with Drug Allergy rows
DRUGALLERGY CODE,DRUGALLERGY NAME,DRUGALLERGY DESCRIPTION
A001,Updated Penicillin Allergy,Severe rash and swelling reaction
A003,Aspirin Allergy,Breathing difficulty after aspirin
Responses:
- 200: Drug Allergy CSV updated successfully
- 400: Invalid headers/file or validation failure
- 404: Invalid hospital_id
- 500: Internal server error
Additional Drug Allergy APIs
Get Existing Drug Allergy List
Summary: Get stored Drug Allergy CSV rows
Query Parameters:
- hospital_id (required): Unique hospital identifier
Responses:
- 200: Returns Drug Allergy rows
- 400: Missing query parameter
- 404: No Drug Allergy data available
- 500: Internal server error
Update Drug Allergy Rows by Code
Summary: Update selected rows by DRUGALLERGY CODE
Query Parameters:
- hospital_id (required): Unique hospital identifier
DRUGALLERGY CODEis mandatory and cannot be changed- Allowed update fields:
DRUGALLERGY NAME,DRUGALLERGY DESCRIPTION
{
"data": [
{
"DRUGALLERGY CODE": "A001",
"DRUGALLERGY NAME": "Updated Penicillin Allergy",
"DRUGALLERGY DESCRIPTION": "Severe rash and swelling reaction"
},
{
"DRUGALLERGY CODE": "A002",
"DRUGALLERGY NAME": "Updated Sulfa Allergy",
"DRUGALLERGY DESCRIPTION": "Updated skin reaction details"
}
]
}
Responses:
- 200: Rows updated successfully
- 400: Validation failure / bad request
- 404: Code not found or no CSV exists
- 500: Internal server error
Delete Drug Allergy Rows by Code
Summary: Delete selected rows by DRUGALLERGY CODE
Query Parameters:
- hospital_id (required): Unique hospital identifier
- Matching is case-insensitive
- If all rows are removed, stored CSV is also deleted
{
"allergies": [
{
"DRUGALLERGY CODE": "A001"
},
{
"DRUGALLERGY CODE": "A002"
}
]
}
Responses:
- 200: Rows deleted successfully
- 400: Validation errors in request
- 404: Hospital/code not found
- 500: Internal server error
Step 11: Upload Food Allergy List
Summary: Upload and manage Food Allergy list for your organization
Description: You can upload Food Allergy data in two ways (JSON or CSV) and update it later using merge APIs. You also get row-level update and delete APIs using FOODALLERGY CODE.
⚠️ Important: Use upload APIs only for initial setup. Calling upload again replaces existing Food Allergy data. For incremental changes, use update or by-code APIs.
Two Methods Available (Initial Upload)
JSON Payload Method
POST /software/uploadFoodAllergyJson
CSV File Upload Method
POST /software/uploadFoodAllergyCsv
Method 1: JSON Payload
Summary: Upload Food Allergy data as JSON
Description: Uploads Food Allergy records using a JSON body with a data array.
Query Parameters:
- hospital_id (required): Unique hospital identifier
Required fields per record:
FOODALLERGY CODEFOODALLERGY NAMEFOODALLERGY DESCRIPTION
{
"data": [
{
"FOODALLERGY CODE": "F001",
"FOODALLERGY NAME": "Peanut Allergy",
"FOODALLERGY DESCRIPTION": "Severe allergic reaction to peanuts"
},
{
"FOODALLERGY CODE": "F002",
"FOODALLERGY NAME": "Milk Allergy",
"FOODALLERGY DESCRIPTION": "Allergic reaction to dairy products"
}
]
}
Responses:
- 200: Food Allergy JSON uploaded successfully
- 400: Validation error or missing data
- 404: Invalid hospital_id
- 500: Internal server error
Method 2: CSV File Upload
Summary: Upload Food Allergy CSV
Query Parameters:
- hospital_id (required): Unique hospital identifier
Form Data:
- csvFile (required, binary): CSV file containing food allergy records
CSV Header Rules (Strict):
- Required headers:
FOODALLERGY CODE,FOODALLERGY NAME,FOODALLERGY DESCRIPTION - Optional headers:
ACTIVE FROM,ACTIVE TO(DD/MM/YYYY) - Header names are matched case-insensitively; unknown or duplicate headers are rejected
- Duplicate
FOODALLERGY CODEvalues are not allowed
FOODALLERGY CODE,FOODALLERGY NAME,FOODALLERGY DESCRIPTION
F001,Peanut Allergy,Severe allergic reaction to peanuts
F002,Milk Allergy,Allergic reaction to dairy products
Responses:
- 200: Food Allergy CSV uploaded and processed successfully
- 400: Invalid headers, file, or row validation errors
- 404: Invalid hospital_id
- 500: Internal server error
Update Food Allergy List
Two Methods Available (Update/Merge)
JSON Merge
POST /software/updateFoodAllergyJson
CSV Merge
POST /software/updateFoodAllergyCsv
Method 1: JSON Merge Update
Summary: Update (merge) Food Allergy JSON
Description: Updates existing rows and inserts new rows using FOODALLERGY CODE as key.
Query Parameters:
- hospital_id (required): Unique hospital identifier
- Matching codes are updated
- New codes are added
- Duplicate codes in payload are rejected
{
"data": [
{
"FOODALLERGY CODE": "F001",
"FOODALLERGY NAME": "Updated Peanut Allergy",
"FOODALLERGY DESCRIPTION": "Updated severe peanut allergy"
},
{
"FOODALLERGY CODE": "F003",
"FOODALLERGY NAME": "Egg Allergy",
"FOODALLERGY DESCRIPTION": "Allergic reaction to egg protein"
}
]
}
Responses:
- 200: Food Allergy JSON updated successfully
- 400: Invalid request payload or validation failure
- 404: Invalid hospital_id
- 500: Internal server error
Method 2: CSV Merge Update
Summary: Update (merge) Food Allergy CSV
Description: Merges uploaded Food Allergy CSV with existing stored CSV.
Query Parameters:
- hospital_id (required): Unique hospital identifier
Form Data:
- csvFile (required, binary): CSV file with Food Allergy rows
FOODALLERGY CODE,FOODALLERGY NAME,FOODALLERGY DESCRIPTION
F001,Updated Peanut Allergy,Updated severe peanut allergy
F003,Egg Allergy,Allergic reaction to egg protein
Responses:
- 200: Food Allergy CSV updated successfully
- 400: Invalid headers/file or validation failure
- 404: Invalid hospital_id
- 500: Internal server error
Additional Food Allergy APIs
Summary: Get existing Food Allergy rows
Query Parameters:
- hospital_id (required): Unique hospital identifier
Responses:
- 200: Returns Food Allergy rows
- 400: Missing query parameter
- 404: No Food Allergy CSV data available
- 500: Internal server error
Summary: Update Food Allergy rows by FOODALLERGY CODE
Query Parameters:
- hospital_id (required): Unique hospital identifier
FOODALLERGY CODEis mandatory and cannot be changed- Allowed update fields:
FOODALLERGY NAME,FOODALLERGY DESCRIPTION
{
"data": [
{
"FOODALLERGY CODE": "F001",
"FOODALLERGY NAME": "Updated Peanut Allergy",
"FOODALLERGY DESCRIPTION": "Updated severe peanut allergy"
},
{
"FOODALLERGY CODE": "F003",
"FOODALLERGY NAME": "Egg Allergy",
"FOODALLERGY DESCRIPTION": "Allergic reaction to egg protein"
}
]
}
Responses:
- 200: Food Allergy rows updated successfully
- 400: Validation failure / bad request
- 404: Code not found or no CSV exists
- 500: Internal server error
Summary: Delete Food Allergy rows by FOODALLERGY CODE
Query Parameters:
- hospital_id (required): Unique hospital identifier
{
"data": [
{
"FOODALLERGY CODE": "F001"
},
{
"FOODALLERGY CODE": "F003"
}
]
}
Responses:
- 200: Food Allergy rows deleted successfully
- 400: Validation errors in request
- 404: Hospital/code not found
- 500: Internal server error
Step 12: Upload Other Allergy List
Summary: Upload and manage Other Allergy list for your organization
Description: You can upload Other Allergy data in two ways (JSON or CSV) and update it later using merge APIs. You also get row-level update and delete APIs using OTHERALLERGY CODE.
⚠️ Important: Use upload APIs only for initial setup. Calling upload again replaces existing Other Allergy data. For incremental changes, use update or by-code APIs.
Two Methods Available (Initial Upload)
JSON Payload Method
POST /software/uploadOtherAllergyJson
CSV File Upload Method
POST /software/uploadOtherAllergyCsv
Method 1: JSON Payload
Summary: Upload Other Allergy data as JSON
Description: Uploads Other Allergy records using a JSON body with a data array.
Query Parameters:
- hospital_id (required): Unique hospital identifier
{
"data": [
{
"OTHERALLERGY CODE": "OTH001",
"OTHERALLERGY NAME": "Dust Allergy",
"OTHERALLERGY DESCRIPTION": "Sneezing and breathing irritation due to dust"
},
{
"OTHERALLERGY CODE": "OTH002",
"OTHERALLERGY NAME": "Pollen Allergy",
"OTHERALLERGY DESCRIPTION": "Seasonal pollen allergy symptoms"
}
]
}
Responses:
- 200: Other Allergy JSON uploaded successfully
- 400: Invalid payload or validation failure
- 404: Invalid hospital_id
- 500: Internal server error
Method 2: CSV File Upload
Summary: Upload Other Allergy CSV
Query Parameters:
- hospital_id (required): Unique hospital identifier
Form Data:
- csvFile (required, binary): CSV file containing Other Allergy records
CSV Header Rules (Strict):
- Required headers:
OTHERALLERGY CODE,OTHERALLERGY NAME,OTHERALLERGY DESCRIPTION - Optional headers:
ACTIVE FROM,ACTIVE TO(DD/MM/YYYY) - Header names are matched case-insensitively; unknown or duplicate headers are rejected
- Duplicate
OTHERALLERGY CODEvalues are not allowed
OTHERALLERGY CODE,OTHERALLERGY NAME,OTHERALLERGY DESCRIPTION
OTH001,Dust Allergy,Sneezing and breathing irritation due to dust
OTH002,Pollen Allergy,Seasonal pollen allergy symptoms
Responses:
- 200: Other Allergy CSV uploaded successfully
- 400: Invalid request, headers, or CSV data
- 404: Invalid hospital_id
- 500: Internal server error
Update Other Allergy List
Two Methods Available (Update/Merge)
JSON Merge
POST /software/updateOtherAllergyJson
CSV Merge
POST /software/updateOtherAllergyCsv
Method 1: JSON Merge Update
Summary: Update (merge) Other Allergy JSON
Description: Updates existing rows and inserts new rows using OTHERALLERGY CODE as key.
Query Parameters:
- hospital_id (required): Unique hospital identifier
{
"data": [
{
"OTHERALLERGY CODE": "OTH001",
"OTHERALLERGY NAME": "Updated Dust Allergy",
"OTHERALLERGY DESCRIPTION": "Updated dust allergy description"
},
{
"OTHERALLERGY CODE": "OTH003",
"OTHERALLERGY NAME": "Perfume Allergy",
"OTHERALLERGY DESCRIPTION": "Sensitivity to strong fragrances"
}
]
}
Responses:
- 200: Other Allergy JSON updated successfully
- 400: Invalid payload or validation failure
- 404: Invalid hospital_id or allergy data unavailable
- 500: Internal server error
Method 2: CSV Merge Update
Summary: Update (merge) Other Allergy CSV
Description: Merges uploaded Other Allergy CSV with existing stored CSV.
Query Parameters:
- hospital_id (required): Unique hospital identifier
Form Data:
- csvFile (required, binary): CSV file with Other Allergy rows
OTHERALLERGY CODE,OTHERALLERGY NAME,OTHERALLERGY DESCRIPTION
OTH001,Updated Dust Allergy,Updated dust allergy description
OTH003,Perfume Allergy,Sensitivity to strong fragrances
Responses:
- 200: Other Allergy CSV updated successfully
- 400: Invalid request, CSV headers, or row validation failed
- 404: Invalid hospital_id or CSV data unavailable
- 500: Internal server error
Additional Other Allergy APIs
Summary: Get existing Other Allergy rows
Query Parameters:
- hospital_id (required): Unique hospital identifier
Responses:
- 200: Returns Other Allergy rows
- 400: Missing query parameter
- 404: No Other Allergy CSV data available
- 500: Internal server error
Summary: Update Other Allergy rows by OTHERALLERGY CODE
Query Parameters:
- hospital_id (required): Unique hospital identifier
OTHERALLERGY CODEis mandatory and cannot be changed- Allowed update fields:
OTHERALLERGY NAME,OTHERALLERGY DESCRIPTION
{
"data": [
{
"OTHERALLERGY CODE": "OTH001",
"OTHERALLERGY NAME": "Updated Dust Allergy",
"OTHERALLERGY DESCRIPTION": "Updated allergy description"
},
{
"OTHERALLERGY CODE": "OTH003",
"OTHERALLERGY NAME": "Perfume Allergy",
"OTHERALLERGY DESCRIPTION": "Sensitivity to strong fragrances"
}
]
}
Responses:
- 200: Other Allergy rows updated successfully
- 400: Validation error or rows could not be updated
- 404: Other Allergy CSV not found or invalid hospital_id
- 500: Internal server error
Summary: Delete Other Allergy rows by OTHERALLERGY CODE
Query Parameters:
- hospital_id (required): Unique hospital identifier
{
"data": [
{
"OTHERALLERGY CODE": "OTH001"
},
{
"OTHERALLERGY CODE": "OTH003"
}
]
}
Responses:
- 200: Other Allergy rows deleted successfully
- 400: Validation error in delete request
- 404: OTHERALLERGY CODE not found or CSV unavailable
- 500: Internal server error
Upload Patient Document
Summary: Upload patient document
Description: Upload a patient document file and patient details. Send the request as multipart/form-data.
Query Parameters:
- hospital_id (required): Hospital identifier used to resolve the organization.
Form Data:
- patient_id (required): Patient identifier.
- name (required): Patient name.
- age (required): Patient age.
- gender (required): Patient gender.
- language (required): Patient preferred language.
- practitioner_id (required): Practitioner identifier.
- caregiver_id (required): Caregiver identifier.
- patient_type (required): Patient type for the upload flow. Use
opdoripd. - hospital_inpatient_id (required): Inpatient identifier from the HMS.
- file (required, binary): File to upload. Supported examples include PDF, DOC, DOCX, TXT, JPG, JPEG, PNG, GIF, AVIF, and HEIC.
Payload Example
hospital_id=9
patient_id=GEN9-202604-00301
name=Rajesh Ravi
age=21
gender=Male
language=English
practitioner_id=888
caregiver_id=carescribe-001-nr001
patient_type=ipd
hospital_inpatient_id=IN-GEN9-202602-00038
file=@patient-document.pdf
Response (200 OK):
{
"message": "Document uploaded successfully."
}
Responses:
- 200:
{"message": "Document uploaded successfully."} - 400: Validation or upload error. Examples:
{"message": "Missing required field(s): hospital_id."},{"message": "file is required."},{"message": "Document upload size exceeds 30MB limit."},{"message": "Upload a maximum of 10 document files in the file field."},{"message": "Document upload failed."} - 404: Referenced hospital, clinician, or inpatient record was not found. Examples:
{"message": "hospital_id not found."},{"message": "practitioner_id not found."},{"message": "caregiver_id not found."},{"message": "inpatient_id not found for this patient."} - 500:
{"message": "Document upload failed."}
IPD Integration
IPD Integration allows you to integrate CareScribe with your Hospital Management System for Inpatient Department (IPD) workflows. This integration enables seamless data flow between your HMS and CareScribe's AI-powered documentation system for inpatient care.
The integration follows a step-by-step process to set up nurses, manage inpatient records, and handle IPD session data.
Where to Start IPD Integration
Prerequisites for IPD Integration:
- If you have already completed OPD integration: You can start directly with Step 1: Create a Nurse below, as your hospital account setup and doctor creation are already completed.
- If you are starting fresh (no OPD integration): You need to complete the initial setup steps first:
- Complete Step 1: Create a Hospital (from OPD Integration section) to set up your hospital account
- Complete Step 2: Get the Specialty List (from OPD Integration section) to retrieve available specialties
- Complete Step 3: Create a Doctor (from OPD Integration section) to create at least one doctor in the system
- Then proceed with Step 1: Create a Nurse below to begin IPD integration
Note: The hospital account setup and doctor creation are shared between OPD and IPD integrations. Once these are completed, you can use the same hospital and doctor records for both workflows.
Floor Management
Summary: Get All Floors
Description: Retrieves all floors for a given hospital. The hospital_id is used to identify the organization.
Query: hospital_id (required)
Response (200 OK)
{
"message": "Floors fetched successfully.",
"data": [
{
"floor_id": 12,
"floor_name": "Second Floor",
"organization_id": 5,
"createdAt": "2025-01-15T10:30:00Z",
"updatedAt": "2025-01-15T10:30:00Z"
}
]
}
Responses:
- 200: Floors fetched successfully
- 400: Missing hospital_id -
{"message": "hospital_id is required."} - 404: No floors found -
{"message": "No Floors found for this hospital."} - 500: Server error -
{"message": "Failed to retrieve floors.", "error": "Database error"}
Summary: Create Floor
Description: 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.
Body required: floor_name, hospital_id
Body
{
"floor_name": "First Floor",
"hospital_id": "9"
}
Response (201 Created)
{
"message": "Floor created successfully.",
"data": {
"floor_id": 12,
"floor_name": "First Floor",
"organization_id": 3
}
}
Responses:
- 201: Floor created successfully
- 400: Invalid request -
{"message": "floor_name and hospital_id are required"} - 404: Organization not found -
{"message": "Organization not found"} - 409: Duplicate floor -
{"message": "Floor already exists for this organization."} - 500: Server error -
{"message": "Failed to create floor", "error": "Database connection failed"}
Summary: Update Floor
Description: 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.
Query: hospital_id (required)
Body required: floor_id
Body
{
"floor_id": 2,
"floor_name": "New Floor"
}
Response (200 OK)
{
"message": "Floor updated successfully.",
"data": {
"floor_id": 2,
"floor_name": "New Floor",
"organization_id": 3
}
}
Responses:
- 200: Floor updated successfully
- 400: Missing hospital_id -
{"message": "hospital_id is required."} - 404: Floor not found -
{"message": "Floor not found."} - 409: Duplicate floor name -
{"message": "Floor with this name already exists."} - 500: Server error -
{"message": "Failed to update.", "error": "Database error"}
Summary: Delete Floor
Description: 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.
Query: hospital_id (required), floor_id (required)
Response (200 OK)
{
"message": "Floor deleted successfully."
}
Responses:
- 200: Floor deleted successfully
- 400: Missing floor_id -
{"message": "floor_id is required."} - 404: Floor not found -
{"message": "Floor not found."} - 500: Server error -
{"message": "Failed to delete", "error": "Database error"}
Bed Management
Summary: Get All Beds List
Description: Fetches all beds for a hospital, including floor details.
Query: hospital_id (required)
Response (200 OK)
{
"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"
}
]
}
Responses:
- 200: Beds fetched successfully
- 400: Missing hospital_id -
{"message": "hospital_id is required"} - 404: Invalid hospital_id -
{"message": "Invalid hospital_id"} - 500: Server error -
{"message": "Internal Server Error"}
Summary: Create a new inpatient bed
Description: Creates a bed for a hospital; status and maintenance fields are optional.
Body
{
"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": null
}
Response (201 Created)
{
"message": "Bed created successfully.",
"bed": { /* new bed details */ }
}
Responses:
- 201: Bed created successfully
- 400: Duplicate bed number -
{"message": "Bed number already exists."} - 404: Invalid hospital_id -
{"message": "Invalid hospital_id"} - 500: Server error -
{"message": "Internal Server Error"}
Summary: Update an existing inpatient bed
Description: Updates ward and bed information, status, floor, and maintenance flags.
Query: bed_id (required)
Body
{
"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"
}
Response (200 OK)
{
"message": "Bed updated successfully.",
"bed": { /* updated bed details */ }
}
Responses:
- 200: Bed updated successfully
- 400: Duplicate bed number -
{"message": "Bed number already exists on this floor/ward."} - 404: Invalid hospital_id, invalid floor, or bed not found -
{"message": "Invalid hospital_id / Invalid floor / Bed not found."} - 500: Server error -
{"message": "Internal Server Error"}
Ward Management
Summary: Get Bed Types and Wards
Description: Retrieves bed types and wards configured for a hospital. Data is returned as arrays even if stored as JSON strings.
Query: hospital_id (required)
Response (200 OK)
{
"bedtypes": [
"ICU",
"General",
"Semi-Private"
],
"wards": [
"Ward A",
"Ward B",
"Emergency"
]
}
Responses:
- 200: Bed types and wards retrieved successfully
- 404: Hospital not found -
{"message": "hospital not found."} - 500: Server error -
{"message": "Failed to retrieve bed types and wards", "error": "Error details message here"}
Summary: Add Ward to Organization
Description: Adds a new ward to the organization based on hospital_id.
Query: hospital_id (required)
Body required: ward
Body
{
"ward": "Ward 15"
}
Response (200 OK)
{
"message": "Ward added successfully.",
"data": {
"wards": [
"Ward 1",
"Ward 2",
"Ward 15"
]
}
}
Responses:
- 200: Ward added successfully
- 400: Missing hospital_id -
{"message": "hospital_id is required."} - 404: Organization not found -
{"message": "Organization not found."} - 409: Duplicate ward -
{"message": "This ward already exists for the organization."} - 500: Server error -
{"message": "Failed to add ward", "error": "Error details message here"}
Summary: Update Ward Name
Description: Updates an existing ward name for an organization using hospital_id.
Query: hospital_id (required)
Body required: old_ward, new_ward
Body
{
"old_ward": "ward 15",
"new_ward": "ward 17"
}
Response (200 OK)
{
"message": "Ward updated successfully.",
"data": {
"organization_id": 101,
"hospital_id": "9",
"wards": [
"Ward 1",
"Ward 2",
"Ward 17"
]
}
}
Responses:
- 200: Ward updated successfully
- 400: Invalid request -
{"message": "Old ward and new ward are required."} - 404: Ward not found -
{"message": "Ward not found."} - 409: Duplicate ward -
{"message": "This ward already exists for the organization."} - 500: Server error -
{"message": "Failed to update ward", "error": "Error details message here"}
Summary: Remove Ward
Description: Removes an existing ward from the organization using hospital_id.
Query: hospital_id (required)
Body required: ward
Body
{
"ward": "ward 17"
}
Response (200 OK)
{
"message": "Ward removed successfully.",
"data": {
"wards": [
"Ward 1",
"Ward 2"
]
}
}
Responses:
- 200: Ward removed successfully
- 400: Ward name is required -
{"message": "Ward name is required."} - 404: Ward not found -
{"message": "Ward not found."} - 500: Server error -
{"message": "Failed to remove ward", "error": "Error details message here"}
Summary: Upload CSV for Floor, Bed Type, and Ward Setup
Description: Uploads a CSV file to configure floors, bed types, and wards for a hospital.
Query: hospital_id (required)
Form Data: csvFile (required, multipart/form-data)
CSV Requirements
- CSV must contain at least one of the following headers:
- Floor Name
- Bed Type
- Ward
- Rows with all empty values are treated as invalid.
- Existing values in the database are skipped automatically.
Response (200 OK)
{
"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": []
}
Responses:
- 200: CSV uploaded and processed successfully
- 400: Missing CSV file -
{"message": "A CSV file is required."} - 404: Organization not found -
{"message": "Organization not found for the given hospital_id."} - 500: Server error -
{"message": "Failed to upload CSV", "error": "Error details message here"}
Step 1: Create a Nurse
Summary: Create Nurse
Description: Maps hospital_id to organization and creates nurse; email optional (auto-generated if blank).
Query Parameters:
- hospital_id (required): The hospital identifier
Headers:
- x-api-key (required): API key for authentication
Body
{
"firstname": "Sarah",
"lastname": "John",
"email": "",
"phone": "994056789",
"floor_id": 2,
"caregiver_id": "carescribe-001-nr001"
}
Note:
- firstname: Required — Nurse's first name
- lastname: Required — Nurse's last name
- email: Optional — If blank, email will be auto-generated
- phone: Optional — Nurse's phone number
- floor_id: Required — The floor/ward ID where the nurse is assigned. We will share the floor_id.
- caregiver_id: Required and must be unique — Must be in format "hospital_id-nrsomenumber" (e.g.,
carescribe-001-nr001,carescribe-001-nr002). Format: your hospital_id followed by "-nr" and a number.
Response (201 Created):
{
"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": "carescribe-001-nr001",
"role": "nurse,nurse_admin",
"shift": "day",
"organization_id": "ORG123"
}
}
Responses:
- 201: Nurse created successfully — Returns nurse data with auto-generated email if not provided
- 400: Invalid request —
{"message": "firstname, lastname, and floor_id are required fields"} - 404: Invalid hospital_id —
{"message": "Invalid hospital_id"} - 500: Server error —
{"message": "Server error", "error": "Database connection failed"}
Step 2: Inpatient Integration
Summary: Inpatient software integration
Description: Creates or updates an inpatient record. Generates a secure session URL for clinician access.
Headers: x-api-key (required)
Important:
- Provide EITHER
doctor.practitioner_idORnurse.caregiver_id - If both are provided → request will be rejected
- Empty
caregiver_idorpractitioner_idis treated as NOT provided
Request Body - Doctor Session Link
Use this payload when a doctor is accessing the inpatient record:
{
"hospital_id": "9",
"doctor": {
"practitioner_id": "1001"
},
"patient": {
"patient_id": "HOSP-PAT-001",
"name": "John Doe",
"age": 45,
"gender": "Male"
},
"inpatient": {
"hospital_inpatient_id": "INP-HOSP-PAT-001"
}
}
Response (200 OK) - Doctor Session Link:
{
"message": "Patient already exists. Inpatient record updated.",
"path": "/session_id?...&practitioner_id=1001",
"patient_id": "4435c603-a0b8-48a6-9766-4ca911770fac",
"inpatient_id": "INP-HOSP-PAT-001",
"interaction_id": 105574
}
Request Body - Nurse Session Link
Use this payload when a nurse is accessing the inpatient record:
{
"hospital_id": "9",
"nurse": {
"caregiver_id": "carescribe-001-nr001"
},
"patient": {
"patient_id": "HOSP-PAT-001",
"name": "John Doe",
"age": 45,
"gender": "Male"
},
"inpatient": {
"hospital_inpatient_id": "INP-HOSP-PAT-001"
}
}
Response (200 OK) - Nurse Session Link:
{
"message": "Patient already exists. Inpatient record updated.",
"path": "/session_id?...&caregiver_id=carescribe-001-nr001",
"patient_id": "4435c603-a0b8-48a6-9766-4ca911770fac",
"inpatient_id": "INP-HOSP-PAT-001",
"interaction_id": 105574
}
Session URL Notes:
- Session URL includes ONLY the identifier provided in request
- Doctor flow: The
pathwill containpractitioner_idparameter - Nurse flow: The
pathwill containcaregiver_idparameter - The
pathfield contains the complete session URL that can be used to access the inpatient record
Responses:
- 200: Success — Session URL generated with patient and inpatient details
- 400: Invalid request —
"Provide either practitioner_id (doctor) or caregiver_id (nurse), not both. Please use one and try again." - 404: Organization not found —
"Organization not found" - 409: Conflict —
"Another clinician is currently visiting this inpatient." - 500: Internal server error —
"Internal Server Error"
Summary: Assign Primary Doctor / Update Inpatient
Description: Use this endpoint after creating the doctor session link or nurse session link in Step 2 when you need to assign or change the inpatient's primary doctor. In the same request you can also update the ward, floor, bed, patient category, and admission details for that inpatient.
Query: hospital_id (required)
Body required: hospital_inpatient_id
When to use this:
- After generating a doctor session link or nurse session link for the inpatient in Step 2.
- When you need to assign or change the primary doctor using
practitioner_id. - When you need to update inpatient placement details such as
floor_id,ward, andbed_no.
Body
{
"hospital_inpatient_id": "INP-HOSP-PAT-001",
"practitioner_id": "1001",
"floor_id": 29,
"bed_no": "B123",
"ward": "General",
"patient_id": "HOSP-PAT-001",
"patient_category": "Inpatient",
"in_date": "2025-01-06T10:00:00Z",
"attender_mobile_no": "+919876543210",
"insurance_type": "Cashless",
"attender_name": "Suresh Kumar",
"attender_relation": "Brother"
}
Response (200 OK)
{
"message": "Inpatient updated successfully",
"inpatient": {
"inpatient_id": "INP-HOSP-PAT-001",
"hospital_inpatient_id": "INP-HOSP-PAT-001",
"patient_id": "HOSP-PAT-001",
"ward": "General",
"bed_no": "B123",
"in_date": "2025-01-06T10:00:00Z",
"out_date": null,
"active": true,
"Patient": {
"patient_id": "HOSP-PAT-001",
"hospital_patient_id": "HP-001",
"first_name": "John",
"last_name": "Doe",
"phone_number": "+919876543210",
"gender": "Male"
},
"primaryDoctor": {
"doctor_id": 12,
"first_name": "Dr. Arjun",
"last_name": "Sharma"
},
"Bed": { /* Bed details */ },
"floor": {
"floor_id": 29,
"floor_name": "First Floor"
}
}
}
Responses:
- 200: Inpatient updated successfully
- 400: Missing hospital_id or hospital_inpatient_id
- 404: Organization, inpatient, or doctor not found
- 500: Server error —
{"message": "Server error", "error": "Database error"}
Upload Patient Document
Summary: Upload patient document
Description: Upload a patient document file and patient details. Send the request as multipart/form-data.
Query Parameters:
- hospital_id (required): Hospital identifier used to resolve the organization.
Form Data:
- patient_id (required): Patient identifier.
- name (required): Patient name.
- age (required): Patient age.
- gender (required): Patient gender.
- language (required): Patient preferred language.
- practitioner_id (required): Practitioner identifier.
- caregiver_id (required): Caregiver identifier.
- patient_type (required): Patient type for the upload flow. Use
opdoripd. - hospital_inpatient_id (required): Inpatient identifier from the HMS.
- file (required, binary): File to upload. Supported examples include PDF, DOC, DOCX, TXT, JPG, JPEG, PNG, GIF, AVIF, and HEIC.
Payload Example
hospital_id=9
patient_id=GEN9-202604-00301
name=Rajesh Ravi
age=21
gender=Male
language=English
practitioner_id=888
caregiver_id=carescribe-001-nr001
patient_type=ipd
hospital_inpatient_id=IN-GEN9-202602-00038
file=@patient-document.pdf
Response (200 OK):
{
"message": "Document uploaded successfully."
}
Responses:
- 200:
{"message": "Document uploaded successfully."} - 400: Validation or upload error. Examples:
{"message": "Missing required field(s): hospital_id."},{"message": "file is required."},{"message": "Document upload size exceeds 30MB limit."},{"message": "Upload a maximum of 10 document files in the file field."},{"message": "Document upload failed."} - 404: Referenced hospital, clinician, or inpatient record was not found. Examples:
{"message": "hospital_id not found."},{"message": "practitioner_id not found."},{"message": "caregiver_id not found."},{"message": "inpatient_id not found for this patient."} - 500:
{"message": "Document upload failed."}
Step 3: IPD Forms
Summary: Dynamic IPD Forms API
What this endpoint does: This endpoint centralizes multiple IPD (inpatient) form operations. It is used to retrieve or process various IPD workflows such as initial assessment, progress notes, surgery notes, nurse notes, nursing care plan, discharge summary, drug chart, blood glucose monitoring chart, IPD vitals, and intake/output records. Based on the input provided, the server validates the required fields and returns the generated form data.
When to include date filters
Only certain form types (notably IPD_VITALS and IPD_INTAKE_OUTTAKE) accept date range filters. Add start_date and/or end_date when you want historical or interval-based data. If omitted, the API returns the most recent or default range as implemented by the server.
Query Parameters
- hospital_id (required): Hospital identifier (query param). Also include
hospital_idin the body for clarity.
Body (application/json) — common fields
hospital_id(string) — requiredhospital_inpatient_id(string) — required: inpatient identifier from your HMSform_name(string) — required: the operation/form to process (see allowed list below)practitioner_idORcaregiver_id— one is required depending on whether a doctor or nurse initiated the requeststart_date,end_date(string) — optional; use only forIPD_VITALSandIPD_INTAKE_OUTTAKEto request a specific date window (recommended format:YYYY-MM-DDorDD/MM/YYYYdepending on your integration; confirm with the server implementation).
Allowed examples for form_name (not exhaustive)
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
Example 1 — IPD_VITALS (no date filters)
{
"hospital_id": "9",
"hospital_inpatient_id": "IN-GEN9-202602-00038",
"form_name": "IPD_VITALS",
"practitioner_id": "98857"
}
Example 2 — IPD_VITALS (with date filters)
{
"hospital_id": "9",
"hospital_inpatient_id": "IN-GEN9-202602-00038",
"form_name": "IPD_VITALS",
"practitioner_id": "98857",
"start_date": "2026-05-01",
"end_date": "2026-05-10"
}
Example 3 — IPD_INTAKE_OUTTAKE (with date filters)
{
"hospital_id": "9",
"hospital_inpatient_id": "IN-GEN9-202602-00038",
"form_name": "IPD_INTAKE_OUTTAKE",
"caregiver_id": "carescribe-001-nr001",
"start_date": "2026-05-01",
"end_date": "2026-05-03"
}
Example 4 — Drug Chart
The request must also support other forms such as
initial_assessment, progress_notes, surgery_notes,
nurse_notes, nurse_care_plan, discharge_summary,
and case_sheet etc without applying any date filters.
{
"hospital_id": "9",
"hospital_inpatient_id": "IN-GEN9-202602-00038",
"form_name": "drug_chart",
"practitioner_id": "98857"
}
Validation & behaviour:
- Required body fields:
hospital_id,hospital_inpatient_id, andform_name. - Provide exactly one clinician identifier:
practitioner_idfor doctors orcaregiver_idfor nurses. Supplying both will result in rejection. - Date filters are optional. When provided
start_dateandend_dateare mandatory. - If
form_nameis not valid, the API returns 400 with anallowedlist of valid values.
Responses
The 200 response can now also return these structured bundle payloads when form_name is cauti_bundle, clabsi_bundle, IPD_CAUTI_BUNDLE, IPD_CLABSI_BUNDLE, or IPD_VASCULAR_BUNDLE.
CAUTI Bundle Response
{
"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,
"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": {
"acute_urinary_retention": true,
"accurate_urine_output_monitoring_critically_ill": false,
"perioperative_use": false,
"pressure_ulcer_management": false,
"other": ""
},
"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": {
"urine_flow_confirmed": true,
"patient_comfortable": true
},
"signatures": {
"inserted_by": 72,
"verified_by": "Sonia"
}
},
"daily_maintenance_checklist_form": {
"date_of_insertion": "01/06/2026",
"indication": "",
"assessments": [],
"signs_of_infection": {
"fever": false,
"burning_sensation": false,
"cloudy_urine": false,
"foul_smell": false
},
"culture": "",
"action_taken": {
"action": "",
"date": "",
"signature": ""
}
},
"removal_checklist_form": {
"type_of_catheter": "",
"date_of_removal": "",
"removal_checklist": {
"doctors_order_verified": false,
"catheter_no_longer_indicated": false,
"hand_hygiene_performed": false,
"ppe_used": false,
"balloon_deflated_completely": false,
"catheter_removed_gently": false,
"patient_monitored_post_removal": false
},
"post_removal_observation": {
"able_to_void": false,
"pain_discomfort": false,
"retention": false,
"others": ""
},
"date": "",
"signature": ""
},
"summary_form": {
"unit": "",
"month": "",
"catheter_date": "",
"indication_days": "",
"in_situ": "",
"infection": false,
"remarks": "",
"total_catheter_days": "",
"total_cauti_cases": "",
"infection_control_nurse_signature": "",
"date": ""
},
"is_form_completed": false,
"form_completed_date_time": ""
}
}
]
}
}
CLABSI Bundle Response
{
"patient_id": "GEN9-202605-00191",
"inpatient_id": "IN-GEN9-202605-00056",
"structured_data": {
"IPD_CLABSI_BUNDLE": [
{
"central_line_insertion": {
"central_line_placed_in": "",
"date_of_insertion": "26/05/2026",
"inserted_by_name": "",
"line_type": {
"cvc": false,
"dialysis_line": false,
"other": "",
"picc": true
},
"no_of_attempts": "",
"reasons_for_insertion": "IV medications",
"site": {
"femoral": false,
"internal_jugular": false,
"subclavian": true
},
"time_of_insertion": "12:54 PM"
},
"indication_for_central_line": {
"dialysis": true,
"difficult_peripheral_access": false,
"hemodynamic_monitoring": false,
"iv_medications": true,
"other": ""
},
"clabsi_bundle_compliance": {
"all_lumens_capped": true,
"appropriate_site_selected": false,
"aseptic_technique_maintained": true,
"chest_xray_done": false,
"date_time_label_applied": false,
"dressing_clean_dry_intact": true,
"full_sterile_barrier_precautions_used": false,
"hand_hygiene_performed": false,
"informed_consent_obtained": false,
"line_flushed_and_patent": true,
"line_secured_properly": true,
"patient_identity_confirmed": false,
"procedure_documented": true,
"review_catheter_necessity_daily_and_remove_promptly": false,
"skin_antisepsis_with_chlorhexidine": false,
"sterile_dressing_applied": false,
"ultrasound_guidance_used": true
},
"signatures": {
"assistant_nurse": "",
"inserted_by": "72",
"verified_by": ""
},
"daily_maintenance": [
{
"action_taken": "",
"central_line_still_indicated": false,
"chills": false,
"date": "26/05/2026 03:04 PM",
"day": 1,
"dressing_change_daily": true,
"dressing_clean_dry_intact": true,
"fever": "",
"hand_hygiene_before_accessing": false,
"hand_hygiene_before_handling": false,
"hub_port_disinfected_before_access": false,
"line_detail_date": "26/05/2026",
"line_secured_properly": false,
"line_type": "",
"local_site_infection": false,
"no_discharge_pus": true,
"no_redness_swelling_at_site": true,
"nurse_name": "",
"positive_blood_culture": false,
"redness": false,
"reviewed_by": "72",
"scrub_the_hub": false,
"site": "",
"time": "03:04 PM",
"tubing_cap_changed_as_per_policy": false
},
{
"action_taken": "qqqq",
"central_line_still_indicated": false,
"chills": false,
"date": "26/05/2026 12:54 PM",
"day": 2,
"dressing_change_daily": false,
"dressing_clean_dry_intact": false,
"fever": "43°C",
"hand_hygiene_before_accessing": false,
"hand_hygiene_before_handling": false,
"hub_port_disinfected_before_access": false,
"line_detail_date": "26/05/2026",
"line_secured_properly": true,
"line_type": "PICCdd",
"local_site_infection": false,
"no_discharge_pus": true,
"no_redness_swelling_at_site": false,
"nurse_name": "",
"positive_blood_culture": true,
"redness": false,
"reviewed_by": "72",
"scrub_the_hub": false,
"site": "Subclavianddd",
"time": "02:42 PM",
"tubing_cap_changed_as_per_policy": true
}
],
"dressing_change_checklist": {
"allowed_to_dry_completely": false,
"date": "26/05/2026",
"date_time_labeled": true,
"hand_hygiene_performed": true,
"nurse": "72",
"old_dressing_removed_aseptically": false,
"remarks": "",
"signature": "",
"site": "internal jugular",
"site_inspected": false,
"skin_cleaned_with_chlorhexidine": true,
"sterile_dressing_applied": true,
"sterile_gloves_used": false
},
"central_line_removal": {
"catheter_tip_intact": true,
"date": "26/05/2026",
"date_of_removal": "26/05/2026",
"doctor_nurse": "72",
"doctors_order_verified": true,
"hand_hygiene_performed": false,
"hemostasis_achieved": false,
"line_no_longer_indicated": true,
"line_removed_using_aseptic_technique": true,
"line_type": "",
"others": "",
"post_removal_monitoring": {
"air_embolism_signs": true,
"bleeding": false,
"pain": false
},
"ppe_used": false,
"reasons_for_removal": "",
"removed_by": "",
"sign": "",
"signature": "",
"site": "",
"sterile_dressing_applied": true
},
"culture": "",
"antibiotics": "",
"note_time": "26/05/2026 26/05/2026 26/05/2026",
"timestamp": "2026-05-26T09:12:36.839260+00:00",
"interaction_id": "116320"
}
]
}
}
Vascular Bundle Response
{
"patient_id": "GUN8-202605-00012",
"inpatient_id": "IN-GUN8-202605-00002",
"structured_data": {
"IPD_VASCULAR_BUNDLE": [
{
"interaction_id": "116791",
"note_time": "06:51 PM 29/05/2026",
"timestamp": "2026-05-30T09:50:34.469184+00:00",
"nurse_id": 122,
"vascular_bundle": {
"insertion_checklist_form": {
"diagnosis": "",
"device_details": {
"type_of_vad": "peripheral_iv",
"type_options": {
"peripheral_iv": true,
"picc": false,
"port": false
},
"site_selected": "Left hand",
"date_time": "29/05/2026 06:25 PM"
},
"pre_insertion_checks": {
"patient_identity_confirmed": true,
"informed_consent_obtained": true,
"allergy_checked": true,
"indication_for_vad_confirmed": true,
"hand_hygiene_performed": true,
"prepared_sterile": true
},
"insertion_procedure": {
"sterile_barrier_precautions_used": true,
"skin_antisepsis_applied": true,
"aseptic_technique_maintained": true,
"correct_catheter_size_type_used": true,
"successful_insertion": true
},
"post_insertion": {
"line_flushed_and_patent": true,
"dressing_applied_sterile": true,
"line_secured": true,
"label_applied_date_time": true,
"patient_tolerated_procedure": true,
"pain_score": ""
},
"signatures": {
"inserted_by": "127",
"verified_by": "Sonia Bai"
},
"patient_details": {
"age_sex": "25/M",
"department_ward": "GENERAL AND LAPAROSCOPIC SURGERY",
"ip_op_no": "IN-GUN8-202605-00002",
"name": "mr srihari"
}
},
"daily_maintenance_checklist_form": {
"type_of_vad": "peripheral_iv",
"site": "left hand",
"assessments": [
{
"date": "29/05/2026",
"dressing_intact": true,
"hub_disinfected_before_use": false,
"interaction_id": "116787",
"line_patent_flush_working": true,
"note_time": "06:39 PM 29/05/2026",
"nurse_id": 119,
"pain_score": "0",
"redness_swelling_present": false,
"signature": "119",
"signs_of_infection": false,
"site_clean_dry": true,
"time": "06:39 PM",
"timestamp": "2026-05-29T13:09:55.068862+00:00",
"vad_still_required": true
},
{
"date": "29/05/2026",
"dressing_intact": true,
"hub_disinfected_before_use": false,
"interaction_id": "116791",
"line_patent_flush_working": true,
"note_time": "06:51 PM 29/05/2026",
"nurse_id": 122,
"pain_score": "0",
"redness_swelling_present": false,
"signature": "122",
"signs_of_infection": false,
"site_clean_dry": true,
"time": "06:51 PM",
"timestamp": "2026-05-29T13:21:40.064820+00:00",
"vad_still_required": true
}
]
},
"vad_removal_checklist_form": {},
"complication_report_form": {},
"is_form_completed": false,
"form_completed_date_time": ""
}
},
{
"interaction_id": "116783",
"note_time": "06:23 PM 29/05/2026",
"timestamp": "2026-05-30T09:50:34.842819+00:00",
"nurse_id": 127,
"vascular_bundle": {
"insertion_checklist_form": {
"device_details": {
"date_time": "12/05/2026 08:27 PM",
"site_selected": "right hand",
"type_of_vad": "peripheral_iv",
"type_options": {
"cvc": false,
"peripheral_iv": true,
"picc": false,
"port": false
}
},
"diagnosis": "",
"insertion_procedure": {
"aseptic_technique_maintained": true,
"correct_catheter_size_type_used": true,
"skin_antisepsis_applied": true,
"sterile_barrier_precautions_used": true,
"successful_insertion": true
},
"post_insertion": {
"dressing_applied_sterile": true,
"label_applied_date_time": true,
"line_flushed_and_patent": true,
"line_secured": true,
"pain_score": "0",
"patient_tolerated_procedure": true
},
"pre_insertion_checks": {
"allergy_checked": false,
"hand_hygiene_performed": true,
"indication_for_vad_confirmed": true,
"informed_consent_obtained": true,
"patient_identity_confirmed": false,
"prepared_sterile": true
},
"signatures": {
"inserted_by": 127,
"verified_by": ""
}
},
"daily_maintenance_checklist_form": {
"assessments": [],
"site": "",
"type_of_vad": ""
},
"vad_removal_checklist_form": {
"date": "29/05/2026",
"date_of_removal": "29/05/2026",
"nurse": 127,
"post_removal_observation": {
"bleeding": false,
"pain": false,
"swelling": false
},
"reason_for_removal": "bulging and pain at the site",
"removal_checklist": {
"catheter_venflon_removed_safely": true,
"doctor_order_verified": false,
"hand_hygiene_performed": true,
"hemostasis_achieved": true,
"others": false,
"ppe_used": false,
"sterile_dressing_applied": true,
"tip_intact": true
},
"signature": 127,
"site": "right hand",
"type_of_vad": "peripheral_iv"
},
"complication_report_form": null,
"is_form_completed": true,
"form_completed_date_time": "29/05/2026 06:23 PM"
}
}
]
}
}
- 200: IPD form processed successfully — returns a message and any requested data (for example vitals array or intake/output entries).
- 400: Validation error — response contains
messageand optionally anallowedlist of valid form names. - 404: Invalid inpatient or hospital — response contains
messageanddetail. - 500: Internal server error.
Doctor Session Link Forms
1. Drug Chart
formName: "drug_chart"
Records medication prescriptions with dosage schedules, frequencies, and administration instructions.
Complete Response Structure:
{
"status": "complete",
"data": {
"SessionId": "GEN9-202512-00286",
"hospitalId": "9",
"patientId": "GEN9-202512-00286",
"IpId": "95535",
"type": "ipd",
"formName": "drug_chart",
"process": "drug_chart",
"response": "{\"drug_chart\":[...],\"once_only_drugs\":[...],\"iv_infusion_therapy\":[]}",
"medication_templates": [],
"status": "complete"
}
}
Parsed Response Structure:
{
"patient_id": "QAT70-202604-00362",
"inpatient_id": "IN-QAT70-202604-00007",
"merged_schema": {
"prescription_data": {
"allergies": {
"has_known_allergies": false,
"allergies": []
},
"once_only_drugs": [
{
"medication_name": "ONDANSETRON-4MG (EMESET 4ML INJECTION)",
"dosage": "4ml",
"route": "IV",
"status": "active",
"start_date": "2026-04-15",
"prescription_type": "regular",
"additional_information": "BD",
"is_stat": false,
"is_once_only": false,
"is_sos": false,
"frequency_morning": "0",
"frequency_afternoon": "0",
"frequency_evening": "0",
"frequency_night": "0",
"created_at": "2026-04-15T00:00:00",
"prescribed_by": "312",
"administered": [
{
"administered_by_nurse_id": "74",
"administered_time": "2026-04-22T06:37:07.832333",
"status": "given"
}
]
},
{
"medication_name": "ONDANSETRON-4MG (EMESET 4 ML INJECTION)",
"dosage": "",
"route": "Oral",
"status": "active",
"start_date": "2026-04-15",
"prescription_type": "regular",
"additional_information": "stat",
"is_stat": true,
"is_once_only": false,
"is_sos": false,
"frequency_morning": "0",
"frequency_afternoon": "0",
"frequency_evening": "0",
"frequency_night": "0",
"created_at": "2026-04-15T00:00:00",
"prescribed_by": "312",
"administered": [
{
"administered_by_nurse_id": "74",
"administered_time": "2026-04-22T06:37:07.832333",
"status": "given"
}
]
}
],
"oral_anticoagulation": [],
"thromboprophylaxis": [],
"antiplatelet": [],
"drug_chart": [],
"prn_drugs": [],
"infusions": [
{
"medication_name": "PANTOPRAZOLE 40MG INJECTION",
"dosage": "40 mg",
"route": "IV",
"status": "active",
"start_date": "2026-04-15",
"prescription_type": "regular",
"additional_information": "BD",
"is_stat": false,
"is_once_only": false,
"is_sos": false,
"frequency_morning": "0",
"frequency_afternoon": "0",
"frequency_evening": "0",
"frequency_night": "0",
"created_at": "2026-04-15T00:00:00",
"prescribed_by": "312",
"administered": []
},
{
"medication_name": "Piptaz",
"dosage": "4.5 mg",
"route": "IV",
"status": "active",
"start_date": "2026-05-08",
"prescription_type": "regular",
"additional_information": "BD after stopping Ceftriaxone",
"is_stat": false,
"is_once_only": false,
"is_sos": false,
"frequency_morning": "0",
"frequency_afternoon": "0",
"frequency_evening": "0",
"frequency_night": "0",
"created_at": "2026-05-08T00:00:00",
"prescribed_by": "318",
"administered": []
}
],
"iv_fluids": [
{
"medication_name": "SODIUM CHLORIDE (0.600GM) + SODIUM LACTATE (0.320GM) + POTASSIUM CHLORIDE (0.040GM) + CALCIUM CHLORIDE (0.027GM) (RINGER LACTATE 500 ML INFUSION)",
"dosage": "100 ml",
"route": "IV",
"status": "active",
"start_date": "2026-04-15",
"prescription_type": "regular",
"additional_information": "BD",
"is_stat": false,
"is_once_only": false,
"is_sos": false,
"frequency_morning": "0",
"frequency_afternoon": "0",
"frequency_evening": "0",
"frequency_night": "0",
"created_at": "2026-04-15T00:00:00",
"prescribed_by": "312",
"administered": []
}
],
"oxygen": [],
"administrations": [
{
"drug_name": "TPN",
"scheduled_time": null,
"administered_time": "2026-04-15T10:21:15.388709",
"administered_by": "nurse",
"doctor_id": "",
"nurse_id": "74",
"status": "given",
"notes": "200 ml"
},
{
"drug_name": "Emeset",
"scheduled_time": null,
"administered_time": "2026-04-22T06:37:07.832333",
"administered_by": "nurse",
"doctor_id": "",
"nurse_id": "74",
"status": "given",
"notes": "Administered as part of CAUTI bundle"
},
{
"drug_name": "Emiset",
"scheduled_time": null,
"administered_time": "2026-04-22T06:40:10.201786",
"administered_by": "nurse",
"doctor_id": "",
"nurse_id": "74",
"status": "given",
"notes": "Administered as per nurse notes"
}
],
"medication_reconciliation": {
"past_long_term_medications": [
{
"medication_name": "g-icon suspension",
"dosage": null,
"route": null,
"frequency": null,
"continue_medication": true,
"notes": "Previous medication",
"reconciled_by": null,
"reconciled_at": null
},
{
"medication_name": "panpra d",
"dosage": null,
"route": null,
"frequency": null,
"continue_medication": true,
"notes": "Previous medication",
"reconciled_by": null,
"reconciled_at": null
},
{
"medication_name": "Calpol",
"dosage": "500 mg",
"route": null,
"frequency": null,
"continue_medication": false,
"notes": "Previous medication",
"reconciled_by": null,
"reconciled_at": null,
"indication": "Hypertension",
"is_antiplatelet": false
},
{
"medication_name": "ONDANSETRON-4MG (EMESET 4 ML INJECTION)",
"dosage": "4ml",
"route": "IV",
"frequency": "BD",
"continue_medication": true,
"notes": "Current inpatient medication",
"reconciled_by": null,
"reconciled_at": null
},
{
"medication_name": "PANTOPRAZOLE 40MG INJECTION",
"dosage": "40 mg",
"route": "IV",
"frequency": "BD",
"continue_medication": true,
"notes": "Current inpatient medication",
"reconciled_by": null,
"reconciled_at": null
},
{
"medication_name": "Piptaz",
"dosage": "4.5 mg",
"route": "IV",
"frequency": "BD after stopping Ceftriaxone",
"continue_medication": true,
"notes": "Current inpatient medication",
"reconciled_by": null,
"reconciled_at": null
},
{
"medication_name": "SODIUM CHLORIDE (0.600GM) + SODIUM LACTATE (0.320GM) + POTASSIUM CHLORIDE (0.040GM) + CALCIUM CHLORIDE (0.027GM) (RINGER LACTATE 500 ML INFUSION)",
"dosage": "100 ml",
"route": "IV",
"frequency": "BD",
"continue_medication": true,
"notes": "Current inpatient medication",
"reconciled_by": null,
"reconciled_at": null
}
]
}
},
"total_records": {
"drug_chart": 0,
"once_only_drugs": 2,
"oral_anticoagulation": 0,
"thromboprophylaxis": 0,
"antiplatelet": 0,
"prn_drugs": 0,
"infusions": 2,
"iv_fluids": 1,
"oxygen": 0,
"administered": 3
}
}
}
2. IO Chart (Intake/Output Chart)
formName: "io_chart"
Tracks patient fluid intake (oral and parenteral) and output (urine, vomit, etc.) measurements.
Complete Response Structure:
{
"status": "complete",
"data": {
"SessionId": "GEN9-202508-00394",
"hospitalId": "9",
"patientId": "GEN9-202508-00394",
"IpId": "99661",
"type": "ipd",
"formName": "io_chart",
"process": "io_chart",
"response": "{\"IPD_INTAKE_OUTTAKE\":[...]}",
"medication_templates": [],
"status": "complete"
}
}
Parsed Response Structure:
{
"IPD_INTAKE_OUTTAKE": [
{
"note_time": "12:59 PM 22/12/2025",
"intake": [
{
"oral_rt": "",
"oral_rt_quantity_ml": 0,
"parenteral": "Injection TPN",
"parenteral_quantity_ml": 100
},
{
"oral_rt": "Water",
"oral_rt_quantity_ml": 600,
"parenteral": "",
"parenteral_quantity_ml": 0
},
{
"oral_rt": "Tea",
"oral_rt_quantity_ml": 250,
"parenteral": "",
"parenteral_quantity_ml": 0
}
],
"output": [
{
"drainage_ml": 0,
"ryles_aspiration_ml": 0,
"urine_ml": 1050,
"vomitus_bowels_ml": 250
}
],
"intake_description": "Injection TPN 100ml; Injection Metrogyl 100ml; Water 600ml; Tea 250ml",
"output_description": "Urine 1050ml; Vomitus/Bowels 250ml",
"intake_total_ml": 1450,
"output_total_ml": 1300,
"balance_ml": 150,
"interaction_id": "98254"
}
]
}
3. Peripheral Chart
formName: "peripheral_chart"
Documents peripheral IV line details including insertion site, date, and status.
Complete Response Structure:
{
"status": "complete",
"data": {
"SessionId": "GEN9-202512-00286",
"hospitalId": "9",
"patientId": "GEN9-202512-00286",
"IpId": "95535",
"type": "ipd",
"formName": "peripheral_chart",
"process": "peripheral_chart",
"response": "{\"IPD_PERIPHERAL_CHART\":[...]}",
"medication_templates": [],
"status": "complete"
}
}
Parsed Response Structure:
{
"IPD_PERIPHERAL_CHART": [
{
"notes": {
"insertion_details": {
"aseptic_technique_used": false,
"date_of_insertion": "2025-10-29",
"site_of_insertion": "",
"time_of_insertion": "12:00:00.000Z"
},
"maintenance_checklist": [
{
"date": "08/12/2025",
"entries": [
{
"assessment_of_need_for_line": true,
"erythema_at_insertion_site": false,
"extravasation_into_soft_tissue": false,
"leakage_into_soft_tissue": false,
"nurse_id": "72",
"pain_at_insertion_site": false,
"thrombophlebitis_evidence": false,
"interaction_id": "95463",
"note_time": "11:35 AM"
}
],
"line_removal_date": null,
"line_removal_time": null
}
],
"notes_text": ""
}
}
]
}
4. TPR Chart (Temperature, Pulse, Respiration)
formName: "tpr_chart"
Records vital signs including temperature, pulse rate, and respiratory rate over time.
Complete Response Structure:
{
"status": "complete",
"data": {
"SessionId": "403a9674-1720-499e-ad46-0c0134f845d5",
"hospitalId": "9",
"patientId": "ragul001",
"IpId": "105739",
"type": "ipd",
"formName": "tpr_chart",
"process": "tpr_chart",
"response": "{\"IPD_VITALS\":[...]}",
"medication_templates": [],
"status": "complete"
}
}
Parsed Response Structure:
{
"patient_id": "QAT70-202604-00362",
"inpatient_id": "IN-QAT70-202604-00007",
"structured_data": {
"IPD_VITALS": [
{
"date": "2026-04-22",
"noOfDays": "",
"daysPostOp": "",
"time": "18:28",
"pulse": null,
"temperature": "",
"respiration": "",
"blood_pressure": null,
"blood_sugar": null,
"spo2": null,
"interaction_id": "112877"
},
{
"date": "2026-04-22",
"noOfDays": "",
"daysPostOp": "",
"time": "13:36",
"pulse": null,
"temperature": "",
"respiration": "",
"blood_pressure": null,
"blood_sugar": null,
"spo2": null,
"interaction_id": "112843"
},
{
"date": "2026-04-22",
"noOfDays": "",
"daysPostOp": "",
"time": "13:34",
"pulse": null,
"temperature": "",
"respiration": "",
"blood_pressure": null,
"blood_sugar": null,
"spo2": null,
"interaction_id": "112842"
},
{
"date": "2026-04-22",
"noOfDays": "",
"daysPostOp": "",
"time": "12:10",
"pulse": null,
"temperature": "",
"respiration": "",
"blood_pressure": null,
"blood_sugar": null,
"spo2": null,
"interaction_id": "112779"
},
{
"date": "2026-04-22",
"noOfDays": "",
"daysPostOp": "",
"time": "12:07",
"pulse": null,
"temperature": "",
"respiration": "",
"blood_pressure": null,
"blood_sugar": null,
"spo2": null,
"interaction_id": "112778"
},
{
"date": "2026-04-22",
"noOfDays": "",
"daysPostOp": "",
"time": "12:02",
"pulse": null,
"temperature": "",
"respiration": "",
"blood_pressure": null,
"blood_sugar": null,
"spo2": null,
"interaction_id": "112777"
},
{
"date": "2026-04-15",
"noOfDays": "",
"daysPostOp": "",
"time": "16:20",
"pulse": "90 bpm",
"temperature": "",
"respiration": "",
"blood_pressure": "120/70 mmHg",
"blood_sugar": null,
"spo2": null,
"interaction_id": "112259"
},
{
"date": "2026-04-15",
"noOfDays": "",
"daysPostOp": "",
"time": "16:11",
"pulse": "76 bpm",
"temperature": "",
"respiration": "15",
"blood_pressure": "120/80 mmHg",
"blood_sugar": null,
"spo2": "100",
"interaction_id": "112251"
},
{
"date": "2026-04-15",
"noOfDays": "",
"daysPostOp": "",
"time": "16:09",
"pulse": "92 bpm",
"temperature": "",
"respiration": "",
"blood_pressure": "120/80 mmHg",
"blood_sugar": null,
"spo2": "99",
"interaction_id": "112250"
},
{
"date": "2026-04-15",
"noOfDays": "",
"daysPostOp": "",
"time": "15:58",
"pulse": null,
"temperature": "",
"respiration": "",
"blood_pressure": null,
"blood_sugar": "120 mg/dl",
"spo2": null,
"interaction_id": "112243"
},
{
"date": "2026-04-15",
"noOfDays": "",
"daysPostOp": "",
"time": "15:55",
"pulse": null,
"temperature": "",
"respiration": "",
"blood_pressure": null,
"blood_sugar": null,
"spo2": null,
"interaction_id": "112242"
},
{
"date": "2026-04-15",
"noOfDays": "",
"daysPostOp": "",
"time": "15:51",
"pulse": null,
"temperature": "",
"respiration": "",
"blood_pressure": null,
"blood_sugar": null,
"spo2": null,
"interaction_id": "112241"
},
{
"date": "2026-04-15",
"noOfDays": "",
"daysPostOp": "",
"time": "15:49",
"pulse": "66 bpm",
"temperature": "99°F",
"respiration": "18 breaths/min",
"blood_pressure": "118/80 mmHg",
"blood_sugar": null,
"spo2": "98",
"interaction_id": "112240"
},
{
"date": "2026-04-15",
"noOfDays": "",
"daysPostOp": "",
"time": "15:42",
"pulse": "70 bpm",
"temperature": "99°F",
"respiration": "25 breaths/min",
"blood_pressure": "110/80 mmHg",
"blood_sugar": null,
"spo2": "96",
"interaction_id": "112238"
},
{
"date": "22/04/2026",
"noOfDays": "",
"daysPostOp": "",
"time": "01:36 PM",
"pulse": "",
"temperature": "",
"respiration": "",
"blood_pressure": "",
"blood_sugar": "",
"spo2": "",
"interaction_id": "112843"
},
{
"date": "22/04/2026",
"noOfDays": "",
"daysPostOp": "",
"time": "01:34 PM",
"pulse": "",
"temperature": "",
"respiration": "",
"blood_pressure": "",
"blood_sugar": "",
"spo2": "",
"interaction_id": "112842"
},
{
"date": "22/04/2026",
"noOfDays": "",
"daysPostOp": "",
"time": "12:10 PM",
"pulse": "",
"temperature": "",
"respiration": "",
"blood_pressure": "",
"blood_sugar": "",
"spo2": "",
"interaction_id": "112779"
},
{
"date": "22/04/2026",
"noOfDays": "",
"daysPostOp": "",
"time": "12:07 PM",
"pulse": "",
"temperature": "",
"respiration": "",
"blood_pressure": "",
"blood_sugar": "",
"spo2": "",
"interaction_id": "112778"
},
{
"date": "22/04/2026",
"noOfDays": "",
"daysPostOp": "",
"time": "12:02 PM",
"pulse": "",
"temperature": "",
"respiration": "",
"blood_pressure": "",
"blood_sugar": "",
"spo2": "",
"interaction_id": "112777"
},
{
"date": "15/04/2026",
"noOfDays": "",
"daysPostOp": "",
"time": "04:20 PM",
"pulse": "90 bpm",
"temperature": null,
"respiration": null,
"blood_pressure": "120/70 mmHg",
"blood_sugar": null,
"spo2": null,
"interaction_id": "112259"
},
{
"date": "15/04/2026",
"noOfDays": "",
"daysPostOp": "",
"time": "04:11 PM",
"pulse": "76 per minute",
"temperature": null,
"respiration": "14",
"blood_pressure": "120/80 mmHg",
"blood_sugar": null,
"spo2": "100%",
"interaction_id": "112251"
},
{
"date": "15/04/2026",
"noOfDays": "",
"daysPostOp": "",
"time": "04:09 PM",
"pulse": "70 bpm",
"temperature": null,
"respiration": null,
"blood_pressure": "120/80 mmHg",
"blood_sugar": null,
"spo2": "99",
"interaction_id": "112250"
},
{
"date": "15/04/2026",
"noOfDays": "",
"daysPostOp": "",
"time": "03:58 PM",
"pulse": "",
"temperature": "",
"respiration": "",
"blood_pressure": "",
"blood_sugar": "120 mg/dl",
"spo2": "",
"interaction_id": "112243"
},
{
"date": "15/04/2026",
"noOfDays": "",
"daysPostOp": "",
"time": "03:55 PM",
"pulse": null,
"temperature": null,
"respiration": null,
"blood_pressure": null,
"blood_sugar": null,
"spo2": null,
"interaction_id": "112242"
},
{
"date": "15/04/2026",
"noOfDays": "",
"daysPostOp": "",
"time": "03:51 PM",
"pulse": null,
"temperature": null,
"respiration": null,
"blood_pressure": null,
"blood_sugar": null,
"spo2": null,
"interaction_id": "112241"
},
{
"date": "15/04/2026",
"noOfDays": "",
"daysPostOp": "",
"time": "03:49 PM",
"pulse": "66 bpm",
"temperature": "99°F",
"respiration": "18 breaths/min",
"blood_pressure": "118/80 mmHg",
"blood_sugar": null,
"spo2": "98%",
"interaction_id": "112240"
},
{
"date": "2026-04-15",
"noOfDays": "",
"daysPostOp": "",
"time": "15:42",
"pulse": "70 bpm",
"temperature": "99°F",
"respiration": "25 breaths/min",
"blood_pressure": "110/80 mmHg",
"blood_sugar": null,
"spo2": "96%",
"interaction_id": "112238"
},
{
"date": "2026-04-15",
"noOfDays": "",
"daysPostOp": "",
"time": "15:49",
"pulse": "66 bpm",
"temperature": "99°F",
"respiration": "18 breaths/min",
"blood_pressure": "118/80 mmHg",
"blood_sugar": null,
"spo2": "98%",
"interaction_id": "112240"
},
{
"date": "2026-04-15",
"noOfDays": "",
"daysPostOp": "",
"time": "15:51",
"pulse": "",
"temperature": "",
"respiration": "",
"blood_pressure": null,
"blood_sugar": null,
"spo2": null,
"interaction_id": "112241"
},
{
"date": "2026-04-15",
"noOfDays": "",
"daysPostOp": "",
"time": "15:55",
"pulse": "",
"temperature": "",
"respiration": "",
"blood_pressure": null,
"blood_sugar": null,
"spo2": null,
"interaction_id": "112242"
},
{
"date": "2026-04-15",
"noOfDays": "",
"daysPostOp": "",
"time": "15:58",
"pulse": "",
"temperature": "",
"respiration": "",
"blood_pressure": "",
"blood_sugar": "120 mg/dl",
"spo2": null,
"interaction_id": "112243"
},
{
"date": "2026-04-15",
"noOfDays": "",
"daysPostOp": "",
"time": "16:09",
"pulse": "92 bpm",
"temperature": "",
"respiration": "",
"blood_pressure": "120/80 mmHg",
"blood_sugar": null,
"spo2": "99",
"interaction_id": "112250"
},
{
"date": "2026-04-15",
"noOfDays": "",
"daysPostOp": "",
"time": "16:11",
"pulse": "76 per minute",
"temperature": "",
"respiration": "15",
"blood_pressure": "120/80 mmHg",
"blood_sugar": null,
"spo2": "100%",
"interaction_id": "112251"
},
{
"date": "2026-04-15",
"noOfDays": "",
"daysPostOp": "",
"time": "16:20",
"pulse": "90 bpm",
"temperature": "",
"respiration": "",
"blood_pressure": "120/70 mmHg",
"blood_sugar": null,
"spo2": null,
"interaction_id": "112259"
},
{
"date": "2026-04-22",
"noOfDays": "",
"daysPostOp": "",
"time": "12:02",
"pulse": "",
"temperature": "",
"respiration": "",
"blood_pressure": "",
"blood_sugar": null,
"spo2": null,
"interaction_id": "112777"
},
{
"date": "2026-04-22",
"noOfDays": "",
"daysPostOp": "",
"time": "12:07",
"pulse": "",
"temperature": "",
"respiration": "",
"blood_pressure": "",
"blood_sugar": null,
"spo2": null,
"interaction_id": "112778"
},
{
"date": "2026-04-22",
"noOfDays": "",
"daysPostOp": "",
"time": "12:10",
"pulse": "",
"temperature": "",
"respiration": "",
"blood_pressure": "",
"blood_sugar": null,
"spo2": null,
"interaction_id": "112779"
},
{
"date": "2026-04-22",
"noOfDays": "",
"daysPostOp": "",
"time": "13:34",
"pulse": "",
"temperature": "",
"respiration": "",
"blood_pressure": "",
"blood_sugar": null,
"spo2": null,
"interaction_id": "112842"
},
{
"date": "2026-04-22",
"noOfDays": "",
"daysPostOp": "",
"time": "13:36",
"pulse": "",
"temperature": "",
"respiration": "",
"blood_pressure": "",
"blood_sugar": null,
"spo2": null,
"interaction_id": "112843"
},
{
"date": "2026-04-22",
"noOfDays": "",
"daysPostOp": "",
"time": "18:28",
"pulse": "",
"temperature": "",
"respiration": "",
"blood_pressure": "",
"blood_sugar": null,
"spo2": null,
"interaction_id": "112877"
}
]
}
}
5. Discharge Summary
formName: "discharge_summary"
Comprehensive summary of patient's hospital stay, diagnosis, treatment, and discharge instructions.
Complete Response Structure:
{
"status": "complete",
"data": {
"SessionId": "GEN9-202509-00170",
"hospitalId": "9",
"patientId": "GEN9-202509-00170",
"IpId": "105673",
"type": "ipd",
"formName": "discharge_summary",
"process": "discharge_summary",
"response": "{\"discharge_summary\":{...},\"treatment_given\":[...],\"advice_on_discharge\":{...}}",
"medication_templates": [],
"status": "complete"
}
}
Parsed Response Structure:
{
"discharge_summary": {
"diagnosis": "Acute appendicitis; Persistent right-sided chest wall pain",
"procedure": "",
"reason_for_admission": "Patient presents with severe right-sided lower abdominal pain...",
"patient_past_history": "The patient has no history of hypertension, diabetes mellitus, or asthma...",
"personal_history": "Patient follows a vegetarian diet and has a good sleep pattern...",
"general_examination": "Patient is conscious and oriented with mild distress.",
"vital_signs": {
"pulse_rate": "",
"blood_pressure": "",
"spo2": "",
"temperature": ""
},
"abdomen": "Tenderness is present at McBurney's point with rebound tenderness. No palpable mass.",
"investigations": "Urine Test (Ordered on 2026-01-13, Status: Ordered); Blood Test...",
"course_in_hospital": "The patient was admitted with severe right-sided lower abdominal pain..."
},
"treatment_given": [
{
"medication_name": "ESOMEPRAZOLE (20MG) (NEXPRO FAST 20MG TABLET)",
"medication_type": null,
"dosage": "",
"frequency": {
"morning": 1,
"afternoon": 0,
"evening": 1,
"night": 1
},
"duration": null
}
],
"advice_on_discharge": {
"medications": [
{
"medication_name": "Acetaminophen",
"medication_type": "Analgesic",
"dosage": "650mg",
"frequency": {
"morning": 1,
"afternoon": 0,
"evening": 0,
"night": 1
},
"duration": "3 days"
}
],
"general_advice": "Patient is advised to continue walking...",
"diet": "Normal diet, no dietary restrictions required.",
"follow_up": "Patient should follow up in five days..."
}
}
6. Progress Notes
formName: "progress_notes"
Daily progress notes documenting patient condition, treatment response, and plan updates.
Complete Response Structure:
{
"status": "complete",
"data": {
"SessionId": "GEN9-202509-00170",
"hospitalId": "9",
"patientId": "GEN9-202509-00170",
"IpId": "105673",
"type": "ipd",
"formName": "progress_notes",
"process": "progress_notes",
"response": "{\"patientInfo\":{...},\"progressNotes\":[...]}",
"medication_templates": [],
"status": "complete"
}
}
Parsed Response Structure:
{
"success": true,
"message": "Document generated successfully",
"data": {
"session_id": "114484",
"patient_id": "QAT70-202604-00362",
"inpatient_id": "IN-QAT70-202604-00007",
"nurse_id": null,
"doctor_id": 318,
"question": "Generate Progress Notes",
"questioned_at": 1778584003763,
"patient_type": "progress_notes",
"organization_id": "286",
"answer": {
"patientInfo": {
"knownDrugAllergies": "None",
"diagnosis": "total hip replacement"
},
"progressNotes": [
{
"id": "312",
"date": "2026-04-15 15:59:11",
"notes": "**Vitals:** Blood glucose: 120.\n\n**Assessment:** Blood glucose is 120.\n\n**Plan:** Give Injection Emiset stat.\n\n**Escalation Instructions:** Inform the doctor in case of any new complaints, fever, hypotension, tachycardia, drop in saturation, or any other signs of clinical deterioration.",
"doctorSignature": "",
"practitioner_id": "pract006"
},
{
"id": "318",
"date": "2026-04-15 16:19:16",
"notes": "**Clinical Context:** Patient has been received in the ward and is currently comfortable.\n\n**Complaints and Events:** The patient reports a pain score of 2.\n\n**Vitals:** Not specifically dictated, but patient is noted to be comfortable.\n\n**Clinical Status:** Patient is comfortable and stable.\n\n**Systemic Examination:** Cardiovascular and respiratory systems show no abnormality detected. Abdominal examination reveals a soft abdomen with no tenderness.\n\n**Assessment:** Post-operative patient stable in the ward with controlled pain.\n\n**Plan:** Patient to be started on oral fluids with semi-solid fluids allowed after one hour. IV fluids are currently on flow. Continue injections as per the drug chart. Patient is to be mobilized, and the Foley's catheter should be removed after half an hour.\n\n**Escalation Instructions:** Escalate in case of increased pain score, abdominal distension, fever, or inability to tolerate oral intake.\n\n**Disposition Plan:** Continue management in the ward.",
"doctorSignature": "**Doctor Signature:** Not dictated.",
"practitioner_id": "carescribe-070-dr0001"
},
{
"id": "318",
"date": "2026-04-15 16:21:26",
"notes": "**Clinical Context:** The patient is being prepared for discharge today.\n\n**Complaints and Events:** The patient is currently comfortable and doing very well.\n\n**Clinical Status:** The patient is in a stable condition.\n\n**Assessment:** The patient is stable and fit for discharge.\n\n**Plan:** The patient is discharged with medications including Tablet Bactoclav 200 mg for three days, Tablet Inflam-S twice daily for three days after food, and Tablet Pantoprazole 40 mg twice daily before food for three days. Dietary advice includes a normal vegetarian, easy-to-digest diet. Activity allowed includes climbing stairs and driving, but heavy weight lifting is restricted.\n\n**Escalation Instructions:** In case of severe pain, the patient is instructed to report to the casualty emergency department.\n\n**Disposition Plan:** Discharged to home.",
"doctorSignature": "",
"practitioner_id": "carescribe-070-dr0001"
},
{
"id": "312",
"date": "2026-04-16 10:59:55",
"notes": "**Clinical Context:** Patient is post-surgery with healing wounds. 1\n\n**Complaints And Events:** Patient's pain score has improved from 8 to 5. 2\n\n**Clinical Status:** Patient's health is progressively improving. Condition and severity are at a tolerable level. 3\n\n**Systemic Examination:** Recent scan reports are normal. 4\n\n**Assessment:** Patient is recovering well post-surgery. The current treatment and medication plan is effective. 5\n\n**Plan:** Continue the same medications. Give Calpol tablet SOS if pain elevates. Patient can do mild exercises and movements. No food restrictions after discharge. 6\n\n**Escalation Instructions:** If the stomach is heavily bulged or if there is swelling, come to the hospital immediately. 7\n\n**Disposition Plan:** Plan for discharge. Post-discharge, the patient can eat any kind of food and perform mild exercises. 8",
"doctorSignature": "",
"practitioner_id": "pract006"
},
{
"id": "318",
"date": "2026-05-08 12:06:34",
"notes": "**Assessment:** Patient is being evaluated for a total hip replacement.\n\n**Plan:** Obtain an X-ray. Plan for a total hip replacement procedure.\n\n**Escalation Instructions:** Escalate if there is severe pain, inability to move the limb, or signs of neurovascular compromise.",
"doctorSignature": "",
"practitioner_id": "carescribe-070-dr0001"
}
]
},
"summary": null,
"question_audio_link": null,
"answer_audio_link": null,
"funct_name": "summary_rag_engine",
"answered_at": 1778584026537,
"practitioner_id": "carescribe-070-dr0001"
}
}
7. Doctor Initial Assessment
formName: "doctor_initial_assessment"
Initial assessment performed by the doctor upon patient admission.
Complete Response Structure:
{
"status": "complete",
"data": {
"SessionId": "GEN9-202509-00170",
"hospitalId": "9",
"patientId": "GEN9-202509-00170",
"IpId": "101142",
"type": "ipd",
"formName": "doctor_initial_assessment",
"process": "doctor_initial_assessment",
"response": "Chief Complaints:* Patient presents with persistent right-sided chest wall pain...",
"medication_templates": [],
"status": "complete"
}
}
Parsed Response Structure:
{
"success": true,
"message": "Document generated successfully",
"data": {
"session_id": "114484",
"patient_id": "QAT70-202604-00362",
"inpatient_id": "IN-QAT70-202604-00007",
"nurse_id": null,
"doctor_id": 318,
"question": "Generate Initial Assessment",
"questioned_at": 1778584110080,
"patient_type": "initial_assessment",
"interaction_id": "112239",
"organization_id": "286",
"answer": {
"response": "Chief Complaints:* Patient admitted with complaints of abdominal pain for the last three months\n\nHistory of Present Illness:* The patient presented with abdominal pain for three days, which started in the stomach and gradually increased in intensity. The pain is now locally\n\nPast Medical History and Duration:* The patient is a known case of hypertension and diabetes mellitus for the past four years, for which they are on medication. The patient underwent a Cesarean section previously. A previous and ultrasound revealed the presence of gallstones.\n\nFamily History:* 3 child\n\nPersonal History:* The patient is married and has two living children. And\n\nObstetrical History:* The patient has had one Cesarean section delivery in the past.and\n\nPrevious Medication:* G-Icon suspension, Calpol 500 mg, Panpra D.s\n\nPrevious Investigations:* Previous ultrasound showed stones in the gallbladder.And\n\nPlan of Care:* The patient will be kept nil per oral. IV fluids will be started. Medications prescribed include Injection Emeset, Injection Ringer's Lactate, and Injection Pantopra. And\n\nSurgery/Procedure Planned:* Laparoscopic appendectomy is planned.and",
"medication_templates": [
{
"dosage": "4ml",
"dosage_time": "6:00 AM, 6:00 PM",
"duration": "",
"frequency_afternoon": [
"0"
],
"frequency_evening": [
"0"
],
"frequency_morning": [
"1"
],
"frequency_night": [
"1"
],
"instructions": "BD",
"med_status": "continue",
"medication_name": "ONDANSETRON-4MG (EMESET 4 ML INJECTION)",
"medication_type": "injection",
"route": "IV",
"scheduled_date": null,
"is_stat": false,
"is_once_only": false,
"is_sos": false
},
{
"dosage": "40 mg",
"dosage_time": "6:00 AM, 6:00 PM",
"duration": "",
"frequency_afternoon": [
"0"
],
"frequency_evening": [
"0"
],
"frequency_morning": [
"1"
],
"frequency_night": [
"1"
],
"instructions": "BD",
"med_status": "continue",
"medication_name": "(PANTOPRAZOLE 40MG INJECTION)",
"medication_type": "injection",
"route": "IV",
"scheduled_date": null,
"is_stat": false,
"is_once_only": false,
"is_sos": false
},
{
"dosage": "100 ml",
"dosage_time": null,
"duration": "",
"frequency_afternoon": [
"0"
],
"frequency_evening": [
"0"
],
"frequency_morning": [
"0"
],
"frequency_night": [
"0"
],
"instructions": "BD",
"med_status": "continue",
"medication_name": "SODIUM CHLORIDE (0.600GM) + SODIUM LACTATE (0.320GM) + POTASSIUM CHLORIDE (0.040GM) + CALCIUM CHLORIDE (0.027GM) (RINGER LACTATE 500 ML INFUSION)",
"medication_type": "IV fluid",
"route": "IV",
"scheduled_date": null,
"is_stat": false,
"is_once_only": false,
"is_sos": false
},
{
"dosage": "",
"dosage_time": null,
"duration": "",
"frequency_afternoon": [
"0"
],
"frequency_evening": [
"0"
],
"frequency_morning": [
"0"
],
"frequency_night": [
"0"
],
"instructions": "",
"med_status": "continue",
"medication_name": "(Allegra 100 ml syrup) Fexofenadine (30mg/5ml)",
"medication_type": "",
"route": "",
"scheduled_date": null,
"is_stat": false,
"is_once_only": false,
"is_sos": false
},
{
"dosage": "2",
"dosage_time": null,
"duration": "2",
"frequency_afternoon": [
"1"
],
"frequency_evening": [
"0"
],
"frequency_morning": [
"1"
],
"frequency_night": [
"0"
],
"instructions": "",
"med_status": "continue",
"medication_name": "Acebrophylline (200mg)",
"medication_type": "AB day 200 SR tablets",
"route": "2",
"scheduled_date": null,
"is_stat": false,
"is_once_only": true,
"is_sos": false
}
],
"additional_response": null,
"assessment": [
{
"template_tests": "Ultrasound"
}
]
},
"summary": null,
"question_audio_link": null,
"answer_audio_link": null,
"funct_name": "summary_rag_engine",
"answered_at": 1778584113956,
"practitioner_id": "carescribe-070-dr0001"
}
}
8. Surgery Notes
formName: "surgery_notes"
Documentation of surgical procedures including pre-operative, intra-operative, and post-operative details.
Complete Response Structure:
{
"status": "complete",
"data": {
"SessionId": "GEN9-202509-00170",
"hospitalId": "9",
"patientId": "GEN9-202509-00170",
"IpId": "105673",
"type": "ipd",
"formName": "surgery_notes",
"process": "surgery_notes",
"response": "{\"pre_operative_diagnosis\":\"...\",\"post_operative_diagnosis\":\"...\",...}",
"medication_templates": [],
"status": "complete"
}
}
Parsed Response Structure:
{
"success": true,
"message": "Document generated successfully",
"data": {
"session_id": "114484",
"patient_id": "QAT70-202604-00362",
"inpatient_id": "IN-QAT70-202604-00007",
"nurse_id": null,
"doctor_id": 318,
"question": "Generate Surgery Notes",
"questioned_at": 1778584213208,
"patient_type": "surgery_notes",
"interaction_id": "114015",
"organization_id": "286",
"answer": {
"pre_operative_diagnosis": "Acute appendicitis with abscess.",
"post_operative_diagnosis": "Acute appendicitis with abscess.",
"surgeon": "Dr. M. Senthil",
"anaesthetist": "Dr. CVG",
"assistant1": "Dr. Bharat",
"assistant2": "",
"scrub_nurse": "Ms. Varsha",
"circ_nurse": "Ms. Bhavya",
"findings": "Omentum adherent to the inflamed, turgid appendix. Appendix perforated near the base with periappendicular abscess collection.",
"name_of_operation": "Laparoscopic appendectomy with peritoneal lavage",
"procedure": "Laparoscopic appendectomy with peritoneal lavage under general anesthesia. Patient in supine position, parts prepared and draped. Pneumoperitoneum created with Veress needle subumbilically. Once the pressure reached 10 mmHg, incision made and extended, and a 5 mm trocar placed in the subumbilical region. Findings noted. Additional trocars, 5 mm in the suprapubic region and 5 mm in the right iliac fossa, placed. Adhesions gently released. Pus sucked out. Appendix gently released from the surrounding adhesions. Mesoappendix divided with harmonic scalpel. Base of appendix endoloop ligated twice using 1-0 Vicryl and appendectomy done. Specimen removed through suprapubic port, which was converted to 10 mm. Thorough peritoneal lavage given. Hemostasis ensured. Drain kept in the pelvic cavity and brought out through the right iliac fossa and fixed to the anterior abdominal wall. 10 mm port wound closed with 1-0 Vicryl. Skin wounds stapled.",
"post_medications": "Half-hourly BP and PR to be maintained.\n\nIntake-output chart to be maintained.\n\nInjection IV fluids: Ringer's Lactate 1 pint at 100 ml per hour.\n\nStop injection DNS.\n\nInjection Piptaz 4.5 mg IV BD.\n\nInjection Pantoprazole 40 mg infusion in 500 ml NS at 50 ml per hour for 24 hours.\n\nCatheter care to be done.",
"post_operative_orders": "Half-hourly BP and PR to be maintained.\n\nIntake-output chart to be maintained.\n\nInjection IV fluids: Ringer's Lactate 1 pint at 100 ml per hour.\n\nStop injection DNS.\n\nInjection Piptaz 4.5 mg IV BD.\n\nInjection Pantoprazole 40 mg infusion in 500 ml NS at 50 ml per hour for 24 hours.\n\nCatheter care to be done.",
"diet": "",
"postoperative_condition": "Stable, extubated",
"surgeon_remarks": "Shift to ward once stable",
"biopsy_specimen": "Appendix",
"medication_templates": [
{
"medication_name": "medication",
"medication_type": "IV fluid",
"dosage": "500 ml",
"route": "IV",
"frequency_morning": "0",
"frequency_afternoon": "0",
"frequency_evening": "0",
"frequency_night": "0",
"duration": "",
"dosage_time": "",
"scheduled_date": null,
"instructions": "100 ml per hour",
"med_status": "continue",
"is_stat": true,
"is_once_only": false,
"is_sos": false
}
],
"vitals_abnormality": {
"abnormality_detected": false,
"abnormal_vitals_message": "",
"overall_severity": "normal"
},
"monitoring_tasks": [
{
"is_monitor": true,
"monitoring_message": "check vitals",
"interval_minutes": 30,
"start_or_stop": "start"
},
{
"is_monitor": true,
"monitoring_message": "check intake output",
"interval_minutes": null,
"start_or_stop": "start"
}
]
},
"summary": null,
"question_audio_link": null,
"answer_audio_link": null,
"funct_name": "summary_rag_engine",
"answered_at": 1778584217198,
"practitioner_id": "carescribe-070-dr0001"
}
}
Nurse Session Link Forms
Shared Forms: "drug_chart", "io_chart", "peripheral_chart", "tpr_chart"
These forms are used by nurses to record medication administration, intake/output measurements, peripheral IV line details, and vital signs. Refer to the Doctor Session Link Forms section above for complete documentation of these shared forms.
5. Nurse Care Plan
formName: "nurse_care_plan"
Nursing care plan documenting patient care activities, observations, and interventions.
Complete Response Structure:
{
"status": "complete",
"data": {
"SessionId": "GEN9-202602-00044",
"hospitalId": "9",
"patientId": "GEN9-202602-00044",
"IpId": "105474",
"type": "ipd",
"formName": "nurse_care_plan",
"process": "nurse_care_plan",
"response": "## 05 February 2026\n04:52 PM: Patient complaining severe abdominal pain. Pain score 7/10. Vitals stable. Patient guarding abdomen.\n05:26 PM: Patient checked. Patient reports no abdominal pain. Pain score is 3. Patient appears fine and is stable.\n",
"medication_templates": [],
"status": "complete"
}
}
Parsed Response Structure:
## 05 February 2026
04:52 PM: Patient complaining severe abdominal pain. Pain score 7/10. Vitals stable. Patient guarding abdomen.
05:26 PM: Patient checked. Patient reports no abdominal pain. Pain score is 3. Patient appears fine and is stable.
6. Nurse Notes
formName: "nurse_notes"
Detailed nursing notes including special observations, care given, and patient status updates.
Complete Response Structure:
{
"session_id": "f877d22f-bc55-4840-854e-79ec8bc4ee6d",
"patient_id": "GEN9-202509-00442",
"inpatient_id": "IN-GEN9-202509-00037",
"nurse_id": 72,
"doctor_id": null,
"question": "Generate Nurse Notes",
"questioned_at": 1778584605689,
"patient_type": "ipd",
"organization_id": "9",
"answer": {
"pain_assessment": {
"date_and_time": null,
"score": null,
"location": null,
"intervention_time": null,
"intervention": null,
"post_intervention_score": null
},
"care_given": {
"hygienic_needs": null,
"elimination_needs": null,
"catheter_care": null,
"care_of_invasive_lines": "IV fluids are ongoing. Monitor IV line for leakage or blockage. Ensure IV flow rate matches doctor's orders.",
"position_change_and_back_care": null,
"wound_dressing": null,
"tracheostomy_care": null
},
"special_notes": {
"15 April 2026": {
"2:12 PM": {
"description": "The patient is currently under care and stable; vitals have been documented properly and medications administered as per instructions. Blood pressure, pulse, and temperature have been noted and documented regularly. Medications administered via the right dose and route; IV fluids are ongoing. Regular vital checks performed; medications administered on time; documentation completed for the shift. Continue monitoring vitals as scheduled; administer next medications according to the chart; monitor IV line for leakage or blockage. Patient was admitted today and care was initiated following doctor's instructions without complications. Monitor for pain, discomfort, or breathing issues and act quickly if noted. Inform the duty doctor immediately if vitals become abnormal; ensure IV flow rate matches doctor's orders; do not make adjustments to medications independently; maintain clear documentation of all observations and actions. Monitor for breathing issues and IV line patency (leakage/blockage). Monitoring tasks include checking vitals and breathing."
}
}
}
},
"summary": null,
"question_audio_link": null,
"answer_audio_link": null,
"funct_name": "summary_rag_engine",
"answered_at": 1778584616565
}
7. Nurse Initial Assessment
formName: "nurse_initial_assessment"
Initial nursing assessment performed upon patient admission.
Complete Response Structure:
{
"status": "complete",
"data": {
"SessionId": "GEN9-202509-00170",
"hospitalId": "9",
"patientId": "GEN9-202509-00170",
"IpId": "105673",
"type": "ipd",
"formName": "nurse_initial_assessment",
"process": "nurse_initial_assessment",
"response": "{\"basicInformation\":{...},\"functionalAssessment\":{...},\"nutritionalAssessment\":{...}}",
"medication_templates": [],
"status": "complete"
}
}
Parsed Response Structure:
{
"basicInformation": {
"how_admitted": "walking",
"attendant_present": "yes",
"mother_tongue": "Tamil",
"allergies": "Others",
"height": "162 cm",
"weight": "56 kg",
"vitals": [
{
"blood_pressure": "118/76 mmHg",
"pulse": "88 bpm",
"respiration": "18 breaths/min",
"temperature": "99.2°F",
"spo2": "99%",
"blood_sugar": "",
"abnormality_detected": false,
"abnormal_vitals_message": "",
"overall_severity": "normal"
}
],
"special_notes": "Patient admitted via OPD for surgical evaluation.",
"allergiesOther": "no nothing"
},
"functionalAssessment": {
"washing": true,
"dressing": true,
"feeding": false,
"toileting": true,
"transferring": true,
"mobility": true
},
"nutritionalAssessment": {
"diet": {
"isSpecialDiet": false,
"type": ""
},
"recentWeightChanges": false,
"supplements": false,
"conditionsAffectingEating": false
}
}