Blood oxygen and pulse rate
Use this category for oxygen saturation and pulse rate recorded together.
Support in @ovok/core
- Category key:
bloodOxygenPulseRate(blood-oxygen-pulse-rate) - Read: Supported through the observation mapping.
- Save: Supported through the typed measurement save workflow.
The category key selects a measurement shape. It does not determine the patient, time range, or source device. For the shared React query and save behavior, see Measurements and health data.
Data shape
The base measurement requires measurementTypeKey. Fields marked optional can be omitted when the source did not provide a value.
| Field | Type | Unit or meaning | Read and save behavior |
|---|---|---|---|
bloodOxygen | number (optional) | percent (%) | Mapped and saved as oxygen saturation; whole-number precision. |
pulseRate | number (optional) | bpm | Mapped and saved as heart rate; whole-number precision. |
rrInterval | number (optional) | Not specified by this measurement mapping | Declared in the public type, but not currently saved or returned by the observation mapper. |
perfusionIndex | number (optional) | Not specified by this measurement mapping | Declared in the public type, but not currently saved or returned by the observation mapper. |
Mapped values
The read and save workflows currently handle bloodOxygen and pulseRate. The other two fields are present in the type but are not serialized by the measurement service. Keep the original Observation resources when the app needs additional source details.
Supply oxygen saturation as a percentage, such as 97, and pulse rate in bpm. The SDK does not convert a fraction such as 0.97 to a percentage on direct saves.
Read this category
Select MeasurementTypeKey.bloodOxygenPulseRate. Returned measurements include the mapped saturation and pulse-rate values when present; rrInterval and perfusionIndex are not populated by this mapper.
Use useObservations() in a client-side component below OvokProvider. It returns mapped measurements, original observations, loading, and error. The hook reference describes its filters and state.
Save this category
Pass the values using percent and bpm. Set effectiveDateTime on the request when the reading time is known.
Pass the measurement to OvokClient.saveMeasurement() or, in React, the function returned by useSaveMeasurement(). Common request fields such as patientId and device are described in the measurement overview.
Example
This example uses the configured OvokClient from the get started guide. Supply values in the units listed above.
import { MeasurementTypeKey } from '@ovok/core';
async function saveOxygenAndPulse() {
return client.saveMeasurement({
measurement: {
measurementTypeKey: MeasurementTypeKey.bloodOxygenPulseRate,
bloodOxygen: 97,
pulseRate: 68,
},
effectiveDateTime: new Date(),
});
}
When offline queueing is enabled, inspect the returned status. A queued result means the measurement is pending until the queue is flushed; it is not a completed server save.