Libraries

if(!require("pacman"))install.packages("pacman")
library(pacman)
p_load(tidyverse, quanteda, tidytext, skimr, topicmodels, stm, textfeatures, wordcloud, ggforce)

p_load_gh("julianflowers/myScrapers")

Read data

data <- read_csv("qsis_self_declarations.zip")

Rapid EDA

skim(data)
Data summary
Name data
Number of rows 190328
Number of columns 15
_______________________
Column type frequency:
character 10
logical 1
numeric 4
________________________
Group variables None

Variable type: character

skim_variable n_missing complete_rate min max empty n_unique whitespace
publish_on 0 1.00 10 10 0 99 0
indicator_code 0 1.00 3 25 0 2305 0
user_comments 114301 0.40 1 35525 0 58635 0
pr_risk_comments 113728 0.40 1 6196 0 5540 0
indicator_name 0 1.00 5 1029 0 1606 0
poc 0 1.00 6 25 0 7 0
crg 0 1.00 3 43 0 44 0
service_name 0 1.00 13 136 0 222 0
subservice_name 107474 0.44 6 69 0 45 0
team_name 0 1.00 16 219 0 880 0

Variable type: logical

skim_variable n_missing complete_rate mean count
indicator_theme 190328 0 NaN :

Variable type: numeric

skim_variable n_missing complete_rate mean sd p0 p25 p50 p75 p100 hist
X1 0 1.00 95164.50 54943.11 1 47582.75 95164.5 142746.2 190328 ▇▇▇▇▇
team_id 0 1.00 3860.66 2462.51 1 2108.00 3334.0 5329.0 11112 ▇▇▆▁▁
value 15079 0.92 0.80 0.60 -1 1.00 1.0 1.0 1 ▁▁▁▁▇
score 10057 0.95 90.13 15.21 0 85.70 100.0 100.0 100 ▁▁▁▁▇

Clean

  • Remove NAs
  • Convert text format
  • Add row id
  • (Note - the latest version of the tidyverse has introduced |> to substitute %>% - ‘the pipe’) `
data1 <- data |>
  filter(!is.na(pr_risk_comments)) |>
  mutate(pr_risk_comments = stringi::stri_enc_toascii(pr_risk_comments), 
         docnum = row_number())

Process text

Create corpus

Corpus = body of texts. Using quanteda retains additional fields as metadata (docvars). It is quick, easy and flexible

qsis_corpus = corpus(data1, text_field = "pr_risk_comments")

summary(qsis_corpus)[1:10]
##        Text Types Tokens Sentences  X1 team_id publish_on        indicator_code
## 1     text1    40     48         1  19       1 01/08/2016        A11/S/a-101-18
## 2     text2    40     48         1  20       1 01/08/2016        A11/S/a-103-18
## 3     text3    40     48         1  21       1 01/08/2016        A11/S/a-105-18
## 4     text4     4      4         1  22       1 01/08/2017        A11/S/a-102-18
## 5     text5     4      4         1  23       1 01/08/2017        A11/S/a-104-18
## 6     text6     4      4         1  24       1 01/08/2017        A11/S/a-106-18
## 7     text7     4      4         1  25       1 01/08/2017        A11/S/a-107-18
## 8     text8     4      4         1  26       1 01/08/2017        A11/S/1-17-005
## 9     text9     4      4         1  27       1 01/08/2017        A11/S/1-17-006
## 10   text10     4      4         1  28       1 01/08/2017        A11/S/1-17-007
## 11   text11     4      4         1  29       1 01/08/2017        A11/S/1-17-008
## 12   text12     4      4         1  30       1 01/08/2017        A11/S/1-17-010
## 13   text13     4      4         1  31       1 01/08/2017        A11/S/1-17-011
## 14   text14     4      4         1  32       1 01/08/2017        A11/S/1-17-012
## 15   text15     4      4         1  33       1 01/08/2017        A11/S/1-17-013
## 16   text16     4      4         1  34       1 01/08/2017        A11/S/1-17-014
## 17   text17     4      4         1  35       1 01/08/2017        A11/S/1-17-015
## 18   text18     4      4         1  36       1 01/08/2017        A11/S/1-17-201
## 19   text19     4      4         1  37       1 01/08/2017        A11/S/1-17-202
## 20   text20     4      4         1  38       1 01/08/2017        A11/S/1-17-203
## 21   text21     4      4         1  39       1 01/08/2017        A11/S/1-17-204
## 22   text22    56     68         3  69     100 01/08/2016        A14/S/a-101-18
## 23   text23    56     68         3  70     100 01/08/2016        A14/S/a-102-18
## 24   text24    56     68         3  71     100 01/08/2016        A14/S/a-103-18
## 25   text25    56     68         3  72     100 01/08/2016        A14/S/a-104-18
## 26   text26    30     34         2  92    1000 01/08/2017        A12/S/a-101-18
## 27   text27    30     34         2  93    1000 01/08/2017        A12/S/a-102-18
## 28   text28    30     34         2  94    1000 01/08/2017        A12/S/a-103-18
## 29   text29    30     34         2  95    1000 01/08/2017        A12/S/a-104-18
## 30   text30    30     34         2  96    1000 01/08/2017        A12/S/a-105-18
## 31   text31    74    106         1 125   10005 09/01/2020 B15/S/a/itc-16-cc-001
## 32   text32    74    106         1 126   10005 09/01/2020 B15/S/a/itc-16-cc-002
## 33   text33    74    106         1 127   10005 09/01/2020 B15/S/a/itc-16-cc-003
## 34   text34    74    106         1 128   10005 09/01/2020 B15/S/a/itc-16-cc-004
## 35   text35    74    106         1 129   10005 09/01/2020 B15/S/a/itc-16-cc-005
## 36   text36    74    106         1 130   10005 09/01/2020 B15/S/a/itc-16-cc-006
## 37   text37    74    106         1 131   10005 09/01/2020 B15/S/a/itc-16-cc-007
## 38   text38    74    106         1 132   10005 09/01/2020 B15/S/a/itc-16-cc-008
## 39   text39    74    106         1 133   10005 09/01/2020 B15/S/a/itc-16-cc-009
## 40   text40    74    106         1 134   10005 09/01/2020 B15/S/a/itc-16-cc-010
## 41   text41    74    106         1 135   10005 09/01/2020 B15/S/a/itc-16-cc-011
## 42   text42    74    106         1 136   10005 09/01/2020 B15/S/a/itc-16-cc-012
## 43   text43    74    106         1 137   10005 09/01/2020 B15/S/a/itc-16-cc-013
## 44   text44    74    106         1 138   10005 09/01/2020 B15/S/a/itc-16-cc-014
## 45   text45    74    106         1 139   10005 09/01/2020 B15/S/a/itc-16-cc-015
## 46   text46    74    106         1 140   10005 09/01/2020 B15/S/a/itc-16-cc-016
## 47   text47    74    106         1 141   10005 09/01/2020 B15/S/a/itc-16-cc-017
## 48   text48    74    106         1 142   10005 09/01/2020 B15/S/a/itc-16-cc-018
## 49   text49    74    106         1 143   10005 09/01/2020 B15/S/a/itc-16-cc-019
## 50   text50    74    106         1 144   10005 09/01/2020 B15/S/a/itc-16-cp-001
## 51   text51    74    106         1 145   10005 09/01/2020 B15/S/a/itc-16-cp-002
## 52   text52    74    106         1 146   10005 09/01/2020 B15/S/a/itc-16-cp-003
## 53   text53    74    106         1 147   10005 09/01/2020 B15/S/a/itc-16-cp-004
## 54   text54    74    106         1 148   10005 09/01/2020 B15/S/a/itc-16-cp-005
## 55   text55    74    106         1 149   10005 09/01/2020 B15/S/a/itc-16-cc-020
## 56   text56    74    106         1 150   10005 09/01/2020 B15/S/a/itc-16-cc-021
## 57   text57    74    106         1 151   10005 09/01/2020 B15/S/a/itc-16-cc-022
## 58   text58    74    106         1 152   10005 09/01/2020 B15/S/a/itc-16-cc-023
## 59   text59   119    219         7 181   10007 11/12/2019 B15/S/a/itc-16-cc-001
## 60   text60   119    219         7 182   10007 11/12/2019 B15/S/a/itc-16-cc-002
## 61   text61   119    219         7 183   10007 11/12/2019 B15/S/a/itc-16-cc-003
## 62   text62   119    219         7 184   10007 11/12/2019 B15/S/a/itc-16-cc-004
## 63   text63   119    219         7 185   10007 11/12/2019 B15/S/a/itc-16-cc-005
## 64   text64   119    219         7 186   10007 11/12/2019 B15/S/a/itc-16-cc-006
## 65   text65   119    219         7 187   10007 11/12/2019 B15/S/a/itc-16-cc-007
## 66   text66   119    219         7 188   10007 11/12/2019 B15/S/a/itc-16-cc-008
## 67   text67   119    219         7 189   10007 11/12/2019 B15/S/a/itc-16-cc-009
## 68   text68   119    219         7 190   10007 11/12/2019 B15/S/a/itc-16-cc-010
## 69   text69   119    219         7 191   10007 11/12/2019 B15/S/a/itc-16-cc-011
## 70   text70   119    219         7 192   10007 11/12/2019 B15/S/a/itc-16-cc-012
## 71   text71   119    219         7 193   10007 11/12/2019 B15/S/a/itc-16-cc-013
## 72   text72   119    219         7 194   10007 11/12/2019 B15/S/a/itc-16-cc-014
## 73   text73   119    219         7 195   10007 11/12/2019 B15/S/a/itc-16-cc-015
## 74   text74   119    219         7 196   10007 11/12/2019 B15/S/a/itc-16-cc-016
## 75   text75   119    219         7 197   10007 11/12/2019 B15/S/a/itc-16-cc-017
## 76   text76   119    219         7 198   10007 11/12/2019 B15/S/a/itc-16-cc-018
## 77   text77   119    219         7 199   10007 11/12/2019 B15/S/a/itc-16-cc-019
## 78   text78   119    219         7 200   10007 11/12/2019 B15/S/a/itc-16-cp-001
## 79   text79   119    219         7 201   10007 11/12/2019 B15/S/a/itc-16-cp-002
## 80   text80   119    219         7 202   10007 11/12/2019 B15/S/a/itc-16-cp-003
## 81   text81   119    219         7 203   10007 11/12/2019 B15/S/a/itc-16-cp-004
## 82   text82   119    219         7 204   10007 11/12/2019 B15/S/a/itc-16-cp-005
## 83   text83   119    219         7 205   10007 11/12/2019 B15/S/a/itc-16-cc-020
## 84   text84   119    219         7 206   10007 11/12/2019 B15/S/a/itc-16-cc-021
## 85   text85   119    219         7 207   10007 11/12/2019 B15/S/a/itc-16-cc-022
## 86   text86   119    219         7 208   10007 11/12/2019 B15/S/a/itc-16-cc-023
## 87   text87    57     70         4 392    1002 01/08/2016        A12/S/a-101-18
## 88   text88    57     70         4 393    1002 01/08/2016        A12/S/a-102-18
## 89   text89    57     70         4 394    1002 01/08/2016        A12/S/a-103-18
## 90   text90    57     70         4 395    1002 01/08/2016        A12/S/a-104-18
## 91   text91    57     70         4 396    1002 01/08/2016        A12/S/a-105-18
## 92   text92    19     21         1 397    1002 01/08/2017        A12/S/a-101-18
## 93   text93    19     21         1 398    1002 01/08/2017        A12/S/a-102-18
## 94   text94    19     21         1 399    1002 01/08/2017        A12/S/a-103-18
## 95   text95    19     21         1 400    1002 01/08/2017        A12/S/a-104-18
## 96   text96    19     21         1 401    1002 01/08/2017        A12/S/a-105-18
## 97   text97     5      6         1 402   10021 01/07/2018        E09/S/c-101-18
## 98   text98     5      6         1 403   10021 01/07/2018        E09/S/c-102-18
## 99   text99    68    101         4 463   10043 01/07/2018        B08/S/a-101-18
## 100 text100    68    101         4 464   10043 01/07/2018        B08/S/a-102-18
##     value
## 1       1
## 2       1
## 3       1
## 4      -1
## 5       1
## 6       1
## 7      -1
## 8       1
## 9       1
## 10      1
## 11      1
## 12     -1
## 13      1
## 14      1
## 15      1
## 16      1
## 17     -1
## 18      1
## 19     NA
## 20     NA
## 21     NA
## 22      1
## 23      1
## 24      1
## 25      1
## 26     -1
## 27      1
## 28      1
## 29      1
## 30      1
## 31      1
## 32     -1
## 33     -1
## 34      1
## 35      1
## 36      1
## 37      1
## 38      1
## 39     -1
## 40      1
## 41      1
## 42     -1
## 43      1
## 44      1
## 45      1
## 46      1
## 47     -1
## 48     -1
## 49      1
## 50      1
## 51      1
## 52      1
## 53     NA
## 54     NA
## 55      1
## 56      1
## 57      1
## 58      1
## 59      1
## 60     -1
## 61      1
## 62      1
## 63      1
## 64      1
## 65      1
## 66      1
## 67     -1
## 68      1
## 69      1
## 70     -1
## 71      1
## 72      1
## 73      1
## 74      1
## 75      1
## 76     -1
## 77      1
## 78      1
## 79      1
## 80      1
## 81     NA
## 82     NA
## 83      1
## 84     -1
## 85      1
## 86      1
## 87      1
## 88      1
## 89      1
## 90      1
## 91      1
## 92      1
## 93      1
## 94      1
## 95      1
## 96      1
## 97      1
## 98      1
## 99      1
## 100     1
##                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         user_comments
## 1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <NA>
## 2                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <NA>
## 3                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <NA>
## 4                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Attached SLAs are in Appendix 6 of SOP. An SLA needs to be developed for King's Hospital and updated for Guy's and St Thomas's hospital ( expired 31/5/17) and East Kent (expired 31/3/15)
## 5                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   See annual report
## 6                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 See SOP from p130 and annual report
## 7                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               See appendix 7 of SOP.There are 3 MDT meetings per week. These are documented on individual case files. Attendance log only been kept since 4/4/17. 30 MDTs have occurred since then and 4 did not have quorate which equates to 86%.
## 8                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    See SOP from p 130 -The Pulmonary Hypertension Team and Meetings
## 9                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    See SOP from p 130 -The Pulmonary Hypertension Team and Meetings
## 10                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   See SOP from p 130 -The Pulmonary Hypertension Team and Meetings
## 11                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              See SOP from P128- Clinical Nurse Specialist training
## 12                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   See SOP. No audit in place to monitor time for inpatient transfers to take place
## 13                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           See SOP and SLAs Appendix 6. King's SLA to be developed.
## 14                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         See SOP from P135 and SLAs
## 15                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               See SOP page 152-154
## 16                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            See SOP
## 17                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              See appendix 7 of SOP.There are 3 MDT meetings per week. These are documented on individual case files. Attendance log only been kept since 4/4/17. 30 MDTs have occurred since then and 4 did not have quorate which equates to 86%.
## 18                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            See SOP
## 19                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     Relates to SCC
## 20                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     Relates to SCC
## 21                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     Relates to SCC
## 22                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               <NA>
## 23                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               <NA>
## 24                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               <NA>
## 25                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               <NA>
## 26                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Please see risks below, staffing issues have meant that routine patients are having to wait longer. Speciality Doctor recruitment in place to address this.
## 27                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               <NA>
## 28                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               <NA>
## 29                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               <NA>
## 30                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               <NA>
## 31                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     The head of the CCS is Dr Joanne Murdock, Consultant Haematologist who has weekly involvement in the prescribing of SACT. The role has 0.125 of a PA per month attached to it.There is a list of responsibilities for the role
## 32                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      The interim Trust Lead Chemotherapy Nurse is Sr Karen Kirkwood, Nurse Manager in the Chemo Unit, Antrim Area Hospital.Her post is split into 70% management and 30% clinical where she is actively involved in the delivery of SACT.<U+00A0>There is an agreed list of responsibilities for the role.There is Regional work to seek<U+00A0> support for a funded Lead Chemotherapy Nurse Role
## 33                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           Although Consultant Oncologists provide a clinical service to the Trust their work plan cannot support attendance at the MPT meetings. They are available for advice via e-mail or telephoneAt present there is no representation from the MPT on the Trust Drug & Therapeutic Committee
## 34                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Each professional group have their training programme and their competencies confirmed and recorded in a training record.Medical staff are trained on the relevant curriculum from the Joint royal College of Physicians Training Board (JRCPTB).Nursing - <U+0091>NICaN The Administration of Systemic Anti-Cancer Therapies Clinical Competence FrameworkPharmacy- Local Training programme in line with National Standards & Guidelines<U+0091>NICaN Regional Competency Framework for Prescribing Systemic Anti-Cancer Therapies (SACT) 2019<U+0092> covers the training and competencies required by medical and Non -Medical Prescribers in the prescribing SACT.
## 35                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Nursing and Pharmacy maintain a single list of assessors within their area of responsibility. Consultant staff in substantive posts are authorized to assess for their professional group and Non- Medical Prescribers.
## 36                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 Within the Northern Trust IV SACT is only delivered in the Chemo Unit, Antrim Area Hospital for Oncology and Haematology Services. Inpatient IV SACT is only delivered in Ward C7 Antrim Area Hospital as part of its regular activity for those patients under the Trust Haematology Service. There is a an administration at home service delivered by a private company, Health Care at Home (HC@H)<U+00A0>The Chemo Unit and Ward C7 have the required information and equipment available to themThe Pharmacy Department sits within the Chemo Unit where the storage of SACT is contained within this area. There is a hatch between Pharmacy and the Clinical Area where SACT is transferred after dispensing and waiting administration.In Ward C7 SACT is stored in the Clean Utility room which can only be accessed by designated staff passes. A lockable fridge, specifically for SACT, is in the clean Utility room.
## 37                                                                                                                                                                                                                                                                                                                                                  OOH Chemo;SACT is only administered during normal working hours, in the Chemo Unit between 8.30am and 5pm from Monday to Friday excluding Bank Holidays. There is no provision in the NT for the out of hour<U+0092>s administration of SACT. Pharmacy does not have an out of hours<U+0092> SACT preparation service or a scheduled pharmacy on call service.<U+00A0>There is an agreement with the Regional Haematology Service Belfast where conditions such as Acute Leukaemia, Lymphoblastic Lymphoma or Burkitts lymphoma may be transferred if SACT is required out of hours. The transfer is by Consultant to Consultant agreement.Workload RestrictionsWorkload is managed in the CCS by using agreed clinic/treatment templates. Oncology SACT appointments are booked on RISOH and Haematology appointments are booked by the nurses and any issues with capacity are highlighted to the Line Managers. The workload in each area is also monitored on a daily basis by the clinical managers to determine if there is a safety risk.<U+00A0>There is an agreed protocol for the CCS for the management of potential and unsafe workload in the areas relating to SACT
## 38                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   There is an agreed list of treatment algorithms produced by NICaN Network Groups stored on the NICaN Share point which are reviewed and updated 2 yearly.<U+00A0>The CCS MPT will review the list annually or if changes/adjustments made along with any deviations from the Network algorithms.
## 39                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     SACT Regional Protocols for Oncology have been agreed and are stored on the NICaN Share Point and are updated bi annually. These are incorporated into the electronic prescribing system RISOH. New regimens are added when agreed by CRGHaematology protocols are in place and agreed by MDT however work is progressing to include Haematology Protocols onto RISOH.<U+00A0>
## 40                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  There are policies/guidelines /protocols in place both Regional and Local to cover the above list
## 41                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   The NICaN Acute Oncology Clinical Guidelines<U+0092> (December 2015) support the management of patients with SACT related complications.There is an AO Team to support Oncology patients<U+00A0>
## 42                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      There is a Regional electronic system Regional Information System for Oncology and haematology (RISOH) being introduced. To date Oncology has been transferred across and work has commenced for Haematology.
## 43                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       There is a Regional SOP for the use of RISOH
## 44                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   There are processes in place to confirm patent identity supported by the followingNICaN <U+0093>Guidelines for the safe prescribing, handling and administration of SACT drugs<U+0094> 2019.<U+00A0>NHSCT/17/1117 Medicines Code - Policy for the Prescribing, Supply, Administration, Storage and Disposal of<U+00A0> Medicines
## 45                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            There are protocols in place to check prior to the first cycle of SACT- The decision to initiate a new course of SACT is only taken by a Consultant Oncologist or Consultant Haematologist- the <U+0091>Initial SACT Assessment Questionnaire is completed by the Medic
## 46                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          There are processes in place to check prior to administration. These include the RISOH <U+0091>Pre SACT Checklist completed by the nurse.
## 47                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          At this time the patient does not get a treatment summary
## 48                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              The RISOH system has the electronic functionality to extract information to produce a chemotherapy dataset but due to partial implementation and challenges with the reports extracted the accuracy of the reports is not guaranteed.
## 49                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            All error reporting is recorded on the Trust Datix system and managed by the appropriate Manager..The Datix report is an Agenda item on the CCS MPT meeting.<U+00A0>It is also reported to the Regional SACT CRG twice a year.Regional and Local learning is shared through the monthly Trust Haematology M&M meetings.
## 50                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Mr Ewan McGrattan, Principal Pharmacist for Specialist Services is the Lead Pharmacist for the CCS. There is a list of responsibilities for the role.There are designated Pharmacists overseeing the day to day work within the Chemo Unit. They are responsible for prescription verification, checking worksheets and labels, performing pre and in process checks and undertaking the final check and release of products.<U+00A0>
## 51                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          An independent external audit was carried out by Regional Pharmaceutical Quality Assurance Service (RPQAS) in 2018. It is available in the Annual Report.
## 52                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Vinca alkaloids are only supplied for adults in the form of mini bags. The prescribed dose of vinca alkaloids is supplied ready to administer in a 50ml mini bag of sodium chloride 0.9%, (glucose 5% solution for injection may be used instead of sodium chloride 0.9% where clinically required).All Vinca Alkaloid doses are labelled 'For Intravenous Use Only - Fatal If Administered by Other Routes'. Where possible observe the judicious use of colour and design on the label, outer packaging and delivery bags to further differentiate mini bags containing vinca alkaloids from other mini bag infusions. The vinca mini bag is infused intravenously over 5 - 10 minutes.
## 53                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        The CCS does not treat paediatric patients.
## 54                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        The CCS does not treat paediatric patients.
## 55                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       At the initial consultation with the Oncologist/ Haematologists about their treatment plan the patient will receive verbal and written information about the SACT regimen they will receive and the services available within the CCS. The patient will have the opportunity to have another appointment with the medical staff/ CNS if they have further questions about their treatment/pathway. These appointments will be within clinic templates and prior to the commencement of SACT.
## 56                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 CRUK national consent forms have been regionally approved and are used in the CCS by Oncology. The Haematology team use generic Consent forms and record the name of the regimen and side effects.The patient is given a copy of the consent form.
## 57                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             The CCS has a 24hour telephone triage service based on the UKONS model
## 58                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Prior to the commencement of SACT the patient is given verbal and written information about the service and both numbers to call if required and information about possible side effects e.g sepsis, extravasation, nausea and vomiting, diarrhoea<U+00A0> and stomatitisThe nurse records on the Initial Nursing Assessment that the information has been given.
## 59                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 Dr Hossam Abdulkhalek is the named lead within Oncology Services, and Dr Feargal McNicholl is the named lead within Haematology Services.<U+00A0> Dr David Stewart, Lead oncologist also plays a key role in the managed entry of new drugs processes.<U+00A0> This role includes approval of individual funding requests, approval of cost per cases and implementation/updates of service notifications associated with NICE Technology Appraisals.<U+00A0>Dr Abdulkhalek has a dedicated PA for this role. Dr McNicholl does not have a dedicated PA for this role, however, he undertakes the agreed list of responsibilities.
## 60                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        WHSCT does not currently have a named Lead Nurse for SACT Services. This position is reflected across the region. The Trust does have a dedicated Sperrin Suite Unit Manager who also manages the outreach complex in OHPCC, who reports directly to the Macmillan Lead Nurse / Nursing Services Manager. The Trust also has a Sperrin Outpatient Manager, and Ward 50 Manager, where SACT Services are delivered.<U+00A0>At present, the Trust does not currently meet this measure, however, are keen to be involved in regional discussions with the Commissioners to address this going forward. This is a key priority within our work plan.<U+00A0> [
## 61                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     The Western Trust has a single multi-professional team for the clinical Chemotherapy service. This achieved via a dedicated SACT group which includes membership from Consultant Oncology, Consultant Haematology, Consultant Pharmacist, Chemotherapy Nurse, Lead Nurse, and General Manager for Cancer Services. The SACT group meets on a monthly basis and is currently chaired by the Consultant Pharmacist.The SACT group supports the Trust and specifically the Oncology and Haematology teams through the development and application of robust processes which oversee the managed introduction of new drugs. This group becomes involved in an early stage of the pathway, i.e. horizon scanning stage through to implementation and monitoring. The group also plays a key role in overseeing safe and effective service delivery of Chemotherapy within North West Cancer Centre.
## 62                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                The Western Trust complies with the NICaN policy for Prescribing SACT which is available on the NICaN SharePoint. This framework covers the following professional groups: Medical Oncology, Clinical Oncology, Haematology, Nursing, and Pharmacists.<U+00A0>The policy for prescribing SACT is used to underpin professional responsibility and reflects key competencies required by all prescribers within a framework for the provision of training and competency assessment.
## 63                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 The Western Trust complies with the NICaN Regional Competency Framework for Prescribing SACT which is available on the NICaN SharePoint. This framework covers the following professional groups: Medical Oncology, Clinical Oncology, Haematology, Nursing, Pharmacists.<U+00A0> <U+00A0><U+00A0>Competencies are regionally agreed, all new staff including locums, must have their competency record counter-signed by the designated lead Oncologist / Haematologist within the Trust.<U+00A0>
## 64                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              The Western Trust has a dedicated guideline for named wards / specified departments for SACT to be administered. A copy of the guideline can be found in the evidence file. The guideline applies to all clinical staff working in the areas where SACT may be administered. The guideline names the specific ward / department where SACT may be administered to patients with malignant disease as it is preferred this type of intervention is undertaken in an area where administration of SACT is part of the ward / department<U+0092>s regular activity. The guideline also highlights that all named wards / departments must have a designated locked fridge and cupboard for SACT storage.
## 65  The Western Trust is compliant with the NICaN guidelines for the safe prescribing, handling, and administration of SACT which is available on the NICaN SharePoint. This guideline is intended to safeguard patients and staff by defining best practice for all disciplines involved in the delivery of SACT.<U+00A0><U+00A0>There is an agreement where the Head of Service in conjunction with the Lead Pharmacist and Sperrin Suite Manager are able to limit the number of Chemotherapy patients being treated if they judge the workload has reached unsafe levels. NWCC currently treat between 40 and 60 patients per day for day-case Chemotherapy. However, it should be noted that this number can vary due to the variation in the types of treatment, with some treatments requiring longer than others. A procedure is in place to ensure that if there are capacity issues, an early alert is raised to address it. There are also daily review meetings to discuss capacity issues and, with Consultant approval, to decide and agree if less urgent treatments can be safely deferred in order to accommodate cases deemed to be treated with urgency.Out-of-hours ChemotherapyThe Trust does not currently have a policy for the provision of out-of-hours chemotherapy as the service is not currently resourced to deliver this.<U+00A0> This is in line with the regional position.<U+00A0> Additional resources would be required regionally to support introduction of out of hours chemotherapy delivery.
## 66                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      The Trust complies with the NICaN CMGs and with the regionally agreed process for the managed entry of new drugs. This information is available on the NICaN SharePoint. The NICaN SACT CRG reviews any deviations from the relevant network guidelines and discusses the reasons for this deviation. These guidelines are reviewed annually.
## 67                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 Partial ComplianceThe Trust complies with the NICaN SACT Regional Protocols which are in place for Oncology, and it is overseen by the local WHSCT SACT Group. The Trust also follows the Management of New Drugs Policy in order to comply with any necessary updates and changes.<U+00A0>Work continues in relation to the Haematology protocols. The current process for Haematology involves Pharmacy creating the prescription templates, which are then signed off by the relevant Consultant Haematologist.
## 68                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  There are dedicated regionally agreed guidelines for the safe prescribing, handling, and administration of SACT, which have been agreed by the SACT CRG. The Trust complies with these guidelines. The guidelines were due for review in May 2019; however, this review deadline has been extended until May 2020 pending review of London Pan Alliance Guidance.
## 69                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          The Trust complies with the regionally agreed NICaN clinical management guidelines across the various tumour sites. There is also a dedicated Acute Oncology Service within the Trust with detailed clinical CMGs, which outlines the management of acute oncology patients. The Trust complies with the regionally agreed guidelines. A copy of these guidelines can be found on the NICaN SharePoint and hard copies can be found in the evidence file.
## 70                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         Partial ComplianceIn line with the move towards a new regional system for Oncology and Haematology, the Western Trust has moved towards the use of the Regional Information System for Oncology and Haematology (RISOH). Electronic prescribing within Oncology is fully complete, and work is underway in relation to a move towards electronic prescribing for Haematology. Within Oncology, the electronic prescribing platform within RISOH allows electronic prescribing using the regionally agreed protocols and has replaced manual prescriptions.
## 71                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      There is a regionally agreed Standard Operating Procedure for the use of the Electronic Prescribing System. This is included as an appendix within the SACT Prescribing Competency Framework, which can be found on the NICaN SharePoint and a hard copy is within the evidence file.<U+00A0>
## 72                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             The Trust complies with the Patient & Client Identification Policy, a copy of which can be found in the evidence file. The purpose of this policy is to reduce the likelihood of risk of misidentification of patients prior to any procedure, treatment, and/or care.
## 73                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           The WHST complies with the NICaN guidelines for the safe prescribing, handling, and administration of SACT. The protocol is followed prior to the prescription of the first cycle of SACT in order to carry out clinical checks.<U+00A0>
## 74                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             The Trust complies with the NICaN guidelines for the safe prescribing, handling, and administration of SACT. The protocol is followed prior to the administration of SACT.<U+00A0>The WHSCT also comply with the use of the Pre-IV SACT Administration Checklist, which can be found on RISOH.<U+00A0>
## 75                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            The Trust complies with the NICaN guidelines for the safe prescribing, handling, and administration of SACT. The protocol is followed after SACT has been administered.
## 76                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 As a region, all Trusts wish to comply with the national Chemotherapy Dataset, however, are not currently fully compliant as not all relevant information is currently being input / collated. This issue was discussed at a recent NICaN SACT CRG on the 16th August 2019, and it was agreed that a regional Task and Finish Group will be established to take this work forward.
## 77                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                The Trust is represented on the NICaN CRG where error reporting and recording is a standing agenda item. Quarterly reports are done for all Datix and Pharmaforms involving SACT, these are then reported to NICaN CRG, Medicines Governance and WHSCT M&M.<U+00A0>
## 78                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   There is a regional Pharmacist (Job Share) who the Trust works closely with and there is a clearly defined list of their responsibilities.The Trust also has a Principal Pharmacist and a Consultant Pharmacist. An overview of their roles is detailed below and a copy of their job descriptions can be found in the evidence.
## 79                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  The Trust participates in the regional aseptic audit schedule and a copy of the audit schedule can be found in the evidence file.
## 80                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      The Trust is compliant with the NICaN guidelines for the safe prescribing, handing, and administering of SACT. The Trust has an agreed Intrathecal Chemotherapy Accountability Agreement which has been signed by the Lead Haematologist and Chief Executive.
## 81                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       The Trust does not treat Pediatric Patients.
## 82                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Not Applicable to WHSCT<U+00A0>
## 83                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    The Trust has a dedicated Pre-Assessment Team with clear roles and responsibilities. See Operational Policy for further detail.
## 84                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               Partial ComplianceIn line with the regional position, the Trust utilise the CRUK consent forms where available within Oncology. Samples of these can be found in the evidence file. Work is currently underway to develop regional consent forms within Haematology.
## 85                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     The Trust complies with the NICaN Regional Guidance for 24 hour telephone advice. It has long been recognised that patients who are in receipt of anti-cancer treatments are at high risk of experiencing toxicity side effects from their treatments. In order to monitor and safely manage this risk, National guidelines have recommended that cancer patients receiving cancer treatment should have access to a 24-hour telephone advice service.<U+00A0>
## 86                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Prior to a patient commencing Chemotherapy, the patient receives a dedicated patient information pack which includes information about the multi-disciplinary team and Chemotherapy-specific information. This information includes contact details for the 24/7 advice line, drug-specific information, etc.
## 87                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               <NA>
## 88                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               <NA>
## 89                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               <NA>
## 90                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          See below
## 91                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               <NA>
## 92                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     We do not record waiting time from referral to diagnosis (rather than treatment), but at least 90% of all Dermatology patients have a first appointment within 3 months of referral, and around 95% of all Dermatology patients receive treatment within 18 weeks of referral.
## 93                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               <NA>
## 94                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         The only Dermatology episodes commissioned by NHSE in 16/17 were daycase procedures. For these, a discharge summary is sent to GPs within 24 hours of a daycase admission.
## 95                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           Services can be accessed as appropriate.
## 96                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               <NA>
## 97                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    This is supported by local community child development services
## 98                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 However the service struggles to due lack of full time clinical psychology support
## 99                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      LGT is part of the South East Thames Sickle Cell and Thalassaemia Network and is being assessed as a Specialist Centre carrying out its own Annual Reviews. Automated exchanges transfusions are now established in the Trust
## 100                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         Extensive participation in Network meetings, regional meetings with NHSE Commissioners, MDMs /Morbidity& Mortality Reviews, as well as audit. Regular liaison with Tertiary Centre clinicians and referrals to specialist clinics as necessary. Participation in Network research, adoption of Network  guidelines with IT links from Trust to Network guidelines section
docvars(qsis_corpus) |>
  head()
##   X1 team_id publish_on indicator_code value
## 1 19       1 01/08/2016 A11/S/a-101-18     1
## 2 20       1 01/08/2016 A11/S/a-103-18     1
## 3 21       1 01/08/2016 A11/S/a-105-18     1
## 4 22       1 01/08/2017 A11/S/a-102-18    -1
## 5 23       1 01/08/2017 A11/S/a-104-18     1
## 6 24       1 01/08/2017 A11/S/a-106-18     1
##                                                                                                                                                                                user_comments
## 1                                                                                                                                                                                       <NA>
## 2                                                                                                                                                                                       <NA>
## 3                                                                                                                                                                                       <NA>
## 4 Attached SLAs are in Appendix 6 of SOP. An SLA needs to be developed for King's Hospital and updated for Guy's and St Thomas's hospital ( expired 31/5/17) and East Kent (expired 31/3/15)
## 5                                                                                                                                                                          See annual report
## 6                                                                                                                                                        See SOP from p130 and annual report
##   score
## 1 100.0
## 2 100.0
## 3 100.0
## 4  73.3
## 5  73.3
## 6  73.3
##                                                                                                                                                         indicator_name
## 1 PH Centres must have the specified specialist team in place, and treat at least  the stated minimum caseload as detailed on pages 7 & 8 on the service specification
## 2                                                            Treatment will be decided by a correctly constituted MDT and care delivered according to agreed protocols
## 3                                                                          PH Centre services must contribute to national PH forums, and review audit and outcome data
## 4                                                                                                             There is a referral agreement and service configuration.
## 5                                                                                                             The PHC<U+0092>s case throughput meets required numbers.
## 6                                                                                                                 Specialist Staffing are in place for the PH service.
##   indicator_theme               poc                     crg
## 1              NA Internal Medicine Specialised Respiratory
## 2              NA Internal Medicine Specialised Respiratory
## 3              NA Internal Medicine Specialised Respiratory
## 4              NA Internal Medicine Specialised Respiratory
## 5              NA Internal Medicine Specialised Respiratory
## 6              NA Internal Medicine Specialised Respiratory
##                              service_name subservice_name
## 1 Pulmonary Hypertension: Centres (Adult)            <NA>
## 2 Pulmonary Hypertension: Centres (Adult)            <NA>
## 3 Pulmonary Hypertension: Centres (Adult)            <NA>
## 4 Pulmonary Hypertension: Centres (Adult)            <NA>
## 5 Pulmonary Hypertension: Centres (Adult)            <NA>
## 6 Pulmonary Hypertension: Centres (Adult)            <NA>
##                                                        team_name docnum
## 1 Royal Free London NHS Foundation Trust  -  Royal Free Hospital      1
## 2 Royal Free London NHS Foundation Trust  -  Royal Free Hospital      2
## 3 Royal Free London NHS Foundation Trust  -  Royal Free Hospital      3
## 4 Royal Free London NHS Foundation Trust  -  Royal Free Hospital      4
## 5 Royal Free London NHS Foundation Trust  -  Royal Free Hospital      5
## 6 Royal Free London NHS Foundation Trust  -  Royal Free Hospital      6

Create dfm / dtm

dfm <- tokens(qsis_corpus, 
              remove_punct = TRUE, 
              remove_numbers = TRUE, 
              remove_symbols = TRUE, 
              remove_url = TRUE, 
              remove_separators = TRUE) |>
  tokens_remove(stopwords('en')) |>
  dfm()

Top features

topfeatures(dfm, 50)
##         risk      service     patients        trust     oncology         team 
##        46044        45297        35544        26362        22574        20989 
##    currently      support          mdt          due chemotherapy        risks 
##        20400        20172        19534        19469        18747        18192 
##         lack        cover   consultant       cancer      patient     clinical 
##        17423        17098        16744        16671        16427        16389 
##        staff       review     capacity   identified     register       within 
##        16288        15528        15477        15271        14327        13903 
##         care          cns        place        nurse     staffing         time 
##        12853        12264        11412        11357        11216        11131 
##      current    treatment         lead          new         work      nursing 
##        11121        11114        10815        10769        10274        10156 
##     services         plan      however        acute          day       system 
##         9726         9619         9305         9238         9179         8955 
##         unit   specialist      provide       number  recruitment      medical 
##         8788         8678         8635         8517         8506         8375 
##          one         case 
##         8340         8148

Topic modelling using structural topic modelling stm

Try 10 topics (K = 10) Note: takes some time - completes 20 iterations - this can be changed and may need to be increased as model doesn’t converge.

set.seed(123)
stm_prep <- convert(dfm, to = "stm") ## converts dfm to a format stm can use
qsis_stm <- stm(documents = stm_prep$documents, vocab = stm_prep$vocab, data = stm_prep$meta, K = 10, init.type = "Spectral", max.em.its = 20)

Wordlclouds

map(1:10, ~cloud(topic = .x, qsis_stm))

## [[1]]
## NULL
## 
## [[2]]
## NULL
## 
## [[3]]
## NULL
## 
## [[4]]
## NULL
## 
## [[5]]
## NULL
## 
## [[6]]
## NULL
## 
## [[7]]
## NULL
## 
## [[8]]
## NULL
## 
## [[9]]
## NULL
## 
## [[10]]
## NULL

Find top 20 terms in each topic

tidy_stm <- tidy(qsis_stm, "beta")

top_20 <- tidy_stm |>
  group_by(topic) |>  
  top_n(20, beta) |>
  arrange(topic) |>
  summarise(terms = paste(term, collapse = ", ")) |>
  mutate(topic = as.character(topic), 
         topic = paste("Topic", topic))
stm_dt <- make.dt(qsis_stm)

stm_dt |>
  pivot_longer(names_to = "topic", values_to = "vals", 2:11) |>
  group_by(docnum) |>
  slice_max(vals) |>
  ungroup() |>
  count(topic)
## # A tibble: 10 x 2
##    topic       n
##    <chr>   <int>
##  1 Topic1   3923
##  2 Topic10 16350
##  3 Topic2   7137
##  4 Topic3  12359
##  5 Topic4    732
##  6 Topic5   7903
##  7 Topic6   4065
##  8 Topic7   2267
##  9 Topic8   9016
## 10 Topic9  12388

Assign topics

stm_topics <- stm_dt |>
  pivot_longer(names_to = "topic", values_to = "vals", 2:11) |>
  group_by(docnum) |>
  slice_max(vals) |>
  left_join(top_20)

Sentiment analysis

sent1 <- stm_prep$meta |>
  left_join(data1)

sent <- textfeatures(sent1$pr_risk_comments)
## <U+21AA> Counting features in text...
## <U+21AA> Sentiment analysis...
## <U+21AA> Parts of speech...
## <U+21AA> Word dimensions started
## <U+21AA> Normalizing data
## <U+2714> Job's done!
sent <- sent |>
  bind_cols(stm_prep$meta) |>
  bind_cols(stm_topics) |>
  left_join(sent1, by = c("docnum...249" = "docnum"))
sent |>
  ggplot(aes(sent_vader)) +
  geom_density()

Reduce fields

df <- sent |>
  select(docnum = docnum...249, sent_vader, contains("topic"), contains("indicator"), contains("name"), contains("comments"))

Clustering

Create a tf-idf weighted dfm

clus_corp <- df |>
  rename(pmid = docnum, 
         absText = pr_risk_comments, 
         title = topic) |>
  sample_frac(.2) |>
  create_abstract_corpus()


head(clus_corp)
## $search
## # A tibble: 15,228 x 19
##     pmid sent_vader title  indicator_code.x indicator_name.x    indicator_theme~
##    <int>      <dbl> <chr>  <chr>            <chr>               <lgl>           
##  1 48730    -0.0855 Topic~ B13/S/a/G-16-001 There is a named l~ NA              
##  2  4483    -0.383  Topic3 E10/S/f-16-002   There is an MDT     NA              
##  3 76315     0.0719 Topic9 A08/SC/LS-16-005 There are agreed p~ NA              
##  4  1529     2.24   Topic3 B16/S/a-16-003   There is a weekly ~ NA              
##  5 53698    -1.14   Topic~ NS/BC-16-006     There are national~ NA              
##  6 46422     1.10   Topic3 NS/SCS/CC-16-010 The MDT discusses ~ NA              
##  7 44993     0.299  Topic~ NS/SCS/CC-16-003 There is a weekly ~ NA              
##  8 49694    -0.488  Topic7 NS/CUP-17-007    Provision of Hospi~ NA              
##  9 58505    -0.0855 Topic9 AO-18-007        There are clinical~ NA              
## 10 51130    -0.768  Topic5 B03/GC/LG-16-002 There is an MDT     NA              
## # ... with 15,218 more rows, and 13 more variables: indicator_code.y <chr>,
## #   indicator_name.y <chr>, indicator_theme.y <lgl>, service_name.x <chr>,
## #   subservice_name.x <chr>, team_name.x <chr>, service_name.y <chr>,
## #   subservice_name.y <chr>, team_name.y <chr>, user_comments.x <chr>,
## #   user_comments.y <chr>, absText <chr>, row_id <int>
## 
## $corpus
## # A tibble: 409,666 x 6
##     pmid word         n     tf   idf tf_idf
##    <int> <chr>    <int>  <dbl> <dbl>  <dbl>
##  1     2 contract     1 0.0476  4.15  0.198
##  2     2 databas      1 0.0476  5.09  0.242
##  3     2 enter        1 0.0476  4.39  0.209
##  4     2 inform       1 0.0476  3.35  0.160
##  5     2 manual       1 0.0476  5.57  0.265
##  6     2 nation       1 0.0476  2.80  0.133
##  7     2 outreach     2 0.0952  5.54  0.527
##  8     2 paper        1 0.0476  4.93  0.235
##  9     2 progress     1 0.0476  3.38  0.161
## 10     2 remot        1 0.0476  4.92  0.234
## # ... with 409,656 more rows

Cluster

This takes several minutes

qsis_clusters <- create_abstract_cluster(clus_corp$corpus, minPts = 40)
## If there are a small number of abstracts, set perplexity value 
## to less than 30% of abstract count

## 2006.77 sec elapsed

Labels

qsis_clusters$cluster_count
## [1] 50
labels <-create_cluster_labels(clus_corp$corpus, qsis_clusters$clustering)
labels$labels
## # A tibble: 50 x 2
## # Groups:   cluster [50]
##    cluster clus_names                                                           
##      <dbl> <chr>                                                                
##  1       0 nurs-trust-servic-risk-patient                                       
##  2       1 manag-line-polici-risk-trust                                         
##  3       2 accord-enter-manag-special-polici-risk-topic5-regist-trust           
##  4       3 routin-agre-pressur-topic2-level-staf                                
##  5       4 emploi-invest-nurs-electron-ao-hour-prescrib-implement-hospit-site-a~
##  6       5 declar-concern-topic3-identifi-risk                                  
##  7       6 nil-note-topic9-identifi-risk                                        
##  8       7 comment-topic10                                                      
##  9       8 lincoln-comment-wide-local-topic10-trust-servic                      
## 10       9 valid-comment-topic7-intern-peer-review-identifi-risk                
## # ... with 40 more rows
labels$results %>%
  ggplot(aes(X1, X2, colour = clus_names)) +
  geom_mark_ellipse(aes(fill = clus_names, filter = cluster != 0)) +
  geom_point(show.legend = FALSE) +
  geom_point(data = labels$plot, aes(medX, medY), shape = "X", size = 3, colour = "black") +
  ggrepel::geom_text_repel(data = labels$plot, aes(medX, medY, label = clus_names), size = 3, colour = "black") +
  theme(legend.position = "")