EndpointsLab Test Suggestions

Lab Test Suggestions

Function-calling namespace: labTestSuggestions

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

getByConsulation

Source: backend/endpoints/lab-test-suggestions/get-by-consultation

Input Fields

FieldTypeRequiredConstraints
patientIdstringYes-
consultationIdstringYes-
priceFilterobjectNonullable
nearByobjectNonullable

Nested Field Structures

priceFilter

FieldTypeRequiredConstraints
minPricenumberNonullable
maxPricenumberNonullable
sortBystringNo-

nearBy

FieldTypeRequiredConstraints
latnumberNounix-ms timestamp; nullable
lotnumberNonullable
latitudenumberNonullable
longitudenumberNonullable
radiusKmnumberNonullable
addressStreetstringNo-
addressCitystringNo-
addressStatestringNo-
addressPostalCodestringNo-
addressCountrystringNo-

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": "labTestSuggestions",
  "apiName": "getByConsulation",
  "data": {
    "patientId": "patient_123",
    "consultationId": "consultation_123"
  }
}'

Example Response

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