<retrieval_status>not_ready</retrieval_status>

<task_id>bb39d2e</task_id>

<task_type>local_bash</task_type>

<status>running</status>

<output>
[Truncated. Full output: C:\Users\CHARLW~1\AppData\Local\Temp\claude\C--Users-charlwoodand-Ralph-local-Tasks-UI-Redesign\tasks\bb39d2e.output]

(consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  UPID_date_var = str(x.name) + str(x[d])
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:96: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  UPID_date_var = str(x.name) + str(x[d])
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:96: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  UPID_date_var = str(x.name) + str(x[d])
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:326: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  v = row[c]
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:333: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  label = row[count - 1]
2026-02-06 00:04:06 [INFO] pathways.analysis.pathway_analyzer: Building graph dataframe structure.
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:543: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  ice_df["level"] = ice_df["ids"].str.count("-")
2026-02-06 00:04:07 [INFO] pathways.analysis.pathway_analyzer: Generating graph.
2026-02-06 00:04:07 [INFO] pathways.data_processing.pathway_pipeline: Generated 93 pathway nodes for 1yr_6mo
2026-02-06 00:04:07 [INFO] pathways.data_processing.pathway_pipeline: Extracted denormalized fields for 93 nodes
2026-02-06 00:04:07 [INFO] pathways.data_processing.pathway_pipeline:   Unique trusts: 7
2026-02-06 00:04:07 [INFO] pathways.data_processing.pathway_pipeline:   Unique directories: 10
2026-02-06 00:04:07 [INFO] pathways.data_processing.pathway_pipeline: Converted 93 pathway nodes to records for 1yr_6mo (directory)
2026-02-06 00:04:07 [INFO] pathways.data_processing.pathway_pipeline: Completed 1yr_6mo: 93 nodes
2026-02-06 00:04:07 [INFO] pathways.data_processing.pathway_pipeline: Processing date filter: 1yr_12mo
2026-02-06 00:04:07 [INFO] pathways.data_processing.pathway_pipeline: Processing pathway for 1yr_12mo
2026-02-06 00:04:07 [INFO] pathways.data_processing.pathway_pipeline:   Date range: 2025-02-06 to 2026-02-06
2026-02-06 00:04:07 [INFO] pathways.data_processing.pathway_pipeline:   Last seen after: 2025-02-11
2026-02-06 00:04:07 [INFO] pathways.analysis.pathway_analyzer: Filtering unrelated interventions
2026-02-06 00:04:08 [INFO] pathways.analysis.pathway_analyzer: Identifying unique patients and interventions used
2026-02-06 00:04:10 [INFO] pathways.analysis.pathway_analyzer: Calculating each unique patient's intervention average frequency, cost and duration of each intervention
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:96: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  UPID_date_var = str(x.name) + str(x[d])
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:96: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  UPID_date_var = str(x.name) + str(x[d])
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:96: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  UPID_date_var = str(x.name) + str(x[d])
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:96: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  UPID_date_var = str(x.name) + str(x[d])
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:326: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  v = row[c]
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:333: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  label = row[count - 1]
2026-02-06 00:04:27 [INFO] pathways.analysis.pathway_analyzer: Building graph dataframe structure.
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:543: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  ice_df["level"] = ice_df["ids"].str.count("-")
2026-02-06 00:04:27 [INFO] pathways.analysis.pathway_analyzer: Generating graph.
2026-02-06 00:04:27 [INFO] pathways.data_processing.pathway_pipeline: Generated 105 pathway nodes for 1yr_12mo
2026-02-06 00:04:27 [INFO] pathways.data_processing.pathway_pipeline: Extracted denormalized fields for 105 nodes
2026-02-06 00:04:27 [INFO] pathways.data_processing.pathway_pipeline:   Unique trusts: 7
2026-02-06 00:04:27 [INFO] pathways.data_processing.pathway_pipeline:   Unique directories: 11
2026-02-06 00:04:27 [INFO] pathways.data_processing.pathway_pipeline: Converted 105 pathway nodes to records for 1yr_12mo (directory)
2026-02-06 00:04:27 [INFO] pathways.data_processing.pathway_pipeline: Completed 1yr_12mo: 105 nodes
2026-02-06 00:04:27 [INFO] pathways.data_processing.pathway_pipeline: Processing date filter: 2yr_6mo
2026-02-06 00:04:27 [INFO] pathways.data_processing.pathway_pipeline: Processing pathway for 2yr_6mo
2026-02-06 00:04:27 [INFO] pathways.data_processing.pathway_pipeline:   Date range: 2024-02-06 to 2026-02-06
2026-02-06 00:04:27 [INFO] pathways.data_processing.pathway_pipeline:   Last seen after: 2025-08-10
2026-02-06 00:04:28 [INFO] pathways.analysis.pathway_analyzer: Filtering unrelated interventions
2026-02-06 00:04:28 [INFO] pathways.analysis.pathway_analyzer: Identifying unique patients and interventions used
2026-02-06 00:04:31 [INFO] pathways.analysis.pathway_analyzer: Calculating each unique patient's intervention average frequency, cost and duration of each intervention
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:96: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  UPID_date_var = str(x.name) + str(x[d])
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:96: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  UPID_date_var = str(x.name) + str(x[d])
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:96: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  UPID_date_var = str(x.name) + str(x[d])
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:96: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  UPID_date_var = str(x.name) + str(x[d])
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:326: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  v = row[c]
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:333: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  label = row[count - 1]
2026-02-06 00:04:50 [INFO] pathways.analysis.pathway_analyzer: Building graph dataframe structure.
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:543: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  ice_df["level"] = ice_df["ids"].str.count("-")
2026-02-06 00:04:51 [INFO] pathways.analysis.pathway_analyzer: Generating graph.
2026-02-06 00:04:51 [INFO] pathways.data_processing.pathway_pipeline: Generated 134 pathway nodes for 2yr_6mo
2026-02-06 00:04:51 [INFO] pathways.data_processing.pathway_pipeline: Extracted denormalized fields for 134 nodes
2026-02-06 00:04:51 [INFO] pathways.data_processing.pathway_pipeline:   Unique trusts: 7
2026-02-06 00:04:51 [INFO] pathways.data_processing.pathway_pipeline:   Unique directories: 13
2026-02-06 00:04:51 [INFO] pathways.data_processing.pathway_pipeline: Converted 134 pathway nodes to records for 2yr_6mo (directory)
2026-02-06 00:04:51 [INFO] pathways.data_processing.pathway_pipeline: Completed 2yr_6mo: 134 nodes
2026-02-06 00:04:51 [INFO] pathways.data_processing.pathway_pipeline: Processing date filter: 2yr_12mo
2026-02-06 00:04:51 [INFO] pathways.data_processing.pathway_pipeline: Processing pathway for 2yr_12mo
2026-02-06 00:04:51 [INFO] pathways.data_processing.pathway_pipeline:   Date range: 2024-02-06 to 2026-02-06
2026-02-06 00:04:51 [INFO] pathways.data_processing.pathway_pipeline:   Last seen after: 2025-02-11
2026-02-06 00:04:51 [INFO] pathways.analysis.pathway_analyzer: Filtering unrelated interventions
2026-02-06 00:04:52 [INFO] pathways.analysis.pathway_analyzer: Identifying unique patients and interventions used
2026-02-06 00:04:55 [INFO] pathways.analysis.pathway_analyzer: Calculating each unique patient's intervention average frequency, cost and duration of each intervention
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:96: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  UPID_date_var = str(x.name) + str(x[d])
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:96: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  UPID_date_var = str(x.name) + str(x[d])
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:96: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  UPID_date_var = str(x.name) + str(x[d])
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:96: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  UPID_date_var = str(x.name) + str(x[d])
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:326: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  v = row[c]
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:333: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  label = row[count - 1]
2026-02-06 00:05:12 [INFO] pathways.analysis.pathway_analyzer: Building graph dataframe structure.
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:543: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  ice_df["level"] = ice_df["ids"].str.count("-")
2026-02-06 00:05:13 [INFO] pathways.analysis.pathway_analyzer: Generating graph.
2026-02-06 00:05:13 [INFO] pathways.data_processing.pathway_pipeline: Generated 147 pathway nodes for 2yr_12mo
2026-02-06 00:05:13 [INFO] pathways.data_processing.pathway_pipeline: Extracted denormalized fields for 147 nodes
2026-02-06 00:05:13 [INFO] pathways.data_processing.pathway_pipeline:   Unique trusts: 7
2026-02-06 00:05:13 [INFO] pathways.data_processing.pathway_pipeline:   Unique directories: 14
2026-02-06 00:05:13 [INFO] pathways.data_processing.pathway_pipeline: Converted 147 pathway nodes to records for 2yr_12mo (directory)
2026-02-06 00:05:13 [INFO] pathways.data_processing.pathway_pipeline: Completed 2yr_12mo: 147 nodes
2026-02-06 00:05:13 [INFO] pathways.data_processing.pathway_pipeline: Total pathway nodes across all filters: 1101
2026-02-06 00:05:13 [INFO] pathways.__main__:
2026-02-06 00:05:13 [INFO] pathways.__main__: Processing chart type: indication
2026-02-06 00:05:13 [INFO] pathways.__main__: Building drug-aware indication groups...
2026-02-06 00:05:13 [INFO] pathways.data_processing.diagnosis_lookup: Loaded drug-indication mapping: 162 Search_Terms, 346 drug fragments
2026-02-06 00:05:13 [INFO] pathways.__main__: Loaded drug mapping: 162 Search_Terms
2026-02-06 00:05:14 [INFO] pathways.__main__: Looking up GP diagnoses for 36628 unique patients...
2026-02-06 00:05:14 [INFO] pathways.__main__: Restricting GP codes to HCD window: >= 2019-04-01
2026-02-06 00:05:14 [INFO] pathways.data_processing.diagnosis_lookup: Starting Snowflake-direct indication lookup for 36628 patients...
2026-02-06 00:05:14 [INFO] pathways.data_processing.diagnosis_lookup:   Restricting GP codes to >= 2019-04-01
2026-02-06 00:05:14 [INFO] pathways.data_processing.diagnosis_lookup: Batch 1/8: patients 1 to 5000
2026-02-06 00:05:14 [INFO] pathways.data_processing.snowflake_connector: Executing query (timeout=300s)
2026-02-06 00:05:14 [DEBUG] pathways.data_processing.snowflake_connector: Query:

WITH SearchTermClusters AS (
    SELECT Search_Term, Cluster_ID FROM (VALUES
        ('acute lymphoblastic leukaemia', 'HAEMCANMORPH_COD'),
        ('acute myeloid leukaemia', 'C19HAEMCAN_COD'),
   ...
2026-02-06 00:05:20 [INFO] pathways.data_processing.snowflake_connector: Query returned 54300 rows in 6.11s
2026-02-06 00:05:20 [DEBUG] pathways.data_processing.diagnosis_lookup: Batch 1: found 54300 patient-indication matches
2026-02-06 00:05:20 [INFO] pathways.data_processing.diagnosis_lookup: Batch 2/8: patients 5001 to 10000
2026-02-06 00:05:20 [INFO] pathways.data_processing.snowflake_connector: Executing query (timeout=300s)
2026-02-06 00:05:20 [DEBUG] pathways.data_processing.snowflake_connector: Query:

WITH SearchTermClusters AS (
    SELECT Search_Term, Cluster_ID FROM (VALUES
        ('acute lymphoblastic leukaemia', 'HAEMCANMORPH_COD'),
        ('acute myeloid leukaemia', 'C19HAEMCAN_COD'),
   ...
2026-02-06 00:05:24 [INFO] pathways.data_processing.snowflake_connector: Query returned 61077 rows in 4.13s
2026-02-06 00:05:25 [DEBUG] pathways.data_processing.diagnosis_lookup: Batch 2: found 61077 patient-indication matches
2026-02-06 00:05:25 [INFO] pathways.data_processing.diagnosis_lookup: Batch 3/8: patients 10001 to 15000
2026-02-06 00:05:25 [INFO] pathways.data_processing.snowflake_connector: Executing query (timeout=300s)
2026-02-06 00:05:25 [DEBUG] pathways.data_processing.snowflake_connector: Query:

WITH SearchTermClusters AS (
    SELECT Search_Term, Cluster_ID FROM (VALUES
        ('acute lymphoblastic leukaemia', 'HAEMCANMORPH_COD'),
        ('acute myeloid leukaemia', 'C19HAEMCAN_COD'),
   ...
2026-02-06 00:05:29 [INFO] pathways.data_processing.snowflake_connector: Query returned 67362 rows in 3.71s
2026-02-06 00:05:29 [DEBUG] pathways.data_processing.diagnosis_lookup: Batch 3: found 67362 patient-indication matches
2026-02-06 00:05:29 [INFO] pathways.data_processing.diagnosis_lookup: Batch 4/8: patients 15001 to 20000
2026-02-06 00:05:29 [INFO] pathways.data_processing.snowflake_connector: Executing query (timeout=300s)
2026-02-06 00:05:29 [DEBUG] pathways.data_processing.snowflake_connector: Query:

WITH SearchTermClusters AS (
    SELECT Search_Term, Cluster_ID FROM (VALUES
        ('acute lymphoblastic leukaemia', 'HAEMCANMORPH_COD'),
        ('acute myeloid leukaemia', 'C19HAEMCAN_COD'),
   ...
2026-02-06 00:05:33 [INFO] pathways.data_processing.snowflake_connector: Query returned 67937 rows in 3.71s
2026-02-06 00:05:33 [DEBUG] pathways.data_processing.diagnosis_lookup: Batch 4: found 67937 patient-indication matches
2026-02-06 00:05:33 [INFO] pathways.data_processing.diagnosis_lookup: Batch 5/8: patients 20001 to 25000
2026-02-06 00:05:33 [INFO] pathways.data_processing.snowflake_connector: Executing query (timeout=300s)
2026-02-06 00:05:33 [DEBUG] pathways.data_processing.snowflake_connector: Query:

WITH SearchTermClusters AS (
    SELECT Search_Term, Cluster_ID FROM (VALUES
        ('acute lymphoblastic leukaemia', 'HAEMCANMORPH_COD'),
        ('acute myeloid leukaemia', 'C19HAEMCAN_COD'),
   ...
2026-02-06 00:05:36 [INFO] pathways.data_processing.snowflake_connector: Query returned 80531 rows in 3.53s
2026-02-06 00:05:36 [DEBUG] pathways.data_processing.diagnosis_lookup: Batch 5: found 80531 patient-indication matches
2026-02-06 00:05:36 [INFO] pathways.data_processing.diagnosis_lookup: Batch 6/8: patients 25001 to 30000
2026-02-06 00:05:36 [INFO] pathways.data_processing.snowflake_connector: Executing query (timeout=300s)
2026-02-06 00:05:36 [DEBUG] pathways.data_processing.snowflake_connector: Query:

WITH SearchTermClusters AS (
    SELECT Search_Term, Cluster_ID FROM (VALUES
        ('acute lymphoblastic leukaemia', 'HAEMCANMORPH_COD'),
        ('acute myeloid leukaemia', 'C19HAEMCAN_COD'),
   ...
2026-02-06 00:05:40 [INFO] pathways.data_processing.snowflake_connector: Query returned 88184 rows in 3.82s
2026-02-06 00:05:40 [DEBUG] pathways.data_processing.diagnosis_lookup: Batch 6: found 88184 patient-indication matches
2026-02-06 00:05:40 [INFO] pathways.data_processing.diagnosis_lookup: Batch 7/8: patients 30001 to 35000
2026-02-06 00:05:40 [INFO] pathways.data_processing.snowflake_connector: Executing query (timeout=300s)
2026-02-06 00:05:40 [DEBUG] pathways.data_processing.snowflake_connector: Query:

WITH SearchTermClusters AS (
    SELECT Search_Term, Cluster_ID FROM (VALUES
        ('acute lymphoblastic leukaemia', 'HAEMCANMORPH_COD'),
        ('acute myeloid leukaemia', 'C19HAEMCAN_COD'),
   ...
2026-02-06 00:05:44 [INFO] pathways.data_processing.snowflake_connector: Query returned 89959 rows in 3.82s
2026-02-06 00:05:44 [DEBUG] pathways.data_processing.diagnosis_lookup: Batch 7: found 89959 patient-indication matches
2026-02-06 00:05:44 [INFO] pathways.data_processing.diagnosis_lookup: Batch 8/8: patients 35001 to 36628
2026-02-06 00:05:44 [INFO] pathways.data_processing.snowflake_connector: Executing query (timeout=300s)
2026-02-06 00:05:44 [DEBUG] pathways.data_processing.snowflake_connector: Query:

WITH SearchTermClusters AS (
    SELECT Search_Term, Cluster_ID FROM (VALUES
        ('acute lymphoblastic leukaemia', 'HAEMCANMORPH_COD'),
        ('acute myeloid leukaemia', 'C19HAEMCAN_COD'),
   ...
2026-02-06 00:05:46 [INFO] pathways.data_processing.snowflake_connector: Query returned 28444 rows in 1.71s
2026-02-06 00:05:46 [DEBUG] pathways.data_processing.diagnosis_lookup: Batch 8: found 28444 patient-indication matches
2026-02-06 00:05:46 [INFO] pathways.data_processing.diagnosis_lookup: Indication lookup complete:
2026-02-06 00:05:46 [INFO] pathways.data_processing.diagnosis_lookup:   Total patients queried: 36628
2026-02-06 00:05:46 [INFO] pathways.data_processing.diagnosis_lookup:   Patients with GP match: 33642 (91.8%)
2026-02-06 00:05:46 [INFO] pathways.data_processing.diagnosis_lookup:   Total patient-indication rows: 537794 (avg 16.0 per patient)
2026-02-06 00:05:46 [INFO] pathways.data_processing.diagnosis_lookup:   Unique Search_Terms found: 144
2026-02-06 00:05:46 [INFO] pathways.data_processing.diagnosis_lookup:   Top 5 indications: {'sepsis': np.int64(32382), 'drug misuse': np.int64(31536), 'influenza': np.int64(28550), 'lung cancer': np.int64(14467), 'non-small-cell lung cancer': np.int64(14467)}
2026-02-06 00:06:00 [INFO] pathways.data_processing.diagnosis_lookup: GP lookup built: 33642 patients with GP matches
2026-02-06 00:06:02 [INFO] pathways.data_processing.diagnosis_lookup: Drug-indication matching complete:
2026-02-06 00:06:02 [INFO] pathways.data_processing.diagnosis_lookup:   Total UPID-Drug pairs: 50797
2026-02-06 00:06:02 [INFO] pathways.data_processing.diagnosis_lookup:   Matched (GP dx + drug mapping): 25059 (49.3%)
2026-02-06 00:06:02 [INFO] pathways.data_processing.diagnosis_lookup:   Tiebreaker used: 15238
2026-02-06 00:06:02 [INFO] pathways.data_processing.diagnosis_lookup:   Fallback (no match): 25738 (50.7%)
2026-02-06 00:06:06 [INFO] pathways.data_processing.diagnosis_lookup:   Unique modified UPIDs: 42072
2026-02-06 00:06:06 [INFO] pathways.data_processing.diagnosis_lookup:   Top 5 indications: {'Undefined (no GP dx)': np.int64(8110), 'macular degeneration': np.int64(5256), 'diabetes': np.int64(3841), 'OPHTHALMOLOGY (no GP dx)': np.int64(3040), 'rheumatoid arthritis': np.int64(2216)}
2026-02-06 00:06:06 [INFO] pathways.__main__: Drug-aware indication matching complete. Modified UPIDs: 42072, Indication groups: 42072
2026-02-06 00:06:06 [INFO] pathways.__main__: Processing indication pathway for all_6mo
2026-02-06 00:06:06 [INFO] pathways.data_processing.pathway_pipeline: Processing indication pathway for all_6mo
2026-02-06 00:06:06 [INFO] pathways.data_processing.pathway_pipeline:   Date range: 2000-01-01 to 2026-02-06
2026-02-06 00:06:06 [INFO] pathways.data_processing.pathway_pipeline:   Last seen after: 2025-08-10
2026-02-06 00:06:07 [INFO] pathways.analysis.pathway_analyzer: Filtering unrelated interventions
2026-02-06 00:06:07 [INFO] pathways.analysis.pathway_analyzer: Identifying unique patients and interventions used
2026-02-06 00:06:10 [INFO] pathways.analysis.pathway_analyzer: Calculating each unique patient's intervention average frequency, cost and duration of each intervention
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:96: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  UPID_date_var = str(x.name) + str(x[d])
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:96: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  UPID_date_var = str(x.name) + str(x[d])
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:96: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  UPID_date_var = str(x.name) + str(x[d])
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:96: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  UPID_date_var = str(x.name) + str(x[d])
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:326: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  v = row[c]
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:333: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  label = row[count - 1]
2026-02-06 00:06:28 [INFO] pathways.analysis.pathway_analyzer: Building graph dataframe structure.
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:543: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  ice_df["level"] = ice_df["ids"].str.count("-")
2026-02-06 00:06:32 [INFO] pathways.analysis.pathway_analyzer: Generating graph.
2026-02-06 00:06:32 [INFO] pathways.data_processing.pathway_pipeline: Generated 438 indication pathway nodes for all_6mo
2026-02-06 00:06:32 [INFO] pathways.data_processing.pathway_pipeline: Extracted indication fields for 438 nodes
2026-02-06 00:06:32 [INFO] pathways.data_processing.pathway_pipeline:   Unique trusts: 8
2026-02-06 00:06:32 [INFO] pathways.data_processing.pathway_pipeline:   Unique search_terms: 42
2026-02-06 00:06:32 [INFO] pathways.data_processing.pathway_pipeline: Converted 438 pathway nodes to records for all_6mo (indication)
2026-02-06 00:06:32 [INFO] pathways.__main__: Completed all_6mo:indication: 438 nodes
2026-02-06 00:06:32 [INFO] pathways.__main__: Processing indication pathway for all_12mo
2026-02-06 00:06:32 [INFO] pathways.data_processing.pathway_pipeline: Processing indication pathway for all_12mo
2026-02-06 00:06:32 [INFO] pathways.data_processing.pathway_pipeline:   Date range: 2000-01-01 to 2026-02-06
2026-02-06 00:06:32 [INFO] pathways.data_processing.pathway_pipeline:   Last seen after: 2025-02-11
2026-02-06 00:06:33 [INFO] pathways.analysis.pathway_analyzer: Filtering unrelated interventions
2026-02-06 00:06:34 [INFO] pathways.analysis.pathway_analyzer: Identifying unique patients and interventions used
2026-02-06 00:06:37 [INFO] pathways.analysis.pathway_analyzer: Calculating each unique patient's intervention average frequency, cost and duration of each intervention
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:96: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  UPID_date_var = str(x.name) + str(x[d])
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:96: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  UPID_date_var = str(x.name) + str(x[d])
</output>

Full pathway refresh ÔÇö both chart types with verbose output

Output:
2026-02-05 23:56:37 [INFO] pathways.__main__: Loaded 8 default trusts
2026-02-05 23:56:37 [INFO] pathways.__main__: Loaded 54 default drugs
2026-02-05 23:56:37 [INFO] pathways.__main__: Loaded 57 default directories
2026-02-05 23:56:37 [INFO] pathways.__main__: ============================================================
2026-02-05 23:56:37 [INFO] pathways.__main__: Pathway Data Refresh Starting
2026-02-05 23:56:37 [INFO] pathways.__main__: ============================================================
2026-02-05 23:56:37 [INFO] pathways.__main__: Minimum patients: 5
2026-02-05 23:56:37 [INFO] pathways.__main__: Trust filter: 8 trusts
2026-02-05 23:56:37 [INFO] pathways.__main__: Drug filter: 54 drugs
2026-02-05 23:56:37 [INFO] pathways.__main__: Directory filter: 57 directories
2026-02-05 23:56:37 [INFO] pathways.__main__: Provider codes: All
2026-02-05 23:56:37 [INFO] pathways.__main__: Chart type(s): directory, indication
2026-02-05 23:56:37 [INFO] pathways.__main__: Database: C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\data\pathways.db
2026-02-05 23:56:37 [INFO] pathways.__main__: Dry run: False
2026-02-05 23:56:37 [INFO] pathways.__main__: ============================================================
2026-02-05 23:56:37 [INFO] pathways.__main__:
2026-02-05 23:56:37 [INFO] pathways.__main__: Step 1/4: Fetching data from Snowflake...
2026-02-05 23:56:37 [INFO] pathways.data_processing.pathway_pipeline: Fetching activity data from Snowflake...
2026-02-05 23:56:37 [INFO] pathways.data_processing.snowflake_connector: Connecting to Snowflake account: ZK91403.uk-south.azure
2026-02-05 23:56:37 [INFO] pathways.data_processing.snowflake_connector: Using warehouse: WH__XSMALL, database: DATA_HUB
2026-02-05 23:56:37 [INFO] pathways.data_processing.snowflake_connector: Authenticator: externalbrowser
2026-02-05 23:56:37 [INFO] pathways.data_processing.snowflake_connector: Browser window will open for NHS SSO authentication
2026-02-05 23:56:39 [INFO] pathways.data_processing.snowflake_connector: Connected to Snowflake successfully in 2.3s
2026-02-05 23:56:39 [INFO] pathways.data_processing.snowflake_connector: Fetching activity data from Snowflake
2026-02-05 23:56:39 [INFO] pathways.data_processing.snowflake_connector: Executing chunked dict query (chunk_size=10000, timeout=300s)
2026-02-05 23:56:39 [DEBUG] pathways.data_processing.snowflake_connector: Query:
            SELECT
                "PseudoNHSNoLinked",
                "ProviderCode" AS "Provider Code",
                "LocalPatientID" AS "PersonKey",
                "DrugName" AS "Drug Name",
...
2026-02-05 23:56:40 [DEBUG] pathways.data_processing.snowflake_connector: Chunk 1: 10000 rows (total: 10000)
2026-02-05 23:56:40 [DEBUG] pathways.data_processing.snowflake_connector: Fetched 10000 rows so far...
2026-02-05 23:56:40 [DEBUG] pathways.data_processing.snowflake_connector: Chunk 2: 10000 rows (total: 20000)
2026-02-05 23:56:40 [DEBUG] pathways.data_processing.snowflake_connector: Fetched 20000 rows so far...
2026-02-05 23:56:41 [DEBUG] pathways.data_processing.snowflake_connector: Chunk 3: 10000 rows (total: 30000)
2026-02-05 23:56:41 [DEBUG] pathways.data_processing.snowflake_connector: Fetched 30000 rows so far...
2026-02-05 23:56:41 [DEBUG] pathways.data_processing.snowflake_connector: Chunk 4: 10000 rows (total: 40000)
2026-02-05 23:56:41 [DEBUG] pathways.data_processing.snowflake_connector: Fetched 40000 rows so far...
2026-02-05 23:56:41 [DEBUG] pathways.data_processing.snowflake_connector: Chunk 5: 10000 rows (total: 50000)
2026-02-05 23:56:41 [DEBUG] pathways.data_processing.snowflake_connector: Fetched 50000 rows so far...
2026-02-05 23:56:41 [DEBUG] pathways.data_processing.snowflake_connector: Chunk 6: 10000 rows (total: 60000)
2026-02-05 23:56:41 [DEBUG] pathways.data_processing.snowflake_connector: Fetched 60000 rows so far...
2026-02-05 23:56:41 [DEBUG] pathways.data_processing.snowflake_connector: Chunk 7: 10000 rows (total: 70000)
2026-02-05 23:56:41 [DEBUG] pathways.data_processing.snowflake_connector: Fetched 70000 rows so far...
2026-02-05 23:56:41 [DEBUG] pathways.data_processing.snowflake_connector: Chunk 8: 10000 rows (total: 80000)
2026-02-05 23:56:41 [DEBUG] pathways.data_processing.snowflake_connector: Fetched 80000 rows so far...
2026-02-05 23:56:41 [DEBUG] pathways.data_processing.snowflake_connector: Chunk 9: 10000 rows (total: 90000)
2026-02-05 23:56:41 [DEBUG] pathways.data_processing.snowflake_connector: Fetched 90000 rows so far...
2026-02-05 23:56:41 [DEBUG] pathways.data_processing.snowflake_connector: Chunk 10: 10000 rows (total: 100000)
2026-02-05 23:56:41 [DEBUG] pathways.data_processing.snowflake_connector: Fetched 100000 rows so far...
2026-02-05 23:56:41 [DEBUG] pathways.data_processing.snowflake_connector: Chunk 11: 10000 rows (total: 110000)
2026-02-05 23:56:41 [DEBUG] pathways.data_processing.snowflake_connector: Fetched 110000 rows so far...
2026-02-05 23:56:42 [DEBUG] pathways.data_processing.snowflake_connector: Chunk 12: 10000 rows (total: 120000)
2026-02-05 23:56:42 [DEBUG] pathways.data_processing.snowflake_connector: Fetched 120000 rows so far...
2026-02-05 23:56:42 [DEBUG] pathways.data_processing.snowflake_connector: Chunk 13: 10000 rows (total: 130000)
2026-02-05 23:56:42 [DEBUG] pathways.data_processing.snowflake_connector: Fetched 130000 rows so far...
2026-02-05 23:56:42 [DEBUG] pathways.data_processing.snowflake_connector: Chunk 14: 10000 rows (total: 140000)
2026-02-05 23:56:42 [DEBUG] pathways.data_processing.snowflake_connector: Fetched 140000 rows so far...
2026-02-05 23:56:42 [DEBUG] pathways.data_processing.snowflake_connector: Chunk 15: 10000 rows (total: 150000)
2026-02-05 23:56:42 [DEBUG] pathways.data_processing.snowflake_connector: Fetched 150000 rows so far...
2026-02-05 23:56:42 [DEBUG] pathways.data_processing.snowflake_connector: Chunk 16: 10000 rows (total: 160000)
2026-02-05 23:56:42 [DEBUG] pathways.data_processing.snowflake_connector: Fetched 160000 rows so far...
2026-02-05 23:56:42 [DEBUG] pathways.data_processing.snowflake_connector: Chunk 17: 10000 rows (total: 170000)
2026-02-05 23:56:42 [DEBUG] pathways.data_processing.snowflake_connector: Fetched 170000 rows so far...
2026-02-05 23:56:42 [DEBUG] pathways.data_processing.snowflake_connector: Chunk 18: 10000 rows (total: 180000)
2026-02-05 23:56:42 [DEBUG] pathways.data_processing.snowflake_connector: Fetched 180000 rows so far...
2026-02-05 23:56:42 [DEBUG] pathways.data_processing.snowflake_connector: Chunk 19: 10000 rows (total: 190000)
2026-02-05 23:56:42 [DEBUG] pathways.data_processing.snowflake_connector: Fetched 190000 rows so far...
2026-02-05 23:56:42 [DEBUG] pathways.data_processing.snowflake_connector: Chunk 20: 10000 rows (total: 200000)
2026-02-05 23:56:42 [DEBUG] pathways.data_processing.snowflake_connector: Fetched 200000 rows so far...
2026-02-05 23:56:42 [DEBUG] pathways.data_processing.snowflake_connector: Chunk 21: 10000 rows (total: 210000)
2026-02-05 23:56:42 [DEBUG] pathways.data_processing.snowflake_connector: Fetched 210000 rows so far...
2026-02-05 23:56:42 [DEBUG] pathways.data_processing.snowflake_connector: Chunk 22: 10000 rows (total: 220000)
2026-02-05 23:56:42 [DEBUG] pathways.data_processing.snowflake_connector: Fetched 220000 rows so far...
2026-02-05 23:56:42 [DEBUG] pathways.data_processing.snowflake_connector: Chunk 23: 10000 rows (total: 230000)
2026-02-05 23:56:42 [DEBUG] pathways.data_processing.snowflake_connector: Fetched 230000 rows so far...
2026-02-05 23:56:42 [DEBUG] pathways.data_processing.snowflake_connector: Chunk 24: 10000 rows (total: 240000)
2026-02-05 23:56:43 [DEBUG] pathways.data_processing.snowflake_connector: Fetched 240000 rows so far...
2026-02-05 23:56:43 [DEBUG] pathways.data_processing.snowflake_connector: Chunk 25: 10000 rows (total: 250000)
2026-02-05 23:56:43 [DEBUG] pathways.data_processing.snowflake_connector: Fetched 250000 rows so far...
2026-02-05 23:56:43 [DEBUG] pathways.data_processing.snowflake_connector: Chunk 26: 10000 rows (total: 260000)
2026-02-05 23:56:43 [DEBUG] pathways.data_processing.snowflake_connector: Fetched 260000 rows so far...
2026-02-05 23:56:43 [DEBUG] pathways.data_processing.snowflake_connector: Chunk 27: 10000 rows (total: 270000)
2026-02-05 23:56:43 [DEBUG] pathways.data_processing.snowflake_connector: Fetched 270000 rows so far...
2026-02-05 23:56:43 [DEBUG] pathways.data_processing.snowflake_connector: Chunk 28: 10000 rows (total: 280000)
2026-02-05 23:56:43 [DEBUG] pathways.data_processing.snowflake_connector: Fetched 280000 rows so far...
2026-02-05 23:56:43 [DEBUG] pathways.data_processing.snowflake_connector: Chunk 29: 10000 rows (total: 290000)
2026-02-05 23:56:43 [DEBUG] pathways.data_processing.snowflake_connector: Fetched 290000 rows so far...
2026-02-05 23:56:43 [DEBUG] pathways.data_processing.snowflake_connector: Chunk 30: 10000 rows (total: 300000)
2026-02-05 23:56:43 [DEBUG] pathways.data_processing.snowflake_connector: Fetched 300000 rows so far...
2026-02-05 23:56:43 [DEBUG] pathways.data_processing.snowflake_connector: Chunk 31: 10000 rows (total: 310000)
2026-02-05 23:56:43 [DEBUG] pathways.data_processing.snowflake_connector: Fetched 310000 rows so far...
2026-02-05 23:56:43 [DEBUG] pathways.data_processing.snowflake_connector: Chunk 32: 10000 rows (total: 320000)
2026-02-05 23:56:43 [DEBUG] pathways.data_processing.snowflake_connector: Fetched 320000 rows so far...
2026-02-05 23:56:43 [DEBUG] pathways.data_processing.snowflake_connector: Chunk 33: 10000 rows (total: 330000)
2026-02-05 23:56:43 [DEBUG] pathways.data_processing.snowflake_connector: Fetched 330000 rows so far...
2026-02-05 23:56:43 [DEBUG] pathways.data_processing.snowflake_connector: Chunk 34: 10000 rows (total: 340000)
2026-02-05 23:56:43 [DEBUG] pathways.data_processing.snowflake_connector: Fetched 340000 rows so far...
2026-02-05 23:56:43 [DEBUG] pathways.data_processing.snowflake_connector: Chunk 35: 10000 rows (total: 350000)
2026-02-05 23:56:43 [DEBUG] pathways.data_processing.snowflake_connector: Fetched 350000 rows so far...
2026-02-05 23:56:44 [DEBUG] pathways.data_processing.snowflake_connector: Chunk 36: 10000 rows (total: 360000)
2026-02-05 23:56:44 [DEBUG] pathways.data_processing.snowflake_connector: Fetched 360000 rows so far...
2026-02-05 23:56:44 [DEBUG] pathways.data_processing.snowflake_connector: Chunk 37: 10000 rows (total: 370000)
2026-02-05 23:56:44 [DEBUG] pathways.data_processing.snowflake_connector: Fetched 370000 rows so far...
2026-02-05 23:56:44 [DEBUG] pathways.data_processing.snowflake_connector: Chunk 38: 10000 rows (total: 380000)
2026-02-05 23:56:44 [DEBUG] pathways.data_processing.snowflake_connector: Fetched 380000 rows so far...
2026-02-05 23:56:44 [DEBUG] pathways.data_processing.snowflake_connector: Chunk 39: 10000 rows (total: 390000)
2026-02-05 23:56:44 [DEBUG] pathways.data_processing.snowflake_connector: Fetched 390000 rows so far...
2026-02-05 23:56:44 [DEBUG] pathways.data_processing.snowflake_connector: Chunk 40: 10000 rows (total: 400000)
2026-02-05 23:56:44 [DEBUG] pathways.data_processing.snowflake_connector: Fetched 400000 rows so far...
2026-02-05 23:56:44 [DEBUG] pathways.data_processing.snowflake_connector: Chunk 41: 10000 rows (total: 410000)
2026-02-05 23:56:44 [DEBUG] pathways.data_processing.snowflake_connector: Fetched 410000 rows so far...
2026-02-05 23:56:44 [DEBUG] pathways.data_processing.snowflake_connector: Chunk 42: 10000 rows (total: 420000)
2026-02-05 23:56:44 [DEBUG] pathways.data_processing.snowflake_connector: Fetched 420000 rows so far...
2026-02-05 23:56:44 [DEBUG] pathways.data_processing.snowflake_connector: Chunk 43: 10000 rows (total: 430000)
2026-02-05 23:56:44 [DEBUG] pathways.data_processing.snowflake_connector: Fetched 430000 rows so far...
2026-02-05 23:56:44 [DEBUG] pathways.data_processing.snowflake_connector: Chunk 44: 10000 rows (total: 440000)
2026-02-05 23:56:44 [DEBUG] pathways.data_processing.snowflake_connector: Fetched 440000 rows so far...
2026-02-05 23:56:44 [DEBUG] pathways.data_processing.snowflake_connector: Chunk 45: 10000 rows (total: 450000)
2026-02-05 23:56:44 [DEBUG] pathways.data_processing.snowflake_connector: Fetched 450000 rows so far...
2026-02-05 23:56:44 [DEBUG] pathways.data_processing.snowflake_connector: Chunk 46: 10000 rows (total: 460000)
2026-02-05 23:56:44 [DEBUG] pathways.data_processing.snowflake_connector: Fetched 460000 rows so far...
2026-02-05 23:56:45 [DEBUG] pathways.data_processing.snowflake_connector: Chunk 47: 10000 rows (total: 470000)
2026-02-05 23:56:45 [DEBUG] pathways.data_processing.snowflake_connector: Fetched 470000 rows so far...
2026-02-05 23:56:45 [DEBUG] pathways.data_processing.snowflake_connector: Chunk 48: 10000 rows (total: 480000)
2026-02-05 23:56:45 [DEBUG] pathways.data_processing.snowflake_connector: Fetched 480000 rows so far...
2026-02-05 23:56:45 [DEBUG] pathways.data_processing.snowflake_connector: Chunk 49: 10000 rows (total: 490000)
2026-02-05 23:56:45 [DEBUG] pathways.data_processing.snowflake_connector: Fetched 490000 rows so far...
2026-02-05 23:56:45 [DEBUG] pathways.data_processing.snowflake_connector: Chunk 50: 10000 rows (total: 500000)
2026-02-05 23:56:45 [DEBUG] pathways.data_processing.snowflake_connector: Fetched 500000 rows so far...
2026-02-05 23:56:45 [DEBUG] pathways.data_processing.snowflake_connector: Chunk 51: 10000 rows (total: 510000)
2026-02-05 23:56:45 [DEBUG] pathways.data_processing.snowflake_connector: Fetched 510000 rows so far...
2026-02-05 23:56:45 [DEBUG] pathways.data_processing.snowflake_connector: Chunk 52: 10000 rows (total: 520000)
2026-02-05 23:56:45 [DEBUG] pathways.data_processing.snowflake_connector: Fetched 520000 rows so far...
2026-02-05 23:56:45 [DEBUG] pathways.data_processing.snowflake_connector: Chunk 53: 10000 rows (total: 530000)
2026-02-05 23:56:45 [DEBUG] pathways.data_processing.snowflake_connector: Fetched 530000 rows so far...
2026-02-05 23:56:45 [DEBUG] pathways.data_processing.snowflake_connector: Chunk 54: 10000 rows (total: 540000)
2026-02-05 23:56:45 [DEBUG] pathways.data_processing.snowflake_connector: Fetched 540000 rows so far...
2026-02-05 23:56:45 [DEBUG] pathways.data_processing.snowflake_connector: Chunk 55: 10000 rows (total: 550000)
2026-02-05 23:56:45 [DEBUG] pathways.data_processing.snowflake_connector: Fetched 550000 rows so far...
2026-02-05 23:56:45 [DEBUG] pathways.data_processing.snowflake_connector: Chunk 56: 10000 rows (total: 560000)
2026-02-05 23:56:45 [DEBUG] pathways.data_processing.snowflake_connector: Fetched 560000 rows so far...
2026-02-05 23:56:45 [DEBUG] pathways.data_processing.snowflake_connector: Chunk 57: 10000 rows (total: 570000)
2026-02-05 23:56:45 [DEBUG] pathways.data_processing.snowflake_connector: Fetched 570000 rows so far...
2026-02-05 23:56:46 [DEBUG] pathways.data_processing.snowflake_connector: Chunk 58: 10000 rows (total: 580000)
2026-02-05 23:56:46 [DEBUG] pathways.data_processing.snowflake_connector: Fetched 580000 rows so far...
2026-02-05 23:56:46 [DEBUG] pathways.data_processing.snowflake_connector: Chunk 59: 10000 rows (total: 590000)
2026-02-05 23:56:46 [DEBUG] pathways.data_processing.snowflake_connector: Fetched 590000 rows so far...
2026-02-05 23:56:46 [DEBUG] pathways.data_processing.snowflake_connector: Chunk 60: 10000 rows (total: 600000)
2026-02-05 23:56:46 [DEBUG] pathways.data_processing.snowflake_connector: Fetched 600000 rows so far...
2026-02-05 23:56:46 [DEBUG] pathways.data_processing.snowflake_connector: Chunk 61: 10000 rows (total: 610000)
2026-02-05 23:56:46 [DEBUG] pathways.data_processing.snowflake_connector: Fetched 610000 rows so far...
2026-02-05 23:56:46 [DEBUG] pathways.data_processing.snowflake_connector: Chunk 62: 10000 rows (total: 620000)
2026-02-05 23:56:46 [DEBUG] pathways.data_processing.snowflake_connector: Fetched 620000 rows so far...
2026-02-05 23:56:46 [DEBUG] pathways.data_processing.snowflake_connector: Chunk 63: 10000 rows (total: 630000)
2026-02-05 23:56:46 [DEBUG] pathways.data_processing.snowflake_connector: Fetched 630000 rows so far...
2026-02-05 23:56:46 [DEBUG] pathways.data_processing.snowflake_connector: Chunk 64: 10000 rows (total: 640000)
2026-02-05 23:56:46 [DEBUG] pathways.data_processing.snowflake_connector: Fetched 640000 rows so far...
2026-02-05 23:56:46 [DEBUG] pathways.data_processing.snowflake_connector: Chunk 65: 10000 rows (total: 650000)
2026-02-05 23:56:46 [DEBUG] pathways.data_processing.snowflake_connector: Fetched 650000 rows so far...
2026-02-05 23:56:46 [DEBUG] pathways.data_processing.snowflake_connector: Chunk 66: 6695 rows (total: 656695)
2026-02-05 23:56:46 [DEBUG] pathways.data_processing.snowflake_connector: Fetched 656695 rows so far...
2026-02-05 23:56:46 [INFO] pathways.data_processing.snowflake_connector: Chunked dict query returned 656695 rows in 66 chunks (6.61s)
2026-02-05 23:56:46 [INFO] pathways.data_processing.snowflake_connector: Fetched 656695 activity records from Snowflake
2026-02-05 23:56:46 [INFO] pathways.data_processing.pathway_pipeline: Fetched 656695 records from Snowflake
2026-02-05 23:56:48 [INFO] pathways.data_processing.pathway_pipeline: Applying data transformations...
2026-02-05 23:56:48 [INFO] pathways.data_processing.pathway_pipeline: Generated UPID for 42769 unique patients
2026-02-05 23:56:49 [INFO] pathways.data_processing.pathway_pipeline: Removed 136847 rows with unmapped drug names
2026-02-05 23:56:50 [ERROR] pathways.tools.data: Error processing column NCDR Treatment Function Name: 'NCDR Treatment Function Name'
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\tools\data.py:139: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.

For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.

  df["Treatment Function Code"].replace(np.nan, 0, inplace=True)
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\tools\data.py:241: FutureWarning: DataFrameGroupBy.apply operated on the grouping columns. This behavior is deprecated, and in a future version of pandas the grouping columns will be excluded from the operation. Either pass `include_groups=False` to exclude the groupings or explicitly select the grouping columns after groupby to silence this warning.
  calculated_dirs = valid_groups.apply(lambda grp: find_first_valid_dir(grp, drug_to_valid_dirs))
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\tools\data.py:263: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.

For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.

  df['Directory'].fillna(df['Calculated_Directory'], inplace=True)
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\tools\data.py:273: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.

For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.

  df['UPID'].replace('', np.nan, inplace=True) # Ensure empty strings are NaN
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\tools\data.py:304: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.

For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.

  df['Directory'].fillna("Undefined", inplace=True)
2026-02-06 00:02:55 [INFO] pathways.data_processing.pathway_pipeline: Assigned directories to 519848 records
2026-02-06 00:02:55 [INFO] pathways.data_processing.pathway_pipeline: Data transformation complete. Final record count: 519848
2026-02-06 00:02:55 [INFO] pathways.__main__: Fetched 519848 records from Snowflake
2026-02-06 00:02:55 [INFO] pathways.__main__:
2026-02-06 00:02:55 [INFO] pathways.__main__: Step 2/4: Processing pathway data for 12 datasets (6 date filters x 2 chart types)...
2026-02-06 00:02:55 [INFO] pathways.__main__:
2026-02-06 00:02:55 [INFO] pathways.__main__: Processing chart type: directory
2026-02-06 00:02:55 [INFO] pathways.data_processing.pathway_pipeline: Processing date filter: all_6mo
2026-02-06 00:02:55 [INFO] pathways.data_processing.pathway_pipeline: Processing pathway for all_6mo
2026-02-06 00:02:55 [INFO] pathways.data_processing.pathway_pipeline:   Date range: 2000-01-01 to 2026-02-06
2026-02-06 00:02:55 [INFO] pathways.data_processing.pathway_pipeline:   Last seen after: 2025-08-10
2026-02-06 00:02:55 [INFO] pathways.analysis.pathway_analyzer: Filtering unrelated interventions
2026-02-06 00:02:56 [INFO] pathways.analysis.pathway_analyzer: Identifying unique patients and interventions used
2026-02-06 00:02:59 [INFO] pathways.analysis.pathway_analyzer: Calculating each unique patient's intervention average frequency, cost and duration of each intervention
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:96: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  UPID_date_var = str(x.name) + str(x[d])
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:96: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  UPID_date_var = str(x.name) + str(x[d])
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:96: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  UPID_date_var = str(x.name) + str(x[d])
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:96: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  UPID_date_var = str(x.name) + str(x[d])
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:326: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  v = row[c]
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:333: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  label = row[count - 1]
2026-02-06 00:03:15 [INFO] pathways.analysis.pathway_analyzer: Building graph dataframe structure.
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:543: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  ice_df["level"] = ice_df["ids"].str.count("-")
2026-02-06 00:03:20 [INFO] pathways.analysis.pathway_analyzer: Generating graph.
2026-02-06 00:03:20 [INFO] pathways.data_processing.pathway_pipeline: Generated 293 pathway nodes for all_6mo
2026-02-06 00:03:20 [INFO] pathways.data_processing.pathway_pipeline: Extracted denormalized fields for 293 nodes
2026-02-06 00:03:20 [INFO] pathways.data_processing.pathway_pipeline:   Unique trusts: 8
2026-02-06 00:03:20 [INFO] pathways.data_processing.pathway_pipeline:   Unique directories: 14
2026-02-06 00:03:20 [INFO] pathways.data_processing.pathway_pipeline: Converted 293 pathway nodes to records for all_6mo (directory)
2026-02-06 00:03:20 [INFO] pathways.data_processing.pathway_pipeline: Completed all_6mo: 293 nodes
2026-02-06 00:03:20 [INFO] pathways.data_processing.pathway_pipeline: Processing date filter: all_12mo
2026-02-06 00:03:20 [INFO] pathways.data_processing.pathway_pipeline: Processing pathway for all_12mo
2026-02-06 00:03:20 [INFO] pathways.data_processing.pathway_pipeline:   Date range: 2000-01-01 to 2026-02-06
2026-02-06 00:03:20 [INFO] pathways.data_processing.pathway_pipeline:   Last seen after: 2025-02-11
2026-02-06 00:03:21 [INFO] pathways.analysis.pathway_analyzer: Filtering unrelated interventions
2026-02-06 00:03:21 [INFO] pathways.analysis.pathway_analyzer: Identifying unique patients and interventions used
2026-02-06 00:03:24 [INFO] pathways.analysis.pathway_analyzer: Calculating each unique patient's intervention average frequency, cost and duration of each intervention
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:96: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  UPID_date_var = str(x.name) + str(x[d])
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:96: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  UPID_date_var = str(x.name) + str(x[d])
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:96: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  UPID_date_var = str(x.name) + str(x[d])
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:96: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  UPID_date_var = str(x.name) + str(x[d])
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:326: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  v = row[c]
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:333: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  label = row[count - 1]
2026-02-06 00:03:41 [INFO] pathways.analysis.pathway_analyzer: Building graph dataframe structure.
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:543: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  ice_df["level"] = ice_df["ids"].str.count("-")
2026-02-06 00:03:46 [INFO] pathways.analysis.pathway_analyzer: Generating graph.
2026-02-06 00:03:47 [INFO] pathways.data_processing.pathway_pipeline: Generated 329 pathway nodes for all_12mo
2026-02-06 00:03:47 [INFO] pathways.data_processing.pathway_pipeline: Extracted denormalized fields for 329 nodes
2026-02-06 00:03:47 [INFO] pathways.data_processing.pathway_pipeline:   Unique trusts: 8
2026-02-06 00:03:47 [INFO] pathways.data_processing.pathway_pipeline:   Unique directories: 15
2026-02-06 00:03:47 [INFO] pathways.data_processing.pathway_pipeline: Converted 329 pathway nodes to records for all_12mo (directory)
2026-02-06 00:03:47 [INFO] pathways.data_processing.pathway_pipeline: Completed all_12mo: 329 nodes
2026-02-06 00:03:47 [INFO] pathways.data_processing.pathway_pipeline: Processing date filter: 1yr_6mo
2026-02-06 00:03:47 [INFO] pathways.data_processing.pathway_pipeline: Processing pathway for 1yr_6mo
2026-02-06 00:03:47 [INFO] pathways.data_processing.pathway_pipeline:   Date range: 2025-02-06 to 2026-02-06
2026-02-06 00:03:47 [INFO] pathways.data_processing.pathway_pipeline:   Last seen after: 2025-08-10
2026-02-06 00:03:47 [INFO] pathways.analysis.pathway_analyzer: Filtering unrelated interventions
2026-02-06 00:03:48 [INFO] pathways.analysis.pathway_analyzer: Identifying unique patients and interventions used
2026-02-06 00:03:50 [INFO] pathways.analysis.pathway_analyzer: Calculating each unique patient's intervention average frequency, cost and duration of each intervention
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:96: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  UPID_date_var = str(x.name) + str(x[d])
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:96: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  UPID_date_var = str(x.name) + str(x[d])
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:96: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  UPID_date_var = str(x.name) + str(x[d])
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:96: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  UPID_date_var = str(x.name) + str(x[d])
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:326: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  v = row[c]
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:333: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  label = row[count - 1]
2026-02-06 00:04:06 [INFO] pathways.analysis.pathway_analyzer: Building graph dataframe structure.
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:543: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  ice_df["level"] = ice_df["ids"].str.count("-")
2026-02-06 00:04:07 [INFO] pathways.analysis.pathway_analyzer: Generating graph.
2026-02-06 00:04:07 [INFO] pathways.data_processing.pathway_pipeline: Generated 93 pathway nodes for 1yr_6mo
2026-02-06 00:04:07 [INFO] pathways.data_processing.pathway_pipeline: Extracted denormalized fields for 93 nodes
2026-02-06 00:04:07 [INFO] pathways.data_processing.pathway_pipeline:   Unique trusts: 7
2026-02-06 00:04:07 [INFO] pathways.data_processing.pathway_pipeline:   Unique directories: 10
2026-02-06 00:04:07 [INFO] pathways.data_processing.pathway_pipeline: Converted 93 pathway nodes to records for 1yr_6mo (directory)
2026-02-06 00:04:07 [INFO] pathways.data_processing.pathway_pipeline: Completed 1yr_6mo: 93 nodes
2026-02-06 00:04:07 [INFO] pathways.data_processing.pathway_pipeline: Processing date filter: 1yr_12mo
2026-02-06 00:04:07 [INFO] pathways.data_processing.pathway_pipeline: Processing pathway for 1yr_12mo
2026-02-06 00:04:07 [INFO] pathways.data_processing.pathway_pipeline:   Date range: 2025-02-06 to 2026-02-06
2026-02-06 00:04:07 [INFO] pathways.data_processing.pathway_pipeline:   Last seen after: 2025-02-11
2026-02-06 00:04:07 [INFO] pathways.analysis.pathway_analyzer: Filtering unrelated interventions
2026-02-06 00:04:08 [INFO] pathways.analysis.pathway_analyzer: Identifying unique patients and interventions used
2026-02-06 00:04:10 [INFO] pathways.analysis.pathway_analyzer: Calculating each unique patient's intervention average frequency, cost and duration of each intervention
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:96: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  UPID_date_var = str(x.name) + str(x[d])
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:96: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  UPID_date_var = str(x.name) + str(x[d])
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:96: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  UPID_date_var = str(x.name) + str(x[d])
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:96: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  UPID_date_var = str(x.name) + str(x[d])
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:326: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  v = row[c]
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:333: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  label = row[count - 1]
2026-02-06 00:04:27 [INFO] pathways.analysis.pathway_analyzer: Building graph dataframe structure.
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:543: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  ice_df["level"] = ice_df["ids"].str.count("-")
2026-02-06 00:04:27 [INFO] pathways.analysis.pathway_analyzer: Generating graph.
2026-02-06 00:04:27 [INFO] pathways.data_processing.pathway_pipeline: Generated 105 pathway nodes for 1yr_12mo
2026-02-06 00:04:27 [INFO] pathways.data_processing.pathway_pipeline: Extracted denormalized fields for 105 nodes
2026-02-06 00:04:27 [INFO] pathways.data_processing.pathway_pipeline:   Unique trusts: 7
2026-02-06 00:04:27 [INFO] pathways.data_processing.pathway_pipeline:   Unique directories: 11
2026-02-06 00:04:27 [INFO] pathways.data_processing.pathway_pipeline: Converted 105 pathway nodes to records for 1yr_12mo (directory)
2026-02-06 00:04:27 [INFO] pathways.data_processing.pathway_pipeline: Completed 1yr_12mo: 105 nodes
2026-02-06 00:04:27 [INFO] pathways.data_processing.pathway_pipeline: Processing date filter: 2yr_6mo
2026-02-06 00:04:27 [INFO] pathways.data_processing.pathway_pipeline: Processing pathway for 2yr_6mo
2026-02-06 00:04:27 [INFO] pathways.data_processing.pathway_pipeline:   Date range: 2024-02-06 to 2026-02-06
2026-02-06 00:04:27 [INFO] pathways.data_processing.pathway_pipeline:   Last seen after: 2025-08-10
2026-02-06 00:04:28 [INFO] pathways.analysis.pathway_analyzer: Filtering unrelated interventions
2026-02-06 00:04:28 [INFO] pathways.analysis.pathway_analyzer: Identifying unique patients and interventions used
2026-02-06 00:04:31 [INFO] pathways.analysis.pathway_analyzer: Calculating each unique patient's intervention average frequency, cost and duration of each intervention
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:96: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  UPID_date_var = str(x.name) + str(x[d])
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:96: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  UPID_date_var = str(x.name) + str(x[d])
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:96: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  UPID_date_var = str(x.name) + str(x[d])
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:96: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  UPID_date_var = str(x.name) + str(x[d])
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:326: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  v = row[c]
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:333: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  label = row[count - 1]
2026-02-06 00:04:50 [INFO] pathways.analysis.pathway_analyzer: Building graph dataframe structure.
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:543: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  ice_df["level"] = ice_df["ids"].str.count("-")
2026-02-06 00:04:51 [INFO] pathways.analysis.pathway_analyzer: Generating graph.
2026-02-06 00:04:51 [INFO] pathways.data_processing.pathway_pipeline: Generated 134 pathway nodes for 2yr_6mo
2026-02-06 00:04:51 [INFO] pathways.data_processing.pathway_pipeline: Extracted denormalized fields for 134 nodes
2026-02-06 00:04:51 [INFO] pathways.data_processing.pathway_pipeline:   Unique trusts: 7
2026-02-06 00:04:51 [INFO] pathways.data_processing.pathway_pipeline:   Unique directories: 13
2026-02-06 00:04:51 [INFO] pathways.data_processing.pathway_pipeline: Converted 134 pathway nodes to records for 2yr_6mo (directory)
2026-02-06 00:04:51 [INFO] pathways.data_processing.pathway_pipeline: Completed 2yr_6mo: 134 nodes
2026-02-06 00:04:51 [INFO] pathways.data_processing.pathway_pipeline: Processing date filter: 2yr_12mo
2026-02-06 00:04:51 [INFO] pathways.data_processing.pathway_pipeline: Processing pathway for 2yr_12mo
2026-02-06 00:04:51 [INFO] pathways.data_processing.pathway_pipeline:   Date range: 2024-02-06 to 2026-02-06
2026-02-06 00:04:51 [INFO] pathways.data_processing.pathway_pipeline:   Last seen after: 2025-02-11
2026-02-06 00:04:51 [INFO] pathways.analysis.pathway_analyzer: Filtering unrelated interventions
2026-02-06 00:04:52 [INFO] pathways.analysis.pathway_analyzer: Identifying unique patients and interventions used
2026-02-06 00:04:55 [INFO] pathways.analysis.pathway_analyzer: Calculating each unique patient's intervention average frequency, cost and duration of each intervention
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:96: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  UPID_date_var = str(x.name) + str(x[d])
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:96: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  UPID_date_var = str(x.name) + str(x[d])
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:96: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  UPID_date_var = str(x.name) + str(x[d])
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:96: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  UPID_date_var = str(x.name) + str(x[d])
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:326: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  v = row[c]
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:333: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  label = row[count - 1]
2026-02-06 00:05:12 [INFO] pathways.analysis.pathway_analyzer: Building graph dataframe structure.
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:543: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  ice_df["level"] = ice_df["ids"].str.count("-")
2026-02-06 00:05:13 [INFO] pathways.analysis.pathway_analyzer: Generating graph.
2026-02-06 00:05:13 [INFO] pathways.data_processing.pathway_pipeline: Generated 147 pathway nodes for 2yr_12mo
2026-02-06 00:05:13 [INFO] pathways.data_processing.pathway_pipeline: Extracted denormalized fields for 147 nodes
2026-02-06 00:05:13 [INFO] pathways.data_processing.pathway_pipeline:   Unique trusts: 7
2026-02-06 00:05:13 [INFO] pathways.data_processing.pathway_pipeline:   Unique directories: 14
2026-02-06 00:05:13 [INFO] pathways.data_processing.pathway_pipeline: Converted 147 pathway nodes to records for 2yr_12mo (directory)
2026-02-06 00:05:13 [INFO] pathways.data_processing.pathway_pipeline: Completed 2yr_12mo: 147 nodes
2026-02-06 00:05:13 [INFO] pathways.data_processing.pathway_pipeline: Total pathway nodes across all filters: 1101
2026-02-06 00:05:13 [INFO] pathways.__main__:
2026-02-06 00:05:13 [INFO] pathways.__main__: Processing chart type: indication
2026-02-06 00:05:13 [INFO] pathways.__main__: Building drug-aware indication groups...
2026-02-06 00:05:13 [INFO] pathways.data_processing.diagnosis_lookup: Loaded drug-indication mapping: 162 Search_Terms, 346 drug fragments
2026-02-06 00:05:13 [INFO] pathways.__main__: Loaded drug mapping: 162 Search_Terms
2026-02-06 00:05:14 [INFO] pathways.__main__: Looking up GP diagnoses for 36628 unique patients...
2026-02-06 00:05:14 [INFO] pathways.__main__: Restricting GP codes to HCD window: >= 2019-04-01
2026-02-06 00:05:14 [INFO] pathways.data_processing.diagnosis_lookup: Starting Snowflake-direct indication lookup for 36628 patients...
2026-02-06 00:05:14 [INFO] pathways.data_processing.diagnosis_lookup:   Restricting GP codes to >= 2019-04-01
2026-02-06 00:05:14 [INFO] pathways.data_processing.diagnosis_lookup: Batch 1/8: patients 1 to 5000
2026-02-06 00:05:14 [INFO] pathways.data_processing.snowflake_connector: Executing query (timeout=300s)
2026-02-06 00:05:14 [DEBUG] pathways.data_processing.snowflake_connector: Query:

WITH SearchTermClusters AS (
    SELECT Search_Term, Cluster_ID FROM (VALUES
        ('acute lymphoblastic leukaemia', 'HAEMCANMORPH_COD'),
        ('acute myeloid leukaemia', 'C19HAEMCAN_COD'),
   ...
2026-02-06 00:05:20 [INFO] pathways.data_processing.snowflake_connector: Query returned 54300 rows in 6.11s
2026-02-06 00:05:20 [DEBUG] pathways.data_processing.diagnosis_lookup: Batch 1: found 54300 patient-indication matches
2026-02-06 00:05:20 [INFO] pathways.data_processing.diagnosis_lookup: Batch 2/8: patients 5001 to 10000
2026-02-06 00:05:20 [INFO] pathways.data_processing.snowflake_connector: Executing query (timeout=300s)
2026-02-06 00:05:20 [DEBUG] pathways.data_processing.snowflake_connector: Query:

WITH SearchTermClusters AS (
    SELECT Search_Term, Cluster_ID FROM (VALUES
        ('acute lymphoblastic leukaemia', 'HAEMCANMORPH_COD'),
        ('acute myeloid leukaemia', 'C19HAEMCAN_COD'),
   ...
2026-02-06 00:05:24 [INFO] pathways.data_processing.snowflake_connector: Query returned 61077 rows in 4.13s
2026-02-06 00:05:25 [DEBUG] pathways.data_processing.diagnosis_lookup: Batch 2: found 61077 patient-indication matches
2026-02-06 00:05:25 [INFO] pathways.data_processing.diagnosis_lookup: Batch 3/8: patients 10001 to 15000
2026-02-06 00:05:25 [INFO] pathways.data_processing.snowflake_connector: Executing query (timeout=300s)
2026-02-06 00:05:25 [DEBUG] pathways.data_processing.snowflake_connector: Query:

WITH SearchTermClusters AS (
    SELECT Search_Term, Cluster_ID FROM (VALUES
        ('acute lymphoblastic leukaemia', 'HAEMCANMORPH_COD'),
        ('acute myeloid leukaemia', 'C19HAEMCAN_COD'),
   ...
2026-02-06 00:05:29 [INFO] pathways.data_processing.snowflake_connector: Query returned 67362 rows in 3.71s
2026-02-06 00:05:29 [DEBUG] pathways.data_processing.diagnosis_lookup: Batch 3: found 67362 patient-indication matches
2026-02-06 00:05:29 [INFO] pathways.data_processing.diagnosis_lookup: Batch 4/8: patients 15001 to 20000
2026-02-06 00:05:29 [INFO] pathways.data_processing.snowflake_connector: Executing query (timeout=300s)
2026-02-06 00:05:29 [DEBUG] pathways.data_processing.snowflake_connector: Query:

WITH SearchTermClusters AS (
    SELECT Search_Term, Cluster_ID FROM (VALUES
        ('acute lymphoblastic leukaemia', 'HAEMCANMORPH_COD'),
        ('acute myeloid leukaemia', 'C19HAEMCAN_COD'),
   ...
2026-02-06 00:05:33 [INFO] pathways.data_processing.snowflake_connector: Query returned 67937 rows in 3.71s
2026-02-06 00:05:33 [DEBUG] pathways.data_processing.diagnosis_lookup: Batch 4: found 67937 patient-indication matches
2026-02-06 00:05:33 [INFO] pathways.data_processing.diagnosis_lookup: Batch 5/8: patients 20001 to 25000
2026-02-06 00:05:33 [INFO] pathways.data_processing.snowflake_connector: Executing query (timeout=300s)
2026-02-06 00:05:33 [DEBUG] pathways.data_processing.snowflake_connector: Query:

WITH SearchTermClusters AS (
    SELECT Search_Term, Cluster_ID FROM (VALUES
        ('acute lymphoblastic leukaemia', 'HAEMCANMORPH_COD'),
        ('acute myeloid leukaemia', 'C19HAEMCAN_COD'),
   ...
2026-02-06 00:05:36 [INFO] pathways.data_processing.snowflake_connector: Query returned 80531 rows in 3.53s
2026-02-06 00:05:36 [DEBUG] pathways.data_processing.diagnosis_lookup: Batch 5: found 80531 patient-indication matches
2026-02-06 00:05:36 [INFO] pathways.data_processing.diagnosis_lookup: Batch 6/8: patients 25001 to 30000
2026-02-06 00:05:36 [INFO] pathways.data_processing.snowflake_connector: Executing query (timeout=300s)
2026-02-06 00:05:36 [DEBUG] pathways.data_processing.snowflake_connector: Query:

WITH SearchTermClusters AS (
    SELECT Search_Term, Cluster_ID FROM (VALUES
        ('acute lymphoblastic leukaemia', 'HAEMCANMORPH_COD'),
        ('acute myeloid leukaemia', 'C19HAEMCAN_COD'),
   ...
2026-02-06 00:05:40 [INFO] pathways.data_processing.snowflake_connector: Query returned 88184 rows in 3.82s
2026-02-06 00:05:40 [DEBUG] pathways.data_processing.diagnosis_lookup: Batch 6: found 88184 patient-indication matches
2026-02-06 00:05:40 [INFO] pathways.data_processing.diagnosis_lookup: Batch 7/8: patients 30001 to 35000
2026-02-06 00:05:40 [INFO] pathways.data_processing.snowflake_connector: Executing query (timeout=300s)
2026-02-06 00:05:40 [DEBUG] pathways.data_processing.snowflake_connector: Query:

WITH SearchTermClusters AS (
    SELECT Search_Term, Cluster_ID FROM (VALUES
        ('acute lymphoblastic leukaemia', 'HAEMCANMORPH_COD'),
        ('acute myeloid leukaemia', 'C19HAEMCAN_COD'),
   ...
2026-02-06 00:05:44 [INFO] pathways.data_processing.snowflake_connector: Query returned 89959 rows in 3.82s
2026-02-06 00:05:44 [DEBUG] pathways.data_processing.diagnosis_lookup: Batch 7: found 89959 patient-indication matches
2026-02-06 00:05:44 [INFO] pathways.data_processing.diagnosis_lookup: Batch 8/8: patients 35001 to 36628
2026-02-06 00:05:44 [INFO] pathways.data_processing.snowflake_connector: Executing query (timeout=300s)
2026-02-06 00:05:44 [DEBUG] pathways.data_processing.snowflake_connector: Query:

WITH SearchTermClusters AS (
    SELECT Search_Term, Cluster_ID FROM (VALUES
        ('acute lymphoblastic leukaemia', 'HAEMCANMORPH_COD'),
        ('acute myeloid leukaemia', 'C19HAEMCAN_COD'),
   ...
2026-02-06 00:05:46 [INFO] pathways.data_processing.snowflake_connector: Query returned 28444 rows in 1.71s
2026-02-06 00:05:46 [DEBUG] pathways.data_processing.diagnosis_lookup: Batch 8: found 28444 patient-indication matches
2026-02-06 00:05:46 [INFO] pathways.data_processing.diagnosis_lookup: Indication lookup complete:
2026-02-06 00:05:46 [INFO] pathways.data_processing.diagnosis_lookup:   Total patients queried: 36628
2026-02-06 00:05:46 [INFO] pathways.data_processing.diagnosis_lookup:   Patients with GP match: 33642 (91.8%)
2026-02-06 00:05:46 [INFO] pathways.data_processing.diagnosis_lookup:   Total patient-indication rows: 537794 (avg 16.0 per patient)
2026-02-06 00:05:46 [INFO] pathways.data_processing.diagnosis_lookup:   Unique Search_Terms found: 144
2026-02-06 00:05:46 [INFO] pathways.data_processing.diagnosis_lookup:   Top 5 indications: {'sepsis': np.int64(32382), 'drug misuse': np.int64(31536), 'influenza': np.int64(28550), 'lung cancer': np.int64(14467), 'non-small-cell lung cancer': np.int64(14467)}
2026-02-06 00:06:00 [INFO] pathways.data_processing.diagnosis_lookup: GP lookup built: 33642 patients with GP matches
2026-02-06 00:06:02 [INFO] pathways.data_processing.diagnosis_lookup: Drug-indication matching complete:
2026-02-06 00:06:02 [INFO] pathways.data_processing.diagnosis_lookup:   Total UPID-Drug pairs: 50797
2026-02-06 00:06:02 [INFO] pathways.data_processing.diagnosis_lookup:   Matched (GP dx + drug mapping): 25059 (49.3%)
2026-02-06 00:06:02 [INFO] pathways.data_processing.diagnosis_lookup:   Tiebreaker used: 15238
2026-02-06 00:06:02 [INFO] pathways.data_processing.diagnosis_lookup:   Fallback (no match): 25738 (50.7%)
2026-02-06 00:06:06 [INFO] pathways.data_processing.diagnosis_lookup:   Unique modified UPIDs: 42072
2026-02-06 00:06:06 [INFO] pathways.data_processing.diagnosis_lookup:   Top 5 indications: {'Undefined (no GP dx)': np.int64(8110), 'macular degeneration': np.int64(5256), 'diabetes': np.int64(3841), 'OPHTHALMOLOGY (no GP dx)': np.int64(3040), 'rheumatoid arthritis': np.int64(2216)}
2026-02-06 00:06:06 [INFO] pathways.__main__: Drug-aware indication matching complete. Modified UPIDs: 42072, Indication groups: 42072
2026-02-06 00:06:06 [INFO] pathways.__main__: Processing indication pathway for all_6mo
2026-02-06 00:06:06 [INFO] pathways.data_processing.pathway_pipeline: Processing indication pathway for all_6mo
2026-02-06 00:06:06 [INFO] pathways.data_processing.pathway_pipeline:   Date range: 2000-01-01 to 2026-02-06
2026-02-06 00:06:06 [INFO] pathways.data_processing.pathway_pipeline:   Last seen after: 2025-08-10
2026-02-06 00:06:07 [INFO] pathways.analysis.pathway_analyzer: Filtering unrelated interventions
2026-02-06 00:06:07 [INFO] pathways.analysis.pathway_analyzer: Identifying unique patients and interventions used
2026-02-06 00:06:10 [INFO] pathways.analysis.pathway_analyzer: Calculating each unique patient's intervention average frequency, cost and duration of each intervention
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:96: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  UPID_date_var = str(x.name) + str(x[d])
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:96: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  UPID_date_var = str(x.name) + str(x[d])
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:96: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  UPID_date_var = str(x.name) + str(x[d])
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:96: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  UPID_date_var = str(x.name) + str(x[d])
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:326: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  v = row[c]
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:333: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  label = row[count - 1]
2026-02-06 00:06:28 [INFO] pathways.analysis.pathway_analyzer: Building graph dataframe structure.
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:543: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  ice_df["level"] = ice_df["ids"].str.count("-")
2026-02-06 00:06:32 [INFO] pathways.analysis.pathway_analyzer: Generating graph.
2026-02-06 00:06:32 [INFO] pathways.data_processing.pathway_pipeline: Generated 438 indication pathway nodes for all_6mo
2026-02-06 00:06:32 [INFO] pathways.data_processing.pathway_pipeline: Extracted indication fields for 438 nodes
2026-02-06 00:06:32 [INFO] pathways.data_processing.pathway_pipeline:   Unique trusts: 8
2026-02-06 00:06:32 [INFO] pathways.data_processing.pathway_pipeline:   Unique search_terms: 42
2026-02-06 00:06:32 [INFO] pathways.data_processing.pathway_pipeline: Converted 438 pathway nodes to records for all_6mo (indication)
2026-02-06 00:06:32 [INFO] pathways.__main__: Completed all_6mo:indication: 438 nodes
2026-02-06 00:06:32 [INFO] pathways.__main__: Processing indication pathway for all_12mo
2026-02-06 00:06:32 [INFO] pathways.data_processing.pathway_pipeline: Processing indication pathway for all_12mo
2026-02-06 00:06:32 [INFO] pathways.data_processing.pathway_pipeline:   Date range: 2000-01-01 to 2026-02-06
2026-02-06 00:06:32 [INFO] pathways.data_processing.pathway_pipeline:   Last seen after: 2025-02-11
2026-02-06 00:06:33 [INFO] pathways.analysis.pathway_analyzer: Filtering unrelated interventions
2026-02-06 00:06:34 [INFO] pathways.analysis.pathway_analyzer: Identifying unique patients and interventions used
2026-02-06 00:06:37 [INFO] pathways.analysis.pathway_analyzer: Calculating each unique patient's intervention average frequency, cost and duration of each intervention
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:96: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  UPID_date_var = str(x.name) + str(x[d])
C:\Users\charlwoodand\Ralph local\Tasks\UI Redesign\analysis\pathway_analyzer.py:96: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
  UPID_date_var = str(x.name) + str(x[d])


The refresh is progressing well. Directory charts completed (1,101 nodes across 6 filters), and now indication charts are being processed. GP lookup completed successfully (91.8% match rate, 42,072 modified UPIDs). Indication chart processing is underway ÔÇö I can see all_6mo (438 nodes) and all_12mo starting. Let me wait for it to finish.