Skip to main content

Observation

Overview

The Observation resource represents measurements and simple assertions made about a patient. This includes vital signs (heart rate, blood pressure, temperature), lab results (blood glucose), and device-collected data (SpO2, weight).

API Endpoints

MethodPathDescription
GET/api/monitoreds/{id}/observations/List observations for a patient
POST/api/monitoreds/{id}/observations/Create observations
GET/api/observations/{id}/Get observation details

Data Model

FieldTypeDescription
idintegerUnique identifier
observation_definitionobjectType and method of observation
categorystringCategory (e.g., physiological_data)
valuestringMeasured value
value_typestringData type (float, int, etc.)
value_unitstringUnit of measurement (bpm, celsius, mmHg, etc.)
issueddatetimeWhen the observation was issued
effective_datetimedatetimeWhen the measurement was taken
source_idintegerSource device identifier

Example

{
"id": 810,
"observation_definition": {
"observation_name": "heart_rate",
"observation_method": "device"
},
"category": "physiological_data",
"value": "72",
"value_type": "int",
"value_unit": "bpm",
"issued": "2024-01-15T10:30:00Z",
"effective_datetime": "2024-01-15T10:30:00Z",
"source_id": 1
}

Observation Types

NameUnitDescription
heart_ratebpmHeart rate
blood_pressure_systolicmmHgSystolic blood pressure
blood_pressure_diastolicmmHgDiastolic blood pressure
temperaturecelsiusBody temperature
oxygen_saturationpercentageSpO2
weightkgBody weight
blood_glucosemg/dLBlood glucose level
respiratory_ratebreaths/minRespiratory rate

SDK v2 Typed Observations

When using the vitalera SDK v2, observations are returned as typed classes rather than generic JSON. This provides compile-time safety and auto-completion in your IDE.

API observation_nameSDK v2 Typed ClassKey Fields
heart_rateHeartRateObservationheartRate (bpm)
blood_pressure_systolic / blood_pressure_diastolicBloodPressureObservationsystolic, diastolic (mmHg), pulseRate (bpm)
temperatureTemperatureObservationtemperature (celsius)
oxygen_saturationOxygenSaturationObservationspo2 (%)
weightWeightObservationweight (kg)
blood_glucoseBloodGlucoseObservationglucose (mg/dL)
respiratory_rateRespiratoryRateObservationrespiratoryRate (breaths/min)

Example (Kotlin):

device.collect().collect { observation ->
when (observation) {
is BloodPressureObservation ->
println("BP: ${observation.systolic}/${observation.diastolic} mmHg")
is HeartRateObservation ->
println("HR: ${observation.heartRate} bpm")
is OxygenSaturationObservation ->
println("SpO2: ${observation.spo2}%")
}
}

Example (Swift):

for try await observation in device.collect() {
if let bp = observation as? BloodPressureObservation {
print("BP: \(bp.systolic)/\(bp.diastolic) mmHg")
} else if let hr = observation as? HeartRateObservation {
print("HR: \(hr.heartRate) bpm")
} else if let spo2 = observation as? OxygenSaturationObservation {
print("SpO2: \(spo2.spo2)%")
}
}

For the full list of 30+ typed observation classes, see the SDK Overview.

  • Patient - The patient this observation belongs to
  • CarePlan - The care plan context