The medical specialty that is concerned with epidemics is epidemiology.