Skip to main content
Health Equity Digital Twin
Live

Patient-Controlled Health Monitoring

An open-source toolkit that turns raw wearable data into clinically interpretable reports. Built by a patient with zero programming background, using AI as external working memory. Every statistical claim verified. Every line of code published.

What the Dashboards Show

The pipeline runs 12 analysis scripts against a single SQLite database and produces interactive HTML reports with machine-readable JSON metrics. Every report regenerates from current data on each run.

Interactive 3D

Biometric Visualisations

Three-dimensional Plotly charts mapping heart rate variability, temperature deviation, sleep architecture, and SpO2 across time. Rotatable, zoomable, and exportable. Each data point links back to the underlying Oura Ring measurement.

Tool
Plotly.js
Output
Self-contained HTML
State Estimation

Digital Twin Model

A five-state Kalman filter with Unscented Kalman Filter (UKF) extension tracks latent health states from noisy wearable signals. EM-optimised parameters. The model estimates overall physiological condition, recovery trajectory, and deviation from baseline.

Method
Kalman + UKF
States
5 latent
Pattern Recognition

Anomaly Detection

Five independent algorithms — Matrix Profile (STUMPY), Isolation Forest, LSTM autoencoder, DBSCAN clustering, and statistical Z-score — flag days where biometric patterns diverge from the patient's own baseline. Consensus scoring reduces false positives.

Algorithms
5 ensemble
Approach
Consensus scoring

Who This Is For

Patients and Caregivers

What this does for you

This toolkit takes the data your Oura Ring already collects and turns it into reports you and your care team can actually read. Instead of raw numbers in an app, you get structured dashboards that track how your body is recovering over time.

What data is tracked

  • Heart rate variability (HRV) — a measure of how well your nervous system adapts
  • Resting heart rate — lower tends to indicate better cardiovascular recovery
  • Body temperature deviation — changes from your personal baseline
  • Blood oxygen saturation (SpO2) — how effectively your lungs are working
  • Sleep stages and duration — deep sleep, REM, and total rest
  • Activity levels — steps and movement patterns

How to interpret the reports

Each dashboard uses colour coding: green indicates values within your normal range, amber flags mild deviations, and red highlights days that multiple algorithms agree are unusual. The reports are designed to start a conversation with your clinician, not to replace clinical judgement.

Developers and Researchers

Open source, forkable, extensible

The full codebase is published under the MIT licence. Clone the repository, run the pipeline against the included demo dataset (79 days of real Oura data), and see every report locally in under two minutes.

git clone https://github.com/The-Educational-Equality-Institute/oura-hsct-digital-twin cd oura-hsct-digital-twin pip install -r requirements.txt cp config.example.py config.py python run_all.py
Licence
MIT
Language
Python 3.10+
Demo data
Included (79 days)

Contributions welcome. The repository includes issue templates, a code of conduct, and a clear project structure. Read the README for setup instructions and architecture details.

Verification Approach

Every number on the live dashboards is checked against the source data. 389 out of 389 statistical claims verified — a 100% verification rate.

Reproducible Scripts

All 12 analysis scripts run against a single SQLite database. The pipeline re-computes every reported value from current data on every run. No manual calculations. No spreadsheet formulas. Every output traces back to a specific Python function.

Statistical QA

A dedicated QA script (statcheck_reports.py) verifies that statistics reported in HTML match the corresponding JSON metrics file. If any value drifts between display and data, the check fails.

Causal Inference

CausalImpact (Bayesian structural time series) with placebo falsification tests. The analysis does not assume that a visible change in the data proves a treatment effect. It tests whether the observed pattern could have occurred by chance.

Known Confounds

Known confounding factors are documented in every report. The current dataset includes a hepatitis E (HEV) diagnosis that overlaps with the treatment window and cannot be fully separated from the drug signal at the current sample size.

Full Analysis Pipeline

Comprehensive Biometric Overview
Advanced HRV Dynamics
Sleep Architecture Analysis
Composite Biomarker Scores
SpO2 Trend and BOS Screening
5-Algorithm Anomaly Detection
Foundation Model Forecasting
Digital Twin State Model
Causal Inference Analysis
GvHD Flare-State Prediction
3D Interactive Dashboards
Roadmap and Appendices

Your Health Data Belongs to You

This project exists because one patient decided to exercise existing legal rights to access, understand, and use their own health data. Those same rights apply to you.

GDPR: Data Protection

Under the General Data Protection Regulation, you have the right to access your personal data (Article 15), correct inaccurate data (Article 16), and receive your data in a portable format (Article 20). These are not requests — they are legal rights.

CRPD: Disability Rights

The Convention on the Rights of Persons with Disabilities establishes that access to information, including health data, is a matter of equality (Article 9, Article 21). When a patient with a disability cannot access their own records, that is a barrier the system must remove.

How this project handles data

  • All processing runs locally on your own machine. No data is sent to external servers.
  • The Oura API connection uses OAuth2 with tokens stored only in your local .env file.
  • Generated reports stay in your local reports/ directory unless you choose to publish them.
  • The included demo dataset contains real data published with the patient's explicit consent.
  • You control what data enters the pipeline, what analysis runs, and where results go.

Important Limitations

This is a single-patient case study (N=1) demonstrating patient-controlled health monitoring. It is not validated for clinical decision-making and is not a medical device.

The current dataset covers 79 modelled days. A hepatitis E (HEV) diagnosis overlaps with the treatment observation window and cannot be fully separated from the drug signal at the present sample size. All caveats are documented in each generated report.

Not affiliated with, endorsed by, or sponsored by Oura Health Oy. Oura is a registered trademark of Oura Health Oy.

Explore the Project

The Digital Twin is one sub-programme within the Health Equity programme at The Educational Equality Institute, a 501(c)(3) tax-exempt organisation. All tools are open source. All resources are free.

Site footer