Skip to content

feat(studies): surface Hypertension v5 results in the frontend - #369

Merged
sudoshi merged 1 commit into
mainfrom
feature/htn-v5-frontend-surfacing
Jul 5, 2026
Merged

feat(studies): surface Hypertension v5 results in the frontend#369
sudoshi merged 1 commit into
mainfrom
feature/htn-v5-frontend-surfacing

Conversation

@sudoshi

@sudoshi sudoshi commented Jul 5, 2026

Copy link
Copy Markdown
Collaborator

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 curated study_results rows (compact chart-ready summary_data) + long-form results.htn_v4_* tables. Estimability gates on O/P/R; IV withheld from publish. SourceAware trait; Pint + PHPStan L8 clean.
  • scripts/sql/htn-v5-fixture-tables.sql — owner DDL + grants (runtime role has no CREATE on results).

Frontend

  • 7 per-analysis renderers (components/v5/) dispatched from StudyResultSummary — Results tab now draws charts, not JSON.
  • Reuses ForestPlot/LovePlot/KaplanMeierPlot/HeatmapChart via adapters; adds RidgelinePlot + PairedArrowTrellis for Analysis N.
  • New Report tab (StudyV5ReportTab) — triangulation headline + designs + matrices + derived V&V acceptance matrix; gated to studies with a triangulation result.
  • Failed gates render an explicit withheld state, never a blinded number. M/N/Q full-table + CSV export client-side from summary_data (no PHI egress).

Test plan

  • Pint + PHPStan L8 clean
  • tsc --noEmit + vite build + ESLint clean
  • Vitest 14/14 (adapter/narrowing logic)
  • Live API returns all 7 v5 rows with correct gating
  • Manual QA on deployed prod: study 165 → Results + Report tabs

🤖 Generated with claude-flow

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.
@sudoshi
sudoshi merged commit 0710625 into main Jul 5, 2026
14 of 16 checks passed
@sudoshi
sudoshi deleted the feature/htn-v5-frontend-surfacing branch July 5, 2026 01:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant