The Observations & Ingestion API handles vital sign data collection from connected medical devices. Readings are ingested, validated, stored, transformed into FHIR R4 Observation resources, and queued for transmission to eClinicalWorks. The ingestion pipeline also triggers threshold-based alerts for the triage system.

Higher Rate Limits

Ingestion endpoints support 1,000 requests/hour for authenticated users to accommodate high-frequency device data streams.

Ingest Blood Pressure

Submit a blood pressure reading from a connected device. The reading is validated (systolic 60–300 mmHg, diastolic 30–200 mmHg), stored, and checked against the patient's configured alert thresholds.

POST /api/v1/ingestion/blood-pressure/

Request Body

ParameterTypeRequiredDescription
patient_iduuidYesPatient ID
systolicnumberYesSystolic pressure in mmHg (60–300)
diastolicnumberYesDiastolic pressure in mmHg (30–200)
pulsenumberNoHeart rate in bpm (30–250)
device_idstringNoDevice identifier for traceability
measured_atstringYesISO 8601 timestamp of the measurement

Example Request

curl -X POST https://app.vantrexia.com/api/v1/ingestion/blood-pressure/ \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..." \
  -H "Content-Type: application/json" \
  -d '{
    "patient_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
    "systolic": 142,
    "diastolic": 92,
    "pulse": 78,
    "device_id": "BP-OMRON-7250",
    "measured_at": "2026-02-06T10:30:00Z"
  }'

Response 201 Created

{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "patient_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
  "observation_type": "blood_pressure",
  "systolic": 142,
  "diastolic": 92,
  "pulse": 78,
  "device_id": "BP-OMRON-7250",
  "measured_at": "2026-02-06T10:30:00Z",
  "fhir_status": "pending",
  "alert_triggered": true,
  "alert_details": {
    "level": "warning",
    "message": "Systolic BP 142 exceeds threshold of 140 mmHg"
  },
  "created_at": "2026-02-06T10:30:05Z"
}
Threshold Alerts

When a reading exceeds the patient's configured thresholds, alert_triggered is true and an alert is automatically created in the triage system. Push notifications are sent to assigned clinicians.

Ingest Weight

Submit a weight reading from a connected scale device.

POST /api/v1/ingestion/weight/

Request Body

ParameterTypeRequiredDescription
patient_iduuidYesPatient ID
weight_kgnumberYesWeight in kilograms (20–500)
device_idstringNoDevice identifier
measured_atstringYesISO 8601 timestamp of the measurement

Example Request

curl -X POST https://app.vantrexia.com/api/v1/ingestion/weight/ \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..." \
  -H "Content-Type: application/json" \
  -d '{
    "patient_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
    "weight_kg": 84.5,
    "device_id": "SCALE-WITHINGS-200",
    "measured_at": "2026-02-06T07:00:00Z"
  }'

Response 201 Created

{
  "id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
  "patient_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
  "observation_type": "weight",
  "weight_kg": 84.5,
  "device_id": "SCALE-WITHINGS-200",
  "measured_at": "2026-02-06T07:00:00Z",
  "fhir_status": "pending",
  "alert_triggered": false,
  "created_at": "2026-02-06T07:00:03Z"
}

Error Response 400 Bad Request

{
  "detail": "Validation error.",
  "code": "validation_error",
  "field_errors": {
    "weight_kg": ["Ensure this value is greater than or equal to 20."],
    "measured_at": ["Datetime has wrong format. Use ISO 8601 format."]
  }
}

List Observations

Retrieve a paginated list of observations with filtering by patient, type, date range, and FHIR status.

GET /api/v1/ingestion/observations/

Query Parameters

ParameterTypeRequiredDescription
patient_iduuidNoFilter by patient
observation_typestringNoFilter by type: blood_pressure, weight, pulse_oximetry, blood_glucose
date_fromstringNoStart date (ISO 8601)
date_tostringNoEnd date (ISO 8601)
fhir_statusstringNoFilter by FHIR status: pending, processing, transmitted, failed
orderingstringNoSort: measured_at, -measured_at (default: -measured_at)

Example Request

curl "https://app.vantrexia.com/api/v1/ingestion/observations/?patient_id=d290f1ee-6c54-4b01-90e6-d701748f0851&observation_type=blood_pressure&date_from=2026-02-01" \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..."

Response 200 OK

{
  "count": 24,
  "next": "https://app.vantrexia.com/api/v1/ingestion/observations/?page=2&patient_id=d290f1ee-6c54-4b01-90e6-d701748f0851&observation_type=blood_pressure&date_from=2026-02-01",
  "previous": null,
  "results": [
    {
      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "patient_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
      "observation_type": "blood_pressure",
      "systolic": 142,
      "diastolic": 92,
      "pulse": 78,
      "device_id": "BP-OMRON-7250",
      "measured_at": "2026-02-06T10:30:00Z",
      "fhir_status": "transmitted",
      "created_at": "2026-02-06T10:30:05Z"
    },
    {
      "id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
      "patient_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
      "observation_type": "blood_pressure",
      "systolic": 128,
      "diastolic": 82,
      "pulse": 72,
      "device_id": "BP-OMRON-7250",
      "measured_at": "2026-02-05T10:15:00Z",
      "fhir_status": "transmitted",
      "created_at": "2026-02-05T10:15:04Z"
    }
  ]
}

Ingestion Service Status

Check the health and status of the ingestion service, including queue depth and processing rates.

GET /api/v1/ingestion/status/

Example Request

curl https://app.vantrexia.com/api/v1/ingestion/status/ \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..."

Response 200 OK

{
  "status": "healthy",
  "queue_depth": 12,
  "observations_today": 347,
  "observations_this_hour": 28,
  "processing_rate": "2.3/sec",
  "last_processed_at": "2026-02-06T14:59:50Z",
  "fhir_pipeline": {
    "pending": 12,
    "processing": 3,
    "transmitted_today": 320,
    "failed_today": 2
  }
}

Processing Pipeline

Every observation goes through a five-stage pipeline from ingestion to eClinicalWorks transmission:

1

Ingest

The raw device reading is received via the ingestion API. The request is authenticated and the payload is parsed.

2

Validate

Values are checked against physiological ranges (e.g., systolic 60–300 mmHg). Invalid readings are rejected with a 400 error. Duplicate detection prevents reprocessing of the same measurement.

3

Store

The validated observation is persisted to the database and threshold checks are performed. If thresholds are breached, alerts are created and push notifications are sent.

4

FHIR Transform

The observation is transformed into a FHIR R4 Observation resource with proper coding (LOINC), units (UCUM), and patient references.

5

Queue for eCW

The FHIR resource is placed in the transmission queue for delivery to eClinicalWorks. Transmission uses exponential backoff retry logic (max 5 attempts).

Pipeline Monitoring

Use the FHIR Transmission Log to monitor the delivery status of observations to eClinicalWorks. The Ingestion Status endpoint provides real-time pipeline metrics.