feat: temporal trends CLI script + Dash tab (Task D.1)
D.1a: cli/compute_trends.py — standalone CLI that imports existing pipeline functions to replay pathway computation for ~10 historical 6-month endpoints. Creates pathway_trends table via CREATE TABLE IF NOT EXISTS. D.1b: Trends tab (10th PP tab) with metric toggle (patients/cost/cost_pp_pa). Query gracefully returns empty when table doesn't exist, figure shows instruction message to run compute_trends.
This commit is contained in:
@@ -14,6 +14,7 @@ TAB_DEFINITIONS = [
|
||||
("network", "Network"),
|
||||
("timeline", "Timeline"),
|
||||
("doses", "Doses"),
|
||||
("trends", "Trends"),
|
||||
]
|
||||
|
||||
# Full set retained for Trust Comparison dashboard (Phase 10.8)
|
||||
@@ -94,6 +95,23 @@ def make_chart_card():
|
||||
),
|
||||
],
|
||||
),
|
||||
# Trends metric toggle — visible only when trends tab active
|
||||
html.Div(
|
||||
id="trends-metric-wrapper",
|
||||
style={"display": "none"},
|
||||
children=[
|
||||
dmc.SegmentedControl(
|
||||
id="trends-metric-toggle",
|
||||
data=[
|
||||
{"value": "patients", "label": "Patients"},
|
||||
{"value": "total_cost", "label": "Cost"},
|
||||
{"value": "cost_pp_pa", "label": "Cost p.a."},
|
||||
],
|
||||
value="patients",
|
||||
size="xs",
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
# Chart area with loading spinner
|
||||
|
||||
Reference in New Issue
Block a user