10. Finish history, settings, localisation and validation
What we are building
The finished member experience: a longitudinal history, clear connection controls, localized app-owned UI and a validated sandbox journey.
What you should already have
- The dashboard, QuestionnaireResponse, coach and Goal flows from steps 6–9.
- Published CMS translation groups for the app.
- A native build on the platform you are validating.
The implementation
History and settings
Build history from the same sources as the dashboard: patient QuestionnaireResponses, Goals and supported Observations. Keep a visible type and source label for each item, such as Weekly reflection · self-reported, Sleep session · imported from Apple Health, Steps · imported from Health Connect, or Resting heart rate · imported from Health Connect.
Settings should let a member:
- View profile and app language.
- Review which health platform is connected and which read permission the app requested.
- Open the platform's health-data settings or disconnect the integration using the supported platform behavior.
- Review coach-sharing information and use the documented revoke flow.
- Sign out.
Do not promise that an SDK component can revoke a platform permission if the operating system owns that control. Explain how to change it in HealthKit or Health Connect settings.
Localize app-owned text through Ovok CMS
Store UI text in published CMS translations documents, grouped by screen, for example whole-person-dashboard, weekly-reflection-ui, coach-review and settings. Keep the same i18next instance used by useCmsTranslations:
import AsyncStorage from "@react-native-async-storage/async-storage";
import i18n from "i18next";
import { useTranslation } from "react-i18next";
const LANGUAGE_KEY = "ovok-healthspan-language";
export async function restoreLanguage() {
const saved = await AsyncStorage.getItem(LANGUAGE_KEY);
if (saved) await i18n.changeLanguage(saved);
}
export async function chooseLanguage(language: "en" | "de") {
await i18n.changeLanguage(language);
await AsyncStorage.setItem(LANGUAGE_KEY, language);
}
export function DashboardTitle() {
const { t } = useTranslation();
return <Text>{t("whole-person-dashboard.title")}</Text>;
}
Install AsyncStorage with npx expo install @react-native-async-storage/async-storage if the project does not already include it. Call restoreLanguage after i18next is initialized and before showing translated screens. The Native SDK's useCmsTranslations refetches the CMS groups when the current language changes; see Use Ovok CMS with i18n.
CMS translation groups cover app-owned strings. Questionnaire question text is FHIR content. Publish and load a reviewed Questionnaire for each supported language; do not assume changing the app locale translates resource content or use casual machine translation for sensitive wording.
Validate the whole journey
Use synthetic accounts and check the following in the sandbox:
- Register and sign in as a Patient.
- Skip health permissions and complete a reflection; verify the app still works.
- Grant read access only to sleep, steps and resting heart rate; verify the imports or valid empty states.
- Complete a second reflection and confirm it creates a separate QuestionnaireResponse.
- Invite a test Practitioner, accept the invitation and verify the share before showing the coach screen.
- Test authorized and unassigned Patient reads with separate accounts.
- Create a member-chosen Goal, review it with the coach and update its state.
- Change language, restart the app, and confirm both locale persistence and CMS strings.
- Revoke coach sharing and confirm the next server request no longer returns the shared record.
- Test denied permission, unavailable platform service, offline state, read/write failures, empty history and wrong tenant configuration.
Important Ovok decisions
- Sleep sessions, local-day step totals and resting-heart-rate samples are optional imports. Their source coding and time semantics remain distinct from reflections.
- Health-platform denial, revoked permissions and missing data are valid product states.
- Coach access is validated through the Ovok server, not by hiding UI or filtering results on the client.
- The app displays multiple trends side by side; it does not compute a composite Healthspan Score, diagnose or prescribe.
- For extended Health Connect background delivery, follow the background sync guide after verifying the foreground path.
Expected result
A member can authenticate, record five-domain reflections, optionally sync sleep sessions, local-day step totals and resting-heart-rate samples, work with an assigned human coach, set a personal goal, review history and use localized app UI. Every value carries its source and the product stays non-diagnostic.
Common errors and troubleshooting
| Symptom | Check |
|---|---|
| The app only works after granting health permission | Make the provider optional and keep the self-report flow available. |
| CMS text stays in the old language | Keep one i18next instance and render useCmsTranslations below OvokProvider. |
| Reflection questions remain in English | Load a separately reviewed FHIR Questionnaire for the selected language. |
| Coach sees a previously shared record after revocation | Reload through the server and verify the revoked share; do not trust cached coach data. |
| A dashboard suggests a cause or treatment | Remove the inference. Show the observations and invite discussion with the human coach. |