# Time series by speciality
national_data %>%
group_by(der_activity_month, speciality) %>%
summarise(n_spells_IP = sum(n_spells_IP, na.rm = TRUE),
n_spells_OP = sum(n_spells_OP, na.rm = TRUE)) %>%
group_by(der_activity_month, speciality) %>%
mutate(all_activity = sum(n_spells_IP, n_spells_OP)) %>%
filter(der_activity_month > "2018-01-01" &
der_activity_month < "2022-11-01") %>%
ggplot(aes(x = der_activity_month, y = all_activity)) +
geom_point(alpha = 0.4) +
geom_smooth(method = "loess", span = 0.2, colour = "#5881c1") +
facet_grid(~speciality, scales = "free") +
scale_color_SU() +
scale_y_continuous(labels = comma, oob = squish) +
theme(strip.background = element_rect(fill = NA, colour = "grey"),
strip.text = element_text(face = "bold")
) +
labs(x = "", y = "Admissions",
title = "Trends in activity by speciality",
subtitle = "Monthly elective inpatient and outpatient activity | National | 2017-22")
create_dt(
national_data %>%
group_by(der_activity_month, speciality) %>%
summarise(n_spells_IP = sum(n_spells_IP, na.rm = TRUE),
n_spells_OP = sum(n_spells_OP, na.rm = TRUE)) %>%
group_by(der_activity_month, speciality) %>%
mutate(all_activity = sum(n_spells_IP, n_spells_OP)) %>%
filter(der_activity_month > "2018-01-01" &
der_activity_month < "2022-11-01")
)
In considering the trends in all activity we include both elective inpatient and outpatient contacts and both NHS and independent sector activity. We note the comparative volumes of activity by speciality and we note the different levels of post-pandemic recovery; ophthalmic activity has returned to pre-pandemic levels where orthopaedic activity has not.
In recent months, monthly orthopaedic activity counts have remained consistent while ophthalmic activity appears to be increased since the start of 2022.
# Time series by speciality and sector
national_data %>%
group_by(der_activity_month, type, speciality) %>%
summarise(n_spells_IP = sum(n_spells_IP, na.rm = TRUE),
n_spells_OP = sum(n_spells_OP, na.rm = TRUE)) %>%
group_by(der_activity_month, type, speciality) %>%
mutate(all_activity = sum(n_spells_IP, n_spells_OP)) %>%
filter(der_activity_month > "2018-01-01" &
der_activity_month < "2022-11-01") %>%
ggplot(aes(x = der_activity_month, y = all_activity)) +
geom_point(alpha = 0.4) +
geom_smooth(method = "loess", span = 0.2, colour = "#5881c1") +
facet_grid(type~speciality, scales = "free") +
scale_color_SU() +
scale_y_continuous(labels = comma, oob = squish) +
theme(strip.background = element_rect(fill = NA, colour = "grey"),
strip.text = element_text(face = "bold")
) +
labs(x = "", y = "Activity",
title = "Trends in activity by speciality and sector",
subtitle = "Monthly elective inpatient and outpatient activity | National | 2018-22",
caption = "Note: Independent sector activity consists of only NHS-funded care in the independent secetor")
create_dt(
national_data %>%
group_by(der_activity_month, type, speciality) %>%
summarise(n_spells_IP = sum(n_spells_IP, na.rm = TRUE),
n_spells_OP = sum(n_spells_OP, na.rm = TRUE)) %>%
group_by(der_activity_month, type, speciality) %>%
mutate(all_activity = sum(n_spells_IP, n_spells_OP)) %>%
filter(der_activity_month > "2018-01-01" &
der_activity_month < "2022-11-01")
)
National trends in ophthalmic and orthopaedic activity show vastly different post-pandemic recoveries. Orthopaedic activity in both NHS and independent sector settings have had consistent monthly volumes from early 2018 until the onset of the pandemic and have regained that consistency post-pandemic, albeit at slightly lower monthly rates; i.e. pre-pandemic levels have not yet been achieved.
Post-pandemic ophthalmic activity is most notably changed in the independent sector, where activity has continued to grow, at a faster rate that in was before the pandemic. The rate of ophthalmic activity in NHS settings has plateaued since early 2021 at near pre-pandemic levels.
# Orthopaedic
national_data %>%
group_by(der_activity_month, type, speciality) %>%
sum_spells_function(.) %>%
pivot_longer(cols = c(-der_activity_month, -type, -speciality)) %>%
mutate(name = case_when(str_detect(name, "IP") ~ "Inpatient admissions",
str_detect(name, "OP") ~ "Outpatient appointments",
TRUE ~ "Cost (£)")) %>%
filter(der_activity_month > "2018-01-01" &
der_activity_month < "2022-11-01") %>%
filter(speciality == "Orthopaedic") %>%
ggplot(aes(x = der_activity_month, y = value, colour = name, group = name)) +
geom_point(alpha = 0.4) +
geom_smooth(method = "loess", span = 0.2) +
facet_grid(str_wrap(name,15) ~ type, scales = "free") +
scale_color_SU() +
scale_y_continuous(labels = comma, oob = squish) +
theme(strip.background = element_rect(fill = NA, colour = "grey"),
strip.text = element_text(face = "bold"),
legend.position = "none"
) +
labs(x = "", y = "", colour = "Activity",
title = "Trends in activity and cost by speciality and sector: Orthopaedic",
subtitle = "Monthly elective activity | National | 2018-22")
create_dt(
national_data %>%
group_by(der_activity_month, type, speciality) %>%
sum_spells_function(.) %>%
pivot_longer(cols = c(-der_activity_month, -type, -speciality)) %>%
mutate(name = case_when(str_detect(name, "IP") ~ "Inpatient admissions",
str_detect(name, "OP") ~ "Outpatient appointments",
TRUE ~ "Cost (£)")) %>%
filter(der_activity_month > "2018-01-01" &
der_activity_month < "2022-11-01") %>%
filter(speciality == "Orthopaedic")
)
# Ophthalmology
national_data %>%
group_by(der_activity_month, type, speciality) %>%
sum_spells_function(.) %>%
pivot_longer(cols = c(-der_activity_month, -type, -speciality)) %>%
mutate(name = case_when(str_detect(name, "IP") ~ "Inpatient admissions",
str_detect(name, "OP") ~ "Outpatient appointments",
TRUE ~ "Cost (£)")) %>%
filter(der_activity_month > "2018-01-01" &
der_activity_month < "2022-11-01") %>%
filter(speciality == "Ophthalmology") %>%
ggplot(aes(x = der_activity_month, y = value, colour = name, group = name)) +
geom_point(alpha = 0.4) +
geom_smooth(method = "loess", span = 0.2) +
facet_grid(str_wrap(name,15) ~ type, scales = "free") +
scale_color_SU() +
scale_y_continuous(labels = comma, oob = squish) +
theme(strip.background = element_rect(fill = NA, colour = "grey"),
strip.text = element_text(face = "bold"),
legend.position = "none"
) +
labs(x = "", y = "", colour = "Activity",
title = "Trends in activity and cost by speciality and sector: Ophthalmology",
subtitle = "Monthly elective activity | National | 2018-22")
create_dt(
national_data %>%
group_by(der_activity_month, type, speciality) %>%
sum_spells_function(.) %>%
pivot_longer(cols = c(-der_activity_month, -type, -speciality)) %>%
mutate(name = case_when(str_detect(name, "IP") ~ "Inpatient admissions",
str_detect(name, "OP") ~ "Outpatient appointments",
TRUE ~ "Cost (£)")) %>%
filter(der_activity_month > "2018-01-01" &
der_activity_month < "2022-11-01") %>%
filter(speciality == "Ophthalmology")
)
The predominant type of ophthalmic care varies by sector; in NHS settings, more than 2 in every 3 contacts are delivered via outpatient attendances, where as care in the independent sector is most often provided in the form of inpatients admissions. These differences are likely a function of the types of procedures considered suitable to outsource from the NHS to independent providers.
Activity volumes between care types are much more similar for orthopaedic care; the monthly volumes of activity in both inpatient and outpatient settings were between 30-40 thousand contacts per month before the pandemic and have reduced to near 20-30 thousand in the post-pandemic period. Provision of orthopaedic care in the independent sector has been more stable - approx. 10,000 monthly inpatient contacts before and after the pandemic.
national_data_procedure %>%
filter(speciality == "Orthopaedic") %>%
group_by(der_activity_month, type, speciality, procedure_desc_short) %>%
mutate(all_activity = sum(n_spells_IP, n_spells_OP)) %>%
filter(der_activity_month > "2018-01-01" &
der_activity_month < "2022-11-01") %>%
ggplot(aes(x = der_activity_month, y = all_activity, colour = type)) +
geom_smooth(method = "loess", span = 0.2) +
facet_wrap(~procedure_desc_short#, scales = "free"
) +
scale_color_SU() +
scale_y_continuous(labels = comma) +
theme(strip.background = element_rect(fill = NA, colour = "grey"),
strip.text = element_text(face = "bold"),
legend.position = "bottom"
) +
labs(x = "", y = "Activity", colour = "Sector",
title = "Trends in Orthopaedic activity by sector and procedure",
subtitle = "Monthly elective inpatient admissions and outpatient appointments | National | 2017-22")
national_data_procedure %>%
filter(speciality == "Orthopaedic") %>%
group_by(der_activity_month, type, speciality, procedure_desc_short) %>%
mutate(all_activity = sum(n_spells_IP, n_spells_OP)) %>%
filter(der_activity_month > "2018-01-01" &
der_activity_month < "2022-11-01") %>%
ggplot(aes(x = der_activity_month, y = all_activity, colour = type)) +
geom_smooth(method = "loess", span = 0.2) +
facet_wrap(~procedure_desc_short, scales = "free") +
scale_color_SU() +
scale_y_continuous(labels = comma) +
theme(strip.background = element_rect(fill = NA, colour = "grey"),
strip.text = element_text(face = "bold"),
legend.position = "bottom"
) +
labs(x = "", y = "Activity", colour = "Sector",
title = "Trends in Orthopaedic activity by sector and procedure",
subtitle = "Monthly elective inpatient admissions and outpatient appointments | National | 2017-22")
create_dt(
national_data_procedure %>%
filter(speciality == "Orthopaedic") %>%
group_by(der_activity_month, type, speciality, procedure_desc_short) %>%
mutate(all_activity = sum(n_spells_IP, n_spells_OP)) %>%
filter(der_activity_month > "2018-01-01" &
der_activity_month < "2022-11-01")
)
The most commonly undertaken orthopaedic procedures appear to be those on hands, knees and feet. The impacts of the COVID-19 pandemic appear to have been felt equally across different procedures; all seeing significant reductions and most not fully recovering to pre-pandemic levels.
national_data_procedure %>%
filter(speciality == "Ophthalmology") %>%
group_by(der_activity_month, type, speciality, procedure_desc_short) %>%
mutate(all_activity = sum(n_spells_IP, n_spells_OP)) %>%
filter(der_activity_month > "2018-01-01" &
der_activity_month < "2022-11-01") %>%
ggplot(aes(x = der_activity_month, y = all_activity, colour = type)) +
geom_smooth(method = "loess", span = 0.2) +
facet_wrap(~procedure_desc_short#, scales = "free"
) +
scale_color_SU() +
scale_y_continuous(labels = comma) +
theme(strip.background = element_rect(fill = NA, colour = "grey"),
strip.text = element_text(face = "bold"),
legend.position = c(0.7,0.1)
) +
labs(x = "", y = "Activity", colour = "Sector",
title = "Trends in Ophthalmology activity by sector and procedure",
subtitle = "Monthly elective inpatient admissions and outpatient appointments | National | 2017-22")
If we view the trends in ophthalmic elective procedures over the last 5 years by procedure type on a fixed scale, we see Vitreous Retinal procedures are much more common than any others. 200,000 of these procedures are undertaken monthly at the national level. Rates were halved at the peak of the pandemic and have return to near pre-pandemic levels in recent months.
national_data_procedure %>%
filter(speciality == "Ophthalmology") %>%
group_by(der_activity_month, type, speciality, procedure_desc_short) %>%
mutate(all_activity = sum(n_spells_IP, n_spells_OP)) %>%
filter(der_activity_month > "2018-01-01" &
der_activity_month < "2022-11-01") %>%
ggplot(aes(x = der_activity_month, y = all_activity, colour = type)) +
geom_smooth(method = "loess", span = 0.2) +
facet_wrap(~procedure_desc_short, scales = "free") +
scale_color_SU() +
scale_y_continuous(labels = comma) +
theme(strip.background = element_rect(fill = NA, colour = "grey"),
strip.text = element_text(face = "bold"),
legend.position = c(0.7,0.1)
) +
labs(x = "", y = "Activity", colour = "Sector",
title = "Trends in Ophthalmology activity by sector and procedure",
subtitle = "Monthly elective inpatient admissions and outpatient appointments | National | 2017-22")
By viewing trends on variable scales, we see procedure-specific patterns more clearly. We note that Ocular Motility, Oculoplastics and Orbit and Lacrimal procedures have not returned to pre-pandmic levels and post-pandemic rates have plateaued. Rates in Cornea and Sclera procedures along with Glaucoma treatments have been trending upwards in NHS settings since early 2021. Is this a procedure type for which demand could be eased by increased provision in the independent sector?
# Cataract and Vitreous Retinal procedures
national_data_procedure %>%
filter(speciality == "Ophthalmology",
procedure_desc_short %in% c("Cataract",
"Vitreous Retinal")) %>%
group_by(der_activity_month, type, speciality, procedure_desc_short) %>%
mutate(all_activity = sum(n_spells_IP, n_spells_OP)) %>%
filter(der_activity_month > "2018-01-01" &
der_activity_month < "2022-11-01") %>%
ggplot(aes(x = der_activity_month, y = all_activity, colour = type)) +
geom_smooth(method = "loess", span = 0.2) +
facet_wrap(~procedure_desc_short, scales = "free") +
scale_color_SU() +
scale_y_continuous(labels = comma) +
theme(strip.background = element_rect(fill = NA, colour = "grey"),
strip.text = element_text(face = "bold"),
legend.position = "bottom"
) +
labs(x = "", y = "Activity", colour = "Sector",
title = "Trends in Ophthalmology activity by sector and procedure",
subtitle = "Monthly elective inpatient admissions and outpatient appointments | National | 2017-22")
Focusing on trends in provision of Vitreous Retinal procedures and Cataract surgeries, our primary observations are that:
create_dt(
national_data_procedure %>%
filter(speciality == "Ophthalmology") %>%
group_by(der_activity_month, type, speciality, procedure_desc_short) %>%
mutate(all_activity = sum(n_spells_IP, n_spells_OP)) %>%
filter(der_activity_month > "2018-01-01" &
der_activity_month < "2022-11-01")
)
create_dt(
national_data_ophthal %>%
group_by(der_activity_month, type, procedure_desc_short) %>%
summarise(n_spells_IP = sum(n_spells_IP, na.rm = TRUE),
n_spells_OP = sum(n_spells_OP, na.rm = TRUE),
all_activity = sum(n_spells_IP, n_spells_OP, na.rm = TRUE)) %>%
pivot_longer(cols = c(n_spells_IP, n_spells_OP, all_activity)) %>%
pivot_wider(id_cols = c(der_activity_month, procedure_desc_short,name),
names_from = type,
values_from = value) %>%
group_by(der_activity_month, procedure_desc_short, name) %>%
mutate(IS_prop = `Independent Sector`/ sum(`Independent Sector`, `NHS`, na.rm = TRUE) * 100) %>%
mutate(name = case_when(str_detect(name, "IP") ~ "Inpatient admissions",
str_detect(name, "OP") ~ "Outpatient appointments",
TRUE ~ "All activity (IP & OP)")) %>%
mutate(name = factor(name, levels = c("Inpatient admissions",
"All activity (IP & OP)",
"Outpatient appointments"))) %>%
filter(der_activity_month > "2018-01-01" & der_activity_month < "2022-11-01") %>%
drop_na(procedure_desc_short)
)
We note that independent sector ophthalmic care is focused on cataract procedures; the proportion of cataract procedures undertaken in the independent sector has been increasing throughout our data collection period in both inpatient and outpatient settings. Primarily, we now see that of all NHS funded cataract procedures occurring in inpatient settings, the independent sector delivers 60%.
Inpatient admissions:
procedure_vol_prop_function_annual_opcs_13("Orthopaedic", "n_spells_IP", "Inpatient activity")
create_dt(procedure_vol_prop_wrangle_opcs_l3("Orthopaedic", "n_spells_IP"))
Outpatient appointments:
procedure_vol_prop_function_annual_opcs_13("Orthopaedic", "n_spells_OP", "Outpatient activity")
create_dt(procedure_vol_prop_wrangle_opcs_l3("Orthopaedic", "n_spells_OP"))
Inpatient admissions:
procedure_vol_prop_function_annual_opcs_14("Orthopaedic", "n_spells_IP", "Inpatient activity")
create_dt(procedure_vol_prop_wrangle_opcs_l4("Orthopaedic", "n_spells_IP"))
Outpatient appointments:
procedure_vol_prop_function_annual_opcs_14("Orthopaedic", "n_spells_OP", "Outpatient activity")
create_dt(procedure_vol_prop_wrangle_opcs_l4("Orthopaedic", "n_spells_OP"))
Inpatient admissions:
procedure_vol_prop_function_annual_opcs_13("Ophthalmology", "n_spells_IP", "Inpatient activity")
create_dt(procedure_vol_prop_wrangle_opcs_l3("Ophthalmology", "n_spells_IP"))
Outpatient appointments:
procedure_vol_prop_function_annual_opcs_13("Ophthalmology", "n_spells_OP", "Outpatient activity")
create_dt(procedure_vol_prop_wrangle_opcs_l3("Ophthalmology", "n_spells_OP"))
Inpatient admissions:
procedure_vol_prop_function_annual_opcs_14("Ophthalmology", "n_spells_IP", "Inpatient activity")
create_dt(procedure_vol_prop_wrangle_opcs_l4("Ophthalmology", "n_spells_IP"))
Outpatient appointments:
procedure_vol_prop_function_annual_opcs_14("Ophthalmology", "n_spells_OP", "Outpatient activity")
create_dt(procedure_vol_prop_wrangle_opcs_l4("Ophthalmology", "n_spells_OP"))
national_data_ortho %>%
wrangle_function(., age_range_broad) %>%
filter(var_1 != "100+") %>%
pivot_longer(cols = c(NHS, `Independent Sector`), names_to = "sector", values_to = "value") %>%
graph_function_2(., "Orthopaedic")
create_dt(
national_data_ortho %>%
wrangle_function(., age_range_broad) %>%
filter(var_1 != "100+") %>%
pivot_longer(cols = c(NHS, `Independent Sector`), names_to = "sector", values_to = "value")
)
Independent sector provision of orthopaedic care increases gradually with age, peaking in the 60-80 age groups. There is a marked increase between the 10-19 years and 20-29 years age band, suggesting paediatric orthopaedic care is not commonly delivered in the independent sector. The trends by age range are similar in inpatient and outpatient settings.
national_data_ortho %>%
wrangle_function(., ethnicity_broad) %>%
filter(var_1 != "Not stated_broad") %>%
pivot_longer(cols = c(NHS, `Independent Sector`), names_to = "sector", values_to = "value") %>%
graph_function_2(., "Orthopaedic")
create_dt(
national_data_ortho %>%
wrangle_function(., ethnicity_broad) %>%
filter(var_1 != "Not stated_broad") %>%
pivot_longer(cols = c(NHS, `Independent Sector`), names_to = "sector", values_to = "value")
)
There is significant variation in independent sector provision when presented by broad ethnic group. White patients have been more likely to receive NHS-funded care in an independent care setting; between 1 in 4 and 1 in 5 White patients were given orthopaedic care in independent care settings, compared to 1 in 10 Black patients requiring elective orthopaedic care. Those of mixed and White ethnic background saw the largest spike in independent sector provision in immediate aftermath of the pandemic, where over 30% of procedures were performed by the independent sector.
national_data_ortho %>%
wrangle_function(., imd_quintile) %>%
pivot_longer(cols = c(NHS, `Independent Sector`), names_to = "sector", values_to = "value") %>%
mutate(var_1 = case_when(var_1 == 1 ~ "Deprivation quintile 1",
var_1 == 2 ~ "2",
var_1 == 3 ~ "3",
var_1 == 4 ~ "4",
var_1 == 5 ~ "Deprivation quintile 5"
)) %>%
mutate(var_1 = factor(var_1,
levels = c("Deprivation quintile 1","2","3","4","Deprivation quintile 5")
)) %>%
graph_function_2(., "Orthopaedic")
create_dt(
national_data_ortho %>%
wrangle_function(., imd_quintile) %>%
pivot_longer(cols = c(NHS, `Independent Sector`), names_to = "sector", values_to = "value")
)
The provision of elective orthopaedic care in independent care settings increases with affluence. Approximately 25% of elective orthopaedic procedures were undertaken in the independent sector for patients from the most deprived 20% of the population (deprivation quintile 1) in the post-pandemic period; this proportion increases to 35-40% for the 20% most affluent patients (deprivation quintile 5).
At each increase in affluence, we note an increase in independent sector provision of elective orthopaedic care.
# Ethnicity and deprivation
national_data_ortho %>%
group_by(der_activity_month, imd_quintile, ethnicity_broad, type) %>%
sum_spells_function(.) %>%
group_by(der_activity_month, type, imd_quintile, ethnicity_broad) %>%
mutate(total_activity = sum(n_spells_IP, n_spells_OP)) %>%
pivot_longer(cols = c(-der_activity_month, -type, -ethnicity_broad, -imd_quintile)) %>%
pivot_wider(id_cols = c(der_activity_month, ethnicity_broad, imd_quintile, name),
names_from = type,
values_from = value
) %>%
mutate(`Independent Sector` = case_when(is.na(`Independent Sector`) ~ 0, TRUE ~ `Independent Sector`)) %>%
group_by(der_activity_month, ethnicity_broad, imd_quintile, name) %>%
mutate(prop = `Independent Sector`/ sum(`Independent Sector`, `NHS`) * 100) %>%
mutate(name = case_when(str_detect(name, "IP") ~ "Inpatient admissions",
str_detect(name, "OP") ~ "Outpatient appointments",
str_detect(name, "cost") ~ "Costs",
TRUE ~ "All activity")) %>%
filter(der_activity_month > "2018-01-01" &
der_activity_month < "2022-11-01") %>%
filter(name != "All activity") %>%
ungroup() %>%
filter(name != "Costs") %>%
filter(ethnicity_broad != "Not stated_broad") %>%
filter(is.finite(prop)) %>%
mutate(imd_quintile = case_when(imd_quintile == 1 ~ "Deprivation quintile 1",
imd_quintile == 2 ~ "2",
imd_quintile == 3 ~ "3",
imd_quintile == 4 ~ "4",
imd_quintile == 5 ~ "Deprivation quintile 5"
)) %>%
mutate(imd_quintile = factor(imd_quintile,
levels = c("Deprivation quintile 1","2","3","4","Deprivation quintile 5")
)) %>%
ggplot(aes(x = der_activity_month, y = prop, colour = name)) +
geom_smooth(method = "loess", span = 0.3, size = 0.75) +
facet_grid(str_wrap(ethnicity_broad,13)~imd_quintile) +
scale_color_SU() +
theme(strip.background = element_rect(fill = NA, colour = "grey"),
strip.text = element_text(face = "bold", size = 8),
axis.text.x = element_text(angle = 90),
legend.position = "bottom",
axis.text = element_text(size = 7),
axis.title.x = element_blank()
) +
labs(y = "Independent sector proportion (%)",
colour = "",
title = "Independent sector proportion of activity by deprivation quintile and ethnic group",
subtitle = "Orthopaedic elective procedures | National | 2018-22")
create_dt(
national_data_ortho %>%
group_by(der_activity_month, imd_quintile, ethnicity_broad, type) %>%
sum_spells_function(.) %>%
group_by(der_activity_month, type, imd_quintile, ethnicity_broad) %>%
mutate(total_activity = sum(n_spells_IP, n_spells_OP)) %>%
pivot_longer(cols = c(-der_activity_month, -type, -ethnicity_broad, -imd_quintile)) %>%
pivot_wider(id_cols = c(der_activity_month, ethnicity_broad, imd_quintile, name),
names_from = type,
values_from = value
) %>%
mutate(`Independent Sector` = case_when(is.na(`Independent Sector`) ~ 0, TRUE ~ `Independent Sector`)) %>%
group_by(der_activity_month, ethnicity_broad, imd_quintile, name) %>%
mutate(prop = `Independent Sector`/ sum(`Independent Sector`, `NHS`) * 100) %>%
mutate(name = case_when(str_detect(name, "IP") ~ "Inpatient admissions",
str_detect(name, "OP") ~ "Outpatient appointments",
str_detect(name, "cost") ~ "Costs",
TRUE ~ "All activity")) %>%
filter(der_activity_month > "2018-01-01" &
der_activity_month < "2022-11-01") %>%
filter(name != "All activity") %>%
ungroup() %>%
filter(name != "Costs") %>%
filter(ethnicity_broad != "Not stated_broad") %>%
filter(is.finite(prop))
)
Increases in independent sector provision are seen with increases in affluence across most ethnic groups. Increases with affluence are most pronounced in the Black and Black British group where provision increased from >10% in the most deprived to approx 25% in the most affluent patients.
Of the most deprived 20% of the population, White patients are most likely to receive elective orthopaedic care (15-20% post pandemic) compared to Black and Other ethnicities (>10%).
IS provision has been the most stable in the White population pre- and post-pandemic across the deprivation-affluence spectrum. The impacts of the pandemic were the least disruptive in the White cohort.
Non-White patients from the most deprived 20% of the population experienced similar responsed to the pandemic in terms of elective orthopaedic care; each group saw an initial increase in IS provision of outpatient care, followed by a spike in provision of inpatient IS care - this appears to be isolated to deprivation quintile 1.
national_data_ophthal %>%
wrangle_function(., age_range_broad) %>%
filter(var_1 != "100+") %>%
pivot_longer(cols = c(NHS, `Independent Sector`), names_to = "sector", values_to = "value") %>%
graph_function_2(., "Ophthalmology")
create_dt(
national_data_ophthal %>%
wrangle_function(., age_range_broad) %>%
filter(var_1 != "100+") %>%
pivot_longer(cols = c(NHS, `Independent Sector`), names_to = "sector", values_to = "value")
)
Independent sector provision of ophthalmic care is focused on those ages 50+ years; this is likely a function of cataract procedures being the primary care activity delivered in the independent sector. Variation in IS provision by age is most pronounced in inpatient settings. Increases in independent sector market share are most apparent in those aged 60-90 years old.
national_data_ophthal %>%
wrangle_function(., ethnicity_broad) %>%
filter(var_1 != "Not stated_broad") %>%
pivot_longer(cols = c(NHS, `Independent Sector`), names_to = "sector", values_to = "value") %>%
graph_function_2(., "Ophthalmology")
create_dt(
national_data_ophthal %>%
wrangle_function(., ethnicity_broad) %>%
filter(var_1 != "Not stated_broad") %>%
pivot_longer(cols = c(NHS, `Independent Sector`), names_to = "sector", values_to = "value")
)
Variation in the independent sector provision of ophthalmic elective care by broad ethnic group is similar to that of orthopaedic activity - access to NHS-funded care in private settings is the highest in White patients. Unlike in orthopaedic care where patients of mixed ethnicity had high independent sector provision, such patients were seen to have the lowest proportion of independent sector care for ophthalmic treatment.
The rate at which the IS market share is increasing in the post-pandemic period is similar across broad ethnicities, albeit at different levels; IS growth is even. Access to outpatient ophthalmic care in the independent sector has been similar across all broad ethnic groups.
Patients of “Other” ethnic backgrounds saw the largest post-pandemic spike in activity; this occurred in inpatient and outpatient settings. Could be explained by data recording behaviours during the highest stress periods of the pandemic? Other contributing factors?
national_data_ophthal %>%
wrangle_function(., imd_quintile) %>%
pivot_longer(cols = c(NHS, `Independent Sector`), names_to = "sector", values_to = "value") %>%
mutate(var_1 = case_when(var_1 == 1 ~ "Deprivation quintile 1",
var_1 == 2 ~ "2",
var_1 == 3 ~ "3",
var_1 == 4 ~ "4",
var_1 == 5 ~ "Deprivation quintile 5"
)) %>%
mutate(var_1 = factor(var_1,
levels = c("Deprivation quintile 1","2","3","4","Deprivation quintile 5")
)) %>%
graph_function_2(., "Ophthalmology")
create_dt(
national_data_ophthal %>%
wrangle_function(., imd_quintile) %>%
pivot_longer(cols = c(NHS, `Independent Sector`), names_to = "sector", values_to = "value")
)
There is a deprivation gradient present in NHS-funded inpatient admissions for elective ophthalmic care in independent sector providers; there is approx 5-10% difference between the most deprived 20% and the most affluent 20% of the population. The magnitude of the post-pandemic increases in independent sector provision was similar across deprivation quintiles.
It remains unclear whether inequities in access are a primarily a function of demographic differences in populations most served by independent sector ophthalmic sites or whether while geographic provision is equal, referral rates differ by demographic factors.
national_data_ophthal %>%
group_by(der_activity_month, imd_quintile, ethnicity_broad, type) %>%
sum_spells_function(.) %>%
group_by(der_activity_month, type, imd_quintile, ethnicity_broad) %>%
mutate(total_activity = sum(n_spells_IP, n_spells_OP)) %>%
pivot_longer(cols = c(-der_activity_month, -type, -ethnicity_broad, -imd_quintile)) %>%
pivot_wider(id_cols = c(der_activity_month, ethnicity_broad, imd_quintile, name),
names_from = type,
values_from = value
) %>%
mutate(`Independent Sector` = case_when(is.na(`Independent Sector`) ~ 0, TRUE ~ `Independent Sector`)) %>%
group_by(der_activity_month, ethnicity_broad, imd_quintile, name) %>%
mutate(prop = `Independent Sector`/ sum(`Independent Sector`, `NHS`) * 100) %>%
mutate(name = case_when(str_detect(name, "IP") ~ "Inpatient admissions",
str_detect(name, "OP") ~ "Outpatient appointments",
str_detect(name, "cost") ~ "Costs",
TRUE ~ "All activity")) %>%
filter(der_activity_month > "2018-01-01" &
der_activity_month < "2022-11-01") %>%
filter(name != "All activity") %>%
ungroup() %>%
filter(name != "Costs") %>%
filter(ethnicity_broad != "Not stated_broad") %>%
ggplot(aes(x = der_activity_month, y = prop, colour = name)) +
geom_smooth(method = "loess", span = 0.3, size = 0.75) +
facet_grid(str_wrap(ethnicity_broad,13)~imd_quintile) +
scale_color_SU() +
theme(strip.background = element_rect(fill = NA, colour = "grey"),
strip.text = element_text(face = "bold", size = 8),
axis.text.x = element_text(angle = 90),
legend.position = "bottom",
axis.text = element_text(size = 7),
axis.title.x = element_blank()
) +
labs(y = "Independent sector proportion (%)",
colour = "",
title = "Independent sector proportion of activity by deprivation quintile and ethnic group",
subtitle = "Ophthalmology elective procedures | National | 2018-22")
create_dt(
national_data_ophthal %>%
group_by(der_activity_month, imd_quintile, ethnicity_broad, type) %>%
sum_spells_function(.) %>%
group_by(der_activity_month, type, imd_quintile, ethnicity_broad) %>%
mutate(total_activity = sum(n_spells_IP, n_spells_OP)) %>%
pivot_longer(cols = c(-der_activity_month, -type, -ethnicity_broad, -imd_quintile)) %>%
pivot_wider(id_cols = c(der_activity_month, ethnicity_broad, imd_quintile, name),
names_from = type,
values_from = value
) %>%
mutate(`Independent Sector` = case_when(is.na(`Independent Sector`) ~ 0, TRUE ~ `Independent Sector`)) %>%
group_by(der_activity_month, ethnicity_broad, imd_quintile, name) %>%
mutate(prop = `Independent Sector`/ sum(`Independent Sector`, `NHS`) * 100) %>%
mutate(name = case_when(str_detect(name, "IP") ~ "Inpatient admissions",
str_detect(name, "OP") ~ "Outpatient appointments",
str_detect(name, "cost") ~ "Costs",
TRUE ~ "All activity")) %>%
filter(der_activity_month > "2018-01-01" &
der_activity_month < "2022-11-01") %>%
filter(name != "All activity") %>%
ungroup() %>%
filter(name != "Costs") %>%
filter(ethnicity_broad != "Not stated_broad")
)
The shape of the trend lines appears to primarily be a function of ethnicity rather than deprivation.
When comparing the independent sector provision between ethnicities in the most deprived 20% of the population, the ways in which provision has changed since 2018, and the ways in which access was impacted by the pandemic, are markedly different between ethnic groups.
High IS proportions are seen in all White patients, regardless of deprivation level. It is noteworthy that the most deprived White patients have similar or higher proportions of care delivered in the independent sector than the most affluent patients from Black and Black British or Mixed ethnic backgrounds.
It could be said for patients of Black and Black British, Mixed and Other ethnic groups that deprivation has almost no effect on the independent sector market share between deprivation quintiles 1 to 4; 80% of the population in those ethnic groups.
The proportion of patients by the duration of their wait to be seen/treated is displayed below. Patients are presented according to the care type (inpatient or outpatient) and by the setting in which they received care (NHS or independent sector). The larger the yellow and gold bars, the lower the waiting time generally across that service type.
# Stacked bar chart proportions
national_data_ortho %>%
wrangle_function(., duration_elective_wait_range) %>%
filter(var_1 != "500+") %>%
pivot_longer(cols = c(`Independent Sector`, NHS),
names_to = "sector",
values_to = "value"
) %>%
mutate(year = lubridate::year(der_activity_month)) %>%
group_by(year, var_1, name, sector) %>%
summarise(value = sum(value)) %>%
group_by(year, name, sector) %>%
mutate(prop = value/sum(value)*100) %>%
ggplot(aes(x = year, y = prop, fill = var_1)) +
geom_col(position = "stack", colour = "grey", alpha = 0.9, width = 0.7) +
facet_grid(name~sector) +
scale_fill_SU() +
theme(#legend.position = "none",
strip.background = element_rect(fill = NA, colour = "grey"),
strip.text = element_text(face = "bold"),
axis.title.x = element_blank()
) +
labs(y = "Proportion (%)",
fill = "Wait duration (days)",
title = "Change in wait time for treatment",
subtitle = "Proportion of elective orthopaedic care contacts by wait time | National | 2018-22"
)
create_dt(
national_data_ortho %>%
wrangle_function(., duration_elective_wait_range) %>%
filter(var_1 != "500+") %>%
pivot_longer(cols = c(`Independent Sector`, NHS),
names_to = "sector",
values_to = "value"
) %>%
mutate(year = lubridate::year(der_activity_month)) %>%
group_by(year, var_1, name, sector) %>%
summarise(value = sum(value)) %>%
group_by(year, name, sector) %>%
mutate(prop = value/sum(value)*100)
)
For elective orthopaedic care over the last 5 years, lower waiting times are seen in the independent sector for inpatient admissions and in the NHS for outpatient appointments.
While waiting times for inpatient admissions have been lower in the independent sector, this appears to be changing. The proportion of patients waiting 100 days or more for an inpatient admission has been increasing since 2019; the waiting time profile for inpatient admissions in the independent sector is now very similar to NHS.
For outpatient appointments, the proportion of patients waiting less than 100 days is much higher in NHS patients compared to those treated in the independent sector. It may be that those NHS-funded patients treated in the independent sector, were offered care in the independent sector after a period of time spent waiting for treatment at an NHS site, explaining their increased waiting times.
national_data_ophthal %>%
wrangle_function(., duration_elective_wait_range) %>%
filter(var_1 != "500+") %>%
pivot_longer(cols = c(`Independent Sector`, NHS),
names_to = "sector",
values_to = "value"
) %>%
mutate(year = lubridate::year(der_activity_month)) %>%
group_by(year, var_1, name, sector) %>%
summarise(value = sum(value)) %>%
group_by(year, name, sector) %>%
mutate(prop = value/sum(value)*100) %>%
ggplot(aes(x = year, y = prop, fill = var_1)) +
geom_col(position = "stack", colour = "grey", alpha = 0.9, width = 0.7) +
facet_grid(name~sector) +
scale_fill_SU() +
theme(#legend.position = "none",
strip.background = element_rect(fill = NA, colour = "grey"),
strip.text = element_text(face = "bold"),
axis.title.x = element_blank()
) +
labs(y = "Proportion (%)",
fill = "Wait duration (days)",
title = "Change in wait time for treatment",
subtitle = "Proportion of elective ophthalmology care contacts by wait time | National | 2018-22"
)
create_dt(
national_data_ophthal %>%
wrangle_function(., duration_elective_wait_range) %>%
filter(var_1 != "500+") %>%
pivot_longer(cols = c(`Independent Sector`, NHS),
names_to = "sector",
values_to = "value"
) %>%
mutate(year = lubridate::year(der_activity_month)) %>%
group_by(year, var_1, name, sector) %>%
summarise(value = sum(value)) %>%
group_by(year, name, sector) %>%
mutate(prop = value/sum(value)*100)
)
The time in which patients wait for elective inpatient ophthalmic treatment is similar in those treated in NHS sites and those sent to independent sector sites. Over the last 5 years, approximately 75% inpatient admissions in NHS sites have had less that 100 days waiting times; this was the case in the independent sector up to 2019 however waiting times have been increasing for NHS-funded inpatient admissions in independent sector sites in recent years.
The waiting time for outpatient appointments has generally been lower in NHS-funded patients in the independent sector compared to those receiving appointments in NHS sites. On average, less than half the patients in NHS sites waited for 100 days or less to be seen/treated, whereas the figure is approx. 60% for independent sector sites.
Sub-national ophthalmic results: https://alexanderlawless.github.io/Independent_sector_provision/markdown_regional_local_results_ophthalmology.html
Sub-national orthopaedic results: https://alexanderlawless.github.io/Independent_sector_provision/markdown_regional_local_results_orthopaedic.html