In epidemiology, azithromycin is used both as a treatment and as a prophylactic measure. For example, it is a first-line treatment for community-acquired pneumonia and is also used in mass drug administration (MDA) programs to control outbreaks of diseases like trachoma and yaws.