In contrast to these ad hoc policies, we develop a linear programming framework to optimally schedule elective procedures and allocate hospital beds among all planned and emergency patients to minimize years of life lost. In response to unprecedented surges in the demand for hospital care during the SARS-CoV-2 pandemic, health systems have prioritized patients with COVID-19 to life-saving hospital care to the detriment of other patients.