Mechanical ventilation is a limited and labor-intensive resource, requiring a team of physicians, nurses, and respiratory therapists working together to effectively manage the patients requiring these resources. Bed management and staffing models are complicated for several reasons. One, mechanical ventilation is generally restricted to intensive care units with small, fixed numbers of beds relative to the hospital. Second, each type of provider (MD, RN, RT) has a different provider-to-patient ratio to be safe and effective. Third, there are likely seasonal variations in the incidence of acute respiratory failure and a resultant fluctuation in the utilization of mechanical ventilation. The magnitude of this variation throughout a year likely varies based on hospital geography, hospital urban/rural designation, hospital teaching status, hospital size, and the given years severity of influenza. Understanding hospital-level seasonal variation in case volume of acute respiratory failure may help in healthcare systems planning and resource allocation and anticipate needs for surge capacity for influenza pandemics.
General question:
What is the seasonal variation of acute respiratory failure hospital case volume?
Study Aims:
Describe the trends in average quarterly hospital case volume of acute respiratory failure per year in the United States from 2002 to 2014 in the HCUP NIS.
Data Overview
“NIS is the largest publicly available all-payer inpatient health care database in the United States, yielding national estimates of hospital inpatient stays. Unweighted, it contains data from more than 7 million hospital stays each year from ~1,000 hospitals. Weighted, it estimates more than 35 million hospitalizations nationally”
The following ICD-9-CM diagnostic codes will be used to construct a respiratory failure case definitions:
Furthermore, each definition includes one version with only the diagnostic code(s) and one version with any of the ICD-9- CM procedure codes:
Initial data management was performed using SAS 9.4 SURVEY family of procedures accounting for the complex survey design. Statistics were output to CSV files for use within R. Further data management for graphical presentation and within year statistics were performed in R
To view SAS code use the following link (can be added later).
To view R code select the button to the right.
census <- read.csv("USCensusEst_2000_2017.csv")
census <- census %>%
rename(Year = YEAR,
Population = TOT_POP) %>%
filter(MONTH %in% c(1,4,7,10))%>%
mutate(Quarter = if_else(MONTH == 1, paste0(Year, ".1"),
ifelse(MONTH == 4, paste0(Year, ".2"),
ifelse(MONTH == 7, paste0(Year, ".3"),
ifelse(MONTH == 10, paste0(Year, ".4"),
NA_character_)))))%>%
select(Quarter, Population)
nis <- read.csv('nis_2002_2014_quarterstats.csv')
nis_discharges <- nis %>%
filter(VarName == "DIED"|
VarName == "discharges")%>%
mutate(Quarter= paste0(year, ".",DQTR),
Status= as.factor(if_else(VarName == "DIED", "dead",
if_else(VarName == "discharges", "any", NA_character_))))%>%
select(-DQTR, -VarName)
nis_discharges_sd <-nis_discharges %>%
group_by(year)%>%
summarise(SD = as.integer(sd(Sum)),
normal.SD = SD/mean(Sum),
max = max(Sum),
min = min(Sum),
mean = mean(Sum),
abs_difference = max(Sum)-min(Sum),
rel_difference = round(100*abs_difference/min(Sum), digits = 1))
nis_discharges2 <- spread(nis_discharges, Status, Sum)
nis_discharges2 <- nis_discharges2 %>%
mutate(Mortality = round(100*dead/any, digits = 2),
group="all")
nis.arf <- nis %>%
filter(
VarName != "discharges" &
VarName !="DIED")%>%
separate(col = VarName,
into = c("ICD","Codes","Status"),
sep = "_",
remove = T,
fill = "right") %>%
mutate(ICD, ICD = if_else(ICD=="arf0","All",
if_else(ICD=="arf5185","518.5",
if_else(ICD=="arf51881","518.81",
if_else(ICD=="arf51882","518.82",
if_else(ICD=="arf51883","518.83",
if_else(ICD=="arf51884","518.84",NA_character_)))))),
Codes, Codes = if_else(Codes=="dx","Diagnostic only",
if_else(Codes=="dxpx","With 96.7x ", NA_character_)),
Status,
Status = if_else(is.na(Status), "any", Status),
Quarter= paste0(year, ".",DQTR),
Codes = as.factor(Codes),
Status = as.factor(Status))
nis.arf <- left_join(nis.arf, census, by = c("Quarter"))
nis.arf <- nis.arf %>%
mutate(incidence = round(100000*Sum/Population, digits = 1))
nis.arf_any <- filter(nis.arf, Status == "any")
nis.arf_sd <- nis.arf_any %>%
filter(Quarter != "2011.4" | ICD != "518.5")%>%
group_by(year, ICD, Codes)%>%
summarise(SD = as.integer(sd(Sum)),
normal.SD = SD/mean(Sum),
max = max(Sum),
min = min(Sum),
mean = mean(Sum),
abs_difference = max(Sum)-min(Sum),
rel_difference = round(100*abs_difference/min(Sum), digits = 1))
nis.arf_cfr <- nis.arf %>%
select(-DQTR, -Population, -incidence)
nis.arf_cfr <- nis.arf_cfr %>%
spread(Status, Sum) %>%
group_by(Quarter, ICD, Codes)%>%
mutate(Mortality = round(100*dead/any, digits = 2))
nis.arf0_2002_2014 <- nis.arf %>%
filter(ICD=="All")
nis.arf0_2002_2014_sd <- nis.arf0_2002_2014 %>%
filter(Status == "any")%>%
group_by(year, Codes)%>%
summarise(SD = as.integer(sd(Sum)),
normal.SD = SD/mean(Sum),
max = max(Sum),
min = min(Sum),
mean = mean(Sum),
abs_difference = max(Sum)-min(Sum),
rel_difference = round(100*abs_difference/min(Sum), digits = 1))
nis.arf0_2002_2014_cfr <- nis.arf0_2002_2014 %>%
select(-DQTR,-Population, -incidence)
nis.arf0_2002_2014_cfr <- nis.arf0_2002_2014_cfr %>%
spread(Status, Sum) %>%
group_by(Quarter, Codes)%>%
mutate(Mortality = round(100*dead/any, digits = 2))
Before examining epidemiology of respiratory failure we will briefly examine of all hospital discharges.
Summary Annual linear trends in:
number of discharges =-1.80846710^{4}
Over the time period, discharges appear to have peaked in first quarter of 2008, with a general decline since then despite the quarterly fluctuations. Within-year fluctuations appear to have their peaks at the first quarter. The differences in number of discharges from maximum to minimum quarter within a year, relative to the minimum quarter, is large. There is from approximately 4700% to 5800% increase in discharges from minimum to maximum quarters within the years.Hospital mortality appears to have a consistent annual variation, with peaks also in the first quarters. While the range appears small (within 0.3-0.4% within each year) this translates to large numbers of deaths when considering that both admissions and mortality are increased during same period of the year.
Here we graphically examine quarterly statistics of respiratory failure, looking at each code separately with or without an accompanying procedural code for mechanical ventilation.
ICD | Codes | Est |
---|---|---|
518.5 | Diagnostic only | 990.3 |
518.5 | With 96.7x | 388.8 |
518.81 | Diagnostic only | 17961.2 |
518.81 | With 96.7x | 4900.0 |
518.82 | Diagnostic only | 131.1 |
518.82 | With 96.7x | -237.7 |
518.83 | Diagnostic only | 4722.9 |
518.83 | With 96.7x | 325.5 |
518.84 | Diagnostic only | 10890.2 |
518.84 | With 96.7x | 2250.4 |
All | Diagnostic only | 31177.3 |
All | With 96.7x | 5886.4 |
Summary
Globally, for most respiratory failure diagnostic codes there are long-range annual increases in discharges. The single outlier that showed annualized decline is the case definition of 518.82 that includes procedural codes for mechanical ventilation. Another observation is that case definitions with both diagnostic codes and procedural codes for mechanical ventilation are have fewer and with subsequent lower magnitude of change.
Annual fluctuations are pronounced and with peaks in first quarter. Above we see that the 518.81 (“Acute respiratory failure”) is the most frequent code throughout the entire period. In regards to other codes, the second most frequent code is 518.84 (Acute and Chronic Respiratory Failure), starting around 2009. The 518.5 (“Pulmonary insufficiency following trauma and surgery”) falls off at the 4the quarter of 2011. This is an artifact of coding that I should be able to fix since that is the time when 518.5 was split in 4 different sub-codes.
Summary Above are 4 different methods of looking at the within-year spread of hospital discharge volume for respiratory failure. I will focus on the fourth, i.e. the difference between the maximum and minimum quarter with the year relative to the minimum. While this is not a standard measure I think it conveys practical information for a health system planning how much surge to anticipate between high and low seasons. Overall changes in annual fluctuation appear stable other than for 518.82 (Other Pulmonary Insufficiency NOS, often used for ARDS). Otherwise, within-year variations from maximum to minimum quarter are generally larger for diagnostic codes than for diagnostic codes plus a code for mechanical ventilation. Annual variation is about 10-30% for most codes. Notably, there is 5-10% variation within 518.5, Acute Respiratory Failure following trauma or surgery.
ICD | Codes | Est |
---|---|---|
518.5 | Diagnostic only | -1.0 |
518.5 | With 96.7x | -0.8 |
518.81 | Diagnostic only | -1.0 |
518.81 | With 96.7x | -0.3 |
518.82 | Diagnostic only | -1.0 |
518.82 | With 96.7x | -0.6 |
518.83 | Diagnostic only | -0.5 |
518.83 | With 96.7x | -0.5 |
518.84 | Diagnostic only | -0.6 |
518.84 | With 96.7x | -0.3 |
All | Diagnostic only | -1.0 |
All | With 96.7x | -0.3 |
Summary
Above there are two graphs that contain the exact same data but are ‘faceted’ in a different way. One clusters the diagnostic codes together and the diagnostic + procedural codes together. The second one clusters the diagnostic code with its accompanying diagnostic + procedural code pairing. These give two ways of visualizing complex data to potentially see patterns. The graphs and corresponding table demonstrates that the case-fatality rate is decreasing for all case definitions of respiratory failure. The rate of decrease is more pronounced in diagnostic codes than in diagnostic codes paired with procedural codes, with the exception of 518.83 (Chronic respiratory failure)
Here we simplify the analyses, only utilizing the case 2 case definitions that group together all diagnostic codes for respiratory failure. The two remaining case definitions respond to with or without procedural codes for mechanical ventilation. These case definitions were included in the above graphical analyses but now as we add more variables it would become difficult to discern patterns. Furthemore, these inclusive definitions generally seemed representative of the trends in the singular definitions.
Summary
The above graphs repeat data from above, just singling out our selected case definitions. Pulling from the data table above, the number of disharges with any diagnostic code is increasing at about 31,000 more discharges a year while the number of discharges with any diagnostic code ofr respiratory failure that also include a procedural code for mechanical ventilation is increasing at about 5,900 more discharges per year.
Summary I again present 4 ways of demonstrating within year variation but will focus this short text on the fourth. This represents the difference between the maximum and mimumn discharges within a year relative to that year’s minimum. The percent changes are similar for the two case definitions within each year. The average change within a year is 17.5066667%. I would interpet this that on average the nation can expect a 17% increase in diagnoses of respiratory failure from the lowest quarter of summer to the highest quarter of winter. This means different things for diagnoses only and diagnoses + procedural codes, since the diagnoses only codes continue to increase at a more pronounced magnitude. In number of discharges, for diagnostic codes this meant a different of 45,000 more discharges in 2002 and 124,000 more winter discharges in 2013 across the nation. For cases including procedural codes, this meant a difference of 22,000 more winter discharge in 2002 and 43,000 more winter discharges in 2011.
Summary This is again repeat of the data above but focusing on only 2 case definitions. This magnificaiton of the axes highlights the difference in the rates of changes of the two case definitions and the periodicity.
Below, we now examine whether there are differences in these summary statistics when stratified by another hospital characteristic variable. From the HCUP NIS dataset we use the limited number of hsopital characteristic variables available.
Summary ABove shows exactly what one might expect, larger hospitals have larger numbers of discharges.
Codes | bedsize | Est |
---|---|---|
Diagnostic only | Large | 17.5 |
Diagnostic only | Medium | 20.7 |
Diagnostic only | Small | 23.5 |
With 96.7x | Large | 15.3 |
With 96.7x | Medium | 18.6 |
With 96.7x | Small | 20.2 |
Summary Here I observe what I find to be a surprising finding that the smaller hospitals on average see more annual fluctation in their cases of respiratory failure.
Codes | Type | Est |
---|---|---|
Diagnostic only | Rural | 29.4 |
Diagnostic only | Urban nonteaching | 21.5 |
Diagnostic only | Urban teaching | 14.8 |
With 96.7x | Rural | 26.0 |
With 96.7x | Urban nonteaching | 19.3 |
With 96.7x | Urban teaching | 13.3 |
Summary Again, here I see the opposite of what I was expecting in the sense the rural hospitals demonstrate the most within-year change.
Codes | Organization | Est |
---|---|---|
Diagnostic only | Government, nonfederal | 18.8 |
Diagnostic only | Private, invest-own | 23.9 |
Diagnostic only | Private, not-profit | 18.0 |
With 96.7x | Government, nonfederal | 16.3 |
With 96.7x | Private, invest-own | 20.4 |
With 96.7x | Private, not-profit | 15.9 |
Summary The private, investor owned hospitals demosntrate the most within-year variation. This is interesting when compared with the above results. Here, private, investor-owned the hsopitals that have the most numbers of discharges collectively and the most variation. Whereas, small hospitals and rural hospitals represented the hospitals with fewest number of discharges nationally but most amount of within year variation.
Codes | Region | Est |
---|---|---|
Diagnostic only | Midwest | 16.7 |
Diagnostic only | Northeast | 15.9 |
Diagnostic only | South | 20.9 |
Diagnostic only | West | 21.2 |
With 96.7x | Midwest | 13.8 |
With 96.7x | Northeast | 14.4 |
With 96.7x | South | 18.6 |
With 96.7x | West | 18.2 |
Summary The South Region represents the most number of discharges with respiratory failure. The South and West Regions have higher within variation.
This data only includes 2012 to 2014.