Economic impact of epidemics and pandemics