@@ -67,6 +67,34 @@ df_measures <- tidy_measures(
67
67
pf_measures_name_mapping = pf_measures_name_mapping,
68
68
pf_measures_groupby_dict = pf_measures_groupby_dict
69
69
)
70
+
71
+ df_measures$ethnicity <- factor(
72
+ df_measures$ethnicity,
73
+ levels = c("White", "Mixed", "Asian or Asian British",
74
+ "Black or Black British", "Chinese or Other Ethnic Groups",
75
+ "Missing"),
76
+ ordered = TRUE
77
+ )
78
+
79
+ df_measures$age_band <- factor(
80
+ df_measures$age_band,
81
+ levels = c("0-19", "20-39", "40-59",
82
+ "60-79", "80+",
83
+ "Missing"),
84
+ ordered = TRUE
85
+ )
86
+
87
+ df_measures$region <- factor(
88
+ df_measures$region,
89
+ levels = c("East", "East Midlands", "London",
90
+ "North East", "North West", "South East",
91
+ "South West", "West Midlands", "Yorkshire and The Humber",
92
+ "Missing"),
93
+ ordered = TRUE
94
+ )
95
+
96
+ df_measures <- df_measures %>%
97
+ mutate(sex = factor(sex, levels = c("female", "male"), labels = c("Female", "Male")))
70
98
```
71
99
72
100
# Background
@@ -93,7 +121,7 @@ Links to the codelist for each analysis can be found beneath the relevant sectio
93
121
94
122
### Total population
95
123
96
- ``` {r, message=FALSE, warning=FALSE, fig.height=4, fig.width=4 }
124
+ ``` {r, message=FALSE, warning=FALSE}
97
125
# Select measures and breakdown
98
126
df_measures_selected <- df_measures %>%
99
127
filter(measure_desc == "clinical_service") %>%
@@ -108,6 +136,8 @@ plot_measures(
108
136
guide_nrow = 1,
109
137
facet_wrap = FALSE,
110
138
facet_var = NULL,
139
+ title = "Number of consultations for each clinical service per month",
140
+ y_label = "Number of codes for consultations",
111
141
)
112
142
```
113
143
@@ -127,7 +157,9 @@ plot_measures(
127
157
colour_var = age_band,
128
158
guide_nrow = 1,
129
159
facet_wrap = TRUE,
130
- facet_var = measure
160
+ facet_var = measure,
161
+ title = "Number of consultations for each clinical service by age band per month",
162
+ y_label = "Number of codes for consultations",
131
163
)
132
164
```
133
165
@@ -148,6 +180,8 @@ plot_measures(
148
180
guide_nrow = 1,
149
181
facet_wrap = TRUE,
150
182
facet_var = measure,
183
+ title = "Number of consultations for each clinical service by sex per month",
184
+ y_label = "Number of codes for consultations",
151
185
)
152
186
```
153
187
@@ -168,6 +202,8 @@ plot_measures(
168
202
guide_nrow = 1,
169
203
facet_wrap = TRUE,
170
204
facet_var = measure,
205
+ title = "Number of consultations for each clinical service by IMD per month",
206
+ y_label = "Number of codes for consultations",
171
207
)
172
208
```
173
209
@@ -188,6 +224,8 @@ plot_measures(
188
224
guide_nrow = 2,
189
225
facet_wrap = TRUE,
190
226
facet_var = measure,
227
+ title = "Number of consultations for each clinical service by region per month",
228
+ y_label = "Number of codes for consultations",
191
229
)
192
230
```
193
231
@@ -210,6 +248,8 @@ plot_measures(
210
248
guide_nrow = 2,
211
249
facet_wrap = TRUE,
212
250
facet_var = measure,
251
+ title = "Number of consultations for each clinical service by ethnicity per month",
252
+ y_label = "Number of codes for consultations",
213
253
)
214
254
```
215
255
@@ -220,7 +260,7 @@ Here we show the number of consultations for each of the Pharmacy First Clinical
220
260
221
261
### Total population
222
262
223
- ``` {r, message=FALSE, warning=FALSE, fig.height=4, fig.width=4 }
263
+ ``` {r, message=FALSE, warning=FALSE}
224
264
# Select measures and breakdown
225
265
df_measures_selected <- df_measures %>%
226
266
filter(measure_desc == "clinical_condition") %>%
@@ -234,6 +274,8 @@ plot_measures(
234
274
guide_nrow = 1,
235
275
facet_wrap = FALSE,
236
276
facet_var = NULL,
277
+ title = "Number of consultations for each clinical condition per month",
278
+ y_label = "Number of codes for consultations",
237
279
)
238
280
```
239
281
@@ -253,7 +295,9 @@ plot_measures(
253
295
colour_var = age_band,
254
296
guide_nrow = 1,
255
297
facet_wrap = TRUE,
256
- facet_var = measure
298
+ facet_var = measure,
299
+ title = "Number of consultations for each clinical condition by age band per month",
300
+ y_label = "Number of codes for consultations",
257
301
)
258
302
```
259
303
@@ -274,6 +318,8 @@ plot_measures(
274
318
guide_nrow = 1,
275
319
facet_wrap = TRUE,
276
320
facet_var = measure,
321
+ title = "Number of consultations for each clinical condition by sex per month",
322
+ y_label = "Number of codes for consultations",
277
323
)
278
324
```
279
325
@@ -294,6 +340,8 @@ plot_measures(
294
340
guide_nrow = 1,
295
341
facet_wrap = TRUE,
296
342
facet_var = measure,
343
+ title = "Number of consultations for each clinical condition by IMD per month",
344
+ y_label = "Number of codes for consultations",
297
345
)
298
346
```
299
347
@@ -314,12 +362,14 @@ plot_measures(
314
362
guide_nrow = 2,
315
363
facet_wrap = TRUE,
316
364
facet_var = measure,
365
+ title = "Number of consultations for each clinical condition by region per month",
366
+ y_label = "Number of codes for consultations",
317
367
)
318
368
```
319
369
320
370
### Clinical Conditions by ethnicity
321
371
322
- ``` {r, message=FALSE, warning=FALSE}
372
+ ``` {r, message=FALSE, warning=FALSE, fig.height=15, fig.width=8 }
323
373
324
374
# Select measures and breakdown
325
375
df_measures_selected <- df_measures %>%
@@ -335,5 +385,7 @@ plot_measures(
335
385
guide_nrow = 2,
336
386
facet_wrap = TRUE,
337
387
facet_var = measure,
388
+ title = "Number of consultations for each clinical condition by ethnicity per month",
389
+ y_label = "Number of codes for consultations",
338
390
)
339
391
```
0 commit comments