mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-09 13:01:00 +00:00
fix(insights): wire grip / pain / waist / waist-to-height across web and MCP
Grip strength, pain (0–10 NRS), waist circumference, and waist-to-height existed in the measurement enum, signal registry, and FHIR export but had no web entry, no detail page, single non-sex-aware bands, and a split-brain MCP exposure. This closes those gaps. Web capture: the four signals join the manual measurement form, so a web-only self-hoster can log them (the iOS client and the measurements API already could). Detail pages: flip detailPage on for the four signals and mount each on the shared HealthKit metric template (chart, stat strip, Coach-read strip, assessment card) via routed sub-pages and tab-strip pills, the same detail spine every other metric carries. Sex-aware bands: grip strength (EWGSOP2 men 27 / women 16 kg) and waist (WHO men 94 / women 80 cm) now classify by the profile sex through the age/sex norm resolver the assessment already threads; the resolver also returns a sex-specific, age-independent band when no date of birth is set. Fix the waist-to-height boundary so the NICE >= 0.5 rule is correct (the last in-range value is 0.49). MCP single source of truth: decouple the registry mcp facet from the Coach snapshot — a signal can be MCP-readable without being on the Coach surface. Mark the four physical signals mcp:true, derive the MCP rich-reads clinical set from the registry flag instead of a duplicate allowlist, and relax the invariant to coachSnapshot implies mcp (not the reverse). PHQ-9 / GAD-7 and the environmental signals stay mcp:false and unreachable. compare_metric and detect_changepoints now advertise clinical-signal support to match get_metric_baseline.
This commit is contained in:
1 parent
4f39058629
commit
a69697b50f
25 files changed
+726
-62
No files matched your search
@@ -87,7 +87,11 @@ const layoutSchema = z.object({
|
||||
}),
|
||||
)
|
||||
.min(1)
|
||||
.max(50)
|
||||
// Cap at the accepted-id universe (canonical slugs + legacy aliases) so a
|
||||
// single PUT can cover every tile the layout knows about — the cap grows
|
||||
// automatically as new sub-page slugs land, rather than tripping a 422
|
||||
// once the slug count crosses a hard-coded ceiling.
|
||||
.max(ACCEPTED_INSIGHTS_TILE_IDS.length)
|
||||
.optional(),
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user