Are medical expenses deductible in the year the services were rendered or when the bill is paid?

For example:  Immunizations were given in December 2015 but paid for in January 2016.