Skip to main content

Respiratory therapy

Use this category to save or read a coded group of respiratory-therapy metrics. The SDK preserves the FHIR components you provide and does not assign device-specific meaning to them.

Support in @ovok/core​

  • Category key: respiratoryTherapy (respiratory-therapy)
  • Read: Supported through the observation mapping.
  • Save: Supported through the typed measurement save workflow.

For shared query filters and save results, see Measurements and health data.

Data shape​

FieldTypeRequiredMeaning
componentsFHIR ObservationComponent[]YesCoded metrics and their typed values. Must contain at least one component to produce an Observation.
recordedAtDate (optional)NoTime associated with the observation.
deviceFHIR Reference (optional)NoDevice reference associated with the reading.

Each component should include a code and an appropriate FHIR value, such as a quantity or string. Choose code systems and units that the receiving application understands. The SDK does not normalize values, infer units, or interpret component codes.

Save a respiratory-therapy observation​

import { MeasurementTypeKey } from '@ovok/core';

const result = await client.saveMeasurement({
measurement: {
measurementTypeKey: MeasurementTypeKey.respiratoryTherapy,
recordedAt: new Date(),
components: [
{
code: {
coding: [{
system: 'https://your-device.example/codes',
code: 'therapy-duration',
display: 'Therapy duration',
}],
},
valueQuantity: {
value: 30,
unit: 'min',
code: 'min',
system: 'http://unitsofmeasure.org',
},
},
],
},
});

Replace the example code system and metric with the conventions used by your device or product. An empty components array does not generate a measurement Observation. Queue-enabled saves can remain pending until a later flush; see Offline measurement saves.

Read this category​

Use MeasurementTypeKey.respiratoryTherapy in useObservations() or the client observation query. The mapper returns the components without translating them into a device-specific model. Inspect the component codes before displaying a label or unit.