The NHS Long Term Plan set out the aim of identifying and supporting patients at risk of stroke. Atrial fibrillation (AF) is a key risk factor for stroke and has become a focus for transformative interventions.
During 2022/23 and 2023/24, c.£26 million was invested in a funding programme to expand access to direct oral anticoagulants (DOACs) - recommended by NICE as the most effective treatment for preventing clots that can cause strokes in patients with AF. The programme had three pillars:
-
Detect: reduce incidence of stroke by diagnosing more patients with AF
-
Protect: ensure patients diagnosed with AF are offered anticoagulation, where clinically appropriate
-
Perfect: ensure patients with AF are on the correct dose of the best value DOAC where clinically appropriate.
All data used in this analysis is within the public domain. Details regarding funding applications have been withheld.
The recommended approach to re-create the analysis is:
-
Install dependencies,
-
Obtain matching data,
-
Obtain outcome data,
-
Run the analysis files.
Details on how to perform each step are provided below.
Run the get_dependencies.R
script to
identify the packages used within this analysis. NB, this file requires
at least renv
, janitor
and dplyr
to first be installed on your
system to run.
This analysis uses a Propensity Score Matching Differences-in-Difference (PSM-DiD) approach. In this method, GP practices which are part of the intervention group are matched with GP practices that are not part of any DPP project (the control group).
The variables used to match practices are grouped into clinical and socio-economic factors:
Matching variable | Rationale | Data source |
---|---|---|
Proportion of the practice population aged 65 years or older | The risk of developing AF doubles with each progressive decade and exceeds 20% by age 80 years | GP registered population data by NHS Digital |
Prevalence of obesity at the practice | Obesity (defined as BMI >= 30) is an independent risk factor for the development of AF | Fingertips |
Prevalence of diabetes at the practice | Diabetes mellitus is an independent risk factor for AF, especially in young people | Fingertips |
Prevalence of hypertension at the practice | People with hypertension have a 1.7-fold higher risk of developing AF compared with people with blood pressure in the normal range | Fingertips |
Gender proportion | Age-adjusted incidence, prevalence and lifetime risk of AF is higher in men compared with women | GP registered population data by NHS Digital |
Matching variable | Rationale | Data source |
---|---|---|
Registered practice population per full time equivalent (FTE) clinician | The number of patients per clinical WTE can be a marker for a range of factors such as funding available to the practice, presence of other clinical staff, clinical needs of the local population and changes in the local population | GP workforce data by NHS Digital |
Weighted deprivation score per practice | Greater socio-economic deprivation is associated with poorer outcomes across a range of health issues, including AF | Fingertips |
Rural-Urban classification of the practice | Distance can be a barrier to accessing healthcare. Rurality can be a proxy measure for ease of healthcare access and has implications in the care of people with AF | Rural-Urban classification based on practice postcode |
These data for these variables need to be downloaded.
-
Get a list of GP practice details from the ODS API using
get_gp_details.R
-
Get monthly details of GP practice registered populations from NHS Digital using
get_gp_registered_patients.R
-
Process this data to extract out relevant details using
get_gp_population_summary.R
-
Get matching data from Fingertips using
data_fingertips.R
-
Download GP workforce data for April 2023
-
Process GP workforce information using
get_gp_workforce.R
-
Process all the matching data using
get_matching_variables_df.R
The outcome data was obtained from the CVDPREVENT audit via their API.
Use the get_cvd_data.R
script to download the data.
-
Investigate the amount of missing data using
dpp_matching_variables_missingness.qmd
-
Perform multiple imputation to ‘fill-in’ missing matching data using
dpp_impute_missing_matching_variables.qmd
GP practices are assigned to each funded intervention based on the geography specified as part of funding applications.
-
Get a lookup from GP practice to PCN, CCG, ICB and NHS Region from NHS Digital. Name this file
intervention_counterfac_lu.csv
. -
Get a list of funded initiatives and their respective start / end dates using
get_dpp_project_final_list.R
NB, this requires a copy of the funding application spreadsheet, which is not currently publicly available. -
Link funding applications with practices using
link_grants_with_practices.R
NB, this step is not possible without the above list of funding applications.
Some hospital-based projects have a unique list of practices or use a method of practice assignment which is based on dominant provider of care based on MSOA geography. To assign practices based on this approach you need to:
-
Download a lookup of hospital catchment areas produced by Office for Health Improvement and Disparities (OHID). NB, this is the ‘2022 Trust Catchment Populations_Supplementary MSOA Analysis.xlsx’ file.
-
Download a lookup from postcode to MSOA from the Open Geography Portal.
-
Use
get_gps_per_hospital.R
to produce catchment areas based on the dominant provider of care in each MSOA, which are then linked with GP practices based on postcode to MSOA lookup.
The process of matching intervention GP practices with control GP practices and the impact analyses are done at national, case-study (aggregate) and case-study (individual) levels.
-
The national-level analysis can be reproduced using
dpp_programme_report_template.qmd
. -
The case-study (aggregate) analyses can be reproduced using
dpp_overall_report_template.qmd
. -
The individual case-study reports can all be reproduced using
dpp_gp_report_template.qmd
. Which project the template produces a report for is controlled by the parameters set within theyaml
header of the document:-
project_id
controls which project is reported, using the ‘P’ nomenclature, where ‘P1’ is the ID for project 1. -
alternate_data
is used where there are multiple ways of assigning GP practices to the intervention area. Setting this toFALSE
will mean the default GP practice assignment method defined inlink_grants_with_practices.R
is used. Setting toTRUE
(default) will use any alternative method of assignment, as detailed in thedpp_gp_report_template.qmd
script. -
alternate_data_details
is used to specify which of multiple GP practice assignment methods are to be used. Commonly used parameters include “emergency” and “af”. “emergency” is used for hospital-based projects to assign GP practices based on MSOAs where the hospital is the dominant provider of emergency care. “af” is used for a single project in which only GP practices which undertook activities to improve care of atrial fibrillation are to be counted. -
save_did
is used to control whether the underlying data is saved for future use with thecalc_percentage_difference.R
script.
-
---
params:
project_id: "P20"
alternate_data: TRUE
alternate_data_details: ""
save_did: TRUE
---