From b6c8cf25965df4b4ab383057af9c88247fec935d Mon Sep 17 00:00:00 2001 From: Milan Wiedemann Date: Fri, 4 Oct 2024 11:08:09 +0100 Subject: [PATCH] Add ethnicity figures to report --- reports/pharmacy_first_report.Rmd | 35 +++++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 6 deletions(-) diff --git a/reports/pharmacy_first_report.Rmd b/reports/pharmacy_first_report.Rmd index 02e8580..6b70500 100644 --- a/reports/pharmacy_first_report.Rmd +++ b/reports/pharmacy_first_report.Rmd @@ -195,13 +195,23 @@ plot_measures( ```{r, message=FALSE, warning=FALSE} -# TODO -``` - -## Clinical Pathways +# Select measures and breakdown +df_measures_selected <- df_measures %>% + filter(measure_desc == "clinical_service") %>% + filter(group_by == "Ethnicity") -This section focuses on the Clinical Pathways element of the Pharmacy First service. +# Create visualisation +plot_measures( + df_measures_selected, + select_value = numerator, + select_interval_date = interval_end, + colour_var = ethnicity, + guide_nrow = 2, + facet_wrap = TRUE, + facet_var = measure, +) +``` ## Clinical Condition @@ -311,6 +321,19 @@ plot_measures( ```{r, message=FALSE, warning=FALSE} -# TODO +# Select measures and breakdown +df_measures_selected <- df_measures %>% + filter(measure_desc == "clinical_condition") %>% + filter(group_by == "Ethnicity") +# Create visualisation +plot_measures( + df_measures_selected, + select_value = numerator, + select_interval_date = interval_end, + colour_var = ethnicity, + guide_nrow = 2, + facet_wrap = TRUE, + facet_var = measure, +) ```