-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpre_release_access.Rmd
156 lines (97 loc) · 3.46 KB
/
pre_release_access.Rmd
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
---
title: "NHS Business Services Authority"
always_allow_html: yes
output:
html_document:
anchor_sections: no
css: www/style.css
toc: yes
toc_depth: 3
toc_float:
collapsed: no
word_document:
toc: yes
toc_depth: '3'
pdf_document:
toc: yes
toc_depth: '3'
---
<script>
$(document).ready(function() {
$('#header').prepend('<img src=`r knitr::image_uri("www/bsa_logo.svg")` alt=\"NHSBSA logo\" style=\"position:relative; float: right; top: 0; right: 0; padding: 10px; width: 25%;\">');
});
</script>
<style type="text/css">
body, td {
font-size: 16px;
font-family: sans-serif;
}
</style>
<html lang="en">
```{r setup, include=FALSE}
# set code chunk options to disable echo by default
knitr::opts_chunk$set(
echo = FALSE,
message = FALSE,
warning = FALSE
)
library("tidyverse")
library("usethis")
library("rmarkdown")
library("tibble")
library("readxl")
library("dplyr")
library("xtable")
install.packages("tidyverse")
install.packages("usethis")
install.packages("rmarkdown")
install.packages("tibble")
install.packages("readxl")
install.packages("dplyr")
get_pra_file <- function(path = NULL, interactive = TRUE) {
if(interactive == FALSE || !is.null(path)) {
path <- path
} else {
path <- file.choose()
}
readxl::read_excel(path)
}
filter_pra_list_and_kabel <- function(data, org) {
pra <- data |>
dplyr::filter(Organisation == org) |>
dplyr::group_by(Title) |>
dplyr::summarise(`Number of roles` = dplyr::n())
if(nrow(pra) == 0) {
stop("No PRA recipients found for ", org)
}
knitr::kable(pra)
}
unfiltered_pra_data <-get_pra_file()
```
# Prescribing Costs in Hospitals and the Community {.toc-ignore}
# England 2015/16 to 2022/23 {.toc-ignore}
## Pre-release access list {.toc-ignore}
As per the ‘Statement of Compliance with Pre-release Access to Statistics Order 2008’, in addition to staff in the NHS Business Services Authority (NHSBSA) who are responsible for the production and quality assurance of the statistics, below is a list of job titles and organisations of people who have been granted 24 hours pre-release access:
### NHS Business Services Authority
```{r}
## extracted data from tibble being filtered "unfiltered_pra_data" for NHSBSA members, summed into number of individuals per job title, arranged alphabetically and returned as a knitr_kable table
filter_pra_list_and_kabel(unfiltered_pra_data, "NHSBSA")
```
### Department of Health and Social Care
```{r}
## extracted data from tibble being filtered "unfiltered_pra_data" for DHSC members, summed into number of individuals per job title, arranged alphabetically and returned as a knitr_kable table
filter_pra_list_and_kabel(unfiltered_pra_data, "DHSC")
```
The staff roles listed below are directly involved in the production and distribution of the statistics in this publication:
### NHS Business Services Authority
```{r}
##
Stats_team_role_call <- data.frame(title = c( "Data Scientist" ,"Senior Statistical Officer", "Statistical Publication Lead", "Statistical Officer"), c(1,2,1, 2))
names(Stats_team_role_call) <- c("Title", "Number of roles")
knitr::kable(Stats_team_role_call)
```
### NHS England
```{r}
## extracted data from tibble being filtered "unfiltered_pra_data" for NHSE members, summed into number of individuals per job title, arranged alphabetically and returned as a knitr_kable table
filter_pra_list_and_kabel(unfiltered_pra_data, "NHSE")
```