feat: add trust selection to drawer with filter wiring (Task 5.1)
This commit is contained in:
@@ -81,3 +81,15 @@ def get_all_drugs() -> list[str]:
|
||||
|
||||
data = load_initial_data()
|
||||
return data.get("available_drugs", [])
|
||||
|
||||
|
||||
def get_all_trusts() -> list[str]:
|
||||
"""
|
||||
Return a sorted flat list of all unique trust names from pathway_nodes level 1.
|
||||
|
||||
Delegates to load_initial_data() which already queries the database.
|
||||
"""
|
||||
from dash_app.data.queries import load_initial_data
|
||||
|
||||
data = load_initial_data()
|
||||
return data.get("available_trusts", [])
|
||||
|
||||
@@ -26,6 +26,7 @@ def load_pathway_data(
|
||||
chart_type: str = "directory",
|
||||
selected_drugs: Optional[list[str]] = None,
|
||||
selected_directorates: Optional[list[str]] = None,
|
||||
selected_trusts: Optional[list[str]] = None,
|
||||
) -> dict:
|
||||
"""Load pre-computed pathway nodes with optional filters."""
|
||||
return _load_pathway_nodes(
|
||||
@@ -34,4 +35,5 @@ def load_pathway_data(
|
||||
chart_type=chart_type,
|
||||
selected_drugs=selected_drugs,
|
||||
selected_directorates=selected_directorates,
|
||||
selected_trusts=selected_trusts,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user