feat: retention funnel chart tab with treatment line depth (Task C.1)
This commit is contained in:
@@ -24,6 +24,7 @@ from data_processing.pathway_queries import (
|
||||
get_trust_heatmap as _get_trust_heatmap,
|
||||
get_trust_durations as _get_trust_durations,
|
||||
get_directorate_summary as _get_directorate_summary,
|
||||
get_retention_funnel as _get_retention_funnel,
|
||||
)
|
||||
|
||||
DB_PATH = Path(__file__).resolve().parents[2] / "data" / "pathways.db"
|
||||
@@ -180,3 +181,16 @@ def get_directorate_summary(
|
||||
) -> list[dict]:
|
||||
"""Per-directorate summary (name, patient count, drug count) for landing cards."""
|
||||
return _get_directorate_summary(DB_PATH, date_filter_id, chart_type)
|
||||
|
||||
|
||||
# --- Retention funnel (Phase C) ---
|
||||
|
||||
|
||||
def get_retention_funnel(
|
||||
date_filter_id: str = "all_6mo",
|
||||
chart_type: str = "directory",
|
||||
directory: Optional[str] = None,
|
||||
trust: Optional[str] = None,
|
||||
) -> list[dict]:
|
||||
"""Patient retention by treatment line depth."""
|
||||
return _get_retention_funnel(DB_PATH, date_filter_id, chart_type, directory, trust)
|
||||
|
||||
Reference in New Issue
Block a user