FHIR and observations
Ovok stores clinical data as FHIR resources. OvokClient extends MedplumClient, so the SDK keeps the inherited FHIR client surface and adds Ovok-specific helpers for common workflows.
Start with FHIR basics for resources, references, identifiers, and coded values. Use the FHIR R4 reference for resource operations and the FHIR elements reference for element definitions.
Save a measurement
The measurement API converts a typed measurement into FHIR Observation resources and saves them through a transaction:
import { MeasurementTypeKey } from '@ovok/core';
const result = await client.saveMeasurement({
patientId: 'patient-id',
measurement: {
measurementTypeKey: MeasurementTypeKey.temperature,
bodyTemp: 36.5,
},
});
if (result.status === 'saved') {
// The backend accepted the transaction bundle.
}
saveObservations(observations) is available when the app already has FHIR Observation resources. The write uses conditional creates with stable identifiers, so repeating an equivalent request does not create a duplicate. When an offline queue is enabled, the return value can be queued; see offline measurements.
The SDK exports measurement types and services for blood pressure, blood glucose, pulse oximetry, temperature, weight, ECG, sleep, respiratory rate, step count, and other supported measurements. Use the exported TypeScript types rather than constructing vendor-specific payloads yourself.
Read observations
The client exposes getLatestObservationsByCodes() for a resource-oriented read and patient helpers such as getPatientLatestObservations() for the patient API. These methods return FHIR resources from the backend; the SDK does not reinterpret clinical values or decide whether a result is clinically significant.
Keep device ingestion separate
This SDK is not the transport for sensor-to-platform ingestion. Device readings enter Ovok through the configured ingestion path, including the OVOK IoT service when that path applies. The SDK is for the application-facing APIs.
For alerts and thresholds, see Signals. For end-to-end sample workflows, browse the Ovok guides.