1 of 22

Who are we & What did we work on

  • NHS England Data Science & Applied AI Team (see our team’s work here)
  • Waiting List Minimum Dataset (WLMDS)
  • Single vs Multiple Pathways
  • Proofs of concept of data science modelling techniques

Amaia Imaz Blanco

Sean Aller (and Libby)

1

2 of 22

Data Wrangling

Processing and challenges of the Waiting List Minimum Dataset (WLMDS)

Data access and quality

Previous codebase

Complex logic

Dataset Size

Historical Data

Challenges

Data

Open referral pathways

Weekly data from July 2021

Processing

Cleaning, filtering and processing

Patient and treatment information

Outputs

Patient referrals

Single or multiple pathways

Assets for modelling

2

3 of 22

Patient Clustering

Identifying patient cohorts from our data

Cluster 3

Mixed genders

Under 61

Mix of ethnic backgrounds

Skewed to lower IMD deciles

Cluster 2

Females

Over 41

Predominately White

Range of IMD deciles

Cluster 1

Males

Over 41

Predominately White

Range of IMD deciles

Bisecting K-Means

Single pathways more common in cluster 1

Multiple pathways higher in clusters 2 and 3

Summary

3

4 of 22

Forecasting Pathway Demand

Prediction of future counts of single vs multiple patient pathways

Prophet

July 2021 – April 2025

12-week forecast

Single and multiple

Summary

4

5 of 22

Forecasting Pathway Demand

Prediction of future counts of single vs multiple patient pathways

Prophet

July 2021 – April 2025

12-week forecast

Single and multiple

Summary

Single

Multiple

5

6 of 22

Binary Classifiers

  • Tested: Gradient Boosting Classifier, Logistic Regression, XGBoost
    • All done using default hyperparameters to begin with
    • Best Result: XGBoost with 0.57 ROC- AUC score and accuracy

Identifying if we can predict classes of patients that are more likely to end up on multiple pathways

6

7 of 22

End slide

Thank You

@nhsengland

company/nhsengland

england.nhs.uk

7

8 of 22

Deep Dive – Python Module

HSMA Module for processing and analysis WLMDS data

hsma6_6048

analysis

Supporting functions for analytics, such as generating forecasting counts, transforming pathways data for clustering.

etl

Functions for extracting, transforming and loading the open referrals data from WLMDS.

main

Orchestration of the ETL processes for creating the analytical assets

model

Classes to define the clustering, binary classifiers and forecasting models

params

Module-level data class to define all the variables used in the codebase

pathway_similarity

Python adaptation of previous (R-based) pathway-processing code.

profiling

Collection of EDA functions to profile and understand the WLMDS data.

utils

Collection of generic utility functions to support the codebase.

8

9 of 22

Patient Clustering

Personas

Optimising

Figures

Breakdown

9

10 of 22

Patient Clustering

Breakdown of Cluster Groups

Model Summary

Bisecting K-Means

k = 3

Run on latest data

Cluster

Unique Patients

Percentage of Total Unique Patients

Percentage of Patients with Multiple Pathways

1

2,019,493

39.9%

22.9%

2

1,646,827

32.6%

32.1%

3

1,390,091

27.5%

30.8%

Total

5,056,411

-

-

Return

10

11 of 22

Patient Clustering

Creating patient cohorts from the cluster outputs

Model Summary

Bisecting K-Means

k = 3

Cluster

Gender

Age (Years)

Ethnicity

IMD Deciles

1

Male only

41+

Predominately White

Consistent across deciles

2

Female only

41+

Predominately White

Consistent across deciles

3

Mixed

< 61

Predominately White (lower proportion than other clusters)

Distribution skewed to lower deciles

Return

11

12 of 22

Patient Clustering

Deciding on Optimal k value

Metrics

Silhouette Score

Within-Cluster Sum of Squares (WCSS)

Return

12

13 of 22

Patient Clustering

Breakdown of each cluster

Cluster 1

Cluster 2

Cluster 3

Return

13

14 of 22

Patient Clustering

Breakdown of each cluster

Cluster 1

Cluster 2

Cluster 3

Return

14

15 of 22

Frequent Pattern Mining

Common sets of treatment function codes (TFC) in multiple pathways

Method Summary

Sequential Pattern Mining (PrefixSpan).

Percentage of all multiple pathways.

Top 20 common sets of TFCs.

15

16 of 22

Binary Classifiers - Details

  • Not a great amount of success (only marginally better than random chance)
  • Basic Initial hyperparameter tuning – not much improvement
  • Challenges:
    • Unbalanced dataset
    • Lack of details on conditions

Identifying if we can predict classes of patients that are more likely to end up on multiple pathways

16

17 of 22

XGBoost Feature Importance

17

18 of 22

Future Work – Binary Classifier

  • Develop more patient and pathway columns (feature engineering) together with SMEs
    • Map ccg to icb to see if this may improve the model
  • Use a more powerful cluster so that SVC and Decision Trees can be tested
  • Link WLMDS to appointments data to be able to include conditions or outcomes into the data.

18

19 of 22

Single vs Multiple Referral to Treatment (RTT) Pathways

HSMA Project 6068

Presented by:�Amaia Imaz Blanco

Sean Aller

20 of 22

Outline

Presentation flow (~3 minutes)

  • Introduction + Overview (45 secs) (Amaia)
    • Amaia and Sean
    • WLMDS
    • What are single vs multiple pathways (or below)
  • Data Wrangling (45 secs) (Sean) (1 slide)
    • Challenges
    • Codebase/ETL code
  • Outputs (1.5 minutes) (1 slide per point - ideally)
    • 30 secs clustering (Sean) > Table (BKM)
    • 30 secs forecasting (Sean) > Figures
    • 30 secs binary classifier (Amaia)

General note

  • “Slides” are summary
  • “Appendix” is detailed (broken-down on each sub-point)
  • Might want to include some stuff from the project templates (firebreak week)

Today Requirements

  • Making repo public 3️⃣
    • Needs a review/quality check
    • Aim: Get the codebase “finalised” today and share for review
    • Need to identify WHO is going to review it (it might be Kin/Nick/Jonathan)
    • Also need to do
      • Update the README
      • Update the DOCs
      • DO a check of any notebook/files/outputs…
      • Dummy data? (CBA so do a dummy schema)
  • Slides 1️⃣
    • Make Amaia slides
    • Make Sean slides
    • Practice
  • Website 2️⃣
    • Write the blog post
    • Write the project page
  • Code Base1️⃣
    • Merging the forecasting (look at putting this in visualise.py)

Post-Presentation ⏱️

  • Talk to Nick/Jonathan (DS Team)
  • Talk to Tineke (Elective Recovery) -> Code handover
  • Refactoring (if we want to)

20

21 of 22

Data Wrangling

Processing and challenges of the Waiting List Minimum Dataset (WLMDS)

Data

Open referral pathways

Weekly data since July 2021

Processing

Cleaning, filtering and processing

Patient and treatment information

Outputs

Patient referral pathways

Single or multiple pathways

Assets for modelling

Challenges

  • Data access
  • Data quality
  • Previous codebase
  • Complex processing logic and rules
  • Dataset Size
  • Historical Data

21

22 of 22

Patient Clustering

Identifying patient cohorts from our data

Males

Over 41

Predominately White

Range of IMD deciles

Clusters Summary

Single pathways more common in cluster 1

Multiple pathways higher in clusters 2 and 3

CLUSTER 1

CLUSTER 3

CLUSTER 2

Females

Over 41

Predominately White

Range of IMD deciles

Mixed genders

Under 61

Mix of ethnic backgrounds

Skewed to lower IMD deciles

22