Skip to content

Commit 179dba9

Browse files
committed
Merge remote-tracking branch 'origin/sgratzl/c2b_blogpost_updates' into c2b_blogpost
2 parents 7801d09 + 1731def commit 179dba9

File tree

7 files changed

+91
-210
lines changed

7 files changed

+91
-210
lines changed

content/blog/2021-03-10_c2b.Rmd

Lines changed: 55 additions & 55 deletions
Large diffs are not rendered by default.

content/blog/2021-03-10_c2b.html

Lines changed: 36 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -14,45 +14,46 @@
1414
heroImage: /blog/images/blog-lg-c2b.jpg # size: 1120x440 jpg and webp format
1515
heroImageThumb: /blog/images/blog-thumb-c2b-1.jpg # size: 300x200 jpg and webp format
1616
# related:
17-
summary: |
18-
In our partnership with the Allegheny County Health Department,
19-
we explored avariety of solutions to different pressing challenges
20-
during the pandemic. Cases2Beds was one such tool that came as a
21-
result of rising COVID cases in Allegheny County.
22-
23-
The goal of Cases2Beds is to project likely hospital bed
24-
utilization from any given set of lab-confirmed cases. The intuition of
25-
Cases2Beds is that some fraction ((hospitalization rate) of individuals who
26-
test positive today will be hospitalized after a time delay
27-
(from test date to admit date) and for a varying duration
28-
(from admit date to discharge date). These values and distributions vary by
29-
individual traits (primarily age group, and then race or gender).
17+
summary: |
18+
In our partnership with the Allegheny County Health Department,
19+
we explored avariety of solutions to different pressing challenges
20+
during the pandemic. Cases2Beds was one such tool that came as a
21+
result of rising COVID cases in Allegheny County.
22+
23+
The goal of Cases2Beds is to project likely hospital bed
24+
utilization from any given set of lab-confirmed cases. The intuition of
25+
Cases2Beds is that some fraction ((hospitalization rate) of individuals who
26+
test positive today will be hospitalized after a time delay
27+
(from test date to admit date) and for a varying duration
28+
(from admit date to discharge date). These values and distributions vary by
29+
individual traits (primarily age group, and then race or gender).
3030
Using the current relevant hospitalization rates, delay distributions,
31-
and duration distributions, we show what bed usage might be for the inputted
32-
positive cases. We are not aware of other generative approaches for
31+
and duration distributions, we show what bed usage might be for the inputted
32+
positive cases. We are not aware of other generative approaches for
3333
hospital utilization.
34-
34+
3535
acknowledgements: |
3636
Thank you to the Allegheny County Health Department (especially Antony Gnalian,
3737
Dr. LuAnn Brink, and Dr. Debra Bogen) for their invaluable feedback, efforts, and
38-
shared interest in actionable intelligence.
39-
40-
Many members of the Delphi Group, including
41-
Sumit Agrawal, Katie Mazaitis,
42-
and Phil McGuinness met regularly with the Allegheny County
43-
Health Department and investigated various solutions other than Cases2Beds.
38+
shared interest in actionable intelligence.
39+
40+
Many members of the Delphi Group, including
41+
Sumit Agrawal, Katie Mazaitis,
42+
and Phil McGuinness met regularly with the Allegheny County
43+
Health Department and investigated various solutions other than Cases2Beds.
4444
Andrew Chin and Benjamin Smith investigated Cases2Beds alternatives.
45-
46-
Zachary Lipton, Helen Zhou, and Cheng Cheng
47-
provided historical data from Florida and valuable support.
48-
49-
Spencer Whitman, Phil McGuinness, and Sam Gratzl helped edit and format
50-
this blog post.
45+
46+
Zachary Lipton, Helen Zhou, and Cheng Cheng
47+
provided historical data from Florida and valuable support.
48+
49+
Spencer Whitman, Phil McGuinness, and Sam Gratzl helped edit and format
50+
this blog post.
5151
output:
5252
blogdown::html_page:
5353
toc: true
5454
---
5555

56+
<script src="/rmarkdown-libs/header-attrs/header-attrs.js"></script>
5657

5758
<div id="TOC">
5859
<ul>
@@ -73,13 +74,13 @@
7374
library(&quot;ggpubr&quot;)
7475
library(scales)
7576

76-
full_df &lt;- tibble(read.csv(file=&quot;../../public/blog/2021-03-10_c2b/test_and_hosp.csv&quot;))
77+
full_df &lt;- tibble(read.csv(file=&quot;./c2b/test_and_hosp.csv&quot;))
7778
full_df$collection_date &lt;- as.Date(full_df$collection_date, &quot;%m/%d/%y&quot;)
7879
df2 &lt;- data.frame(Key=rep(c(&quot;Hospitalization&quot;, &quot;Positive Cases&quot;), each=nrow(full_df)),
7980
CollectionDate=rep(c(full_df$collection_date),2),
8081
Counts=c(full_df$hospital_flag*7, full_df$test_result*7))
8182
ggplot(data=df2, aes(x=CollectionDate, y=Counts, fill=Key), show.legend = FALSE) +
82-
geom_bar(stat=&quot;identity&quot;) +
83+
geom_bar(stat=&quot;identity&quot;) +
8384
labs(x = &quot;&quot;, y=&quot;&quot;,
8485
title = &quot;New COVID-19 Hospitalizations and Cases in Allegheny County&quot;,
8586
subtitle = &quot;Total Weekly Counts&quot;,
@@ -115,8 +116,8 @@ <h2>A probabilistic approach</h2>
115116
Rate=c(0.1*0.01,0.14*0.01, 0.14*0.01, 0.13*0.02, 0.15*0.03, 0.16*0.06, 0.15*0.11, 0.18*0.26, 0.01*0.01 ))
116117

117118
ggplot(data=df4, aes(x=Race, y=Rate)) +
118-
geom_bar(stat=&quot;identity&quot;, fill=&quot;#FF9999&quot;) +
119-
labs(x = &quot;Age Category&quot;, y = &quot;&quot;,
119+
geom_bar(stat=&quot;identity&quot;, fill=&quot;#FF9999&quot;) +
120+
labs(x = &quot;Age Category&quot;, y = &quot;&quot;,
120121
title = &quot;Percent Hospitalized Cases of Total Tested by Age Group &quot;,
121122
subtitle = &quot;Allegheny County&quot;,
122123
caption = &quot;Delphi Group, delphi.cmu.edu, \nData from Allegheny County Dashboard &quot;) +
@@ -155,11 +156,11 @@ <h2>An alternative to Monte Carlo: the analytical model</h2>
155156
</ol>
156157
<p>The second types of inputs are the daily positive cases split by their traits. This is the input that the user actively changes on their end.</p>
157158
<p>Behind the scenes, we take these parameters (first input) and generate Offset Fractions, which is the probability that a patient with given traits will occupy a bed on k days after the specimen testing date. These Offset Fractions and the daily positive case breakdown (second input) give us the expected mean and variance up to 1 month in the future of the number of patients in the hospital per day based on the cases already seen. This information can be used to generate plots like Fig 3. This graph isn’t to suggest that there won’t be any need for beds after February! It is just that based on the cases we know, very few people will remain hospitalized after a month.</p>
158-
<pre class="r"><code>full_df &lt;- tibble(read.csv(file=&quot;../../public/blog/2021-03-10_c2b/C2B_output.csv&quot;))
159+
<pre class="r"><code>full_df &lt;- tibble(read.csv(file=&quot;./c2b/C2B_output.csv&quot;))
159160
full_df$dates &lt;- as.Date(full_df$dates, &quot;%m/%d/%y&quot;)
160161

161162
ggplot(data=full_df) +
162-
geom_ribbon(aes(x = dates, ymin = Q5, ymax = Q95, fill=&quot;Q5-Q95&quot;))+
163+
geom_ribbon(aes(x = dates, ymin = Q5, ymax = Q95, fill=&quot;Q5-Q95&quot;))+
163164
geom_ribbon(aes(x = dates, ymin = Q25, ymax = Q75, fill=&quot;Q25-Q75&quot;)) +
164165
geom_line(aes(x = dates, y = mean,color = &quot;mean&quot;), fill=&quot;black&quot;) +
165166
labs(x = &quot;&quot;, y = &quot;&quot;,
@@ -176,7 +177,7 @@ <h2>An alternative to Monte Carlo: the analytical model</h2>
176177
<h2>The only constant during the pandemic is change</h2>
177178
<p>By November, we had a prototype Cases2Beds spreadsheet for ACHD that they used. Over the following months, we made various modifications with their feedback. For example, the ACHD staff did not have time to input the case numbers. So, we were able to use the granular public data to give them estimates of future hospital utilization without any inputs on their end. We were also able to showcase the spreadsheet to other health departments and hospitals by generating public parameters for offset and length of stay from different national public resources, like the Florida line-level COVID dataset<sup><a href="#FloridaLineLevelLink">4</a></sup>. Based on these users’ feedback, we started to use Cases2Beds as an input to hospital utilization forecasting models. Other inputs included current hospital bed utilization (from HHS Protect<sup><a href="#HHSLink">5</a></sup>), how long current patients are likely to continue to be hospitalized, and how many new cases there will be in the near future. A preliminary evaluation of such a method shows decent predictive power when parameters are <em>tailored to a location</em>.</p>
178179
<p>At the peak of bed utilization, hospital systems themselves increased their COVID beds utilization to <em>6x</em> more than in October 2020. Fortunately, in Allegheny County, we never reached a point where demand for beds exceeded a somewhat elastic supply. By early January, multiple organizations told us that the pandemic’s most acute problem had changed to vaccine distribution and the number of COVID-19 beds needed dropped. Cases2Beds continues to act as an early warning system if the number of cases rise quickly, but hopefully the worst is now over.</p>
179-
<pre class="r"><code>full_df &lt;- tibble(read.csv(file=&quot;../../public/blog/2021-03-10_c2b/uncensored_HHS.csv&quot;))
180+
<pre class="r"><code>full_df &lt;- tibble(read.csv(file=&quot;./c2b/uncensored_HHS.csv&quot;))
180181
full_df$dates &lt;- as.Date(full_df$dates, &quot;%m/%d/%y&quot;)
181182

182183
df2 &lt;- data.frame(Key=rep(c(&quot;7d-Avg COVID Adult Beds Used&quot;), each=nrow(full_df)),
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)