generated from nhsengland/analyticsunit-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdiagnostics_endoscopy_activity.qmd
213 lines (171 loc) · 5.91 KB
/
diagnostics_endoscopy_activity.qmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
---
project:
type: website
website:
open-graph: true
title: "Endoscopy stocktake analysis"
description: "NHS Theme"
site-url: https://nhs-r-community.github.io/quarto-nhs-theme
favicon: docs/_assets/favicon.ico
repo-url: https://github.com/nhs-r-community/quarto-nhs-theme
repo-actions: [edit, issue]
page-footer:
left: "This page is built [Quarto](https://quarto.org/)."
right:
- text: "License"
href: https://github.com/nhs-r-community/quarto-nhs-theme/blob/main/LICENCE
- text: "Code of Conduct"
href: https://github.com/nhs-r-community/quarto-nhs-theme/blob/main/CODE_OF_CONDUCT.md
navbar:
background: light
title: false
collapse-below: lg
left:
- text: "quarto-nhs-theme"
icon: "box-seam"
href: index.qmd
- text: "Tutorials"
icon: "bookmark-check"
href: tutorials/index.qmd
- text: "Documentation"
icon: "file-earmark-text"
href: documentation/index.qmd
- text: "Updates"
icon: "rss"
href: updates.qmd
right:
- text: "Help"
menu:
- text: "About"
icon: "info-circle"
href: about.qmd
- text: "Report a Bug"
icon: "bug"
href: "https://github.com/nhs-r-community/quarto-nhs-theme/issues"
- text: "Ask a Question"
icon: "chat-right-text"
href: "https://github.com/nhs-r-community/quarto-nhs-theme/discussions"
- text: "FAQ"
icon: "question-circle"
href: faq.qmd
- icon: github
href: https://github.com/nhs-r-community/
aria-label: GitHub
- icon: cloud-fill
href: https://nhsrcommunity.com/
aria-label: NHS-R Community
sidebar:
id: toc-side
style: "floating"
pinned: true
contents:
- text: "Homepage"
file: index.qmd
- text: "Contribute to docs"
file: contribute.qmd
- section: Tutorials
file: tutorials/index.qmd
contents:
- auto: tutorials/*.qmd
- section: Documentation
file: documentation/index.qmd
contents:
- auto: documentation/*.qmd
- text: "FAQ"
file: faq.qmd
- text: "About"
file: about.qmd
comments:
giscus:
repo: nhs-r-community/quarto-nhs-theme
format:
html:
toc: true
toc-depth: 4
theme:
light: [cosmo, _assets/style/theme.scss]
code-copy: true
code-overflow: wrap
css: _assets/style/styles.css
include-after-body: _assets/style/js.html
warning: false
execute:
freeze: auto
---
## % Accreditation status map
Map showing accreditation status of sites, along with number of endoscopy rooms
```{r}
#| echo: false
# Call subscript
source("C:/Users/martin.bloyce/OneDrive - NHS England/Documents/GitHub/diagnostics_endoscopy_stocktake/accreditation_map.R")
map
```
## % FIT10 data
Percentage of colonoscopies with a FIT10+ result
```{r}
#| echo: false
library(dplyr)
library(kableExtra)
# Call subscript
source("C:/Users/martin.bloyce/OneDrive - NHS England/Documents/GitHub/diagnostics_endoscopy_stocktake/endoscopy_fit.R")
# Create table visual output
kable(fit_table,
col.names = colnames(fit_table),
caption = "Sample Table") %>%
kable_styling(full_width = FALSE) %>%
add_header_above(c(" ", "Percentage of colonoscopies with a FIT10+ result" = 8)) %>%
row_spec(0, bold = TRUE, color = "white", background = "gray") %>%
column_spec(9, color = "white",
background = spec_color(fit_table$percentageFit10[1:12], begin = 0.9, end = 0.4, option = 'H'))
# Visualise charts
a
b
```
## Endoscopy activity
DM01 activity used, for gastroscopies and colonoscopies only.
```{r}
#| echo: false
library(dplyr)
library(kableExtra)
# Call subscript
source("C:/Users/martin.bloyce/OneDrive - NHS England/Documents/GitHub/diagnostics_endoscopy_stocktake/endoscopy_activity.R")
# Create table visual output
kable(master,
col.names = colnames(master),
caption = "Sample Table") %>%
kable_styling(full_width = FALSE) %>%
add_header_above(c(" ", "DM01 diagnostic activity (gastroscopies and colonoscopies only)" = 3)) %>%
row_spec(0, bold = TRUE, color = "white", background = "gray") %>%
column_spec(4, color = "black",
background = ifelse(master$percent_of_baseline >= 100, "green", ifelse(master$percent_of_baseline > 90, "yellow", "red")))
```
## Future demand
Lists per week used for current position, with following models used for future demand predictions:
- Model A: 120% activity
- Models B-D: Current demand, plus 5% uplift for each subsequent year (as specified in the Richards' Review) to 2026-27
- Gap: 2026-27 gap to 2023-24 lists per week requirement
```{r}
#| echo: false
library(dplyr)
library(kableExtra)
# Call subscript
source("C:/Users/martin.bloyce/OneDrive - NHS England/Documents/GitHub/diagnostics_endoscopy_stocktake/future_demand_modelling.R")
# Create table visual output
kable(lists_per_week,
col.names = colnames(lists_per_week),
caption = "Lists per week") %>%
kable_styling(full_width = FALSE) %>%
add_header_above(c(" ", "Lists per week" = 6)) %>%
row_spec(0, bold = TRUE, color = "white", background = "gray") %>%
column_spec(4, background = lists_per_week$gradient_colour)
```
## Lists
List types used by unit:
```{r}
#| echo: false
library(dplyr)
library(kableExtra)
# Call subscript
source("C:/Users/martin.bloyce/OneDrive - NHS England/Documents/GitHub/diagnostics_endoscopy_stocktake/endoscopy_lists.R")
lists_chart
```