CareScribe IPD HMS Integration API

Focused documentation for inpatient HMS integration, IPD forms, clinical charts, notes, uploads, and module responses.

API Gateway URL

Base URL for all API requests:

https://carescribe-app-api-8to2squd.wl.gateway.dev
Important:
  • All API endpoints should be prefixed with this gateway URL
  • Example: https://carescribe-app-api-8to2squd.wl.gateway.dev/software/integration/inpatient
  • The gateway URL is required for all API calls.

IPD Integration Workflow

Complete these steps in order. Values returned by an earlier step are required by later steps.

  1. Create a Hospital — contact the CareScribe team to register the hospital and obtain its hospital_id.
  2. Create Floor — create a floor for the hospital.
  3. Get All Floors — retrieve and save the required floor_id.
  4. Create Nurse — create the nurse using the floor_id returned in Step 3.
  5. Get the Specialty List — retrieve and save the required speciality_id.
  6. Create a Doctor — create the doctor using the speciality_id returned in Step 5.
  7. Assign Primary Doctor / Update Inpatient — call this once for every newly created inpatient to assign the primary doctor and placement details.
  8. Inpatient Software Integration — create or update the inpatient and obtain the clinician session information.
  9. Route an HMS IPD Form Request — submit the required IPD form workflow.

Step 1: Create a Hospital

Contact the CareScribe team to book an appointment: https://carescribe.health/

Note: Hospital setup is completed by the CareScribe team. Contact them to register your hospital in the system before starting the API integration steps.

Required Hospital Information

Provide the following information to the CareScribe team:

Hospital Name The official name of your hospital or organization.
Hospital ID Use the format orgname-somenumber, such as carescribe-001 or carescribe-002. For multiple hospitals in the same organization, use sequential numbers.
Time Zone The hospital time zone, such as Asia/Kolkata, America/Los_Angeles, or Europe/London.
Client Endpoint URL A publicly accessible HTTPS endpoint in your HMS where CareScribe can send POST requests with OPD data, for example https://api.yourhospital.com/carescribe/opd.
Location Street address, city, state or province, country, and postal or PIN code.

Additional Information (Optional)

  • 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.

Floor Management

Step 2: Create Floor

POST /software/createfloor

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.

Headers: x-api-key (required)
Body required: floor_name, hospital_id

Body

{
  "floor_name": "First Floor",
  "hospital_id": "9"
}

Response 201 — Floor created successfully

{
  "message": "Floor created successfully.",
  "data": {
    "floor_id": 12,
    "floor_name": "First Floor",
    "organization_id": 3
  }
}

Errors

  • 400: {"message": "floor_name and hospital_id are required"}
  • 404: {"message": "Organization not found"}
  • 409: {"message": "Floor already exists for this organization."}
  • 500: {"message": "Failed to create floor", "error": "Database connection failed"}

Step 3: Get All Floors

GET /software/getallfloor

Summary: Get All Floors

Description: Retrieves all floors for a given hospital. Use the returned floor_id when creating a nurse in Step 4.

Headers: x-api-key (required)
Query: hospital_id (required)

Response 200 — Floors fetched successfully

{
  "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"
    }
  ]
}

Errors

  • 400: {"message": "hospital_id is required."}
  • 404: {"message": "No Floors found for this hospital."}
  • 500: {"message": "Failed to retrieve floors.", "error": "Database error"}
PUT /software/updatefloor

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.

Headers: x-api-key (required)
Query: hospital_id (required)
Body required: floor_id

Body

{
  "floor_id": 2,
  "floor_name": "New Floor"
}

Response 200 — Floor updated successfully

{
  "message": "Floor updated successfully.",
  "data": {
    "floor_id": 2,
    "floor_name": "New Floor",
    "organization_id": 3
  }
}

Errors

  • 400: {"message": "hospital_id is required."}
  • 404: {"message": "Floor not found."}
  • 409: {"message": "Floor with this name already exists."}
  • 500: {"message": "Failed to update.", "error": "Database error"}

Bed

GET /software/get/bedslist

Summary: Get All Beds List

Description: Fetches all beds for a hospital, including floor details.

Headers: x-api-key (required)
Query: hospital_id (required)

Response 200 — Success

{
  "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"
    }
  ]
}

Errors

  • 400: {"message": "hospital_id is required"}
  • 404: {"message": "Invalid hospital_id"}
  • 500: {"message": "Internal Server Error"}
POST /software/create/bed

Summary: Create a new inpatient bed

Description: Creates a bed for a hospital; status/maintenance fields 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 */ }
}

Errors

  • 400: {"message": "Bed number already exists."}
  • 404: {"message": "Invalid hospital_id"}
  • 500: {"message": "Internal Server Error"}
POST /software/update/bed

Summary: Update an existing inpatient bed

Description: Updates ward/bed info, status, floor, maintenance flags.

Headers: x-api-key (required)
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 — Success

{
  "message": "Bed updated successfully.",
  "bed": { /* updated bed details */ }
}

Errors

  • 400: {"message": "Bed number already exists on this floor/ward."}
  • 404: {"message": "Invalid hospital_id / Invalid floor / Bed not found."}
  • 500: {"message": "Internal Server Error"}

Ward Management

GET /software/bedtypes-wards

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.

Headers: x-api-key (required)
Query: hospital_id (required)

Response 200 — Bed types and wards retrieved successfully

{
  "bedtypes": [
    "ICU",
    "General",
    "Semi-Private"
  ],
  "wards": [
    "Ward A",
    "Ward B",
    "Emergency"
  ]
}

Errors

  • 404: {"message": "hospital not found."}
  • 500: {"message": "Failed to retrieve bed types and wards", "error": "Error details message here"}
POST /software/ward/add

Summary: Add Ward to Organization

Description: Adds a new ward to the organization based on hospital_id.

Headers: x-api-key (required)
Query: hospital_id (required)
Body required: ward

Body

{
  "ward": "Ward 15"
}

Response 200 — Ward added successfully

{
  "message": "Ward added successfully.",
  "data": {
    "wards": [
      "Ward 1",
      "Ward 2",
      "Ward 15"
    ]
  }
}

Errors

  • 400: {"message": "hospital_id is required."}
  • 404: {"message": "Organization not found."}
  • 409: {"message": "This ward already exists for the organization."}
  • 500: {"message": "Failed to add ward", "error": "Error details message here"}
PUT /software/ward/update

Summary: Update Ward Name

Description: Updates an existing ward name for an organization using hospital_id.

Headers: x-api-key (required)
Query: hospital_id (required)
Body required: old_ward, new_ward

Body

{
  "old_ward": "ward 15",
  "new_ward": "ward 17"
}

Response 200 — Ward updated successfully

{
  "message": "Ward updated successfully.",
  "data": {
    "organization_id": 101,
    "hospital_id": "9",
    "wards": [
      "Ward 1",
      "Ward 2",
      "Ward 17"
    ]
  }
}

Errors

  • 400: {"message": "Old ward and new ward are required."}
  • 404: {"message": "Ward not found."}
  • 409: {"message": "This ward already exists for the organization."}
  • 500: {"message": "Failed to update ward", "error": "Error details message here"}
POST /software/upload-csv/partitionsetup

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.

Headers: x-api-key (required)
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 — CSV uploaded and processed successfully

{
  "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": []
}

Errors

  • 400: {"message": "A CSV file is required."}
  • 404: {"message": "Organization not found for the given hospital_id."}
  • 500: {"message": "Failed to upload CSV", "error": "Error details message here"}

Integration Prerequisites

Complete these setup steps before starting the inpatient integration flow.

Step 4: Create a Nurse

POST /software/nurse/create

Summary: Create Nurse

Description: Maps hospital_id to an organization and creates a nurse using a floor_id returned by Step 3. Email is optional and is generated automatically when blank.

Headers: x-api-key (required)
Query: hospital_id (required)

Body

{
  "firstname": "Sarah",
  "lastname": "John",
  "email": "",
  "phone": "994056789",
  "floor_id": 2,
  "caregiver_id": "LI7897",
  "nurse_category": "Ward Nurse"
}

nurse_category is optional. Supported values are:

  1. Ward Nurse
  2. ICU Nurse
  3. ER Nurse

When provided, the value is trimmed and stored on the nurse record; an empty value is stored as null.

Response 201 — Created immediately

{
  "message": "Nurse created successfully.",
  "member_request": false,
  "created": true,
  "user_id": 102,
  "nurse_id": 72,
  "username": "sarahjohn"
}

Response 202 — Verification required

{
  "message": "Your request has been submitted. We will create this member after verification. Please wait patiently.",
  "member_request": true,
  "created": false,
  "request_id": 501
}

Errors

  • 400: {"message": "firstname, lastname, and floor_id are required fields"}
  • 400: {"message": "caregiver_id is required and must be provided"}
  • 400: Invalid/duplicate email or duplicate caregiver_id.
  • 403: Nurse member limit reached.
  • 404: {"message": "Invalid hospital_id"}
  • 409: A pending or approved request already exists for the caregiver ID or email.
  • 500: {"message": "Server error", "error": "Database connection failed"}

Step 5: Get the Specialty List

GET /software/speciality/list

Summary: Get all specialities

Description: Retrieves all specialities available in the system. Use the selected speciality_id when creating a doctor in Step 6.

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 an array of specialty objects
  • 500: Internal server error

Step 6: Create a Doctor

POST /software/doctor/create

Summary: Create a doctor

Description: Creates a new doctor using a speciality_id returned by Step 5.

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"
}
Field requirements:
  • hospital_id: Required. Use the format orgname-somenumber, such as carescribe-001. For multiple hospitals in one organization, use sequential numbers.
  • practitioner_id: Required and unique. Use the format hospital_id-drsomenumber, such as carescribe-001-dr001.
  • first_name: Required.
  • last_name: Required.
  • speciality_id: Required. Fetch it from /software/speciality/list.
  • license_no: Optional in the current controller. Pass an empty string when unavailable.

Responses

  • 201: Doctor created successfully
  • 400: Invalid input
  • 409: Doctor with practitioner_id or email already exists
  • 500: Internal server error

Inpatient Integration

Step 8: Inpatient Software Integration

POST /software/integration/inpatient

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_id OR nurse.caregiver_id
  • If both are provided → request will be rejected
  • Empty caregiver_id or practitioner_id is treated as NOT provided

Request Body - Doctor Login

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"
  }
}

Request Body - Nurse Login

Use this payload when a nurse is accessing the inpatient record:

{
  "hospital_id": "9",
  "nurse": {
    "caregiver_id": "LI7987"
  },
  "patient": {
    "patient_id": "HOSP-PAT-001",
    "name": "John Doe",
    "age": 45,
    "gender": "Male"
  },
  "inpatient": {
    "hospital_inpatient_id": "INP-HOSP-PAT-001"
  }
}

Response 200 — Success – session URL generated

Doctor Login Response:

{
  "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
}

Nurse Login Response:

{
  "message": "Patient already exists. Inpatient record updated.",
  "path": "/session_id?...&caregiver_id=LI7987",
  "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 path will contain practitioner_id parameter
  • Nurse flow: The path will contain caregiver_id parameter
  • The path field contains the complete session URL that can be used to access the inpatient record

Errors

  • 400: "Provide either practitioner_id (doctor) or caregiver_id (nurse), not both. Please use one and try again."
  • 404: "Organization not found"
  • 409: "Another clinician is currently visiting this inpatient."
  • 500: "Internal Server Error"

Endpoint: POST /software/integration/inpatient

When IPD modules are used, data is sent to your system following a two-payload pattern (see detailed explanation below). The outer status can be "initial" when the form is opened, or "complete" when the form is saved.

Base Response Structure

This structure applies to both Initial Payload and Final Payload - only the status values change.

Initial Payload Example (Form Opened)

{
  "status": "initial",
  "data": {
    "SessionId": "GEN9-202509-00170",
    "hospitalId": "9",
    "patientId": "GEN9-202509-00170",
    "IpId": "105219",
    "OpId": "",
    "PractitionerId": null,
  "type": "ipd",
    "formName": "drug_chart",
    "process": "drug_chart",
    "response": "{\"drug_chart\":[...]}",
    "medication_templates": [],
    "additional_response": null,
    "status": "initial payload"
  }
}

Final Payload Example (Form Saved)

{
  "status": "complete",
  "data": {
    "SessionId": "GEN9-202509-00170",
    "hospitalId": "9",
    "patientId": "GEN9-202509-00170",
    "IpId": "105219",
    "OpId": "",
    "PractitionerId": null,
    "type": "ipd",
    "formName": "drug_chart",
    "process": "drug_chart",
    "response": "{\"drug_chart\":[...]}",
    "medication_templates": [],
    "additional_response": null,
    "status": "complete"
  }
}

Step 7: Assign Primary Doctor / Update Inpatient

PUT /software/inpatient/assign-primary-doctor

Summary: Assign Primary Doctor / Update Inpatient

Description: Call this endpoint to create or update an inpatient admission and assign its primary doctor. If hospital_inpatient_id does not exist, the API creates the inpatient and links it to the resolved or newly created patient. The same request can update the ward, floor, bed, admission details, attendant details, and insurance type. The server always stores patient_category as Inpatient and sets active to true.

Headers: x-api-key (required)
Query: hospital_id (required)
Body required: hospital_inpatient_id, practitioner_id, floor_id, patient_id

When to use this endpoint

Body Fields

Do not send patient_category; it is controlled by the server.

Request Body

{
  "hospital_inpatient_id": "INP-HOSP-PAT-001",
  "practitioner_id": "1001",
  "floor_id": 29,
  "patient_id": "HOSP-PAT-001",
  "in_date": null,
  "bed_no": null,
  "ward": null,
  "attender_mobile_no": null,
  "insurance_type": null,
  "attender_name": null,
  "attender_relation": null
}

Response 200 — Inpatient updated successfully

{
  "message": "Inpatient updated successfully",
  "patient_created": false,
  "inpatient_created": false,
  "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": "Arjun",
      "last_name": "Sharma"
    },
    "Bed": {},
    "floor": {
      "floor_id": 29,
      "floor_name": "First Floor"
    }
  }
}

Responses

Inpatient Summary

POST /software/inpatient/patient-summary

Summary: Retrieve the generated summary for an inpatient admission.

Description: Treats query patient_id as Patient.hospital_patient_id and resolves the internal patient ID. It resolves query hospital_inpatient_id through Inpatients.hospital_inpatient_id. When optional practitioner_id is supplied, the doctor is resolved from that practitioner within the hospital; otherwise the API uses Inpatients.primarydoctor. It then calls the chatbot patient-summary API with the internal patient_id, inpatient_id, and doctor_id.

Headers: x-api-key (required), Content-Type: application/json
Query required: hospital_id, patient_id (hospital patient ID), hospital_inpatient_id
Query optional: practitioner_id

Request

POST /software/inpatient/patient-summary?hospital_id=9&patient_id=HOSP-PAT-007&hospital_inpatient_id=INP-HOSP-PAT-007

To select a practitioner instead of the assigned primary doctor:

POST /software/inpatient/patient-summary?hospital_id=9&patient_id=HOSP-PAT-007&hospital_inpatient_id=INP-HOSP-PAT-007&practitioner_id=1001

Optional Request Body

list_headings is an optional array of dashboard headings. Omit the body or send an empty array to use the default summary configuration.

{
  "list_headings": [
    "Diagnosis",
    "Medication",
    "Vitals"
  ]
}

Response 200 - Summary returned

{
  "speciality_dashboard": {},
  "lab_data": {},
  "ipd_vitals": []
}

Responses

Inpatient Handover Notes

GET /software/inpatient/handover-notes

Summary: Retrieve handover notes for an inpatient admission.

Description: Resolves query patient_id through Patient.hospital_patient_id, resolves hospital_inpatient_id to the internal inpatient admission, and resolves caregiver_id to the hospital nurse's internal nurse_id. The internal IDs are sent to the chatbot get_handover API. The time zone is read from the hospital organization and defaults to Asia/Kolkata when it is not configured.

Headers: x-api-key (required)
Query required: hospital_id, patient_id (hospital patient ID), hospital_inpatient_id, caregiver_id
Query optional: type (default all)

Request

GET /software/inpatient/handover-notes?hospital_id=9&patient_id=HOSP-PAT-007&hospital_inpatient_id=INP-HOSP-PAT-007&caregiver_id=CG-001&type=all

Responses

POST /software/api/ipd/generate-document

Summary: Generate IPD Document

Description: Generates IPD documents such as initial assessment, progress notes, surgery notes, nurse notes, and nursing care plan based on patient, inpatient, and clinician details. For doctor forms provide practitioner_id; for nurse forms provide caregiver_id.

Query: hospital_id (required). It is not read from the JSON body.

Request Body

{
  "patient_id": "GEN9-202509-00435",
  "inpatient_id": "IN-GEN9-202509-00034",
  "practitioner_id": "9871",
  "document_type": "surgery_notes"
}

Allowed document_type values

- initial_assessment
- progress_notes
- surgery_notes
- doctor_notes
- nurse_notes
- nurse_care_plan

Response 200 — Document generated successfully

{
  "success": true,
  "message": "Document generated successfully",
  "data": {
    "session_id": "112170",
    "patient_id": "GEN9-202509-00435",
    "inpatient_id": "IN-GEN9-202509-00034",
    "doctor_id": 226,
    "patient_type": "surgery_notes",
    "answer": {
      "pre_operative_diagnosis": "Abnormal uterine bleeding, complicated fibroid.",
      "name_of_operation": "Total laparoscopic hysterectomy",
      "surgeon_remarks": "Patient shifted to OT."
    }
  }
}

Errors

Step 9: Route an HMS IPD Form Request

POST /software/ipd/forms

Summary: Route an HMS IPD form request

Description: Resolves the hospital, patient, and internal inpatient IDs from hospital_id and hospital_inpatient_id, then delegates the request to the existing document, notes, chart, bundle, case-sheet, discharge, update, or ingestion handler selected by form_name.

Headers: x-api-key (required)
Content-Type: application/json
Role selection: The clinician workflow is inferred from practitioner_id or caregiver_id. A legacy role field may be sent but is ignored.

Body Fields

  • hospital_id (required): Hospital identifier used to resolve the organization.
  • hospital_inpatient_id (required): HMS inpatient identifier. It must belong to a patient in the resolved organization.
  • form_name (required): Form or action routed by this endpoint.
  • practitioner_id or caregiver_id (required): At least one non-empty clinician identifier must be supplied.
  • start_date and end_date (optional): Forwarded only when form_name is IPD_VITALS or IPD_INTAKE_OUTTAKE.
  • category or categories (optional): Forwarded to supported notes/chart proxy handlers.

Basic Request

{
  "hospital_id": "9",
  "hospital_inpatient_id": "IN-GEN9-202605-00056",
  "practitioner_id": "carescribe-001-dr001",
  "form_name": "case_sheet"
}

Supported form_name Values

Workflowform_nameAdditional requirements or behavior
Stored raw notesraw_doctor_notes, raw_nurse_notesRequires the matching practitioner or caregiver ID. Returns the latest stored generated note.
Generated notesdoctor_notes, nurse_notesCalls the chat-service notes generator and requires the matching clinician ID.
Generated IPD documentinitial_assessment, progress_notes, surgery_notes, nurse_care_plansurgery_notes requires practitioner_id; nurse_care_plan requires caregiver_id.
Discharge summarydischarge_summaryUses the supplied interaction_id, or resolves the latest interaction automatically.
Case sheetcase_sheetOptionally accepts force_regenerate.
Bundlescauti_bundle, cautiBundle, clabsi_bundle, clabsiBundleMaps to IPD_CAUTI_BUNDLE or IPD_CLABSI_BUNDLE.
Grouped IPD notesget_all_ipd_notes_grouped_by_date, ipd_notes_grouped_by_dateOptionally accepts category or categories.
Drug chartget_drug_chart, drug_chartDelegates to the drug-chart proxy.
Blood glucose chartblood_glucose_monitoring_chart, get_blood_glucose_monitoring_chartDelegates to the blood-glucose chart proxy.
IPD category shortcutAny IPD_* value up to 80 charactersUses that value as the grouped-notes categories filter. Date range is forwarded only for IPD_VITALS and IPD_INTAKE_OUTTAKE.

IPD Category Request Example

{
  "hospital_id": "9",
  "hospital_inpatient_id": "IN-GEN9-202605-00056",
  "caregiver_id": "LI7897",
  "form_name": "IPD_VITALS",
  "start_date": "2026-06-01",
  "end_date": "2026-06-02"
}

Response Behavior

The success response is the response of the delegated handler, so its shape varies by form_name. Internal doctor_id and nurse_id fields are retained. When a matching external identifier can be resolved, the response also includes practitioner_id or caregiver_id.

get_drug_chart Response

When form_name is get_drug_chart, the response contains patient measurements, allergies, medication orders, administration history, reconciliation data, and record totals.

{
  "patient_id": "SIM11-202607-00001",
  "inpatient_id": "IN-SIM11-202607-00001",
  "height_cm": 162,
  "weight_kg": 56,
  "special_diet": "Soft diet",
  "blood_group": "",
  "merged_schema": {
    "prescription_data": {
      "allergies": {
        "has_known_allergies": true,
        "allergies": [
          {
            "substance": "Curd",
            "reaction": "",
            "severity": null,
            "recorded_at": "2026-07-20T11:44:18.481269",
            "recorded_by": "",
            "source": "nurse"
          }
        ]
      },
      "once_only_drugs": [],
      "oral_anticoagulation": [],
      "thromboprophylaxis": [],
      "antiplatelet": [],
      "drug_chart": [
        {
          "medication_name": "PARACETAMOL 100MG (DORA 30ML DROPS DROPS)",
          "dosage": "",
          "route": "",
          "frequency": "BD",
          "status": "active",
          "start_date": "2026-07-20",
          "administration_times": [],
          "prescription_type": "regular",
          "additional_information": "Morning and night for 5 days",
          "created_at": "2026-08-25T13:54:43.937781",
          "prescribed_by": "240",
          "is_stat": false,
          "is_once_only": false,
          "is_sos": false,
          "administered": [
            {
              "administered_by_nurse_id": "240",
              "administered_time": "2026-07-20T11:44:18.481582",
              "status": "given"
            }
          ],
          "actual_medication_name": "Paracetamol",
          "brand_name": "DORA 30ML DROPS DROPS",
          "generic_name": "PARACETAMOL 100MG",
          "auto_correct": false,
          "med_from_llm": false,
          "medication_type": "drop",
          "drug_name": "PARACETAMOL 100MG (DORA 30ML DROPS DROPS)"
        }
      ],
      "prn_drugs": [],
      "infusions": [],
      "iv_fluids": [],
      "oxygen": [],
      "administrations": [
        {
          "drug_name": "Nexpro DSR",
          "scheduled_time": null,
          "administered_time": "2026-07-20T11:44:18.481582",
          "administered_by": "nurse",
          "doctor_id": "",
          "nurse_id": "240",
          "status": "given",
          "notes": "",
          "prescribed_by": "240",
          "caregiver_id": "carescribe_simmer11_ns_001"
        }
      ],
      "medication_reconciliation": {
        "previous_medications": [
          {
            "drug_name": "METFORMIN 500MG (GLYCOMET 500MG TABLET)",
            "dose": "500mg",
            "route": "oral",
            "frequency": "twice daily",
            "disposition": "continued",
            "is_antiplatelet": false,
            "interaction_id": ""
          }
        ],
        "past_long_term_medications": [
          {
            "medication_name": "METFORMIN 500MG (GLYCOMET 500MG TABLET)",
            "dosage": "500mg",
            "route": "oral",
            "frequency": "twice daily",
            "continue_medication": true,
            "notes": "Previous medication",
            "actual_medication_name": "Metformin",
            "brand_name": "GLYCOMET 500MG TABLET",
            "generic_name": "METFORMIN 500MG",
            "medication_type": "tablet"
          }
        ]
      }
    },
    "total_records": {
      "drug_chart": 5,
      "once_only_drugs": 0,
      "oral_anticoagulation": 0,
      "thromboprophylaxis": 0,
      "antiplatelet": 0,
      "prn_drugs": 0,
      "infusions": 0,
      "iv_fluids": 0,
      "oxygen": 0,
      "administered": 7
    }
  },
  "execution_time_seconds": 2.247
}

initial_assessment Request

{
  "hospital_id": "carescribe-simmer-001",
  "hospital_inpatient_id": "IN-SIM11-202607-00001",
  "practitioner_id": "carescribe_simmer11_dr001",
  "form_name": "initial_assessment"
}

initial_assessment Response

{
  "success": true,
  "message": "Document generated successfully",
  "data": {
    "session_id": "123530",
    "patient_id": "SIM11-202607-00001",
    "inpatient_id": "IN-SIM11-202607-00001",
    "nurse_id": null,
    "doctor_id": 601,
    "question": "Generate Initial Assessment",
    "questioned_at": 1787669458173,
    "patient_type": "initial_assessment",
    "interaction_id": "123164",
    "organization_id": "479",
    "answer": {
      "response": {
        "chief_complaints": "Fever, tiredness",
        "history_of_present_illness": "Patient presents with fever and tiredness. Assessment indicates dehydration with low body water content.",
        "past_history_and_duration": "",
        "family_history": "",
        "personal_history": "",
        "allergies": "",
        "blood_group": "",
        "previous_medication": "",
        "present_medication": "",
        "previous_investigations": "",
        "examination_findings": "Dehydration noted.",
        "provisional_diagnosis": "Fever, Dehydration",
        "plan_of_care": "IV fluids started (one or two bottles), Paracetamol injection administered, IV injection administered.",
        "surgery_procedure_planned": "",
        "pre_operative_instructions": "",
        "recommendations": "Take a lot of water and ORS liquids. Have bland, soft food. Take antibiotics for three days.",
        "assessment": [],
        "medication_templates": [
          {
            "medication_name": "PARACETAMOL 100MG (DORA 30ML DROPS DROPS)",
            "medication_type": "injection",
            "dosage": null,
            "route": "IV",
            "frequency_morning": null,
            "frequency_afternoon": null,
            "frequency_evening": null,
            "frequency_night": null,
            "duration": "",
            "duration_source": "",
            "continue_until_stopped": false,
            "dosage_time": null,
            "instructions": null,
            "med_status": null,
            "is_stat": true,
            "is_once_only": false,
            "is_sos": false,
            "is_status": "pending",
            "actual_medication_name": "Paracetamol",
            "brand_name": "DORA 30ML DROPS DROPS",
            "generic_name": "PARACETAMOL 100MG",
            "auto_correct": false,
            "med_from_llm": false
          },
          {
            "medication_name": "(ANTIBIOTICS)",
            "medication_type": null,
            "dosage": null,
            "route": "oral",
            "duration": "3 days",
            "duration_source": "doctor",
            "continue_until_stopped": false,
            "is_stat": false,
            "is_once_only": false,
            "is_sos": false,
            "is_status": "pending",
            "actual_medication_name": "Antibiotics",
            "brand_name": "antibiotics",
            "auto_correct": false,
            "med_from_llm": true
          },
          {
            "medication_name": "(IV FLUIDS ONE OR TWO BOTTLES)",
            "medication_type": "bottle",
            "dosage": "one or two bottles",
            "route": "IV",
            "duration": "",
            "continue_until_stopped": false,
            "is_stat": true,
            "is_once_only": false,
            "is_sos": false,
            "is_status": "pending",
            "actual_medication_name": "IV fluids",
            "brand_name": "iv fluids one or two bottles",
            "auto_correct": false,
            "med_from_llm": true
          }
        ],
        "phonetic_uri": "gs://medscribe-dev/11/GENERAL AND LAPAROSCOPIC SURGERY/155/medication_autocorrect.csv"
      },
      "assessment": null,
      "additional_response": null,
      "created_at": "23/07/2026 01:57 PM",
      "phonetic_uri": "gs://medscribe-dev/11/GENERAL AND LAPAROSCOPIC SURGERY/155/medication_autocorrect.csv"
    },
    "summary": null,
    "question_audio_link": null,
    "answer_audio_link": null,
    "funct_name": "summary_rag_engine",
    "answered_at": 1787669459841,
    "phonetic_uri": "gs://medscribe-dev/11/GENERAL AND LAPAROSCOPIC SURGERY/155/medication_autocorrect.csv",
    "practitioner_id": "carescribe_simmer11_dr001"
  }
}

surgery_notes Request

{
  "hospital_id": "carescribe-simmer-001",
  "hospital_inpatient_id": "IN-SIM11-202607-00001",
  "practitioner_id": "carescribe_simmer11_dr001",
  "form_name": "surgery_notes"
}

surgery_notes Response

{
  "success": true,
  "message": "Document generated successfully",
  "data": {
    "session_id": "123530",
    "patient_id": "SIM11-202607-00001",
    "inpatient_id": "IN-SIM11-202607-00001",
    "nurse_id": null,
    "doctor_id": 601,
    "question": "Generate Surgery Notes",
    "questioned_at": 1787669486002,
    "patient_type": "surgery_notes",
    "interaction_id": "123277",
    "organization_id": "479",
    "answer": {
      "123277": {
        "pre_operative_diagnosis": "abdominal uterine bleeding, AUB with symptomatic uterine fibroid with severe anemia",
        "post_operative_diagnosis": "abdominal uterine bleeding with uterine fibroid. Status: post total laparoscopic hysterectomy",
        "surgeon": "Dr. M. Senthil",
        "assistant1": "Mohammed Baig",
        "assistant2": "Lingesh",
        "anesthetist": "Pavithran",
        "scrub_nurse": "Tamilan",
        "circ_nurse": "Divya",
        "skin_wound_condition": "skin closed",
        "findings": "Altered blood was approximately 2 weeks size. Presence of uterine fibroid was noted. Bilateral over visual and upper normal. No significant pelvic adhesions. No free fluid in pelvis.",
        "name_of_operation": "total laparoscopic hysterectomy, TLH",
        "procedure": "Under general anesthesia, the patient was placed in the lithotomy position. Pneumoperitoneum was created and laparoscopic ports were placed. The uterus was mobilized and removed vaginally, the vault was closed laparoscopically, hemostasis was achieved, and the skin was closed.",
        "post_operative_orders": "Monitor vitals every 6 hours.\nMaintain IV fluids as per the chart.\nContinue antibiotics and analgesics.\nMonitor urine output.\nCheck Hb if indicated.\nReview tomorrow morning.",
        "diet": "NPO for next 6 hours, then start sips of water, soft diet as tolerated.",
        "postoperative_condition": "patient conscious, oriented, hemodynamically stable, shifted to the recovery room in stable condition.",
        "surgeon_remarks": "procedure completed laparoscopically without intra-operative complication. Progress is good.",
        "biopsy_specimen": "uterus with cervix sent to histopathologic examination, HPE",
        "medication_templates": [],
        "vitals_abnormality": {
          "abnormality_detected": false,
          "abnormal_vitals_message": "",
          "overall_severity": "normal"
        },
        "monitoring_tasks": [
          {
            "is_monitor": true,
            "monitoring_message": "check vitals",
            "interval_minutes": 360,
            "start_or_stop": "start"
          },
          {
            "is_monitor": true,
            "monitoring_message": "check urine output",
            "interval_minutes": null,
            "start_or_stop": "start"
          }
        ],
        "drug_chart_patch": {
          "allergies_to_add": [],
          "administrations_to_add": [],
          "medications_to_stop": [],
          "medications_to_hold": [],
          "medications_to_resume": [],
          "new_regular_orders": [],
          "new_prn_orders": [],
          "medication_reconciliation": {
            "previous_medications": []
          }
        },
        "blood_borne": {
          "hiv": null,
          "hcv": null,
          "hbv": null,
          "syphilis": null,
          "htlv": null,
          "malaria": null,
          "cmv": null
        },
        "phonetic_uri": "gs://medscribe-dev/11/GENERAL AND LAPAROSCOPIC SURGERY/155/medication_autocorrect.csv"
      }
    },
    "summary": null,
    "question_audio_link": null,
    "answer_audio_link": null,
    "funct_name": "summary_rag_engine",
    "answered_at": 1787669487365,
    "phonetic_uri": "gs://medscribe-dev/11/GENERAL AND LAPAROSCOPIC SURGERY/155/medication_autocorrect.csv",
    "practitioner_id": "carescribe_simmer11_dr001"
  }
}

doctor_notes Request

{
  "hospital_id": "carescribe-simmer-001",
  "hospital_inpatient_id": "IN-SIM11-202607-00001",
  "practitioner_id": "carescribe_simmer11_dr002",
  "form_name": "doctor_notes"
}

doctor_notes Response

The notes object can contain multiple entries keyed by interaction ID. The example below shows representative entries from the supplied response.

{
  "status": "success",
  "patient_id": "SIM11-202607-00001",
  "inpatient_id": "IN-SIM11-202607-00001",
  "doctor_id": "all",
  "casesheet": false,
  "question_text": "Generate Progress Notes",
  "notes": {
    "122533": {
      "created_at": "2026-07-20T17:14:02.365833+05:30",
      "updated_at": "2026-07-23T15:46:04.852807+05:30",
      "interaction_type": "raw_description",
      "answer": {
        "assessment": "**Assessment:** Patient presenting with acute chest pain and breathlessness, alongside active lower gastrointestinal bleeding.",
        "clinical_context": "",
        "clinical_status": "**Clinical Status:** Stable on room air; experiencing rectal bleeding and chest discomfort.",
        "comorbids": "**Comorbids:** Diabetes Mellitus, Hyperlipidemia.",
        "complaints_and_events": "**Complaints and Events:** Breathlessness, chest pain, and blood in stool for two days.",
        "disposition_plan": "**Disposition Plan:** Follow-up in one week.",
        "escalation_instructions": "**Escalation Instructions:** Alert the physician for worsening symptoms or a significant hemoglobin drop.",
        "plan": "**Plan:** Monitor hemoglobin, continue current medication, add a stool softener, and repeat blood tests.",
        "systemic_examination": "**Systemic Examination:** Lungs are clear bilaterally.",
        "vitals": "**Vitals:** BP 130/80 mmHg, HR 82 bpm, SpO2 98% on room air."
      },
      "doctor_id": "155",
      "practitioner_id": "carescribe_simmer11_dr002"
    },
    "123158": {
      "created_at": "2026-07-23T13:48:05.815282+05:30",
      "updated_at": "2026-07-23T13:48:05.815282+05:30",
      "interaction_type": "raw_description",
      "answer": {
        "assessment": "**Assessment:** Mild cellulitis of the right foot; post-kidney transplant status; diabetes and hypertension.",
        "clinical_context": "**Clinical Context:** Patient is 12 days post-kidney transplant.",
        "clinical_status": "**Clinical Status:** Stable, ambulatory, and blood sugar controlled with insulin.",
        "comorbids": "**Comorbids:** Kidney transplant recipient; Diabetes Mellitus; Hypertension.",
        "complaints_and_events": "**Complaints and Events:** Mild right-foot swelling and discharge.",
        "disposition_plan": "",
        "escalation_instructions": "**Escalation Instructions:** Return for review in three days.",
        "plan": "**Plan:** Medication, wound care, leg elevation, and follow-up in three days.",
        "systemic_examination": "**Systemic Examination:** Mild swelling and cellulitis of the right foot.",
        "vitals": ""
      },
      "doctor_id": "155",
      "practitioner_id": "carescribe_simmer11_dr002"
    }
  }
}

nurse_notes Request

{
  "hospital_id": "carescribe-simmer-001",
  "hospital_inpatient_id": "IN-SIM11-202607-00001",
  "caregiver_id": "carescribe_simmer11_ns_001",
  "form_name": "nurse_notes"
}

nurse_notes Response

The notes array can contain multiple interaction entries keyed by interaction ID. The example below shows representative entries from the supplied response.

{
  "status": "success",
  "patient_id": "SIM11-202607-00001",
  "inpatient_id": "IN-SIM11-202607-00001",
  "nurse_id": "240",
  "casesheet": false,
  "question_text": "Generate Nurse Notes",
  "notes": [
    {
      "notes": {
        "122527": {
          "created_at": "2026-07-20T16:07:39.542613+05:30",
          "updated_at": "2026-07-20T16:07:39.542613+05:30",
          "interaction_type": "initial_assessment",
          "answer": "**Assessment:** Patient admitted through OPD for surgery evaluation. Vitals and pain were assessed.\n\n**Interventions:** Administered IV paracetamol 1 g at 11:45 AM.\n\n**Patient Response:** Pain score reduced from 7 to 5 after 30 minutes.",
          "nurse_id": "240",
          "caregiver_id": "carescribe_simmer11_ns_001"
        },
        "123253": {
          "created_at": "2026-07-23T17:28:53.886011+05:30",
          "updated_at": "2026-07-23T17:28:53.886011+05:30",
          "interaction_type": "handover",
          "answer": "**Patient Status:** Stable.\n\n**Pending Tasks:** Transfer to OT.\n\n**Special Instructions:** Maintain NPO status.",
          "nurse_id": "240",
          "handovered_nurse": [],
          "caregiver_id": "carescribe_simmer11_ns_001"
        }
      },
      "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": "Foley catheter inserted using aseptic technique and connected to a urinary bag.",
        "care_of_invasive_lines": "CVC and peripheral IV care performed, including dressing changes, patency checks, site monitoring, and central line removal.",
        "position_change_and_back_care": null,
        "wound_dressing": null,
        "tracheostomy_care": null
      }
    }
  ],
  "handover_interactions": [
    {
      "interaction_id": "123253",
      "created_at": "2026-07-23T17:28:53.886011+05:30",
      "updated_at": "2026-07-23T17:28:53.886011+05:30",
      "handovered_nurse": []
    }
  ],
  "pain_graph": [
    {
      "pain_score": "7",
      "time": "04:07 PM",
      "date": "20-07-2026"
    },
    {
      "pain_score": "2",
      "time": "04:47 PM",
      "date": "20-07-2026"
    }
  ],
  "caregiver_id": "carescribe_simmer11_ns_001"
}

IPD_VITALS Request

{
  "hospital_id": "carescribe-simmer-001",
  "hospital_inpatient_id": "IN-SIM11-202607-00001",
  "caregiver_id": "carescribe_simmer11_ns_001",
  "form_name": "IPD_VITALS"
}

IPD_VITALS Response

{
  "patient_id": "SIM11-202607-00001",
  "inpatient_id": "IN-SIM11-202607-00001",
  "structured_data": {
    "IPD_VITALS": [
      {
        "date": "23/07/2026",
        "noOfDays": "",
        "daysPostOp": "",
        "time": "02:26 PM",
        "pulse": null,
        "temperature": null,
        "respiration": null,
        "blood_pressure": null,
        "blood_sugar": null,
        "spo2": null,
        "interaction_id": "123169"
      },
      {
        "date": "23/07/2026",
        "noOfDays": "",
        "daysPostOp": "",
        "time": "02:14 PM",
        "pulse": null,
        "temperature": "fever",
        "respiration": null,
        "blood_pressure": null,
        "blood_sugar": null,
        "spo2": null,
        "interaction_id": "123166"
      },
      {
        "date": "23/07/2026",
        "noOfDays": "",
        "daysPostOp": "",
        "time": "01:48 PM",
        "pulse": null,
        "temperature": null,
        "respiration": null,
        "blood_pressure": null,
        "blood_sugar": null,
        "spo2": null,
        "interaction_id": "123160"
      },
      {
        "date": "20/07/2026",
        "noOfDays": "",
        "daysPostOp": "",
        "time": "06:15 PM",
        "pulse": "",
        "temperature": "",
        "respiration": "",
        "blood_pressure": "",
        "blood_sugar": "",
        "spo2": "",
        "interaction_id": "122547"
      },
      {
        "date": "20/07/2026",
        "noOfDays": "",
        "daysPostOp": "",
        "time": "05:50 PM",
        "pulse": null,
        "temperature": null,
        "respiration": null,
        "blood_pressure": null,
        "blood_sugar": "120",
        "spo2": null,
        "interaction_id": "122538"
      },
      {
        "date": "20/07/2026",
        "noOfDays": "",
        "daysPostOp": "",
        "time": "05:36 PM",
        "pulse": "",
        "temperature": "",
        "respiration": "",
        "blood_pressure": "",
        "blood_sugar": "",
        "spo2": "",
        "interaction_id": "122536"
      },
      {
        "date": "20/07/2026",
        "noOfDays": "",
        "daysPostOp": "",
        "time": "05:14 PM",
        "pulse": null,
        "temperature": null,
        "respiration": null,
        "blood_pressure": null,
        "blood_sugar": null,
        "spo2": null,
        "interaction_id": "122534"
      },
      {
        "date": "20/07/2026",
        "noOfDays": "",
        "daysPostOp": "",
        "time": "04:47 PM",
        "pulse": "",
        "temperature": "",
        "respiration": "",
        "blood_pressure": "",
        "blood_sugar": "",
        "spo2": "",
        "interaction_id": "122532"
      },
      {
        "date": "20/07/2026",
        "noOfDays": "",
        "daysPostOp": "",
        "time": "04:07 PM",
        "pulse": "88 bpm",
        "temperature": "99.2°F",
        "respiration": "18 breaths/min",
        "blood_pressure": "118/76 mmHg",
        "blood_sugar": "",
        "spo2": "99%",
        "interaction_id": "122527"
      }
    ]
  }
}

IPD_INTAKE_OUTTAKE Request

{
  "hospital_id": "carescribe-simmer-001",
  "hospital_inpatient_id": "IN-SIM11-202607-00001",
  "caregiver_id": "carescribe_simmer11_ns_001",
  "form_name": "IPD_INTAKE_OUTTAKE"
}

IPD_INTAKE_OUTTAKE Response

{
  "patient_id": "SIM11-202607-00001",
  "inpatient_id": "IN-SIM11-202607-00001",
  "structured_data": {
    "IPD_INTAKE_OUTTAKE": [
      {
        "note_time": "02:26 PM 23/07/2026",
        "intake": [],
        "output": [],
        "intake_description": "",
        "output_description": "",
        "infusion_fluids_ml": 0,
        "intake_total_ml": 0,
        "output_total_ml": 0,
        "balance_ml": 0,
        "interaction_id": "123169"
      },
      {
        "note_time": "02:14 PM 23/07/2026",
        "intake": [],
        "output": [],
        "intake_description": "",
        "output_description": "",
        "infusion_fluids_ml": 0,
        "intake_total_ml": 0,
        "output_total_ml": 0,
        "balance_ml": 0,
        "interaction_id": "123166"
      },
      {
        "note_time": "01:56 PM 23/07/2026",
        "intake": [],
        "output": [],
        "intake_description": "",
        "output_description": "",
        "infusion_fluids_ml": 0,
        "intake_total_ml": 0,
        "output_total_ml": 0,
        "balance_ml": 0,
        "interaction_id": "123163"
      },
      {
        "note_time": "01:48 PM 23/07/2026",
        "intake": [],
        "output": [],
        "intake_description": "",
        "output_description": "",
        "infusion_fluids_ml": 0,
        "intake_total_ml": 0,
        "output_total_ml": 0,
        "balance_ml": 0,
        "interaction_id": "123160"
      },
      {
        "note_time": "05:50 PM 20/07/2026",
        "intake": [],
        "output": [],
        "intake_description": "",
        "output_description": "",
        "infusion_fluids_ml": 0,
        "intake_total_ml": 0,
        "output_total_ml": 0,
        "balance_ml": 0,
        "interaction_id": "122538"
      },
      {
        "note_time": "05:24 PM 20/07/2026",
        "intake": [
          {
            "oral_rt": null,
            "oral_rt_quantity_ml": null,
            "parenteral": "Injection PCM",
            "parenteral_quantity_ml": 100
          },
          {
            "oral_rt": null,
            "oral_rt_quantity_ml": null,
            "parenteral": "Injection Metronidazole",
            "parenteral_quantity_ml": 100
          },
          {
            "oral_rt": "Water",
            "oral_rt_quantity_ml": 600,
            "parenteral": null,
            "parenteral_quantity_ml": null
          },
          {
            "oral_rt": "Tea",
            "oral_rt_quantity_ml": 250,
            "parenteral": null,
            "parenteral_quantity_ml": null
          },
          {
            "oral_rt": "Coconut water",
            "oral_rt_quantity_ml": 100,
            "parenteral": null,
            "parenteral_quantity_ml": null
          },
          {
            "oral_rt": "Water (evening)",
            "oral_rt_quantity_ml": 300,
            "parenteral": null,
            "parenteral_quantity_ml": null
          }
        ],
        "output": [
          {
            "drainage_ml": null,
            "ryles_aspiration_ml": null,
            "urine_ml": 950,
            "vomitus_bowels_ml": 250
          }
        ],
        "intake_description": "Injection PCM 100ml; Injection Metronidazole 100ml; Water 600ml; Tea 250ml; Coconut water 100ml; Water (evening) 300ml",
        "output_description": "Urine 950ml; Vomitus/Bowels 250ml",
        "infusion_fluids_ml": 200,
        "intake_total_ml": 1450,
        "output_total_ml": 1200,
        "balance_ml": 250,
        "interaction_id": "122535"
      },
      {
        "note_time": "05:14 PM 20/07/2026",
        "intake": [],
        "output": [],
        "intake_description": "",
        "output_description": "",
        "infusion_fluids_ml": 0,
        "intake_total_ml": 0,
        "output_total_ml": 0,
        "balance_ml": 0,
        "interaction_id": "122534"
      },
      {
        "note_time": "04:37 PM 20/07/2026",
        "intake": [],
        "output": [],
        "intake_description": "",
        "output_description": "",
        "infusion_fluids_ml": 0,
        "intake_total_ml": 0,
        "output_total_ml": 0,
        "balance_ml": 0,
        "interaction_id": "122531"
      }
    ]
  }
}

case_sheet Request

{
  "hospital_id": "carescribe-simmer-001",
  "hospital_inpatient_id": "IN-SIM11-202607-00001",
  "practitioner_id": "carescribe_simmer11_dr002",
  "form_name": "case_sheet"
}

case_sheet Response

The case sheet aggregates doctor and nurse assessments, surgery notes, counselling, IPD charts, medications, progress notes, care plans, glucose monitoring, and anaesthesia forms. The example below shows representative records while preserving every top-level response section.

{
  "patient_id": "SIM11-202607-00001",
  "inpatient_id": "IN-SIM11-202607-00001",
  "doctor_initial_assessment": {
    "interaction_id": "123164",
    "time_stamp": "2026-07-23T08:27:08.000Z",
    "doctor_id": 155,
    "nurse_id": null,
    "interaction_detail_type": "initial_assessment",
    "attachment_url": "gs://medscribe-dev/webm_files/initial_assessment/example.txt",
    "response": {
      "response": {
        "chief_complaints": "Fever, tiredness",
        "history_of_present_illness": "Patient presents with fever and tiredness.",
        "provisional_diagnosis": "Fever, Dehydration",
        "plan_of_care": "IV fluids and medication administered.",
        "medication_templates": []
      },
      "assessment": null,
      "additional_response": null
    },
    "practitioner_id": "carescribe_simmer11_dr002"
  },
  "nurse_initial_assessment": {
    "interaction_id": "122527",
    "time_stamp": "2026-07-20T10:37:39.000Z",
    "doctor_id": null,
    "nurse_id": 240,
    "interaction_detail_type": "initial_assessment",
    "response": {
      "basicInformation": {
        "how_admitted": "walking",
        "mother_tongue": "Tamil",
        "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%"
          }
        ]
      },
      "painAssessment": {
        "numericalPainScore": 7,
        "wongBakerPainScore": 0,
        "interventions": []
      }
    },
    "caregiver_id": "carescribe_simmer11_ns_001"
  },
  "gynec_initial_assessment": {},
  "surgery_notes": {
    "123277": {
      "interaction_id": "123277",
      "doctor_id": 155,
      "interaction_detail_type": "surgery_notes",
      "response": {
        "pre_operative_diagnosis": "Abnormal uterine bleeding with symptomatic uterine fibroid",
        "name_of_operation": "Total laparoscopic hysterectomy",
        "postoperative_condition": "Patient stable and shifted to recovery."
      },
      "practitioner_id": "carescribe_simmer11_dr002"
    }
  },
  "counselling": {
    "interaction_id": "123529",
    "doctor_id": 155,
    "interaction_detail_type": "counselling",
    "response": {
      "interaction_id": "123529",
      "patient_id": "SIM11-202607-00001",
      "payload": "Diagnosis, recommended procedure, preoperative plan, postoperative care, and cost discussion."
    },
    "practitioner_id": "carescribe_simmer11_dr002"
  },
  "ipd_data": {
    "patient_id": "SIM11-202607-00001",
    "inpatient_id": "IN-SIM11-202607-00001",
    "structured_data": {
      "IPD_VITALS": [],
      "IPD_INTAKE_OUTTAKE": [],
      "IPD_CAUTI_BUNDLE": []
    }
  },
  "drug_chart": {
    "patient_id": "SIM11-202607-00001",
    "inpatient_id": "IN-SIM11-202607-00001",
    "merged_schema": {}
  },
  "progress_notes": {},
  "nurse_notes": {},
  "nurse_care_plan": {
    "created_at": "2026-07-23 03.46PM",
    "response": {
      "care_plan": "{\"care_plan\":[]}"
    },
    "is_approved": false
  },
  "blood_glucose_monitoring_chart": {
    "structured_data": {
      "IPD_BLOOD_GLUCOSE_MONITORING": [
        {
          "date": "20/07/2026",
          "entries": [
            {
              "time": "05:50 PM",
              "blood_sugar": "120 mg/dl",
              "nurse_id": "240",
              "interaction_id": "122538",
              "caregiver_id": "carescribe_simmer11_ns_001"
            }
          ]
        }
      ]
    }
  },
  "anaesthesia_forms": {
    "pre_anaesthetic_evaluation_form": {},
    "anaesthesia_preoperative_reevaluation_form": {},
    "post_anaesthesia_care_form": {},
    "anaesthesia_record_form": {}
  }
}

cauti_bundle Request

{
  "hospital_id": "carescribe-simmer-001",
  "hospital_inpatient_id": "IN-SIM11-202607-00001",
  "caregiver_id": "carescribe_simmer11_ns_001",
  "form_name": "cauti_bundle"
}

cauti_bundle Response

{
  "patient_id": "SIM11-202607-00001",
  "inpatient_id": "IN-SIM11-202607-00001",
  "structured_data": {
    "IPD_CAUTI_BUNDLE": [
      {
        "interaction_id": "123207",
        "note_time": "03:46 PM 23/07/2026",
        "timestamp": "2026-07-23T10:16:46.162286+00:00",
        "nurse_id": 240,
        "cauti_bundle": {
          "insertion_checklist_form": {
            "diagnosis": "",
            "catheter_details": {
              "type_of_catheter": "foley",
              "type_options": {
                "foley": true,
                "suprapubic": false,
                "other": ""
              },
              "size": "",
              "date_time_of_insertion": "23/07/2026 03:46 PM"
            },
            "indication_for_catheter": {
              "acute_urinary_retention": false,
              "accurate_urine_output_monitoring_critically_ill": false,
              "perioperative_use": false,
              "pressure_ulcer_management": false,
              "other": "lower abdominal pain"
            },
            "insertion_bundle_checklist": {
              "patient_identity_confirmed": false,
              "informed_consent_obtained": false,
              "hand_hygiene_performed": true,
              "sterile_gloves_ppe_used": true,
              "perineal_area_cleaned": true,
              "aseptic_technique_maintained": true,
              "sterile_catheter_used": false,
              "closed_drainage_system_maintained": false,
              "catheter_secured_properly": false,
              "drainage_bag_below_bladder_level": false,
              "no_kinks_obstruction_in_tubing": false
            },
            "post_insertion_care": {
              "urine_flow_confirmed": false,
              "patient_comfortable": false
            },
            "signatures": {
              "inserted_by": 240,
              "verified_by": "Arun"
            }
          },
          "daily_maintenance_checklist_form": {
            "assessments": []
          },
          "removal_checklist_form": {},
          "summary_form": {},
          "is_form_completed": false,
          "form_completed_date_time": ""
        },
        "caregiver_id": "carescribe_simmer11_ns_001"
      }
    ]
  }
}

CLABSI Bundle Response

{
  "patient_id": "GEN9-202605-00191",
  "inpatient_id": "IN-GEN9-202605-00056",
  "structured_data": {
    "IPD_CLABSI_BUNDLE": [
      {
        "interaction_id": "116320",
        "caregiver_id": "CG-72",
        "central_line_insertion": {},
        "clabsi_bundle_compliance": {},
        "daily_maintenance": []
      }
    ]
  }
}

Vascular Bundle Response

{
  "patient_id": "GUN8-202605-00012",
  "inpatient_id": "IN-GUN8-202605-00002",
  "structured_data": {
    "IPD_VASCULAR_BUNDLE": [
      {
        "interaction_id": "116791",
        "caregiver_id": "CG-122",
        "vascular_bundle": {
          "insertion_checklist_form": {},
          "daily_maintenance_checklist_form": {},
          "vad_removal_checklist_form": {},
          "complication_report_form": {}
        }
      }
    ]
  }
}

Errors

  • 400: {"message": "Missing required field(s): hospital_id, hospital_inpatient_id, form_name"}
  • 400: {"message": "Either practitioner_id or caregiver_id is required"}
  • 400: Form-specific clinician ID, interaction ID, or data is missing.
  • 400: Unknown form name. The response includes message and an allowed array.
  • 404: Hospital, inpatient, clinician, stored note, or delegated resource was not found.
  • 503: {"message": "CHATBOT_URL is not configured"} for generated doctor/nurse notes.
  • 500: {"message": "Failed to process IPD form request", "error": "Error details"}
GET /software/get-all-ipd-notes-grouped-by-date

Summary: Get All IPD Notes Grouped By Date

Description: Fetches IPD notes grouped by date for a given patient and inpatient record. Categories must be passed exactly as shown: IPD_PERIPHERAL_CHART, IPD_INTAKE_OUTTAKE, IPD_VITALS. If an incorrect category is provided, the API may return an empty response.

Query parameters

- hospital_id (required) — Unique hospital identifier. Example: "9"
- patient_id (optional) — Patient identifier. Example: "GEN9-202509-00435"
- inpatient_id (required) — Inpatient identifier. Example: "IN-GEN9-202509-00034"
- categories (optional) — One of: IPD_PERIPHERAL_CHART, IPD_INTAKE_OUTTAKE, IPD_VITALS. Example: "IPD_VITALS"

Response 200 — Successfully fetched IPD notes grouped by date

{
  "patient_id": "GEN9-202509-00435",
  "inpatient_id": "IN-GEN9-202509-00034",
  "structured_data": {
    "IPD_VITALS": [
      {
        "date": "23/02/2026",
        "noOfDays": "",
        "daysPostOp": "",
        "time": "01:25 PM",
        "pulse": null,
        "temperature": null,
        "respiration": null,
        "blood_pressure": null,
        "blood_sugar": null,
        "spo2": null,
        "interaction_id": "106804"
      }
    ]
  }
}

Errors

  • 400: { "message": "hospital_id and inpatient_id query parameters are required" }
  • 404: { "message": "Invalid hospital_id" }
  • 502: { "message": "Failed to fetch from chat service", "details": {} }
  • 500: { "message": "Internal server error" }
POST /software/api/ipd/discharge-summary

Summary: Generate IPD Discharge Summary

Description: Generates a discharge summary for an IPD patient. Body fields hospital_id, patient_id, and hospital_inpatient_id are required. The internal inpatient record and latest interaction are resolved automatically. Supply either practitioner_id or caregiver_id.

Request (POST to gateway)

{
  "hospital_id": "9",
  "patient_id": "GEN9-202509-00299",
  "hospital_inpatient_id": "IN-GEN9-202509-00025",
  "practitioner_id": "9871"
}

Response 200 — Discharge summary generated successfully

{
  "success": true,
  "message": "Discharge summary generated successfully",
  "data": "data: event: status\r\ndata: data: {\"status\": \"discharge_summary_generation_started\", \"patient_id\": \"GEN9-202509-00299\", \"inpatient_id\": \"IN-GEN9-202509-00025\", \"user_id\": \"206\", \"interaction_id\": \"107225\"}\r\ndata: \r\ndata: \r\n\r\ndata: event: status\r\ndata: data: {\"status\": \"processing\", \"patient_id\": \"GEN9-202509-00299\", \"inpatient_id\": \"IN-GEN9-202509-00025\", \"user_id\": \"206\", \"interaction_id\": \"107225\"}\r\ndata: \r\ndata: \r\n\r\n...long stream...\r\n\r\ndata: event: completed\r\ndata: data: {\"discharge_summary\": {\"diagnosis\": \"Abnormal uterine bleeding; Complicated fibroid\", \"procedure\": \"\", \"reason_for_admission\": \"Patient reports profuse bleeding per vaginal during menstrual cycle for two years. Patient has back pain on and off, and currently presents with mild pain in the abdomen.\", ... }, \"user_id\": \"206\", \"interaction_id\": \"107225\"}\r\ndata: \r\n"
}

Errors

GET /software/api/ipd/case-sheet

Summary: Get IPD Case Sheet

Description: Fetches the case sheet for a given IPD patient. Required query parameters are hospital_id, patient_id, and inpatient_id. Optional query parameters are practitioner_id, caregiver_id, and force_regenerate.

Response 200 — Case sheet fetched successfully

{
  "patient_id": "c7f71411-fe49-4c43-852d-61db953fa0c4",
  "inpatient_id": "INP-newmereal-PAT-0011",
  "doctor_initial_assessment": {},
  "nurse_initial_assessment": {},
  "surgery_notes": {},
  "counselling": {},
  "ipd_data": {
    "patient_id": "c7f71411-fe49-4c43-852d-61db953fa0c4",
    "inpatient_id": "INP-newmereal-PAT-0011",
    "structured_data": {}
  },
  "drug_chart": { ... },
  "progress_notes": { ... },
  "nurse_notes": { ... },
  "nurse_care_plan": {},
  "blood_glucose_monitoring_chart": { "structured_data": { "IPD_BLOOD_GLUCOSE_MONITORING": [] } },
  "anaesthesia_forms": { ... }
}

Errors

GET /software/get-drug-chart

Summary: Get Drug Chart

Description: Fetches the drug chart details for a given IPD patient using hospital_id , inpatient_id and patient_id.

Current Response 200 — Drug chart fetched successfully

This current response includes patient measurements, allergies, medication orders, administration history, reconciliation data, record totals, and execution time.

{
  "patient_id": "SIM11-202607-00001",
  "inpatient_id": "IN-SIM11-202607-00001",
  "height_cm": 162,
  "weight_kg": 56,
  "special_diet": "Soft diet",
  "blood_group": "",
  "merged_schema": {
    "prescription_data": {
      "allergies": {
        "has_known_allergies": true,
        "allergies": [
          {
            "substance": "Curd",
            "reaction": "",
            "severity": null,
            "recorded_at": "2026-07-20T11:44:18.481269",
            "recorded_by": "",
            "source": "nurse"
          }
        ]
      },
      "once_only_drugs": [],
      "oral_anticoagulation": [],
      "thromboprophylaxis": [],
      "antiplatelet": [],
      "drug_chart": [
        {
          "medication_name": "PARACETAMOL 100MG (DORA 30ML DROPS DROPS)",
          "dosage": "",
          "route": "",
          "frequency": "BD",
          "status": "active",
          "start_date": "2026-07-20",
          "administration_times": [],
          "prescription_type": "regular",
          "additional_information": "Morning and night for 5 days",
          "created_at": "2026-08-25T13:54:43.937781",
          "prescribed_by": "240",
          "is_stat": false,
          "is_once_only": false,
          "is_sos": false,
          "administered": [
            {
              "administered_by_nurse_id": "240",
              "administered_time": "2026-07-20T11:44:18.481582",
              "status": "given"
            }
          ],
          "actual_medication_name": "Paracetamol",
          "brand_name": "DORA 30ML DROPS DROPS",
          "generic_name": "PARACETAMOL 100MG",
          "auto_correct": false,
          "med_from_llm": false,
          "medication_type": "drop",
          "drug_name": "PARACETAMOL 100MG (DORA 30ML DROPS DROPS)"
        }
      ],
      "prn_drugs": [],
      "infusions": [],
      "iv_fluids": [],
      "oxygen": [],
      "administrations": [
        {
          "drug_name": "Nexpro DSR",
          "scheduled_time": null,
          "administered_time": "2026-07-20T11:44:18.481582",
          "administered_by": "nurse",
          "doctor_id": "",
          "nurse_id": "240",
          "status": "given",
          "notes": "",
          "prescribed_by": "240",
          "caregiver_id": "carescribe_simmer11_ns_001"
        }
      ],
      "medication_reconciliation": {
        "previous_medications": [
          {
            "drug_name": "METFORMIN 500MG (GLYCOMET 500MG TABLET)",
            "dose": "500mg",
            "route": "oral",
            "frequency": "twice daily",
            "disposition": "continued",
            "is_antiplatelet": false,
            "interaction_id": ""
          }
        ],
        "past_long_term_medications": [
          {
            "medication_name": "METFORMIN 500MG (GLYCOMET 500MG TABLET)",
            "dosage": "500mg",
            "route": "oral",
            "frequency": "twice daily",
            "continue_medication": true,
            "notes": "Previous medication",
            "actual_medication_name": "Metformin",
            "brand_name": "GLYCOMET 500MG TABLET",
            "generic_name": "METFORMIN 500MG",
            "medication_type": "tablet"
          }
        ]
      }
    },
    "total_records": {
      "drug_chart": 5,
      "once_only_drugs": 0,
      "oral_anticoagulation": 0,
      "thromboprophylaxis": 0,
      "antiplatelet": 0,
      "prn_drugs": 0,
      "infusions": 0,
      "iv_fluids": 0,
      "oxygen": 0,
      "administered": 7
    }
  },
  "execution_time_seconds": 2.247
}

Legacy Response Example

{
    "patient_id": "GEN9-202601-00106",
    "inpatient_id": "IN-GEN9-202601-00013",
    "merged_schema": {
      "prescription_data": {
        "allergies": {
          "has_known_allergies": false,
          "allergies": []
        },
        "once_only_drugs": [
          {
            "dosage": "8 mg",
            "dosage_time": [
              "12:25 PM"
            ],
            "duration": "stat",
            "frequency_afternoon": [
              {
                "frequency": "1",
                "status": "Pending"
              }
            ],
            "frequency_evening": [],
            "frequency_morning": [],
            "frequency_night": [],
            "instructions": "stat",
            "med_status": "continue",
            "medication_name": "(EMESET 8MG INJECTION)",
            "medication_type": "Injection",
            "route": "IV",
            "scheduled_date": "2026-01-23",
            "created_at": "2026-01-23T08:06:49.416405"
          },
          {
            "dosage": "40 mg",
            "dosage_time": [
              "12:25 PM"
            ],
            "duration": "stat",
            "frequency_afternoon": [
              {
                "frequency": "1",
                "status": "Pending"
              }
            ],
            "frequency_evening": [],
            "frequency_morning": [],
            "frequency_night": [],
            "instructions": "stat",
            "med_status": "continue",
            "medication_name": "(PAN 40MG INJECTION)",
            "medication_type": "Injection",
            "route": "IV",
            "scheduled_date": "2026-01-23",
            "created_at": "2026-01-23T08:06:49.416405"
          },
          {
            "dosage": "0.5 cc",
            "dosage_time": [
              "12:25 PM"
            ],
            "duration": "stat",
            "frequency_afternoon": [
              {
                "frequency": "1",
                "status": "Pending"
              }
            ],
            "frequency_evening": [],
            "frequency_morning": [],
            "frequency_night": [],
            "instructions": "stat",
            "med_status": "continue",
            "medication_name": "(TT 0.5 CC INJECTION)",
            "medication_type": "Injection",
            "route": "IM",
            "scheduled_date": "2026-01-23",
            "created_at": "2026-01-23T08:06:49.416405"
          },
          {
            "dosage": "0.1 cc",
            "dosage_time": [
              "12:25 PM"
            ],
            "duration": "stat",
            "frequency_afternoon": [
              {
                "frequency": "1",
                "status": "Pending"
              }
            ],
            "frequency_evening": [],
            "frequency_morning": [],
            "frequency_night": [],
            "instructions": "stat",
            "med_status": "continue",
            "medication_name": "(XYLO 0.1 CC INJECTION)",
            "medication_type": "Injection",
            "route": "ID",
            "scheduled_date": "2026-01-23",
            "created_at": "2026-01-23T08:06:49.416405"
          },
          {
            "dosage": "1 gram",
            "dosage_time": [
              "12:25 PM"
            ],
            "duration": "stat",
            "frequency_afternoon": [
              {
                "frequency": "1",
                "status": "Pending"
              }
            ],
            "frequency_evening": [],
            "frequency_morning": [],
            "frequency_night": [],
            "instructions": "stat",
            "med_status": "continue",
            "medication_name": "(ZONE 1 GRAM INJECTION)",
            "medication_type": "Injection",
            "route": "IV",
            "scheduled_date": "2026-01-23",
            "created_at": "2026-01-23T08:06:49.416405"
          }
        ],
        "oral_anticoagulation": [],
        "thromboprophylaxis": [],
        "antiplatelet": [],
        "drug_chart": [
          {
            "dosage": "35 mg",
            "dosage_time": [
              "6:00 AM",
              "6:00 PM"
            ],
            "duration": "for 5 days",
            "frequency_afternoon": [],
            "frequency_evening": [],
            "frequency_morning": [
              {
                "frequency": "1",
                "status": "Pending"
              }
            ],
            "frequency_night": [
              {
                "frequency": "1",
                "status": "Pending"
              }
            ],
            "instructions": "morning one, evening one",
            "med_status": "continue",
            "medication_name": "(AZILERT 35MG TABLET)",
            "medication_type": "Tablet",
            "route": "Oral",
            "scheduled_date": "2026-01-23",
            "created_at": "2026-01-23T12:10:44.980616",
            "nurse_administrations": []
          }
        ],
        "prn_drugs": [],
        "infusions": [],
        "iv_fluids": [],
        "oxygen": [],
        "administrations": [],
        "medication_reconciliation": null
      },
      "total_records": {
        "drug_chart": 1,
        "once_only_drugs": 5,
        "oral_anticoagulation": 0,
        "thromboprophylaxis": 0,
        "antiplatelet": 0,
        "prn_drugs": 0,
        "infusions": 0,
        "oxygen": 0
      }
    }
  }
  

Errors

GET /software/blood-glucose-monitoring-chart

Summary: Get Blood Glucose Monitoring Chart

Description: Fetches blood glucose monitoring chart data for a given IPD patient using hospital_id, inpatient_id, and patient_id.

Response 200 — Blood glucose monitoring chart fetched successfully

{
  "patient_id": "GEN9-202602-00090",
  "inpatient_id": "IN-GEN9-202602-00038",
  "structured_data": {
    "IPD_BLOOD_GLUCOSE_MONITORING": [
      {
        "date": "12/02/2026",
        "entries": [
          {
            "date": "12/02/2026",
            "time": "11:23 AM",
            "blood_sugar": "192 mg/dl",
            "medication": "",
            "nurse_id": "72",
            "doctor_id": "",
            "interaction_id": "106046"
          },
          {
            "date": "12/02/2026",
            "time": "11:25 AM",
            "blood_sugar": "high mg/dL",
            "medication": "PARACETAMOL (500MG) (CALPOL 500 MG TABLETS)",
            "nurse_id": " ",
            "doctor_id": "142",
            "interaction_id": "106049"
          },
          {
            "date": "12/02/2026",
            "time": "02:03 PM",
            "blood_sugar": "192 mg/dl",
            "medication": "",
            "nurse_id": " ",
            "doctor_id": "142",
            "interaction_id": "106098"
          },
          {
            "date": "12/02/2026",
            "time": "02:04 PM",
            "blood_sugar": "192 mg/dl",
            "medication": "Human Actrapid",
            "nurse_id": "72",
            "doctor_id": "",
            "interaction_id": "106099"
          },
          {
            "date": "12/02/2026",
            "time": "02:20 PM",
            "blood_sugar": "182 mg/dl",
            "medication": "",
            "nurse_id": "72",
            "doctor_id": "",
            "interaction_id": "106101"
          },
          {
            "date": "12/02/2026",
            "time": "02:22 PM",
            "blood_sugar": "182 mg/dl",
            "medication": "Human Actrapid",
            "nurse_id": "72",
            "doctor_id": "",
            "interaction_id": "106102"
          }
        ],
        "total": "",
        "remarks": ""
      },
      {
        "creatinine_level": "",
        "consent_for_insulin": false
      }
    ]
  }
}

Errors

POST /software/interactionDetail/update/botResponse

Summary: Update Bot Response and Trigger Ingestion

Description: Updates interaction detail content (edited bot response), uploads it to storage, and triggers ingestion processing. Required query param: hospital_id. Required body fields: interaction_id, interaction_detail_type, ingestionType, content.

Example request (gateway URL)


{
  "content": {
    "basicInformation": {},
    "nutritionalAssessment": {
      "diet": {},
      "fluidsMonitoring": {},
      "mucousMembranes": {},
      "skinTurgor": {},
      "recentWeightChanges": true
    },
    "painAssessment": {
      "numericalPainScore": 2,
      "wongBakerPainScore": 4,
      "interventions": []
    }
  },
  "interaction_id": 112174,
  "interaction_detail_type": "initial_assessment",
  "ingestionType": "initial_assessment",
  "attachment_url": "",
  "role": "nurse"
}

Response 200 — Interaction updated and ingested successfully

{
  "status": true,
  "message": "Interaction details created and ingested successfully",
  "interaction_id": 112174,
  "uploadedUrls": "gs://medscribe-dev/webm_files/edited_initial_assessment/112174_679e4e09-1b17-4c5e-9c34-21bed611a9ef.txt",
  "pdfingestIntraction": {
    "patient_id": "GEN9-202509-00439",
    "interaction_date": "2026-04-15T05:53:38.000Z",
    "interaction_status": "0",
    "inpatient_id": "IN-GEN9-202509-00035",
    "interaction_id": 112174,
    "nurse_id": 72,
    "doctor_id": null,
    "InteractionDetails": [
      {
        "interaction_id": 112174,
        "interaction_detail_type": "edited_initial_assessment",
        "attachment_url": "gs://medscribe-dev/webm_files/edited_initial_assessment/112174_679e4e09-1b17-4c5e-9c34-21bed611a9ef.txt",
        "vitals": null,
        "detail_id": 79970,
        "processedFileContent": "{\n  \"basicInformation\": {},\n  \"nutritionalAssessment\": {\n    \"diet\": {},\n    \"fluidsMonitoring\": {},\n    \"mucousMembranes\": {},\n    \"skinTurgor\": {},\n    \"recentWeightChanges\": true\n  },\n  \"painAssessment\": {\n    \"numericalPainScore\": 2,\n    \"wongBakerPainScore\": 4,\n    \"interventions\": []\n  }\n}",
        "processedFileContentImage": null
      }
    ]
  }
}

Errors

PUT /software/api/ipd/update_nurse_notes

Summary: Update IPD Nurse Notes / Chat Data

This endpoint updates IPD nurse notes or doctor notes for a specific patient interaction. Although the operation is named update_nurse_notes, it accepts structured notes authored by either nurses or doctors. Provide the appropriate data payload and include practitioner_id or caregiver_id in upstream systems when required.

Required query parameters: hospital_id, patient_id, inpatient_id, and interaction_id.

The request body requires data, which may be a plain string, JSON string, object, or chart payload. Optional org_id must match the organization resolved from hospital_id; optional doctor_id and nurse_id are forwarded upstream.

Example request (gateway URL)


{
  "data": "**Assessment:** Patient is experiencing severe pain, described as somewhat unbearable.\n\n**Medical Administration:** **Paracetamol:** Administered "
}

Response 200 — IPD data updated successfully

{
    "IPD_VITALS": [],
    "IPD_INTAKE_OUTTAKE": [],
    "IPD_PERIPHERAL_CHART": [],
    "IPD_BLOOD_GLUCOSE_MONITORING": [],
    "IPD_CAUTI_BUNDLE": [],
    "IPD_CLABSI_BUNDLE": []
}

Errors

Login Types and Available Forms

IPD module responses are posted for two different login types:

Doctor Login

The following forms are available when a doctor logs in (in order):

  1. drug_chart - Drug Chart
  2. io_chart - I/O Chart (Intake/Output Chart)
  3. peripheral_chart - Peripheral Chart
  4. tpr_chart - TPR Chart (Temperature, Pulse, Respiration)
  5. discharge_summary - Discharge Summary
  6. progress_notes - Progress Notes
  7. doctor_initial_assessment - Doctor Initial Assessment
  8. surgery_notes - Surgery Notes

Nurse Login

The following forms are available when a nurse logs in (in order):

  1. drug_chart - Drug Chart
  2. io_chart - I/O Chart (Intake/Output Chart)
  3. peripheral_chart - Peripheral Chart
  4. tpr_chart - TPR Chart (Temperature, Pulse, Respiration)
  5. nurse_care_plan - Nurse Care Plan
  6. nurse_notes - Nurse Notes
  7. nurse_initial_assessment - Nurse Initial Assessment

Note: Some forms (drug_chart, io_chart, peripheral_chart, tpr_chart) are available to both doctors and nurses, while others are role-specific.

Doctor Login Forms

Drug Chart

formName: "drug_chart"

Complete Response Structure (Real Data Example)

{
  "status": "complete",
  "data": {
    "SessionId": "GEN9-202512-00286",
    "hospitalId": "9",
    "patientId": "GEN9-202512-00286",
    "OpId": "",
    "IpId": "95535",
    "type": "ipd",
    "formName": "drug_chart",
    "process": "drug_chart",
    "response": "{\"drug_chart\":[...],\"once_only_drugs\":[...],\"iv_infusion_therapy\":[]}",
    "medication_templates": [...],
    "additional_response": null,
    "status": "initial payload"
  }
}

Parsed Response Structure (Real Data Example)

{
  "drug_chart": [
    {
      "dosage": "",
      "dosage_time": ["6:00 AM", "12:00 PM", "6:00 PM"],
      "duration": "for 3 days",
      "frequency_afternoon": [],
      "frequency_evening": [
        {
          "frequency": "0",
          "status": "Pending"
        }
      ],
      "frequency_morning": [],
      "frequency_night": [
        {
          "frequency": "1",
          "status": "Pending"
        }
      ],
      "instructions": "Take three times a day for three days, after food. Take for three days without fail.",
      "medication_name": "AMOXYCILLIN  (500MG) +  CLAVULANIC ACID (125MG) (CLAVIFORD 625 MG TABLETS)",
      "medication_type": "",
      "route": "",
      "scheduled_date": "2025-12-08",
      "created_at": "2025-12-08T06:15:39.148516",
      "nurse_administrations": []
    },
    {
      "dosage": "",
      "dosage_time": ["6:00 AM", "12:00 PM", "6:00 PM"],
      "duration": "for 3 days",
      "frequency_afternoon": [
        {
          "frequency": "1",
          "status": "Pending"
        }
      ],
      "frequency_evening": [
        {
          "frequency": "1",
          "status": "Pending"
        }
      ],
      "frequency_morning": [
        {
          "frequency": "1",
          "status": "Pending"
        }
      ],
      "frequency_night": [],
      "instructions": "Take three times a day for three days, after food. Take for three days without fail.",
      "medication_name": "AMOXYCILLIN  (500MG) +  CLAVULANIC ACID (125MG) (CLAVIFORD 625 MG TABLETS)",
      "medication_type": "",
      "route": "",
      "scheduled_date": "2025-12-09",
      "created_at": "2025-12-08T06:15:39.148516",
      "nurse_administrations": []
    },
    {
      "dosage": "",
      "dosage_time": ["6:00 AM", "12:00 PM", "6:00 PM"],
      "duration": "for 3 days",
      "frequency_afternoon": [
        {
          "frequency": "1",
          "status": "Pending"
        }
      ],
      "frequency_evening": [
        {
          "frequency": "1",
          "status": "Pending"
        }
      ],
      "frequency_morning": [
        {
          "frequency": "1",
          "status": "Pending"
        }
      ],
      "frequency_night": [],
      "instructions": "Take three times a day for three days, after food. Take for three days without fail.",
      "medication_name": "AMOXYCILLIN  (500MG) +  CLAVULANIC ACID (125MG) (CLAVIFORD 625 MG TABLETS)",
      "medication_type": "",
      "route": "",
      "scheduled_date": "2025-12-10",
      "created_at": "2025-12-08T06:15:39.148516",
      "nurse_administrations": []
    }
  ],
  "once_only_drugs": [
    {
      "dosage": "",
      "dosage_time": [],
      "duration": "",
      "frequency_afternoon": [],
      "frequency_evening": [],
      "frequency_morning": [],
      "frequency_night": [
        {
          "frequency": "1",
          "status": "Pending"
        }
      ],
      "instructions": "Take once at night, after food.",
      "medication_name": "CETIRIZINE (10MG) (ALERID 10 MG TABLETS)",
      "medication_type": "",
      "route": "",
      "scheduled_date": "2025-12-08",
      "created_at": "2025-12-08T06:15:39.148516"
    }
  ],
  "iv_infusion_therapy": []
}

IO Chart (Intake/Output Chart)

formName: "io_chart"

Complete Response Structure (Real Data Example)

{
  "status": "complete",
  "data": {
    "SessionId": "GEN9-202508-00394",
    "hospitalId": "9",
    "patientId": "GEN9-202508-00394",
    "OpId": "",
    "IpId": "99661",
    "type": "ipd",
    "formName": "io_chart",
    "process": "io_chart",
    "response": "{\"IPD_INTAKE_OUTTAKE\":[...]}",
    "medication_templates": [],
    "additional_response": null,
    "status": "initial payload"
  }
}

Parsed Response Structure (Real Data Example)

{
  "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": "",
          "oral_rt_quantity_ml": 0,
          "parenteral": "Injection Metrogyl",
          "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
        },
        {
          "oral_rt": "Coconut water",
          "oral_rt_quantity_ml": 100,
          "parenteral": "",
          "parenteral_quantity_ml": 0
        },
        {
          "oral_rt": "Water",
          "oral_rt_quantity_ml": 300,
          "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; Coconut water 100ml; Water 300ml",
      "output_description": "Urine 1050ml; Vomitus/Bowels 250ml",
      "intake_total_ml": 1450,
      "output_total_ml": 1300,
      "balance_ml": 150,
      "interaction_id": "98254"
    },
    {
      "note_time": "12:56 PM 22/12/2025",
      "intake": [
        {
          "oral_rt": "",
          "oral_rt_quantity_ml": 0,
          "parenteral": "Injection TPN",
          "parenteral_quantity_ml": 100
        },
        {
          "oral_rt": "",
          "oral_rt_quantity_ml": 0,
          "parenteral": "Injection Metrogyl",
          "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
        },
        {
          "oral_rt": "Coconut water",
          "oral_rt_quantity_ml": 100,
          "parenteral": "",
          "parenteral_quantity_ml": 0
        },
        {
          "oral_rt": "Water",
          "oral_rt_quantity_ml": 300,
          "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; Coconut water 100ml; Water 300ml",
      "output_description": "Urine 1050ml; Vomitus/Bowels 250ml",
      "intake_total_ml": 1450,
      "output_total_ml": 1300,
      "balance_ml": 150,
      "interaction_id": "98252"
    }
  ]
}

Peripheral Chart

formName: "peripheral_chart"

Complete Response Structure (Real Data Example)

{
  "status": "complete",
  "data": {
    "SessionId": "GEN9-202512-00286",
    "hospitalId": "9",
    "patientId": "GEN9-202512-00286",
    "OpId": "",
    "IpId": "95535",
    "type": "ipd",
    "formName": "peripheral_chart",
    "process": "peripheral_chart",
    "response": "{\"IPD_PERIPHERAL_CHART\":[...]}",
    "medication_templates": [],
    "additional_response": null,
    "status": "initial payload"
  }
}

Parsed Response Structure (Real Data Example)

{
  "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 11:35 AM"
              }
            ],
            "line_removal_date": null,
            "line_removal_time": null
          }
        ],
        "notes_text": ""
      }
    }
  ]
}

TPR Chart (Temperature, Pulse, Respiration)

formName: "tpr_chart"

Complete Response Structure (Real Data Example)

{
  "status": "complete",
  "data": {
    "SessionId": "403a9674-1720-499e-ad46-0c0134f845d5",
    "hospitalId": "9",
    "patientId": "ragul001",
    "OpId": "",
    "IpId": "105739",
    "type": "ipd",
    "formName": "tpr_chart",
    "process": "tpr_chart",
    "response": "{\"IPD_VITALS\":[...]}",
    "medication_templates": [],
    "additional_response": null,
    "status": "initial payload"
  }
}

Parsed Response Structure (Real Data Example)

{
  "IPD_VITALS": [
    {
      "date": "2026-02-02",
      "noOfDays": "Day 68",
      "daysPostOp": "",
      "time": "11:30",
      "pulse": "",
      "temperature": "38 degrees Celsius",
      "respiration": "",
      "urine": "",
      "bath": "",
      "weight": "",
      "diet": "",
      "interaction_id": "104622",
      "blood_pressure": null,
      "blood_sugar": "99 mg/dl",
      "spo2": "91%"
    },
    {
      "date": "2026-02-02",
      "noOfDays": "Day 68",
      "daysPostOp": "",
      "time": "11:40",
      "pulse": "",
      "temperature": "39°C, 45°F",
      "respiration": "",
      "urine": "",
      "bath": "",
      "weight": "",
      "diet": "",
      "interaction_id": "104628",
      "blood_pressure": null,
      "blood_sugar": null,
      "spo2": "93%"
    },
    {
      "date": "2026-02-02",
      "noOfDays": "Day 68",
      "daysPostOp": "",
      "time": "11:41",
      "pulse": "120 bpm",
      "temperature": "40°C",
      "respiration": "180 breaths/min",
      "urine": "",
      "bath": "",
      "weight": "",
      "diet": "",
      "interaction_id": "104629",
      "blood_pressure": "180 mmHg",
      "blood_sugar": null,
      "spo2": "91%"
    },
    {
      "date": "2026-02-02",
      "noOfDays": "Day 68",
      "daysPostOp": "",
      "time": "11:42",
      "pulse": "121 bpm",
      "temperature": "105°F / 41°C",
      "respiration": "188 breaths per minute",
      "urine": "",
      "bath": "",
      "weight": "",
      "diet": "",
      "interaction_id": "104630",
      "blood_pressure": null,
      "blood_sugar": null,
      "spo2": "92%"
    },
    {
      "date": "2026-02-02",
      "noOfDays": "Day 68",
      "daysPostOp": "",
      "time": "11:43",
      "pulse": "",
      "temperature": "101°F, 38°C",
      "respiration": "",
      "urine": "",
      "bath": "",
      "weight": "",
      "diet": "",
      "interaction_id": "104631",
      "blood_pressure": null,
      "blood_sugar": null,
      "spo2": "90%"
    },
    {
      "date": "2026-02-02",
      "noOfDays": "Day 68",
      "daysPostOp": "",
      "time": "11:44",
      "pulse": "88 bpm",
      "temperature": "98 °F, 36 °C",
      "respiration": "180 breaths/min",
      "urine": "",
      "bath": "",
      "weight": "",
      "diet": "",
      "interaction_id": "104632",
      "blood_pressure": null,
      "blood_sugar": null,
      "spo2": "91 %"
    },
    {
      "date": "2026-02-02",
      "noOfDays": "Day 68",
      "daysPostOp": "",
      "time": "11:45",
      "pulse": "92 bpm",
      "temperature": "96°F",
      "respiration": "188 breaths/min",
      "urine": "",
      "bath": "",
      "weight": "",
      "diet": "",
      "interaction_id": "104633",
      "blood_pressure": null,
      "blood_sugar": null,
      "spo2": "90%"
    },
    {
      "date": "2026-02-02",
      "noOfDays": "Day 68",
      "daysPostOp": "",
      "time": "19:37",
      "pulse": "88 bpm",
      "temperature": "99.2°F",
      "respiration": "18 breaths/min",
      "urine": "",
      "bath": "",
      "weight": "",
      "diet": "",
      "interaction_id": "104784",
      "blood_pressure": "118/76 mmHg",
      "blood_sugar": null,
      "spo2": "99%"
    }
  ]
}

Discharge Summary

formName: "discharge_summary"

Complete Response Structure (Real Data Example)

{
  "status": "complete",
  "data": {
    "SessionId": "GEN9-202509-00170",
    "hospitalId": "9",
    "patientId": "GEN9-202509-00170",
    "OpId": "",
    "IpId": "105673",
    "PractitionerId": null,
    "type": "ipd",
    "formName": "discharge_summary",
    "process": "discharge_summary",
    "response": "{\"discharge_summary\":{...},\"treatment_given\":[...],\"advice_on_discharge\":{...}}",
    "medication_templates": [...],
    "additional_response": null,
    "status": "initial payload"
  }
}

Parsed Response Structure (Real Data Example)

{
  "discharge_summary": {
    "diagnosis": "Acute appendicitis; Persistent right-sided chest wall pain",
    "procedure": "",
    "reason_for_admission": "Patient presents with severe right-sided lower abdominal pain for two days...",
    "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": ""
    },
    "cardiovascular_system": "",
    "respiratory_system": "",
    "abdomen": "Tenderness is present at McBurney's point with rebound tenderness. No palpable mass.",
    "central_nervous_system": "",
    "local_examination": "",
    "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..."
  },
  "procedure_details": "",
  "findings": "",
  "date_of_procedure": "",
  "procedure_notes": "",
  "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
    },
    {
      "medication_name": "PARACETAMOL 500MG (CALPOL 500MG TABLET)",
      "medication_type": null,
      "dosage": "",
      "frequency": {
        "morning": 1,
        "afternoon": 0,
        "evening": 0,
        "night": 1
      },
      "duration": null
    }
    // ... more medications
  ],
  "advice_on_discharge": {
    "medications": [
      {
        "medication_name": "Acetaminophen",
        "medication_type": "Analgesic",
        "dosage": "650mg",
        "frequency": {
          "morning": 1,
          "afternoon": 0,
          "evening": 0,
          "night": 1
        },
        "duration": "3 days"
      },
      {
        "medication_name": "Amoxicillin",
        "medication_type": "Antibiotic",
        "dosage": "500mg",
        "frequency": {
          "morning": 1,
          "afternoon": 0,
          "evening": 0,
          "night": 0
        },
        "duration": "7 days"
      }
      // ... more discharge medications
    ],
    "general_advice": "Patient is advised to continue walking. Patient is advised to fast before the surgery...",
    "diet": "Normal diet, no dietary restrictions required. Patient follows a vegetarian diet.",
    "follow_up": "Patient should follow up in five days to reassess the pain and decide on further management..."
  },
  "emergency_instructions": "Please call emergency: ___________ if you have any of the following symptoms:\n1. Worsening abdominal pain\n2. Fever or chills...",
  "patient_id": "GEN9-202509-00170",
  "inpatient_id": "IN-GEN9-202509-00009",
  "user_id": "9",
  "interaction_id": "105673"
}

Progress Notes

formName: "progress_notes"

Complete Response Structure (Real Data Example)

{
  "status": "complete",
  "data": {
    "SessionId": "GEN9-202509-00170",
    "hospitalId": "9",
    "patientId": "GEN9-202509-00170",
    "OpId": "",
    "IpId": "105219",
    "PractitionerId": null,
    "type": "ipd",
    "formName": "progress_notes",
    "process": "progress_notes",
    "response": "{\"patientInfo\":{...},\"progressNotes\":[...]}",
    "medication_templates": [],
    "additional_response": null,
    "status": "initial payload"
  }
}

Parsed Response Structure (Real Data Example)

{
  "patientInfo": {
    "knownDrugAllergies": "None",
    "diagnosis": "Acute appendicitis"
  },
  "progressNotes": [
    {
      "id": "314",
      "date": "2026-01-30 14:30:00",
      "notes": "**Assessment and Plan:**\nPatient is stable. Continue current medications.",
      "doctorSignature": "Dr. 314"
    },
    {
      "id": "314",
      "date": "2026-01-31 10:15:00",
      "notes": "",
      "doctorSignature": "Dr. 314"
    }
  ]
}

Doctor Initial Assessment

formName: "doctor_initial_assessment"

Parsed Response Structure (Real Data Example)

{
  "status": "complete",
  "data": {
    "SessionId": "GEN9-202509-00170",
    "hospitalId": "9",
    "patientId": "GEN9-202509-00170",
    "OpId": "",
    "IpId": "101142",
    "PractitionerId": null,
    "type": "ipd",
    "formName": "doctor_initial_assessment",
    "process": "doctor_initial_assessment",
    "response": "Chief Complaints:* Patient presents with persistent right-sided chest wall pain..\n\nHistory of Present Illness:* The patient reports continuous, localized pain that sometimes intensifies. The pain is described as aching and sometimes feels like a wound. He has been taking Tablet Ultra H as needed (approximately once every 4-5 days to a week), which provides about 80% relief. He denies any heavy lifting or strenuous activities at home. The pain is more prominent in the evenings.\n\nPast Medical History and Duration:* The patient has a known history of fatty liver. He previously consulted another physician who performed some blood tests and a nerve-related test. An injection was suggested but not administered. He was prescribed a gel which was not effective.\n\nPersonal History:* Patient engages in walking for exercise. He does not have a night shift.\n\nPrevious Medication:* Patient has used a topical gel for the pain, which was ineffective.\n\nPresent Medication:* Patient is currently taking Tablet Ultra H on an as-needed basis for pain. He is also taking Maxgain NT (Pregabalin NT) daily as prescribed by another doctor, and E-Pirose F for cholesterol.\n\nPrevious Investigations:* include three blood tests and a nerve test. Liver Function Tests (LFT) and enzyme levels were normal, with the exception of elevated triglycerides. An ultrasound scan has been done previously.\n\nPlan of Care:* The patient is advised to continue his current medications. He will be started on a short course of Gabawin NT. A Fibroscan of the liver is planned to further evaluate his fatty liver. A nerve block injection is being considered if the pain does not resolve with medication.\n\nRecommendations:* Patient is advised to continue walking. He should follow up in five days to reassess the pain and decide on further management, such as a nerve block.",
    "medication_templates": [
      {
        "dosage": "",
        "dosage_time": null,
        "duration": "for 5 days",
        "frequency_afternoon": null,
        "frequency_evening": null,
        "frequency_morning": null,
        "frequency_night": null,
        "instructions": "Continue for 5 days",
        "med_status": "continue",
        "medication_name": "(ULTRA PLUS H TABLET)",
        "medication_type": "Tablet",
        "route": "Oral",
        "scheduled_date": null,
        "is_stat": false
      },
      {
        "dosage": "",
        "dosage_time": null,
        "duration": "for 3 days",
        "frequency_afternoon": null,
        "frequency_evening": null,
        "frequency_morning": null,
        "frequency_night": ["1"],
        "instructions": "Take one tablet at night for 3 days.",
        "med_status": "continue",
        "medication_name": "(GABAWIN NT TABLET)",
        "medication_type": "Tablet",
        "route": "Oral",
        "scheduled_date": null,
        "is_stat": false
      },
      {
        "dosage": "",
        "dosage_time": null,
        "duration": "",
        "frequency_afternoon": null,
        "frequency_evening": null,
        "frequency_morning": null,
        "frequency_night": null,
        "instructions": "Continue as prescribed.",
        "med_status": "continue",
        "medication_name": "(MAXGAIN NT TABLET)",
        "medication_type": "Tablet",
        "route": "Oral",
        "scheduled_date": null,
        "is_stat": false
      },
      {
        "dosage": "2ml",
        "dosage_time": null,
        "duration": "",
        "frequency_afternoon": null,
        "frequency_evening": null,
        "frequency_morning": null,
        "frequency_night": null,
        "instructions": "Continue as prescrib for cholesterol.",
        "med_status": "continue",
        "medication_name": "PIROXICAM 20 MG /ML (DOLOFORCE 2ML INJECTION)",
        "medication_type": "Tablet",
        "route": "Oral",
        "scheduled_date": null,
        "is_stat": false
      }
    ],
    "additional_response": null,
    "status": "initial payload"
  }
}

Surgery Notes

formName: "surgery_notes"

Complete Response Structure (Real Data Example)

{
  "status": "complete",
  "data": {
    "SessionId": "GEN9-202509-00170",
    "hospitalId": "9",
    "patientId": "GEN9-202509-00170",
    "OpId": "",
    "IpId": "105219",
    "PractitionerId": null,
    "type": "ipd",
    "formName": "surgery_notes",
    "process": "surgery_notes",
    "response": "{\"pre_operative_diagnosis\":\"...\",\"post_operative_diagnosis\":\"...\",...}",
    "medication_templates": [],
    "additional_response": null,
    "status": "initial payload"
  }
}

Parsed Response Structure (Real Data Example)

{
  "pre_operative_diagnosis": "Acute appendicitis",
  "post_operative_diagnosis": "Acute appendicitis, confirmed",
  "surgeon": "Dr. Smith",
  "anesthetist": "Dr. Jones",
  "assistant1": "Dr. Brown",
  "assistant2": "",
  "scrub_nurse": "Nurse Johnson",
  "circ_nurse": "",
  "findings": "Inflamed appendix, no perforation",
  "name_of_operation": "Appendectomy",
  "procedure": "Laparoscopic appendectomy performed successfully",
  "post_medications": "Paracetamol 500mg TDS",
  "diet": "Clear liquids",
  "postoperative_condition": "Stable",
  "surgeon_remarks": "Patient tolerated procedure well",
  "biopsy_specimen": "Appendix sent for histopathology"
}

Nurse Login 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.

Note: These forms are documented above in the Doctor Login Forms section. Refer to that section for complete documentation.

Nurse Care Plan

formName: "nurse_care_plan"

Complete Response Structure (Real Data Example)

{
  "status": "complete",
  "data": {
    "SessionId": "GEN9-202602-00044",
    "hospitalId": "9",
    "patientId": "GEN9-202602-00044",
    "OpId": "",
    "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": [],
    "additional_response": null,
    "status": "initial payload"
  }
}

Parsed Response Structure (Real Data Example)

## 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.

Nurse Notes

formName: "nurse_notes"

Complete Response Structure (Real Data Example)

{
  "status": "complete",
  "data": {
    "SessionId": "403a9674-1720-499e-ad46-0c0134f845d5",
    "hospitalId": "9",
    "patientId": "ragul001",
    "OpId": "",
    "IpId": "105583",
    "type": "ipd",
    "formName": "nurse_notes",
    "process": "nurse_notes",
    "response": "{\"special_notes\":{...},\"care_given\":{...}}",
    "medication_templates": [],
    "additional_response": null,
    "status": "initial payload"
  }
}

Parsed Response Structure (Real Data Example)

{
  "special_notes": {
    "29 January 2026": {
      "11:27 AM": {
        "description": "Intake: IV Fluids: Injection PPN 100 ml IV, Injection Metrogyl 100 ml IV. Oral Fluids: Water 600 ml oral, Tea 250 ml, Coconut water 100 ml, Water evening 300 ml. Output: Urine clear 1050 ml, Vomit noted 250 ml. Medications administered: AZITHROMYCIN ORAL SUSPENSION IP 100 MG (ORS ORANGE LIQ 200 ML IIQUID) 100 ml IV, METRONIDAZOLE (200MG/5ML) (METROGYL 60 ML SUSPENSION) 100 ml IV. General Observations: Urine is clear. Vomit noted."
      },
      "11:40 AM": {
        "description": "Intake: IV fluids: Injection PPN 100 ml IV, Injection Metrogyl 100 ml IV. Oral fluids: Water 600 ml oral, Tea 250 ml, Coconut water 100 ml, Water evening 300 ml. Output: Urine clear 1050 ml, Vomit noted 250 ml. Medications administered: AZITHROMYCIN ORAL SUSPENSION IP 100 MG (ORS ORANGE LIQ 200 ML IIQUID) 100 ml IV, METRONIDAZOLE (200MG/5ML) (METROGYL 60 ML SUSPENSION) 100 ml IV. General Observations: Urine is clear."
      },
      "11:48 AM": {
        "description": "Intake: IV fluids: Injection PPN 100 ml IV, Injection Metrogyl 100 ml IV. Oral fluids: Water 600 ml oral, Tea 250 ml, Coconut water 100 ml, Water evening 300 ml. Output: Urine clear 1050 ml, Vomit noted 250 ml. General Observations: Urine is clear."
      }
    },
    "02 February 2026": {
      "11:30 AM": {
        "description": "SPO2: 91%, Blood sugar level: 99 mg/dl, Temperature: 38 degrees Celsius."
      },
      "11:40 AM": {
        "description": "Temperature: 39°C, 45°F. SpO2: 93%."
      },
      "11:41 AM": {
        "description": "SPO2: 91%, Respiration: 180 breaths/min, Temperature: 40°C, Pulse: 120 bpm, Blood Pressure: 180 mmHg."
      },
      "11:42 AM": {
        "description": "Pulse: 121 bpm. Respiration: 188 breaths per minute. Temperature: 105°F / 41°C. SpO2: 92%. General Observations: Patient's vitals were recorded."
      },
      "11:43 AM": {
        "description": "Temperature: 101°F, 38°C. SpO2: 90%."
      },
      "11:44 AM": {
        "description": "Respiration 180 breaths/min, Temperature 98°F / 36°C, Pulse 88 bpm, SpO2 91%."
      },
      "11:45 AM": {
        "description": "Temperature: 96°F / 35°C, Respiration: 188 breaths/min, Pulse: 92 bpm, SpO2: 90%."
      }
    },
    "03 February 2026": {
      "05:08 PM": {
        "description": "Patient admitted via OPD for surgical evaluation. Allergies: Others, no nothing. Functional Assessment: Washing: true, Dressing: true, Feeding: false, Toileting: true, Transferring: true, Mobility: true. Nutritional Assessment: Diet: no special diet. Recent Weight Changes: false, Supplements: false, Conditions Affecting Eating: false, Monitoring Required At Meal Times: false. Fluids Monitoring: no monitoring. Mucous Membranes: assessed, Moist. Skin Turgor: assessed. Vitals: Blood Pressure: 118/76 mmHg, Pulse: 88 bpm, Respiration: 18 breaths/min, Temperature: 99.2°F, SpO2: 99%. Overall severity: normal."
      }
    },
    "05 February 2026": {
      "02:07 PM": {
        "description": "Nurse care plan. Patient was admitted by OPD today evening 7:30 PM and we converted the patient to IPD around 10 AM. This is nurse care plan. Patient was admitted by OPD today evening 7:30 PM and we converted the patient to IPD around 11 AM."
      },
      "02:09 PM": {
        "description": "Nursing care plan. Patient has severe bleeding on head and we gave first aid to the patient and admitted in OPD room number 78. General Observations: Patient has severe bleeding on head, first aid was given, and the patient was admitted to OPD room number 78."
      },
      "02:13 PM": {
        "description": "Nursing care plan. Patient has severe bleeding on head and we gave first aid to the patient and admitted in OPD room number 78. General Observations: Nursing care plan. Patient has severe bleeding on head and we gave first aid to the patient and admitted in OPD room number 78."
      },
      "03:02 PM": {
        "description": "Instructed to move to IPD at 10 o'clock. General Observations: Instructed to move patient to IPD at 10 o'clock."
      }
    },
    "09 February 2026": {
      "11:52 AM": {
        "description": "Patient abdomen pain. Pain score six. General Observations: Patient abdomen pain. Pain score six."
      }
    }
  },
  "care_given": {
    "hygienic_needs": null,
    "elimination_needs": "Urine clear 1050 ml. Vomit noted 250 ml.",
    "catheter_care": null,
    "care_of_invasive_lines": "Injection PPN 100 ml IV, Injection Metrogyl 100 ml IV.",
    "position_change_and_back_care": null,
    "wound_dressing": null,
    "tracheostomy_care": null
  }
}

Nurse Initial Assessment

formName: "nurse_initial_assessment"

Complete Response Structure (Real Data Example)

{
  "status": "complete",
  "data": {
    "SessionId": "403a9674-1720-499e-ad46-0c0134f845d5",
    "hospitalId": "9",
    "patientId": "ragul001",
    "OpId": "",
    "IpId": "105739",
    "type": "ipd",
    "formName": "nurse_initial_assessment",
    "process": "nurse_initial_assessment",
    "response": "{\"basicInformation\":{...},\"functionalAssessment\":{...},\"nutritionalAssessment\":{...},\"painAssessment\":{...}}",
    "medication_templates": [],
    "additional_response": null,
    "status": "initial payload"
  }
}

Parsed Response Structure (Real Data Example)

{
  "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.",
    "consultant": "",
    "oral": "",
    "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,
    "monitoringRequiredAtMealTimes": false,
    "fluidsMonitoring": {
      "isMonitoring": false,
      "type": ""
    },
    "mucousMembranes": {
      "isAssessed": true,
      "state": "Moist"
    },
    "skinTurgor": {
      "isAssessed": true,
      "state": ""
    }
  },
  "painAssessment": {
    "numericalPainScore": 7,
    "wongBakerPainScore": 0,
    "interventions": [
      {
        "assessmentDateTime": "",
        "painScore": 7,
        "location": "Lower right abdomen",
        "interventionDateTime": "11:45",
        "intervention": "IV Paracetamol 1 gm",
        "postInterventionDateTime": "",
        "postInterventionScore": 5
      }
    ]
  },
  "vitals_abnormality": {
    "abnormality_detected": false,
    "abnormal_vitals_message": "",
    "overall_severity": "normal"
  },
  "monitoring_tasks": [],
  "iv_infusions": []
}
POST /software/documents/upload

Summary: Upload patient document

Description: Upload a patient document file and patient details. Send the request as multipart/form-data.

Form Data

Payload Example

hospital_id=9
patient_id=GEN9-202604-00301
name=Rajesh Ravi
age=21
gender=Male
language=English
practitioner_id=888
patient_type=ipd
hospital_inpatient_id=IN-GEN9-202602-00038
file=@patient-document.pdf

Response 200 - Document uploaded successfully

{
  "message": "Document uploaded successfully."
}

Errors