EndpointsNurse Patients

Nurse Patients

Function-calling namespace: nursePatients

  • Base URL: https://api.aivida.in
  • Engine endpoint: POST /api
  • Auth: Stack token middleware enabled in optional mode.
  • Send token in header: x-stack-access-token: <access_token> (or Authorization: Bearer <access_token>).
  • In optional mode: no token is allowed; invalid token is rejected with 401.

activateMedication

Source: backend/endpoints/nurse-patients/activate-medication

Input Fields

FieldTypeRequiredConstraints
organizationIdstringYes-
patientIdstringYes-
medicationNamestringYes-

Example Request

curl -X POST https://api.aivida.in/api \
  -H "Content-Type: application/json" \
  -H "x-stack-access-token: <access_token_optional>" \
  -d '{
  "namespace": "nursePatients",
  "apiName": "activateMedication",
  "data": {
    "organizationId": "org_123",
    "patientId": "patient_123",
    "medicationName": "value"
  }
}'

Example Response

{ "status": "ok", "data": {} }

getDetailByOrganizationId

Source: backend/endpoints/nurse-patients/get-detail-by-organization-id

Input Fields

FieldTypeRequiredConstraints
organizationIdstringYes-
patientIdstringYes-

Example Request

curl -X POST https://api.aivida.in/api \
  -H "Content-Type: application/json" \
  -H "x-stack-access-token: <access_token_optional>" \
  -d '{
  "namespace": "nursePatients",
  "apiName": "getDetailByOrganizationId",
  "data": {
    "organizationId": "org_123",
    "patientId": "patient_123"
  }
}'

Example Response

{ "status": "ok", "data": {} }

listByOrganizationSlug

Source: backend/endpoints/nurse-patients/list-by-organization-slug

Input Fields

FieldTypeRequiredConstraints
organizationIdstringYes-
pageintegerNo-
pageSizeintegerNo-

Example Request

curl -X POST https://api.aivida.in/api \
  -H "Content-Type: application/json" \
  -H "x-stack-access-token: <access_token_optional>" \
  -d '{
  "namespace": "nursePatients",
  "apiName": "listByOrganizationSlug",
  "data": {
    "organizationId": "org_123"
  }
}'

Example Response

{ "status": "ok", "data": {} }

startVisit

Source: backend/endpoints/nurse-patients/start-visit

Input Fields

FieldTypeRequiredConstraints
organizationIdstringYes-
patientIdstringYes-
stackUserIdstringYes-
appointmentIdstringNo-

Example Request

curl -X POST https://api.aivida.in/api \
  -H "Content-Type: application/json" \
  -H "x-stack-access-token: <access_token_optional>" \
  -d '{
  "namespace": "nursePatients",
  "apiName": "startVisit",
  "data": {
    "organizationId": "org_123",
    "patientId": "patient_123",
    "stackUserId": "stackuser_123"
  }
}'

Example Response

{ "status": "ok", "data": {} }