Minimizing the COVID-19 spread in hospitals through optimization of ventilation systems