# FHIR persistence in the RPM app

Canonical page: https://docs.ovok.com/example-rpm-app/integrations/fhir-persistence

The example uses the Ovok client for real Patient data while keeping Demo data local. Its persistence boundary is explicit: a demo entry is rejected, and a Patient entry can only be saved when the active client profile matches that Patient.

## What the app writes [#what-the-app-writes]

- **Daily check-in:** the app builds a FHIR `QuestionnaireResponse` for the signed-in Patient and updates it using a stable resource ID. Retrying therefore targets the same response instead of creating a new ID on every attempt.
- **Weight:** the app sends a typed body-weight measurement through `OvokClient.saveMeasurement()`.
- **ECG:** the app sends the waveform, duration, optional heart rate, device details, and recorded time through the SDK's ECG measurement input.

These are example data flows, not clinical interpretation. The check-in is illustrative, and the app does not make a diagnosis or calculate an alert threshold.

The [FHIR R4 reference](/api/fhir/r4), [JavaScript SDK measurement docs](/web-sdk/core/measurements-and-health-data), and [React Native SDK measurement docs](/native-sdk/guide/components/measurement) explain the broader resource and SDK contracts.

**Explore the source:** [ovok.ts](https://github.com/Ovok-Dev/rpm-mobile-app/blob/dev/src/ovok.ts) contains the FHIR resource construction and calls to `updateResource()` and `saveMeasurement()`; [care-store.tsx](https://github.com/Ovok-Dev/rpm-mobile-app/blob/dev/src/care-store.tsx) controls when entries are persisted and synchronized.
