# Follow the RPM example data flow

Canonical page: https://docs.ovok.com/example-rpm-app/monorepo/data-flow

Each app connects to Ovok as needed: the mobile app saves readings, the EHR reads records and performs supported FHIR writes, and the dashboard reads practitioner data. Each authenticates independently. In local demo mode only, a development relay shares synthetic readings between the mobile app, EHR, and dashboard.

```mermaid
flowchart LR
  device[Supported device] --> mobile[Patient mobile app]
  mobile -->|FHIR-backed measurement or response| ovok[Ovok]
  ehr -->|FHIR reads and supported writes| ovok
  ovok -->|Authorized patient records| ehr
  ovok -->|Patient-linked records| dashboard[Clinician dashboard]
  mobile -. synthetic demo only .-> relay[Local in-memory relay]
  relay -. synthetic demo only .-> ehr
  relay -. synthetic demo only .-> dashboard
```

The local relay is not an Ovok service, is unavailable in production builds, and does not carry sandbox records. It exists only to demonstrate synthetic readings across the three local applications.

## Patient write path [#patient-write-path]

In the mobile workspace, [`src/bluetooth.tsx`](https://github.com/Ovok-Dev/rpm-example-app/blob/dev/apps/mobile/src/bluetooth.tsx) receives supported device results. The app passes a validated diary entry into [`src/care-store.tsx`](https://github.com/Ovok-Dev/rpm-example-app/blob/dev/apps/mobile/src/care-store.tsx), which persists it locally and then calls the write functions in [`src/ovok.ts`](https://github.com/Ovok-Dev/rpm-example-app/blob/dev/apps/mobile/src/ovok.ts) when an authenticated Patient session is active.

Demo records remain local. Patient saves use the signed-in profile and are kept separate from demo history. A failed write is surfaced as a retryable state; this example does not promise unattended background delivery.

## Practitioner read path [#practitioner-read-path]

The dashboard's [`patientData.ts`](https://github.com/Ovok-Dev/rpm-example-app/blob/dev/apps/dashboard/src/lib/patientData.ts) loads Patient measurements and QuestionnaireResponses through the SDK. [`PatientReviewPage.tsx`](https://github.com/Ovok-Dev/rpm-example-app/blob/dev/apps/dashboard/src/components/PatientReviewPage.tsx) displays readings, timestamps, source labels, and recent activity. Sandbox access is enforced by the project and practitioner policy, not by a client-side relationship check.

For separate app-specific setup and source tours, continue to the [mobile app](/example-rpm-app/monorepo/mobile-app), [clinician dashboard](/example-rpm-app/monorepo/web-dashboard), and [clinic EHR](/example-rpm-app/ehr).
