feat(studies): surface Hypertension v5 results in the frontend - #369
Merged
Conversation
v5 (Hypertension Outcomes Program: analyses M–R + triangulation) had never been executed — study 165 carried only its four v4 results. Build the full result-surfacing pipeline and drive it with a representative, clearly-labelled demonstration fixture grounded in the real v4 baseline facts. Backend: - study:seed-htn-v5-fixture — idempotent seeder writing 7 curated study_results rows (compact chart-ready summary_data) + the long-form results.htn_v4_* tables. Comparative designs carry estimability gates; IV withheld from publish. Uses the SourceAware trait (Pint + PHPStan L8 clean). - scripts/sql/htn-v5-fixture-tables.sql — owner-run DDL + grants (runtime role has no CREATE on the results schema). Frontend: - 7 per-analysis renderers under components/v5 dispatched from StudyResultSummary: overlap-weighted (O), target-trial (P), instrumental variable (R), comorbidity matrix (M), BP distribution (N), phenotype robustness (Q), triangulation headline. - Reuses ForestPlot/LovePlot/KaplanMeierPlot/HeatmapChart via adapters; adds RidgelinePlot + PairedArrowTrellis primitives for N. - StudyV5ReportTab: assembled native report (triangulation headline + designs + matrices + derived V&V acceptance matrix), gated into the Evidence tab group. - Failed estimability gates render an explicit withheld state, never a blinded number. Every fixture figure shows a Demonstration-data provenance banner. - M/N/Q full-table + CSV export render client-side from summary_data (no member-grain/PHI egress). Verified: pint + phpstan L8, tsc + vite build + eslint clean, vitest 14/14, and a live API check returning all 7 v5 rows with correct gating.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Surfaces the Hypertension Outcomes Program v5 (analyses M–R + triangulation) natively in the React studies module.
Key context: v5 had never been executed — study 165 carried only its four v4 results. This builds the full surfacing pipeline and drives it with a representative, clearly-labelled demonstration fixture (grounded in real v4 baseline facts: T=109,763; never-dx≈90%; CKD HR≈2.60; 37.9% coverage). Every fixture figure renders a "Demonstration data" provenance banner.
What's included
Backend
study:seed-htn-v5-fixture— idempotent seeder: 7 curatedstudy_resultsrows (compact chart-readysummary_data) + long-formresults.htn_v4_*tables. Estimability gates on O/P/R; IV withheld from publish.SourceAwaretrait; Pint + PHPStan L8 clean.scripts/sql/htn-v5-fixture-tables.sql— owner DDL + grants (runtime role has no CREATE on results).Frontend
components/v5/) dispatched fromStudyResultSummary— Results tab now draws charts, not JSON.ForestPlot/LovePlot/KaplanMeierPlot/HeatmapChartvia adapters; addsRidgelinePlot+PairedArrowTrellisfor Analysis N.StudyV5ReportTab) — triangulation headline + designs + matrices + derived V&V acceptance matrix; gated to studies with a triangulation result.summary_data(no PHI egress).Test plan
tsc --noEmit+vite build+ ESLint clean🤖 Generated with claude-flow