CareScribe Software Integration API (v3.6.4)

API for integrating patient, doctor, inpatient, medication, route, frequency, investigation, document upload, and callback response data.

Complete Integration Guide: HMS Integration Documentation

Get all specialities

Retrieves a list of all specialities.

Authorizations:
X-API-Key

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a new doctor

Creates a doctor record and associates it with an organization.

Authorizations:
X-API-Key
Request Body schema: application/json

Doctor creation payload

first_name
required
string
last_name
required
string
speciality_id
required
integer
salutation
string
hospital_id
required
integer
license_no
string
phone_number
string
email
string
practitioner_id
required
string

Responses

Request samples

Content type
application/json
{
  • "first_name": "John",
  • "last_name": "Doe",
  • "speciality_id": 5,
  • "salutation": "Dr.",
  • "hospital_id": 101,
  • "license_no": "ABC12345",
  • "phone_number": "+91-9876543210",
  • "email": "johndoe@example.com",
  • "practitioner_id": "PRAC-001"
}

Response samples

Content type
application/json
{
  • "message": "Doctor created successfully",
  • "doctor": {
    }
}

Integrate patient software data

Accepts patient, doctor, hospital, and vitals data for integration.

Authorizations:
X-API-Key
Request Body schema: application/json
hospital_id
required
string
required
object
required
object
required
object

Responses

Request samples

Content type
application/json
{
  • "hospital_id": "HOS789",
  • "doctor": {
    },
  • "patient": {
    },
  • "vitals": {
    }
}

Response samples

Content type
application/json
{}

Upload medication master data (JSON) and store as CSV

Uploads medication master data for a hospital in JSON format and stores it as a CSV file.

Requirements:

  • hospital_id and a non-empty medications array are required.
  • Each medication must contain BRAND NAME and GENERIC NAME.
  • BRAND ID is optional, but if provided in any item, it must be present in all items.

Optional Fields:

  • UOM CODE
  • UOM DESCRIPTION (if provided, UOM CODE is required).
  • ACTIVE FROM (DD/MM/YYYY)
  • ACTIVE TO (DD/MM/YYYY)
  • MEDICATION TYPE

Validation:

  • Duplicate BRAND ID values in the request are marked invalid.
  • Duplicate BRAND NAME and GENERIC NAME combinations are marked invalid.

The API stores the valid data as a CSV file and returns the processed file URL along with any invalid rows.

Authorizations:
X-API-Key
Request Body schema: application/json
hospital_id
required
string

Hospital/organization identifier.

required
Array of objects non-empty

Array of medication objects.

Supported fields (case-sensitive as shown in examples):

  • BRAND NAME (required)
  • GENERIC NAME (required)
  • BRAND ID (conditionally required if present in any item)
  • UOM CODE (optional)
  • UOM DESCRIPTION (optional; if provided, UOM CODE is required)
  • ACTIVE FROM (optional; DD/MM/YYYY)
  • ACTIVE TO (optional; DD/MM/YYYY)
  • MEDICATION TYPE (optional)

Responses

Request samples

Content type
application/json
{
  • "hospital_id": "9",
  • "medications": [
    ]
}

Response samples

Content type
application/json
{}

Update medication data (merge into existing CSV)

Updates the medication master data for a hospital by merging the given JSON medications with the existing stored CSV.

  • hospital_id and non-empty medications are required.
  • Each item must contain BRAND NAME and GENERIC NAME.
  • BRAND ID is optional, but if used in any item, it must be present in all items.
  • UOM CODE and UOM DESCRIPTION are optional (if UOM DESCRIPTION is provided, UOM CODE is required).
  • ACTIVE FROM, ACTIVE TO, and MEDICATION TYPE are optional; dates use DD/MM/YYYY.
  • If an existing CSV is present, BRAND ID presence must match incoming data.
  • The body may use medications, rows, data, or items; hospital_id may be supplied in query or body.
  • Final merged data is stored back as a CSV file.
Authorizations:
X-API-Key
Request Body schema: application/json
hospital_id
required
string

Hospital/organization identifier.

required
Array of objects non-empty

Array of medication objects to merge into existing data.

Responses

Request samples

Content type
application/json
{
  • "hospital_id": "9",
  • "medications": [
    ]
}

Response samples

Content type
application/json
{
  • "message": "Medication data updated successfully (merged, duplicates removed)",
  • "url": "gs://bucket/csv_uploads/organization_20260916120000.csv",
  • "invalid": [ ]
}

Upload medication CSV

Uploads a medication master CSV for a hospital and replaces the existing stored file (if any). The API validates the CSV, stores only valid rows, and returns the processed file URL.

Supported CSV headers (normalized case-insensitively and kept in this order):

  • BRAND NAME, GENERIC NAME
  • BRAND ID, BRAND NAME, GENERIC NAME
  • BRAND NAME, GENERIC NAME, UOM CODE, UOM DESCRIPTION
  • BRAND ID, BRAND NAME, GENERIC NAME, UOM CODE, UOM DESCRIPTION
  • Any format above may continue with optional ACTIVE FROM, ACTIVE TO, and MEDICATION TYPE columns in that order.

Validation rules:

  • BRAND NAME and GENERIC NAME are required.
  • BRAND ID is required only if the header contains BRAND ID.
  • UOM CODE and UOM DESCRIPTION are optional.
  • If UOM DESCRIPTION is provided, UOM CODE must also be provided.
  • ACTIVE FROM and ACTIVE TO, when present, must use DD/MM/YYYY.
  • Duplicate BRAND ID values are rejected.
  • Duplicate BRAND NAME + GENERIC NAME combinations are rejected.
  • Empty values or values containing only , or . are rejected.

Invalid rows are returned in the invalid field of the response.

Authorizations:
X-API-Key
query Parameters
hospital_id
required
string

Hospital/organization identifier.

Request Body schema: multipart/form-data
csvFile
required
string <binary>

Medication CSV file to upload.

Responses

Response samples

Content type
application/json
{}

Update medication CSV data

Uploads a medication CSV for the given hospital_id and merges it with the existing medication CSV stored in Google Cloud Storage (GCS).

CSV headers (normalized case-insensitively and kept in this order):

  1. BRAND NAME, GENERIC NAME
  2. BRAND ID, BRAND NAME, GENERIC NAME
  3. BRAND NAME, GENERIC NAME, UOM CODE, UOM DESCRIPTION
  4. BRAND ID, BRAND NAME, GENERIC NAME, UOM CODE, UOM DESCRIPTION
  5. Any format above may continue with optional ACTIVE FROM, ACTIVE TO, and MEDICATION TYPE columns in that order.

Validation rules (applies to both existing CSV and uploaded CSV):

  • BRAND NAME and GENERIC NAME are required in every row.
  • Empty values or values containing only , or . are rejected.
  • Duplicate BRAND ID values (when BRAND ID exists) are rejected.
  • Duplicate BRAND NAME + GENERIC NAME combinations are rejected.
  • If UOM DESCRIPTION is provided, UOM CODE is required.
  • ACTIVE FROM and ACTIVE TO, when present, must use DD/MM/YYYY.
  • If an existing medication CSV is present, BRAND ID presence must match; otherwise the API returns 400 with Header mismatch between existing and new CSV.

Merge behavior:

  • If the uploaded header includes BRAND ID, the merge key is BRAND ID.
  • Otherwise, the merge key is BRAND NAME + GENERIC NAME.
  • Uploaded rows overwrite matching existing rows.
Authorizations:
X-API-Key
query Parameters
hospital_id
required
string

Hospital identifier for the organization.

Request Body schema: multipart/form-data
csvFile
required
string <binary>

Medication CSV file to upload (must end with .csv).

Responses

Response samples

Content type
application/json
{}

Upload an investigation CSV file

Uploads and replaces the organization's investigation CSV. Required headers are Service ID and Standard Lab Test Name. Optional headers are Alias Name, Service Type, Hospital ID, ACTIVE FROM, and ACTIVE TO. Headers are matched case-insensitively. Dates, when supplied, must use DD/MM/YYYY. Invalid rows are returned while valid rows are stored; an empty Alias Name is populated from Standard Lab Test Name.

Authorizations:
X-API-Key
query Parameters
hospital_id
required
string

The ID of the hospital associated with the organization.

Request Body schema: multipart/form-data
csvFile
required
string <binary>

CSV with required columns Service ID and Standard Lab Test Name, and optional Alias Name, Service Type, Hospital ID, ACTIVE FROM, and ACTIVE TO.

Responses

Response samples

Content type
application/json
{}

Update an investigation CSV file

Merges the uploaded CSV with stored investigation data using the case-insensitive Service ID and Service Type pair as the key. The same Service ID may therefore be stored in multiple rows when Service Type differs, while duplicate Service ID and Service Type pairs are rejected. Required headers are Service ID and Standard Lab Test Name; optional headers are Alias Name, Service Type, Hospital ID, ACTIVE FROM, and ACTIVE TO. Dates must use DD/MM/YYYY.

Authorizations:
X-API-Key
query Parameters
hospital_id
required
string

The ID of the hospital associated with the organization.

Request Body schema: multipart/form-data
csvFile
required
string <binary>

Investigation CSV to merge. Service ID and Standard Lab Test Name are required; Alias Name, Service Type, Hospital ID, ACTIVE FROM, and ACTIVE TO are optional.

Responses

Response samples

Content type
application/json
{}

Upload investigation data as JSON

Replaces stored investigation data using either a direct JSON array or { data: [...] }. Service ID and Standard Lab Test Name are required. Alias Name, Service Type, Hospital ID, ACTIVE FROM, and ACTIVE TO are optional. Field names are normalized case-insensitively and dates must use DD/MM/YYYY.

Authorizations:
X-API-Key
query Parameters
hospital_id
required
string

The ID of the hospital associated with the organization.

Request Body schema: application/json

Investigation rows wrapped in data; the controller also accepts a direct array.

required
Array of objects

Responses

Request samples

Content type
application/json
{
  • "data": [
    ]
}

Response samples

Content type
application/json
{}

Update investigation data as JSON

Merges a direct JSON array or { data: [...] } into stored investigation data using the case-insensitive Service ID and Service Type pair as the key. The same Service ID may be used for different Service Types. Service ID and Standard Lab Test Name are required; all other supported columns are optional. Dates must use DD/MM/YYYY.

Authorizations:
X-API-Key
query Parameters
hospital_id
required
string

The ID of the hospital associated with the organization.

Request Body schema: application/json

Array of investigation objects to merge with existing data

required
Array of objects

Responses

Request samples

Content type
application/json
{
  • "data": [
    ]
}

Response samples

Content type
application/json
{}

Get Route CSV Data

Retrieves route master data for the given hospital_id.

This API:

  • Maps the provided hospital_id to the organization
  • Reads the stored route CSV data from the organization.

If the organization is not found, or route data is unavailable, the API returns an error.

Authorizations:
X-API-Key
query Parameters
hospital_id
required
string
Example: hospital_id=9

Unique hospital identifier used to find the organization

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Upload Route CSV

Uploads a Route master CSV for the specified hospital_id (query parameter). The CSV requires ROUTE CODE and ROUTE DESCRIPTION. ACTIVE FROM and ACTIVE TO are optional and must use DD/MM/YYYY. Header matching is case-insensitive; unknown or duplicate headers are rejected. Use the uploadRouteCsv API only for the initial upload of Route master data. If this API is called again for appending data, the existing Route list will be completely deleted and replaced with the newly uploaded CSV data. For any modifications, additions, or updates to the existing Route list, please use the updateRouteCsvs API.

Authorizations:
X-API-Key
query Parameters
hospital_id
required
string

Hospital ID used to resolve organization

Request Body schema: multipart/form-data
csvFile
required
string <binary>

CSV file containing route data (ROUTE CODE, ROUTE DESCRIPTION)

Responses

Response samples

Content type
application/json
{}

Update (merge) Route CSV

Uploads a Route CSV file for the specified hospital_id and merges it with the existing Route data (if available) stored for the organization. Requirements: - ROUTE CODE and ROUTE DESCRIPTION are required headers. - ACTIVE FROM and ACTIVE TO are optional headers using DD/MM/YYYY. - Header matching is case-insensitive; unknown or duplicate headers are rejected. Validation: - If duplicate ROUTE CODE values are found in the uploaded CSV, those rows will be reported in the invalid field of the response.

Merge Behavior: - ROUTE CODE is used as the unique key. - If a ROUTE CODE already exists in the stored Route data, the uploaded value overwrites the existing one.

  • New ROUTE CODE entries are added to the dataset. The final merged dataset is stored as a CSV file and linked to the organization.
Authorizations:
X-API-Key
query Parameters
hospital_id
required
string

Hospital ID used to resolve organization

Request Body schema: multipart/form-data
csvFile
required
string <binary>

CSV file containing route data (ROUTE CODE, ROUTE DESCRIPTION)

Responses

Response samples

Content type
application/json
{}

Upload route data

Uploads Route master data from a direct array or an object containing routes, rows, data, or items, then stores it as CSV. ROUTE CODE and ROUTE DESCRIPTION are required; ACTIVE FROM and ACTIVE TO are optional dates in DD/MM/YYYY format. This API should be used only for the initial upload of Route data. If this API is called again, the existing Route list will be completely deleted and replaced with the newly uploaded data. For any modifications or additions to the existing Route list, please use the updateRouteJson API.

Authorizations:
X-API-Key
query Parameters
hospital_id
required
string

The ID of the hospital/organization

Request Body schema: application/json
Array of objects

Array of route objects

Responses

Request samples

Content type
application/json
{
  • "data": [
    ]
}

Response samples

Content type
application/json
{}

Update Route Data using JSON

Merges a direct JSON array, or an object containing routes, rows, data, or items, into stored route data using ROUTE CODE as the key. ACTIVE FROM and ACTIVE TO are optional dates in DD/MM/YYYY format.

The uploaded Route json will be merged with the existing route data (if available) stored for the organization and saved as a CSV file.

Authorizations:
X-API-Key
query Parameters
hospital_id
required
string

Hospital ID used to identify the organization

Request Body schema: application/json
Array of objects

Responses

Request samples

Content type
application/json
{
  • "data": [
    ]
}

Response samples

Content type
application/json
{}

Delete Route CSV Data

Deletes the route CSV file associated with the given hospital_id.

This API:

  • Finds the organization using hospital_id
  • Deletes the route CSV file from Google Cloud Storage
  • Returns success message after deletion.
Authorizations:
X-API-Key
query Parameters
hospital_id
required
string
Example: hospital_id=9

Unique hospital identifier used to find the organization

Responses

Response samples

Content type
application/json
{
  • "message": "Route CSV removed successfully"
}

Get Frequency CSV Data

Retrieves frequency master data for the given hospital_id.

This API:

  • Maps the provided hospital_id to the organization
  • Reads the stored frequency CSV data from the organization.

If the organization is not found, or frequency data is unavailable, the API returns an error.

Authorizations:
X-API-Key
query Parameters
hospital_id
required
string
Example: hospital_id=9

Unique hospital identifier used to find the organization

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Upload Frequency CSV

Uploads a Frequency master CSV for the given hospital_id (query param) and stores it for the organization. The CSV requires FREQUENCY CODE and FREQUENCY DESCRIPTION. ACTIVE FROM and ACTIVE TO are optional and must use DD/MM/YYYY. Header matching is case-insensitive; unknown or duplicate headers are rejected.

Validation:

  • If FREQUENCY CODE is empty, the row is reported in invalid.
  • If FREQUENCY DESCRIPTION is empty, the row is reported in invalid.
  • This API should be used only for the initial upload of Frequency data.
  • If this API is called again, the existing Frequency list will completely deleted and replaced with the newly uploaded data. For any modifications or additions to the existing Frequency list, please use the updateFrequencyCsvs API.
Authorizations:
X-API-Key
query Parameters
hospital_id
required
string

Hospital ID used to resolve organization

Request Body schema: multipart/form-data
csvFile
required
string <binary>

CSV file with headers FREQUENCY CODE and FREQUENCY DESCRIPTION

Responses

Response samples

Content type
application/json
{}

Upload frequency data

This API uploads or updates Frequency master data for a hospital using JSON input and stores it as a CSV file.

For the initial setup, this API can be used to upload the complete Frequency master list for the organization. If this API is called again, the existing Frequency list will be completely deleted and replaced with the newly uploaded data.

For any modifications or incremental updates to the existing Frequency list, please use the updateFrequencyJson API.

Requirements:

  • The body may be a direct array or an object containing frequencies, rows, data, or items.
  • Each object must contain the fields "FREQUENCY CODE" and "FREQUENCY DESCRIPTION".
  • Each FREQUENCY CODE must be unique within the request payload.

Validation:

  • Missing/empty required values and invalid dates are reported in invalid.
  • If duplicate FREQUENCY CODE values are found within the request payload, those items will be reported in the invalid field. A 400 is returned when no valid rows remain.

Behavior:

  • FREQUENCY CODE is treated as the unique identifier for frequency records.
  • During updates, if a FREQUENCY CODE already exists in the stored frequency data, the uploaded value overwrites the existing one.
  • New FREQUENCY CODE entries will be added to the dataset.

The final dataset is stored as a CSV file and linked to the organization.

Authorizations:
X-API-Key
query Parameters
hospital_id
required
string

The ID of the hospital/organization

Request Body schema: application/json
Array of objects

Array of frequency objects

Responses

Request samples

Content type
application/json
{
  • "data": [
    ]
}

Response samples

Content type
application/json
{}

Update (merge) Frequency data using JSON

This API updates frequency master data for a hospital using JSON input.

The provided Frequency list will be merged with the existing frequency data (if available) stored for the organization and saved as a CSV file.

Requirements:

  • The body may be a direct array or an object containing frequencies, rows, data, or items.
  • Each object must contain: "FREQUENCY CODE" and "FREQUENCY DESCRIPTION".
  • Each FREQUENCY CODE must be unique within the request payload.

Validation:

  • Missing/empty required values and invalid dates are reported in invalid.
  • If duplicate FREQUENCY CODE values are found within the request payload, the duplicates will be reported in invalid. A 400 is returned when no valid rows remain.

Merge Behavior:

  • FREQUENCY CODE is used as the unique key.
  • If a FREQUENCY CODE already exists in the stored frequency data, the uploaded value overwrites it.
  • New FREQUENCY CODE entries are added to the dataset.

The final merged dataset is stored as a CSV file and linked to the organization.

Authorizations:
X-API-Key
query Parameters
hospital_id
required
string

Hospital ID used to resolve organization

Request Body schema: application/json
Array of objects

Array of frequency objects. Can be sent directly as an array or wrapped as an object with a data property.

Responses

Request samples

Content type
application/json
{
  • "data": [
    ]
}

Response samples

Content type
application/json
{}

Update (merge) Frequency CSV

This API updates frequency data for a hospital.

The uploaded Frequency CSV will be merged with the existing frequency data (if available) stored for the organization and saved as a CSV file.

Requirements:

  • FREQUENCY CODE and FREQUENCY DESCRIPTION are required headers.
  • ACTIVE FROM and ACTIVE TO are optional headers using DD/MM/YYYY.
  • Header matching is case-insensitive; unknown or duplicate headers are rejected.

Validation:

  • If duplicate FREQUENCY CODE values are found in the uploaded CSV, those rows will be reported in the invalid field of the response.
  • If FREQUENCY CODE is empty, the row will be reported in invalid.
  • If FREQUENCY DESCRIPTION is empty, the row will be reported in invalid.

Merge Behavior:

  • FREQUENCY CODE is used as the unique key.
  • If a FREQUENCY CODE already exists in the stored frequency data, the uploaded value overwrites the existing one.
  • New FREQUENCY CODE entries will be added to the dataset.

The final merged dataset will be stored as a CSV file and linked to the organization.

Authorizations:
X-API-Key
query Parameters
hospital_id
required
string

Hospital ID used to resolve organization

Request Body schema: multipart/form-data
csvFile
required
string <binary>

CSV file containing frequency data (FREQUENCY CODE, FREQUENCY DESCRIPTION)

Responses

Response samples

Content type
application/json
{}

Delete Frequency CSV Data

Deletes the frequency CSV file associated with the given hospital_id.

This API:

  • Finds the organization using hospital_id
  • Deletes the frequency CSV file from Google Cloud Storage
  • Removes the frequency_data reference from the organization
  • Saves the organization record

Returns success message after deletion.

Authorizations:
X-API-Key
query Parameters
hospital_id
required
string
Example: hospital_id=9

Unique hospital identifier used to find the organization

Responses

Response samples

Content type
application/json
{
  • "message": "Frequency CSV removed successfully"
}

Create Nurse

Creates a new nurse for the specified hospital_id. The hospital_id is mapped to an organization and the nurse is created under that organization. Email is optional—if not provided, a unique email is auto-generated based on the nurse name and organization.

Authorizations:
X-API-Key
query Parameters
hospital_id
required
string
Example: hospital_id=9
header Parameters
x-api-key
required
string
Example: your-api-key-here
Request Body schema: application/json
firstname
required
string
lastname
required
string
email
string <email>
phone
string
floor_id
required
integer
caregiver_id
required
string
nurse_category
string
Enum: "Ward Nurse" "ICU Nurse" "ER Nurse"

Optional nurse category. A blank value is stored as null.

Responses

Request samples

Content type
application/json
{
  • "firstname": "Sarah",
  • "lastname": "John",
  • "email": "",
  • "phone": "994056789",
  • "floor_id": 2,
  • "caregiver_id": "LI7897",
  • "nurse_category": "Ward Nurse"
}

Response samples

Content type
application/json
{
  • "message": "Nurse created successfully",
  • "data": {
    }
}

MHC Software Integration

Creates or updates a Master Health Checkup (MHC) patient, assigns doctor, and optionally uploads vitals.

Authorizations:
X-API-Key
Request Body schema: application/json

MHC integration payload

hospital_id
required
string
package_name
required
string
required
object
required
object
Array of objects

Responses

Request samples

Content type
application/json
{
  • "hospital_id": "9",
  • "package_name": "Executive Health Checkup",
  • "doctor": {
    },
  • "patient": {
    },
  • "vitals": [
    ]
}

Response samples

Content type
application/json
{}

Get MHC form data

Retrieves generated Master Health Checkup (MHC) form data for a patient by calling the OPD chatbot upstream service.

Use this GET endpoint after creating or updating an MHC patient via POST /patient/softwareintegrationmhc. The API resolves the patient (by internal patient_id or hospital_patient_id), locates the active MHC record, and returns the generated form payload for the requested form_name.

Response form_name uses internal keys (eye_checkup, dental_checkup, gynaec_checkup, history_physical_examination, ent_checkup). The matching question_text field echoes the requested label.

Authorizations:
X-API-Key
query Parameters
hospital_id
required
string
Example: hospital_id=9

Unique hospital identifier (maps to organization)

patient_id
required
string
Example: patient_id=ragulID1002

Patient identifier (internal patient_id or hospital_patient_id)

form_name
required
string
Enum: "Generate Eye Checkup" "Generate Dental Checkup" "Generate Gynecology checkup Report" "Generate History and Physical Examination" "Generate ENT Checkup"
Example: form_name=Generate ENT Checkup

MHC form to generate.

mhc_id
string
Example: mhc_id=MHC-GEN9-202606-00002

Optional MHC record identifier. When omitted, the most recently updated active MHC record is used.

Responses

Response samples

Content type
application/json
{
  • "status": true,
  • "hospital_id": "9",
  • "patient_id": "ragulID1002",
  • "internal_patient_id": "GEN9-202606-00221",
  • "hospital_patient_id": "ragulID1002",
  • "mhc_id": "MHC-GEN9-202606-00002",
  • "form_name": "eye_checkup",
  • "question_text": "Generate Eye Checkup",
  • "interaction_id": 119880,
  • "force_regenerate": 119880,
  • "data": {
    }
}

Inpatient software integration

Creates or updates a patient and inpatient record. Generates a secure session URL for clinician access.

  • 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
Authorizations:
X-API-Key
Request Body schema: application/json
hospital_id
required
string
object
object
required
object
required
object

Responses

Request samples

Content type
application/json
{
  • "hospital_id": "9",
  • "doctor": {
    },
  • "nurse": {
    },
  • "patient": {
    },
  • "inpatient": {
    }
}

Response samples

Content type
application/json
{
  • "message": "Patient already exists. Inpatient record updated.",
  • "path": "Doctor flow: /session_id?...&practitioner_id=1001\nNurse flow: /session_id?...&caregiver_id=LI7987\n",
  • "patient_id": "4435c603-a0b8-48a6-9766-4ca911770fac",
  • "inpatient_id": "INP-HOSP-PAT-001",
  • "interaction_id": 105574
}

Upload Patient Document

Upload a patient document file and patient details using multipart/form-data.

Authorizations:
X-API-Key
query Parameters
hospital_id
required
string
Example: hospital_id=9

Hospital ID used to resolve the organization.

Request Body schema: multipart/form-data
patient_id
required
string

Patient identifier.

name
required
string

Patient name.

age
required
integer

Patient age.

gender
required
string

Patient gender.

language
required
string

Patient preferred language.

practitioner_id
required
string

Practitioner identifier.

caregiver_id
required
string

Caregiver identifier.

patient_type
required
string
Enum: "opd" "ipd"

Patient type for the upload flow.

hospital_inpatient_id
required
string

Inpatient identifier from the HMS.

file
required
string

File(s) to upload. Send up to 10 document files using the file field. The total upload size must not exceed 30MB. Supported file types include PDF, DOC, DOCX, TXT, JPG, JPEG, PNG, GIF, AVIF, and HEIC.

Responses

Response samples

Content type
application/json
{
  • "message": "Document uploaded successfully."
}

Save Patient and Medical Data

This endpoint saves patient, diagnosis, medication, and vitals data. The patient's outpatient data is sent to the client's system using the URL specified in the organization.api_url field. The data transmission includes both the initial and final payloads as part of the client response.

Dermatology specialty: For dermatology users, the payload sent to the client follows this response format: a wrapped object with top-level status (e.g. "complete") and data. The data object contains SessionId, hospitalId, patientId, OpId, IpId, PractitionerId (nullable), type (e.g. "opd"), response, additional_response, medication_templates, vitals, assessment, dermatology_notes (specialty-specific object), and status (e.g. "initial payload" or "end payload").

IPD bundle forms: For IPD client API URL callbacks (for example an organization's configured ipd_api_url), the payload is a wrapped object with top-level status (e.g. "complete") and data. The data object includes SessionId, hospitalId, patientId, OpId, IpId, PractitionerId, type: "ipd", formName, process, structured_data, and inner status ("initial payload" or "end payload"). Supported bundle structures include IPD_CAUTI_BUNDLE, IPD_CLABSI_BUNDLE, and IPD_VASCULAR_BUNDLE.

Authorizations:
X-API-Key
Request Body schema: application/json
One of
SessionId
string
patientId
string
hospitalId
string
OpId
string
IpId
string
PractitionerId
string or null
type
string

Visit type (e.g. opd). Included when specialty is dermatology.

response
string
Array of objects
Array of objects
Array of objects
additional_response
string
status
string

Responses

Request samples

Content type
application/json
Example
{
  • "status": "complete",
  • "data": {
    }
}

Response samples

Content type
application/json
{
  • "AcknowledgeId": 102,
  • "Message": "Data Posted Successfully (Initial Payload)"
}