Measurements
ovok.measurements turns device readings into FHIR Observations and saves them so a
- Stable unknown
- Release candidate since 0.1.0-rc.3
- Development since 0.1.0-dev.17+c121e27
ovok.measurements turns device readings into FHIR Observations and saves them so a
reading is never lost or duplicated.
final result = await ovok.measurements.save(
BuildObservationsParams(
patientId: patientId,
measurement: {
'measurementTypeKey': 'body-weight',
'bodyWeight': 72.4,
},
),
);
if (result.status == 'queued') {
await ovok.measurements.offlineQueue.flush();
}- Build without saving:
build(...)returns the Observations a measurement maps to, using the same codes as the other Ovok SDKs. - Conditional writes: saves are conditional on the reading's identifier, so saving the same reading twice stores it once. Large readings are split across requests.
- Grouped readings:
saveObservationGroups(...)keeps each reading together, sends main observations before linked members, and returns one combined bundle. - Offline: a save that fails for a retryable reason is queued in the secure store
and reported as
queued. CallofflineQueue.flush()when the device is back online. - Reading back:
latest,lastForPatientandcodesForread recent values and the codes a measurement type uses.
Last updated on