Admissions
Function-calling namespace: admissions
- Base URL:
https://api.aivida.in - Engine endpoint:
POST /api - Auth: Stack token middleware enabled in
optionalmode. - Send token in header:
x-stack-access-token: <access_token>(orAuthorization: Bearer <access_token>). - In
optionalmode: no token is allowed; invalid token is rejected with401.
create
Source: backend/endpoints/admissions/create
Input Fields
| Field | Type | Required |
|---|---|---|
_id | string | No |
organizationId | string | No |
patientId | string | No |
admittingDoctorId | string | No |
appointmentId | string | No |
consultationId | string | No |
status | string | No |
admissionReason | string | No |
admissionNotes | string | No |
requestedAt | int64 | No |
wardId | string | No |
roomId | string | No |
bedId | string | No |
admittedAt | *int64 | No |
confirmedByUserId | string | No |
dischargingDoctorId | string | No |
dischargeReason | string | No |
dischargeSummary | string | No |
dischargeRequestedAt | *int64 | No |
dischargedAt | *int64 | No |
billingClearedByUserId | string | No |
billingClearedAt | *int64 | No |
advanceAmount | *float64 | No |
advancePaymentMethod | string | No |
advanceTransactionId | string | No |
advancePaidAt | *int64 | No |
advanceCollectedByUserId | string | No |
firstCareStartedByNurseId | string | No |
firstCareStartedAt | *int64 | No |
createdAt | int64 | No |
updatedAt | int64 | No |
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": "admissions",
"apiName": "create",
"data": {
"organizationId": "org_123",
"patientId": "patient_123",
"appointmentId": "appointment_123",
"status": "ACTIVE"
}
}'Example Response
{ "status": "ok", "data": {} }delete
Source: backend/endpoints/admissions/delete
Input Fields
| Field | Type | Required |
|---|---|---|
id | string | Yes |
organizationId | string | Yes |
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": "admissions",
"apiName": "delete",
"data": {
"id": "id_123",
"organizationId": "org_123"
}
}'Example Response
{ "status": "ok", "data": {} }getAdmissionLogs
Source: backend/endpoints/admissions/get-admission-logs
Input Fields
| Field | Type | Required |
|---|---|---|
admissionId | string | Yes |
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": "admissions",
"apiName": "getAdmissionLogs",
"data": {
"admissionId": "admission_123"
}
}'Example Response
{ "status": "ok", "data": {} }getAdmittedPatientDetailForBilling
Source: backend/endpoints/admissions/get-admitted-patient-detail-for-billing
Input Fields
| Field | Type | Required |
|---|---|---|
admissionId | string | Yes |
organizationSlug | string | Yes |
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": "admissions",
"apiName": "getAdmittedPatientDetailForBilling",
"data": {
"admissionId": "admission_123",
"organizationSlug": "value"
}
}'Example Response
{ "status": "ok", "data": {} }getById
Source: backend/endpoints/admissions/get-by-id
Input Fields
| Field | Type | Required |
|---|---|---|
id | string | Yes |
organizationId | string | Yes |
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": "admissions",
"apiName": "getById",
"data": {
"id": "id_123",
"organizationId": "org_123"
}
}'Example Response
{ "status": "ok", "data": {} }listByOrganization
Source: backend/endpoints/admissions/list-by-organization
Input Fields
| Field | Type | Required |
|---|---|---|
organizationId | string | Yes |
page | int | No |
pageSize | int | No |
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": "admissions",
"apiName": "listByOrganization",
"data": {
"organizationId": "org_123"
}
}'Example Response
{ "status": "ok", "data": {} }update
Source: backend/endpoints/admissions/update
Input Fields
| Field | Type | Required |
|---|---|---|
id | string | Yes |
organizationId | string | Yes |
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": "admissions",
"apiName": "update",
"data": {
"id": "id_123",
"organizationId": "org_123"
}
}'Example Response
{ "status": "ok", "data": {} }