- POST /auth/demo/fresh + «Демо: войти как Андрей» on the welcome screen: every sign-in gets a fresh private
copy of veteran Andrey (consent, prescription, ЕМИАС record) and lands in the chat — no codes, nobody's
crisis or half-done questionnaire leaks into another viewer.
- Initial screening switch: SCREENING_ENABLED env default + /demo/settings + a toggle in the demo console;
off → after consent straight to the chat.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Patient list sorted red -> yellow -> grey -> green with KPI row, trend arrows,
7-day adherence bars, discontinuation-risk badge with factor tooltip.
- Patient card: scales with severity bands from config/scales (unscheduled marked),
mood/sleep/alcohol small multiples, dose heat-strip, alerts feed with ack,
safety plan, AI summary with disclaimer.
- Live alerts: st.fragment(run_every=2.5s) polling, toast + pinned acute banner on
every page; full rerun on new alert only on doctor pages.
- Connect form -> POST /patients/connect -> code, QR, deep link.
- Thin httpx ApiClient over the frozen schemas with graceful "API недоступен".
- app.py discovers dashboard/pages/*.py automatically (st.navigation); demo pages
of #17 plug in by adding a file.
Refs #16
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- personas degrade: /demo/personas → doctor's patients (hero first) → env token
- scenario file guessed from the transliterated first name (andrey.jsonl), like the backend
- «Подключить демо-пациента»: connects the synthetic hero via /patients/connect when no seed
- connect code prefilled from ?code= of the console link
Refs #17
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- pages/2_Демо-консоль.py: persona selector, virtual clock bar (+1 h, to 08:00/20:00,
next day, reset with confirm), fallback patient web chat (buttons from Reply.buttons,
kind styling, outbox drained after every action and on a 2 s fragment poll), scenario panel
- pages/3_Сплит-экран.py: patient chat or PATIENT_WEB_URL iframe on the left, compact doctor
panel (patients, live alerts, red banner on a new acute alert) on the right
- console/playback.py: data/synthetic/<persona>.jsonl runner (advance_to/press/text/
expect_color/start), date chaining between days, pause on failure with retry/skip/manual
- console/api.py: own HTTP client over the frozen API contract, ApiError only
Refs #17
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
One Postgres with isolated identity/clinical databases and roles (ADR-003),
FastAPI /health, Streamlit placeholder, typed settings with offline defaults.
Refs #1
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>