Commit Graph

14 Commits

Author SHA1 Message Date
Andrew Charlwood d0404aa18a 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.
2026-02-07 18:24:34 +00:00
Andrew Charlwood c7e9398d65 feat: average administered doses chart tab (Task D.2) 2026-02-07 03:47:53 +00:00
Andrew Charlwood 0a14f1fce3 feat: drug timeline Gantt chart tab (Task D.3) 2026-02-07 03:40:29 +00:00
Andrew Charlwood 1405476818 feat: drug switching network graph tab (Task C.4) 2026-02-07 03:32:14 +00:00
Andrew Charlwood d8df41619d feat: duration vs cost scatter plot tab (Task C.3) 2026-02-07 03:25:39 +00:00
Andrew Charlwood 55c9af2de7 feat: pathway depth distribution chart tab (Task C.2)
Horizontal bar chart showing patients who stopped at each treatment
line depth (exclusive counts, not cumulative like the funnel).
2026-02-07 03:18:28 +00:00
Andrew Charlwood a6cf6efa18 feat: retention funnel chart tab with treatment line depth (Task C.1) 2026-02-07 03:12:30 +00:00
Andrew Charlwood 8e2e2b7125 feat: heatmap metric toggle for both PP and TC views (Task B.4)
- Add Heatmap tab to Patient Pathways TAB_DEFINITIONS (was only in ALL_TAB_DEFINITIONS)
- Add dmc.SegmentedControl (Patients/Cost/Cost p.a.) to PP chart card header, hidden by default
- update_chart callback controls toggle visibility via heatmap-metric-wrapper style output
- _render_heatmap() now accepts metric param from toggle
- Add dmc.SegmentedControl to TC heatmap chart cell inline
- tc_heatmap callback reads tc-heatmap-metric-toggle value and passes metric to figure fn
2026-02-07 03:05:41 +00:00
Andrew Charlwood 10d47d616c style: make Patient Pathways chart fill available viewport height (Task 11.3)
- Changed .main from min-height to height with overflow-y auto
- Added flex chain: #view-container → #patient-pathways-view → .chart-card
  → dcc.Loading wrapper → #chart-container → #pathway-chart
- All flex parents get min-height: 0 for proper flex shrinking
- dcc.Graph set to responsive=True with flex: 1 and minHeight: 0
- Trust Comparison view scrolls naturally via .main overflow-y auto
2026-02-07 00:31:47 +00:00
Andrew Charlwood 979b79794c feat: reduce Patient Pathways to Icicle + Sankey tabs only (Task 10.5)
Removed 6 chart tabs (Market Share, Cost Effectiveness, Cost Waterfall,
Dosing, Heatmap, Duration) from the Patient Pathways tab bar. These will
reappear in the Trust Comparison dashboard (Task 10.8).

All _render_* helper functions preserved in chart.py for reuse.
2026-02-06 21:57:06 +00:00
Andrew Charlwood fe2d048a21 feat: add parsing utilities and 8-tab chart infrastructure (Task 9.1)
- Create src/data_processing/parsing.py with parse_average_spacing(),
  parse_pathway_drugs(), and calculate_retention_rate()
- Add 8-tab bar to chart_card.py (Icicle, Market Share, Cost Effectiveness,
  Cost Waterfall, Sankey, Dosing, Heatmap, Duration)
- Add active-tab dcc.Store and tab switching callback in chart.py
- Remove Chart Views section from sidebar (now in tab bar)
- Lazy rendering: only active tab's chart is computed
2026-02-06 19:13:19 +00:00
Andrew Charlwood 7aa49b0d6b refactor: restructure sidebar with chart views, remove placeholder items (Task 7.3)
- Remove non-functional sidebar items: Cost Analysis, Export Data
- Remove filter trigger items: Drug/Trust/Directory Selection, Indications
- Add Chart Views section: Icicle Chart (active), Sankey Diagram (disabled), Timeline (disabled)
- Remove tab row from chart_card.py (chart view selection now in sidebar)
- Remove open_drawer callback (sidebar no longer has filter triggers)
- Add .sidebar__item--disabled CSS class
2026-02-06 15:29:53 +00:00
Andrew Charlwood 5593d08062 feat: add loading spinner, empty state, and error handling to chart area (Task 5.2) 2026-02-06 14:16:26 +00:00
Andrew Charlwood 307563bb31 feat: add KPI row, filter bar, and chart card components (Task 2.2) 2026-02-06 13:20:42 +00:00