mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-14 06:40:50 +00:00
feat(mental-health): gate the PHQ-9/GAD-7 check-in behind an opt-in module
The mental-wellbeing screener surface shipped built but unreachable: no nav entry, no module key, ungated. Add a `mentalHealth` module key (opt-in, default OFF — a depression/anxiety self-assessment is at least as sensitive as mood) to the registry, the module-hub icon map, and the exhaustive module maps. Give the check-in a nav home at /insights/mental-wellbeing, born-gated on the module so it appears only once the account opts in, and redirect the page home on a direct hit when the module is off. Item answers stay encrypted and off the AI Coach / MCP regardless of the toggle; this only controls whether the surface is visible and reachable.
This commit is contained in:
1 parent
15e740bc2b
commit
f62ba50ff0
7 files changed
+88
-7
No files matched your search
@@ -28,6 +28,7 @@ import {
|
||||
Activity,
|
||||
Award,
|
||||
Blocks,
|
||||
Brain,
|
||||
CalendarHeart,
|
||||
Droplet,
|
||||
CloudSun,
|
||||
@@ -80,6 +81,8 @@ const MODULE_ICONS: Record<ModuleKey, LucideIcon> = {
|
||||
mcp: Plug,
|
||||
// v1.25.0 (W-DOCS-IN) — inbound clinical documents (opt-in).
|
||||
inboundDocuments: FileScan,
|
||||
// v1.25.0 — opt-in mental-health screeners (PHQ-9 / GAD-7).
|
||||
mentalHealth: Brain,
|
||||
};
|
||||
|
||||
export function ModulesSection() {
|
||||
|
||||
Reference in new issue
Block a user