-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHCW-observation
470 lines (381 loc) · 20.7 KB
/
HCW-observation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
#load data
HCW_Observation <- read.csv("C:/Users/Jung/Desktop/Extraction 2018_07_06/HealthCare Observations.csv", sep=";")
#Profession breakdown by observation
table(HCW_Observation$PROFESSION)
##Observations of procedures done correctly
#Washed hands
table(HCW_Observation$WASHED_HAND)
#Wear gloves
table(HCW_Observation$GLOVES)
prop.test(64,88,correct = FALSE)
#Wear other PPE
table(HCW_Observation$PPE)
#Use of tray injection
table(HCW_Observation$TRAY_INJECTION)
prop.test(17,34,correct=FALSE)
#Use of prefilled devices
table(HCW_Observation$PREFILLED_DEVICES)
prop.test(30,34,correct=FALSE)
#wipe vial diaphragms with alcohol
table(HCW_Observation$DIAPHRAGMS_ALCOHOL)
prop.test(1,1, correct=FALSE)
binom.test(1,1)
#syringe/needle left in diaphragms of medication vials
table(HCW_Observation$VIALS_ACCESS)
prop.test(5,5,correct = FALSE)
#syringe/other tools broken before disposal
table(HCW_Observation$DEVICES_USED)
prop.test(27,31,correct = FALSE)
#use of disposal container for sharps
table(HCW_Observation$CONTAINER_SHARP)
prop.test(29,33,correct = FALSE)
#use of red bag for hazardous waste/gloves
table(HCW_Observation$RED_BAG)
prop.test(59,64,correct = FALSE)
#disinfect blood spilled correctly
table(HCW_Observation$DISINFECTED_CORRECT)
prop.test(4,15,correct = FALSE)
#######################################
# stack bar graph for IC observation #
#######################################
IC_obs <- c('wears gloves', 'use tray injection', 'use prefilled device', 'wipe access diaphragm with alcohol','did not leave syringe in diaphragm',
'syringe intact before disposal', 'use sharp disposal container', 'use red bag for hazardous waste',
'disinfect spills')
IC_correct <- c(64, 17, 30, 1, 5, 27, 29, 59, 4)
IC_incorrect <- c(24, 17, 4, 0, 0, 4, 4, 5, 11)
IC_total <- IC_correct+IC_incorrect
library(reshape2)
IC_obs_df <- melt(data.frame(IC_obs, IC_correct, IC_incorrect), id.vars="IC_obs") #make data frame wide
#sort df
library(plyr)
IC_obs_df_sorted <- arrange(IC_obs_df, IC_obs, variable)
head(IC_obs_df_sorted)
#Calculate the cumulative sum
IC_obs_cumsum <- ddply(IC_obs_df_sorted, "IC_obs", transform, label_ypos=cumsum(value))
head(IC_obs_cumsum)
# Create the barplot
library(wesanderson)
library(ggplot2)
plot5 <- ggplot(IC_obs_cumsum, aes(x=IC_obs, value, fill=variable)) +
geom_bar(stat="identity") +coord_flip()+
scale_fill_manual(values=wes_palette(n=2, name="Moonrise2"),
name="variable",
breaks=c("IC_correct", "IC_incorrect"),
labels=c("Procedures done correctly", "Procedure not done/done \n incorrectly")) +
geom_text(aes(label = value, y = value), position = position_stack(vjust = 0.5), size = 4)+
theme(axis.title = element_text(face = "bold"),
plot.title = element_text(size = 14, face = "bold", hjust = 0.5)) +
labs(title = "Infection Control Procedures Observed in HCWs", x = "Procedures", y = "Frequency")
#Percentage but no label
library(scales)
ggplot(IC_obs_cumsum,aes(x = IC_obs, y = value,fill = variable)) +
geom_bar(position = "fill",stat = "identity") + coord_flip() +
scale_y_continuous(labels = percent_format())+
scale_fill_manual(values=wes_palette(n=2, name="Moonrise2"),
name="variable",
breaks=c("IC_correct", "IC_incorrect"),
labels=c("Procedures done correctly", "Procedure not done/done \n incorrectly"))+
theme(axis.title = element_text(face = "bold"),
plot.title = element_text(size = 14,
face = "bold", hjust = 0.5)) +
labs(title = "Infection Control Procedures Observed in HCWs", x = "Procedures", y = "Percentage")+
theme(plot.subtitle = element_text(vjust = 1), plot.caption = element_text(vjust = 1))
#########################
## Observed procedures ##
#########################
apply(HCW_Observation[c("INTRAVENOUS","SUTURES", "BLOOD_TRANSFUSION", "BLOOD_SAMPLE", "INJECTION",
"ENDOSCOPY", "GASTRIC_LAVAGE", "IUD_INSERTION","CARDIAC_CATHETER", "DIALYSIS",
"WOUND_DRESSING")], 2, table)
obs_procedures <- c("Intravenous catheter","Sutures", "Blood transfusion", "Blood sample", "Injection", "Wound dressing")
obs_procedures_counts <- c(6,2,1,11,14,11)
obs_procedures_df <- data.frame(obs_procedures, obs_procedures_counts)
### Bar chart
ggplot(data=obs_procedures_df, aes(x=reorder(obs_procedures, -obs_procedures_counts), y=obs_procedures_counts)) +
geom_bar(stat="identity")+labs(title="Number of observed invasive procedures (Total = 45)", x="Procedures", y="Frequency") +
geom_text(aes(y=obs_procedures_counts, label=obs_procedures_counts), size=5, hjust=0.5, vjust=-0.5)+
theme(axis.title = element_text(face = "bold"),plot.title = element_text(face = "bold", hjust = 0.5))
##################################
## IC observation in injection ##
##################################
obs_injection <- HCW_Observation [which(HCW_Observation$INJECTION==1),]
apply(obs_injection[c("GLOVES", "TRAY_INJECTION", "PREFILLED_DEVICES", "DIAPHRAGMS_ALCOHOL", "VIALS_ACCESS",
"DEVICES_USED", "CONTAINER_SHARP", "RED_BAG", "DISINFECTED_CORRECT")], 2, table)
table(obs_injection$GLOVES)
prop.test(14,14,correct = FALSE)
table(obs_injection$TRAY_INJECTION)
prop.test(10,14,correct = FALSE)
table(obs_injection$PREFILLED_DEVICES)
prop.test(14,14,correct = FALSE)
table(obs_injection$DIAPHRAGMS_ALCOHOL)
binom.test(1,1)
table(obs_injection$VIALS_ACCESS)
binom.test(4,4)
table(obs_injection$DEVICES_USED)
prop.test(13,14,correct = FALSE)
table(obs_injection$CONTAINER_SHARP)
prop.test(14,14,correct = FALSE)
table(obs_injection$RED_BAG)
prop.test(12,14,correct = FALSE)
table(obs_injection$DISINFECTED_CORRECT)
binom.test(1,3)
Injection_obs <- c('wears gloves', 'use tray injection', 'use prefilled device', 'wipe access diaphragm with alcohol','did not leave syringe in diaphragm',
'syringe intact before disposal', 'use sharp disposal container', 'use red bag for hazardous waste',
'disinfect spills')
Injection_correct <- c(14, 10, 14, 1, 4, 13, 14, 12, 1)
Injection_incorrect <- c(0, 4, 0, 0, 0, 1, 0, 2, 2)
library(reshape2)
Injection_obs_df <- melt(data.frame(Injection_obs, Injection_correct, Injection_incorrect), id.vars="Injection_obs") #make data frame wide
#sort df
library(plyr)
Injection_obs_df_sorted <- arrange(Injection_obs_df, Injection_obs, variable)
head(Injection_obs_df_sorted)
#Calculate the cumulative sum
Injection_obs_cumsum <- ddply(Injection_obs_df_sorted, "Injection_obs", transform, label_ypos=cumsum(value))
head(Injection_obs_cumsum)
# stacked bar plot
ggplot(Injection_obs_cumsum[which(Injection_obs_cumsum$value>0 & Injection_obs_cumsum$label_ypos>0),],
aes(x=Injection_obs, value, fill=variable)) +
geom_bar(stat="identity") +coord_flip()+
scale_fill_manual(values=wes_palette(n=2, name="Moonrise2"),
name="variable",
breaks=c("Injection_correct", "Injection_incorrect"),
labels=c("Procedures done correctly", "Procedure not done/done \n incorrectly")) +
geom_text(aes(label = value, y = value), position = position_stack(vjust = 0.5), size = 4)+
theme(axis.title = element_text(face = "bold"), plot.title = element_text(size = 14, face = "bold", hjust = 0.5)) +
labs(title = "Infection control procedures observed in injection procedure", x = "Procedures", y = "Frequency")
#Percentage ## but no label yet
library(scales)
plot_inject <- ggplot(Injection_obs_cumsum,aes(x = Injection_obs, y = value,fill = variable)) +
geom_bar(position = "fill",stat = "identity") + coord_flip() +
scale_y_continuous(labels = percent_format())+
scale_fill_manual(values=wes_palette(n=2, name="Moonrise2"),
name="variable",
breaks=c("Injection_correct", "Injection_incorrect"),
labels=c("Procedures done correctly", "Procedure not done/done \n incorrectly"))+
theme(axis.title = element_text(face = "bold"),
plot.title = element_text(size = 14,
face = "bold", hjust = 0.5)) +
labs(title = "Infection control procedures observed in injection procedure", x = "Procedures", y = "Percentage") +
theme(plot.subtitle = element_text(vjust = 1), plot.caption = element_text(vjust = 1))
######################################
## IC observation in wound dressing ##
######################################
obs_wound <- HCW_Observation [which(HCW_Observation$WOUND_DRESSING==1),]
apply(obs_wound[c("GLOVES", "TRAY_INJECTION", "PREFILLED_DEVICES", "DIAPHRAGMS_ALCOHOL", "VIALS_ACCESS",
"DEVICES_USED", "CONTAINER_SHARP", "RED_BAG", "DISINFECTED_CORRECT")], 2, table)
table(obs_wound$GLOVES)
prop.test(12,12,correct = FALSE)
table(obs_wound$PREFILLED_DEVICES)
binom.test(0,0)
table(obs_wound$DIAPHRAGMS_ALCOHOL)
binom.test(0,0)
table(obs_wound$RED_BAG)
prop.test(11,12,correct = FALSE)
table(obs_wound$DISINFECTED_CORRECT)
binom.test(1,4)
wound_obs <- c('wears gloves', 'use tray injection', 'use prefilled device', 'wipe access diaphragm with alcohol','did not leave syringe in diaphragm',
'syringe intact before disposal', 'use sharp disposal container', 'use red bag for hazardous waste',
'disinfect spills')
wound_correct <- c(12, 0, 0, 0, 0, 0, 0, 11, 1)
wound_incorrect <- c(0, 0, 0, 0, 0, 0, 0, 1, 3)
library(reshape2)
wound_obs_df <- melt(data.frame(wound_obs, wound_correct, wound_incorrect), id.vars="wound_obs") #make data frame wide
#sort df
library(plyr)
wound_obs_df_sorted <- arrange(wound_obs_df, wound_obs, variable)
head(wound_obs_df_sorted)
#Calculate the cumulative sum
wound_obs_cumsum <- ddply(wound_obs_df_sorted, "wound_obs", transform, label_ypos=cumsum(value))
head(wound_obs_cumsum)
# stacked bar plot
ggplot(wound_obs_cumsum[which(wound_obs_cumsum$value>0 & wound_obs_cumsum$label_ypos>0),], aes(x=wound_obs, value, fill=variable)) +
geom_bar(stat="identity") +coord_flip()+
scale_fill_manual(values=wes_palette(n=2, name="Moonrise2"),
name="variable",
breaks=c("wound_correct", "wound_incorrect"),
labels=c("Procedures done correctly", "Procedure not done/done \n incorrectly")) +
geom_text(aes(label = value, y = value), position = position_stack(vjust = 0.5), size = 4)+
theme(axis.title = element_text(face = "bold"),
plot.title = element_text(size = 14, face = "bold", hjust = 0.5)) +
labs(title = "Infection control procedures observed in wound dressing procedure", x = "Procedures", y = "Frequency")
#Percentage ## but no label yet
library(scales)
plot_wound <- ggplot(wound_obs_cumsum[which(wound_obs_cumsum$value>0 & wound_obs_cumsum$label_ypos>0),],aes(x = wound_obs, y = value,fill = variable)) +
geom_bar(position = "fill",stat = "identity") + coord_flip() +
scale_y_continuous(labels = percent_format())+
scale_fill_manual(values=wes_palette(n=2, name="Moonrise2"),
name="variable",
breaks=c("wound_correct", "wound_incorrect"),
labels=c("Procedures done correctly", "Procedure not done/done \n incorrectly"))+
theme(axis.title = element_text(face = "bold"),
plot.title = element_text(size = 14,
face = "bold", hjust = 0.5)) +
labs(title = "Infection control procedures observed in wound dressing procedure", x = "Procedures", y = "Percentage") +
theme(plot.subtitle = element_text(vjust = 1), plot.caption = element_text(vjust = 1))
######################################
## IC observation in Blood sample ##
######################################
obs_bloodsamp <- HCW_Observation [which(HCW_Observation$BLOOD_SAMPLE==1),]
apply(obs_bloodsamp[c("GLOVES", "TRAY_INJECTION", "PREFILLED_DEVICES", "DIAPHRAGMS_ALCOHOL", "VIALS_ACCESS",
"DEVICES_USED", "CONTAINER_SHARP", "RED_BAG", "DISINFECTED_CORRECT")], 2, table)
table(obs_bloodsamp$GLOVES)
prop.test(11,11,correct = FALSE)
table(obs_bloodsamp$TRAY_INJECTION)
prop.test(4,11,correct = FALSE)
table(obs_bloodsamp$PREFILLED_DEVICES)
prop.test(11,11,correct = FALSE)
table(obs_bloodsamp$DIAPHRAGMS_ALCOHOL)
binom.test(0,0)
table(obs_bloodsamp$VIALS_ACCESS)
binom.test(1,1)
table(obs_bloodsamp$DEVICES_USED)
prop.test(9,11,correct = FALSE)
table(obs_bloodsamp$CONTAINER_SHARP)
prop.test(10,11,correct = FALSE)
table(obs_bloodsamp$RED_BAG)
prop.test(11,11,correct = FALSE)
table(obs_bloodsamp$DISINFECTED_CORRECT)
binom.test(1,1)
bloodsamp_obs <- c('wears gloves', 'use tray injection', 'use prefilled device', 'wipe access diaphragm with alcohol','did not leave syringe in diaphragm',
'syringe intact before disposal', 'use sharp disposal container', 'use red bag for hazardous waste',
'disinfect spills')
bloodsamp_correct <- c(11, 4, 11, 0, 1, 9, 10, 11, 1)
bloodsamp_incorrect <- c(0, 7, 0, 0, 0, 2, 1, 0, 0)
library(reshape2)
bloodsamp_obs_df <- melt(data.frame(bloodsamp_obs, bloodsamp_correct, bloodsamp_incorrect), id.vars="bloodsamp_obs") #make data frame wide
#sort df
library(plyr)
bloodsamp_obs_df_sorted <- arrange(bloodsamp_obs_df, bloodsamp_obs, variable)
head(bloodsamp_obs_df_sorted)
#Calculate the cumulative sum
bloodsamp_obs_cumsum <- ddply(bloodsamp_obs_df_sorted, "bloodsamp_obs", transform, label_ypos=cumsum(value))
head(bloodsamp_obs_cumsum)
# stacked bar plot
ggplot(bloodsamp_obs_cumsum[which(bloodsamp_obs_cumsum$value>0 & bloodsamp_obs_cumsum$label_ypos>0),], aes(x=bloodsamp_obs, value, fill=variable)) +
geom_bar(stat="identity") +coord_flip()+
scale_fill_manual(values=wes_palette(n=2, name="Moonrise2"),
name="variable",
breaks=c("bloodsamp_correct", "bloodsamp_incorrect"),
labels=c("Procedures done correctly", "Procedure not done/done \n incorrectly")) +
geom_text(aes(label = value, y = value), position = position_stack(vjust = 0.5), size = 4)+
theme(axis.title = element_text(face = "bold"),
plot.title = element_text(size = 14, face = "bold", hjust = 0.5)) +
labs(title = "Infection control procedures observed in blood sample procedure", x = "Procedures", y = "Frequency")
#Percentage ## but no label yet
library(scales)
plot_blood <- ggplot(bloodsamp_obs_cumsum[which(bloodsamp_obs_cumsum$value>0 & bloodsamp_obs_cumsum$label_ypos>0),],aes(x = bloodsamp_obs, y = value,fill = variable)) +
geom_bar(position = "fill",stat = "identity") + coord_flip() +
scale_y_continuous(labels = percent_format())+
scale_fill_manual(values=wes_palette(n=2, name="Moonrise2"),
name="variable",
breaks=c("bloodsamp_correct", "bloodsamp_incorrect"),
labels=c("Procedures done correctly", "Procedure not done/done \n incorrectly"))+
theme(axis.title = element_text(face = "bold"),
plot.title = element_text(size = 14,
face = "bold", hjust = 0.5)) +
labs(title = "Infection control procedures observed in blood sample procedure", x = "Procedures", y = "Percentage")+
theme(plot.subtitle = element_text(vjust = 1), plot.caption = element_text(vjust = 1))
##########################################
## IC observation in Intravenous cath ##
##########################################
obs_iv <- HCW_Observation [which(HCW_Observation$INTRAVENOUS==1),]
apply(obs_iv[c("GLOVES", "TRAY_INJECTION", "PREFILLED_DEVICES", "DIAPHRAGMS_ALCOHOL", "VIALS_ACCESS",
"DEVICES_USED", "CONTAINER_SHARP", "RED_BAG", "DISINFECTED_CORRECT")], 2, table)
table(obs_iv$GLOVES)
prop.test(6,6,correct = FALSE)
table(obs_iv$TRAY_INJECTION)
binom.test(2,5)
table(obs_iv$PREFILLED_DEVICES)
binom.test(4,5)
table(obs_iv$DIAPHRAGMS_ALCOHOL)
binom.test(0,0)
table(obs_iv$VIALS_ACCESS)
binom.test(0,0)
table(obs_iv$DEVICES_USED)
binom.test(2,3)
table(obs_iv$CONTAINER_SHARP)
binom.test(2,5)
table(obs_iv$RED_BAG)
binom.test(5,6)
table(obs_iv$DISINFECTED_CORRECT)
binom.test(0,1)
iv_obs <- c('wears gloves', 'use tray injection', 'use prefilled device', 'wipe access diaphragm with alcohol','did not leave syringe in diaphragm',
'syringe intact before disposal', 'use sharp disposal container', 'use red bag for hazardous waste',
'disinfect spills')
iv_correct <- c(6, 2, 4, 0, 0, 2, 2, 5, 0)
iv_incorrect <- c(0, 3, 1, 0, 0, 1, 3, 1, 1)
library(reshape2)
iv_obs_df <- melt(data.frame(iv_obs, iv_correct, iv_incorrect), id.vars="iv_obs") #make data frame wide
#sort df
library(plyr)
iv_obs_df_sorted <- arrange(iv_obs_df, iv_obs, variable)
head(iv_obs_df_sorted)
#Calculate the cumulative sum
iv_obs_cumsum <- ddply(iv_obs_df_sorted, "iv_obs", transform, label_ypos=cumsum(value))
head(iv_obs_cumsum)
# stacked bar plot
ggplot(iv_obs_cumsum[which(iv_obs_cumsum$value>0 & iv_obs_cumsum$label_ypos>0),], aes(x=iv_obs, value, fill=variable)) +
geom_bar(stat="identity") +coord_flip()+
scale_fill_manual(values=wes_palette(n=2, name="Moonrise2"),
name="variable",
breaks=c("iv_correct", "iv_incorrect"),
labels=c("Procedures done correctly", "Procedure not done/done \n incorrectly")) +
geom_text(aes(label = value, y = value), position = position_stack(vjust = 0.5), size = 4)+
theme(axis.title = element_text(face = "bold"),
plot.title = element_text(size = 14,
face = "bold", hjust = 0.5)) +
labs(title = "Infection control procedures observed in IV catheter procedure", x = "Procedures", y = "Frequency")
#Percentage ## but no label
library(scales)
plot_IV <- ggplot(iv_obs_cumsum[which(iv_obs_cumsum$value>0 & iv_obs_cumsum$label_ypos>0),],aes(x = iv_obs, y = value,fill = variable)) +
geom_bar(position = "fill",stat = "identity") + coord_flip() +
scale_y_continuous(labels = percent_format())+
scale_fill_manual(values=wes_palette(n=2, name="Moonrise2"),
name="variable",
breaks=c("iv_correct", "iv_incorrect"),
labels=c("Procedures done correctly", "Procedure not done/done \n incorrectly"))+
theme(axis.title = element_text(face = "bold"),
plot.title = element_text(size = 14,
face = "bold", hjust = 0.5)) +
labs(title = "Infection control procedures observed in IV catheter procedure", x = "Procedures", y = "Percentage")+
theme(plot.subtitle = element_text(vjust = 1), plot.caption = element_text(vjust = 1))
#### compare compliance between surgery and int med ####
#surgery = 1
HCW_Observation_surg <- HCW_Observation[which(HCW_Observation$HOSPITAL==1),]
##using tray injection
table(HCW_Observation_surg$TRAY_INJECTION)
prop.test(3,18,correct=FALSE) #16.67% 95CI: 5.84-39.22%
#disinfect blood spilled correctly
table(HCW_Observation_surg$DISINFECTED_CORRECT)
binom.test(1,6) #16.67% 95CI: 0.42-64.12%
#int med = 2
HCW_Observation_intmed <- HCW_Observation[which(HCW_Observation$HOSPITAL==2),]
##using tray injection
table(HCW_Observation_intmed$TRAY_INJECTION)
prop.test(3,16, correct=F) #18.75% 95CI: 6.59-43.01%
#disinfect blood spilled correctly
table(HCW_Observation_intmed$DISINFECTED_CORRECT)
binom.test(3,9) #33.33% 95CI: 7.49-70.07%
library(readxl)
IC_compliance <- read_excel("~/Updated IC compliance.xlsx",
col_types = c("text", "text", "numeric", "numeric", "numeric", "numeric","numeric", "numeric"))
# plot
library(ggplot2)
library(wesanderson)
dodge <- position_dodge(width=0.9)
ggplot(IC_compliance, aes(x=IC, y=compliance, fill=hospital))+
geom_text(position=position_dodge(width = 1), aes(y=round(compliance,1), label=round(compliance,1), vjust=-0.5, hjust=1.7))+
geom_bar(stat = "identity", position = "dodge")+
geom_col(position = dodge)+
geom_errorbar(aes(ymin=CIL, ymax=CIU), position = dodge, width=0.25) +
scale_fill_manual(values=wes_palette(n=2, name="Moonrise2"))+
theme(plot.subtitle = element_text(vjust = 1),
plot.caption = element_text(vjust = 1),
axis.title = element_text(face = "bold"),
plot.title = element_text(size = 14,
face = "bold", hjust = 0.5)) +
labs(title = "Comparison of compliance rate", x = "Infection control methods", y = "Compliance rate (%)",fill = "Hospitals") + theme(axis.title = element_text(size = 13),
axis.text = element_text(size = 12),
plot.title = element_text(size = 15),
legend.text = element_text(size = 12),
legend.title = element_text(size = 12))