add reporting foundation: multipage nav, auth gate, date-range fetch
First increment of the clinical reporting feature (see docs/requirements-reporting.md and docs/design-reporting.md): moves the existing live view to pages/1_Live.py, adds a password gate since the dashboard URL will be shared with the diabetes team, adds fetch_entries_range/fetch_treatments_range for multi-day report queries, and adds reporting.py with the core clinical calculations (GMI, %CV, 5-band time-in-range, hypo/hyper event detection per the Battelino et al. 2019 persistence rule). No report pages wired up yet — that's next. Co-Authored-By: Claude Sonnet 5 <[email protected]>
This commit is contained in:
@@ -1,18 +1,22 @@
|
||||
# glucose-dashboard
|
||||
|
||||
Dashboard van glucosedata, live opgehaald uit een [Nightscout](https://nightscout.github.io/)-instantie.
|
||||
Toont een rollend venster (standaard 24 uur) van je CGM-curve met insuline,
|
||||
koolhydraten en pomp-/sensorwissels overlay, plus time-in-range-cijfers.
|
||||
Meerdere pagina's (zie zijbalk): een rollend live-overzicht en een set
|
||||
klinische rapportagepagina's (zie `docs/requirements-reporting.md` en
|
||||
`docs/design-reporting.md`).
|
||||
|
||||
## Instellen
|
||||
|
||||
1. Zorg voor een draaiende Nightscout-instantie en een API-token (Admin Tools
|
||||
> Manage Tokens in Nightscout — geef het token minimaal `readable`-rechten)
|
||||
of het klassieke API secret.
|
||||
2. Kopieer `.env.example` naar `.env` en vul `NIGHTSCOUT_URL` en één van de
|
||||
twee auth-opties in. `app.py` laadt `.env` zelf in (via `python-dotenv`),
|
||||
dus dit werkt hetzelfde onder PowerShell, cmd of bash — je hoeft de
|
||||
variabelen niet zelf in je shell te zetten.
|
||||
2. Kopieer `.env.example` naar `.env` en vul `NIGHTSCOUT_URL`, één van de
|
||||
twee auth-opties, en `DASHBOARD_PASSWORD_HASH` in (zie het voorbeeldbestand
|
||||
voor hoe je die hash genereert — de dashboard-URL wordt gedeeld met het
|
||||
diabetesteam, dus elke pagina zit achter een wachtwoord). `app.py` laadt
|
||||
`.env` zelf in (via `python-dotenv`), dus dit werkt hetzelfde onder
|
||||
PowerShell, cmd of bash — je hoeft de variabelen niet zelf in je shell te
|
||||
zetten.
|
||||
3. Lokaal draaien:
|
||||
|
||||
```powershell
|
||||
|
||||
Reference in New Issue
Block a user