Skip to main content

Body temperature

Use this category for a body-temperature reading.

Support in @ovok/core​

  • Category key: temperature (body-temperature)
  • 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.

FieldTypeUnit or meaningRead and save behavior
bodyTempnumber (optional)°CMapped and saved as body temperature; one decimal place on save.

Value handling​

Supply the temperature in degrees Celsius. The SDK does not convert from Fahrenheit. A saved value is rounded to one decimal place; the mapper returns the numeric Observation value as bodyTemp.

Read this category​

Select MeasurementTypeKey.temperature. The returned measurement uses the property name bodyTemp, while the enum member is named temperature.

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​

Supply bodyTemp in °C. Use request-level effectiveDateTime for the measurement time.

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 saveBodyTemperature() {
return client.saveMeasurement({
measurement: {
measurementTypeKey: MeasurementTypeKey.temperature,
bodyTemp: 36.8,
},
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.