This is an ongoing report of case series describing COVID+ patients at a single center.
Inclusions are those with a positive result for SARS-CoV-2 test. Select the code button in this section to see the R code for dataset construction.
uri = "https://redcap.emory.edu/api/"
token = "8A2809C39614D29826AB44C6FE1E94B8"
covid <- redcap_read_oneshot(redcap_uri = uri, token = token)$data
# Clean up total dataset pulled from EPIC with those missing SARS collect date or
# results status add in the week time variable as this is used by many subsets
# covid = entire data pull covid0 = dataset with valid results and result dates.
covid0 <- covid %>% mutate(sarscov2_status = if_else(sarscov2_status == "Positive",
"Yes", if_else(sarscov2_status == "Negative", "No", NA_character_)), week = floor_date(sarscov2_collected_date,
unit = "week", week_start = 1)) %>% filter(is.na(sarscov2_status) == F) %>% filter(is.na(sarscov2_collected_date) ==
F)
# Clean up data with completed facesheets to examine collected data covid1 =
# dataset with completed facesheets
covid1 <- covid0 %>% filter(is.na(researcher) == F) %>% dplyr::select(admit_date,
admit_loc, admit_service, admit_time, age, arrest, discharge_date, discharge_disposition,
discharge_hai, discharge_hd, discharge_o2, ed_date, ed_time, fu_loc, fu_loc_date,
height, icu_enddate, kg, mrn, patient_location, race_adj, record_id, researcher,
sarscov2_collected_date, sarscov2_status, sex) %>% mutate(admit_loc = if_else(admit_loc ==
0, "General", if_else(admit_loc == 1, "Intermediate", if_else(admit_loc == 2,
"Intensive", if_else(admit_loc == 3, "Discharged from ED", NA_character_)))),
admit_service = if_else(admit_service == 0, "Not Admitted", if_else(admit_service ==
1, "Medical", if_else(admit_service == 2, "Surgical", if_else(admit_service ==
3, "Neurology", if_else(admit_service == 4, "Other", NA_character_))))),
arrest = if_else(arrest == 1, "Yes", if_else(arrest == 0, "No", if_else(arrest ==
99, "Unknown", NA_character_))), bmi = round(kg/(height/100)^2, digits = 1),
died = if_else(discharge_disposition == 6, "Yes", "No", NA_character_), discharge_disposition = if_else(discharge_disposition ==
0, "Home", if_else(discharge_disposition == 1, "Nursing Home/Rehabilitation Facility",
if_else(discharge_disposition == 2, "Long-term Acute Care (LTAC)", if_else(discharge_disposition ==
3, "Hospice", if_else(discharge_disposition == 4, "Transfer to the hospital",
if_else(discharge_disposition == 5, "AMA", if_else(discharge_disposition ==
6, "Died", if_else(discharge_disposition == 99, "Unknown", NA_character_)))))))),
discharge_hai = if_else(discharge_hai == 1, "Yes", if_else(discharge_hai == 0,
"No", if_else(discharge_hai == 99, "Unknown", NA_character_))), discharge_hd = if_else(discharge_hd ==
1, "Yes", if_else(discharge_hd == 0, "No", if_else(discharge_hd == 99, "Unknown",
NA_character_))), discharge_o2 = if_else(discharge_o2 == 1, "Yes", if_else(discharge_o2 ==
0, "No", if_else(discharge_o2 == 99, "Unknown", NA_character_))), fu_loc = if_else(fu_loc ==
0, "General", if_else(fu_loc == 1, "Intermediate", if_else(fu_loc == 2, "Intensive",
NA_character_))), hosp_los = discharge_date - admit_date, patient_location = if_else(patient_location ==
0, "Outpatient", if_else(patient_location == 1, "ECC/Hospital", NA_character_)),
race_adj = if_else(race_adj == 1, "Black", if_else(race_adj == 2, "White", if_else(race_adj ==
3, "Asian/PI", if_else(race_adj == 4, "Alaskan/Native American", if_else(race_adj ==
99, "Unknown", NA_character_))))))
# Summarise over time variables for time series graphing. Here we will use the
# covid0 dataset as the origin but know that many of these are not admitted
# Daily data summary for graphing progress
covid0.daily <- covid0 %>% group_by(sarscov2_collected_date) %>% summarise(N = n(),
Positive = sum(sarscov2_status == "Yes"), Negative = sum(sarscov2_status == "No"),
Ratio.negative = round(Negative/Positive, digits = 0), Percent.positive = round(Positive/N *
100, digits = 1)) %>% mutate(Cum.N = cumsum(N), Cum.P = cumsum(Positive))
# Weekly data summary for graphing progress and for creating strata for sampling
covid0.weekly <- covid0 %>% group_by(week) %>% summarise(N = n(), Positive = sum(sarscov2_status ==
"Yes"), Negative = sum(sarscov2_status == "No"), Ratio.negative = round(Negative/Positive,
digits = 0), Percent.positive = round(Positive/N * 100, digits = 1)) %>% mutate(Cum.N = cumsum(N),
Cum.P = cumsum(Positive))
# Researcher Tracking subsets using the covid1 dataset since this is what we've
# completed so far.
researcher.summary.facesheet <- covid0 %>% dplyr::select(record_id, researcher) %>%
filter(is.na(researcher) == F) %>% group_by(researcher) %>% tally()
researcher.summary.course <- covid0 %>% dplyr::select(record_id, researcher_presentation) %>%
filter(is.na(researcher_presentation) == F) %>% group_by(researcher_presentation) %>%
tally()
Of note, this final percentage is an underestimate of work progress since not all valid results are inpatients, which will be the focus of our Aims.
ggplot(data=researcher.summary.facesheet, aes(x=researcher))+
geom_bar(aes(y=n),stat = 'identity',fill="dark red", color = "black")+
# geom_hline(yintercept = 50, color = "dark red", size = 2, linetype = "dashed")+
geom_text(aes(y=n, label = n), nudge_y = 2.5)+
theme_bw()+
labs(title = "Total Facesheets Completed",
x= "REDCAp Username (hidden)",
y= "Number of Facesheets")+
theme(axis.title = element_text(size = 14),
axis.text.x=element_blank(),
#axis.text.x = element_text(angle = 60, hjust = 1, size =12),
axis.text.y = element_text(size = 12))
ggplot(data=researcher.summary.course, aes(x=researcher_presentation))+
geom_bar(aes(y=n),stat = 'identity',fill="dark red", color = "black")+
# geom_hline(yintercept = 50, color = "dark red", size = 2, linetype = "dashed")+
geom_text(aes(y=n, label = n), nudge_y = 2.5)+
theme_bw()+
labs(title = "Total Presentation & Course Completed",
x= "REDCAp Username (hidden)",
y= "Number of Presentation and Course Sheets")+
theme(axis.title = element_text(size = 14),
axis.text.x=element_blank(),
#axis.text.x = element_text(angle = 60, hjust = 1, size =12),
axis.text.y = element_text(size = 12))
This includes all those tested, inpatient and outpatient.
ggplot(covid0.daily, aes(x = sarscov2_collected_date)) + geom_bar(aes(y = N), stat = "identity",
fill = "dark grey", color = "black") + geom_bar(aes(y = Positive), stat = "identity",
fill = "dark red", color = "black") + geom_text(aes(y = N, label = N), nudge_y = 20,
angle = 90) + geom_text(aes(y = 0, label = Positive), nudge_y = -20, color = "dark red",
angle = 90) + theme_bw() + scale_x_date(breaks = "1 week", date_labels = "%b %d") +
labs(title = "Total Daily Tests Performed", x = "Date of SARS-CoV- 2 Test", y = "Number of tests") +
theme(axis.title = element_text(size = 14), axis.text.x = element_text(angle = 60,
hjust = 1, size = 12), axis.text.y = element_text(size = 12))
ggplot(covid0.daily, aes(x = sarscov2_collected_date)) + geom_bar(aes(y = Cum.N),
stat = "identity", fill = "dark grey", color = "black") + geom_bar(aes(y = Cum.P),
stat = "identity", fill = "dark red", color = "black") + geom_text(aes(y = Cum.N,
label = Cum.N), nudge_y = 500, angle = 90, color = "black") + geom_text(aes(y = 0,
label = Cum.P), nudge_y = -500, angle = 90, color = "dark red") + theme_bw() +
scale_x_date(breaks = "1 week", date_labels = "%b %d") + labs(title = "Cumulative Number of Tests Performed",
x = "Date of SARS-CoV- 2 Test", y = "Number of tests") + theme(axis.title = element_text(size = 14),
axis.text.x = element_text(angle = 60, hjust = 1, size = 12), axis.text.y = element_text(size = 12))
ggplot(covid0.daily, aes(x = sarscov2_collected_date)) + geom_bar(aes(y = Percent.positive),
stat = "identity", fill = "dark red", color = "black") + geom_text(aes(y = Percent.positive,
label = Percent.positive), nudge_y = 10, angle = 90) + theme_bw() + scale_x_date(breaks = "1 week",
date_labels = "%b %d") + labs(title = "Percent of Daily Tests Performed Resulted Positive",
x = "Date of SARS-CoV- 2 Test", y = "%") + theme(axis.title = element_text(size = 14),
axis.text.x = element_text(angle = 60, hjust = 1, size = 12), axis.text.y = element_text(size = 12))
ggplot(covid0.daily, aes(x = sarscov2_collected_date)) + geom_bar(aes(y = Ratio.negative),
stat = "identity", fill = "dark grey", color = "black") + geom_text(aes(y = Ratio.negative,
label = Ratio.negative), nudge_y = 5, angle = 90) + geom_text(aes(y = 0, label = Positive),
nudge_y = -1, color = "dark red", angle = 90) + theme_bw() + scale_x_date(breaks = "1 week",
date_labels = "%b %d") + labs(title = "Ratio of Negative to Positive Tests",
x = "Date of SARS-CoV- 2 Test", y = "Number of tests") + theme(axis.title = element_text(size = 14),
axis.text.x = element_text(angle = 60, hjust = 1, size = 12), axis.text.y = element_text(size = 12))
ggplot(covid0.weekly, aes(x = week)) + geom_bar(aes(y = N), stat = "identity", fill = "dark grey",
color = "black") + geom_bar(aes(y = Positive), stat = "identity", fill = "dark red",
color = "black") + geom_text(aes(y = N, label = N), nudge_y = 30, angle = 90) +
geom_text(aes(y = 0, label = Positive), nudge_y = -30, color = "dark red", angle = 90) +
theme_bw() + scale_x_date(breaks = "1 week", date_labels = "%b %d") + labs(title = "Total Weekly Tests Performed",
x = "Monday of Week of SARS-CoV- 2 Test", y = "Number of tests") + theme(axis.title = element_text(size = 14),
axis.text.x = element_text(angle = 60, hjust = 1, size = 12), axis.text.y = element_text(size = 12))
ggplot(covid0.weekly, aes(x = week)) + geom_bar(aes(y = Cum.N), stat = "identity",
fill = "dark grey", color = "black") + geom_bar(aes(y = Cum.P), stat = "identity",
fill = "dark red", color = "black") + geom_text(aes(y = Cum.N, label = Cum.N),
nudge_y = 1000, angle = 90, color = "black") + geom_text(aes(y = 0, label = Cum.P),
nudge_y = -1000, angle = 90, color = "dark red") + theme_bw() + labs(title = "Cumulative Number of Tests Performed",
x = "Monday Date of Week of SARS-CoV- 2 Test", y = "Number of tests") + theme(axis.title = element_text(size = 14),
axis.text.x = element_text(angle = 60, hjust = 1, size = 12), axis.text.y = element_text(size = 12))
ggplot(covid0.weekly, aes(x = week)) + geom_bar(aes(y = Percent.positive), stat = "identity",
fill = "dark red", color = "black") + geom_text(aes(y = Percent.positive, label = Percent.positive),
nudge_y = 10, angle = 90) + theme_bw() + scale_x_date(breaks = "1 week", date_labels = "%b %d") +
labs(title = "Percent of Weekly Tests Performed Resulted Positive", x = "Monday Date of Week of SARS-CoV- 2 Test",
y = "%") + theme(axis.title = element_text(size = 14), axis.text.x = element_text(angle = 60,
hjust = 1, size = 12), axis.text.y = element_text(size = 12))
ggplot(covid0.weekly, aes(x = week)) + geom_bar(aes(y = Ratio.negative), stat = "identity",
fill = "dark grey", color = "black") + geom_text(aes(y = Ratio.negative, label = Ratio.negative),
nudge_y = 2, angle = 90) + geom_text(aes(y = 0, label = Positive), nudge_y = -2,
color = "dark red", angle = 90) + theme_bw() + scale_x_date(breaks = "1 week",
date_labels = "%b %d") + labs(title = "Ratio of Negative to Positive Tests",
x = "Monday Date of Week of SARS-CoV- 2 Test", y = "Number of tests") + theme(axis.title = element_text(size = 14),
axis.text.x = element_text(angle = 60, hjust = 1, size = 12), axis.text.y = element_text(size = 12))