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
| Field | Type | Required | Meaning |
|---|---|---|---|
components | FHIR ObservationComponent[] | Yes | Coded metrics and their typed values. Must contain at least one component to produce an Observation. |
recordedAt | Date (optional) | No | Time associated with the observation. |
device | FHIR Reference (optional) | No | Device 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.