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 annual 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") %>%
rename(year = YEAR,
Population = TOT_POP) %>%
filter(MONTH %in% c(1)) %>%
select(-MONTH)
nis <- read.csv('nis_2002_2014_annualstats_bymonth.csv')
nis_discharges <- nis %>%
filter(VarName == "DIED"|
VarName == "discharges")%>%
mutate(Status= as.factor(if_else(VarName == "DIED", "dead",
if_else(VarName == "discharges", "any", NA_character_))))%>%
select(-VarName, -StdDev)
nis_discharges2 <- pivot_wider(nis_discharges, names_from = Status, values_from = 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=="arf51851","518.51",
if_else(ICD=="arf51852","518.52",
if_else(ICD=="arf51853","518.53",
if_else(ICD=="arf51881","518.81",
if_else(ICD=="arf51882","518.82",
if_else(ICD=="arf51883","518.83",
if_else(ICD=="arf51884","518.84",
if_else(ICD=="arf","All",NA_character_)))))))))),
Codes, Codes = if_else(Codes=="dx","Diagnosis only",
if_else(Codes=="dxpx","Diagnosis & Procedure",
if_else(Codes=="px","Procedure only",NA_character_))),
Status,
Status = if_else(is.na(Status), "any", Status),
Codes = as.factor(Codes),
Status = as.factor(Status))
nis.arf <- nis.arf %>%
filter(ICD != "518.51" &
ICD != "518.52" &
ICD != "518.53"
)
nis.arf <- left_join(nis.arf, census, by = c("year"))
nis.arf <- nis.arf %>%
mutate(incidence = round(100000*Sum/Population, digits = 1))
nis.arf_any <- filter(nis.arf, Status == "any")
nis.arf_cfr <- nis.arf %>%
select(-Population, -incidence, -StdDev)
nis.arf_cfr <- nis.arf_cfr %>%
pivot_wider(id_cols = c(ICD, Codes, year), names_from = Status, values_from = Sum) %>%
group_by(ICD, Codes)%>%
mutate(Mortality = round(100*dead/any, digits = 2))
nis.arf0 <- nis.arf %>%
filter(ICD=="All")
nis.arf0_cfr <- nis.arf_cfr %>%
filter(ICD=="All")
Before examining epidemiology of respiratory failure we will briefly examine of all hospital discharges.
Summary Annual linear trends in:
number of discharges =-6.967737110^{4}
Here we graphically examine annual statistics of respiratory failure, looking at each code separately with or without an accompanying procedural code for mechanical ventilation.
ICD | Codes | Est |
---|---|---|
518.5 | Diagnosis & Procedure | 3407.4 |
518.5 | Diagnosis only | 7616.7 |
518.81 | Diagnosis & Procedure | 19753.1 |
518.81 | Diagnosis only | 72081.4 |
518.82 | Diagnosis & Procedure | -948.0 |
518.82 | Diagnosis only | 536.6 |
518.83 | Diagnosis & Procedure | 1309.0 |
518.83 | Diagnosis only | 18910.3 |
518.84 | Diagnosis & Procedure | 9012.5 |
518.84 | Diagnosis only | 43590.6 |
All | Diagnosis & Procedure | 33016.6 |
All | Diagnosis only | 143156.4 |
All | Procedure only | 22376.0 |
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 year. 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 year 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.
ICD | Codes | Est |
---|---|---|
518.5 | Diagnosis & Procedure | -0.7 |
518.5 | Diagnosis only | -0.8 |
518.81 | Diagnosis & Procedure | -0.3 |
518.81 | Diagnosis only | -1.0 |
518.82 | Diagnosis & Procedure | -0.6 |
518.82 | Diagnosis only | -1.0 |
518.83 | Diagnosis & Procedure | -0.5 |
518.83 | Diagnosis only | -0.5 |
518.84 | Diagnosis & Procedure | -0.3 |
518.84 | Diagnosis only | -0.6 |
All | Diagnosis & Procedure | -0.5 |
All | Diagnosis only | -1.1 |
All | Procedure only | -0.4 |
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 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.