The medical specialty that is concerned with contagious disease is epidemiology.