The most common ailment of visitors in the city is upset stomach or diarrhea. You should plan on bringing some antacids, a stomach soother and a medication for diarrhea. The public drinking water in the city has a lot of chlorine. Drink only bottled water. While you will be safe from malaria in the city, in Brazil malaria is restricted to the region of the Amazon Forest (really far from the southeast region of the country). Outside this region the risk of contracting the disease is very small or nonexistent. Dengue fever has occurred sporadically in Rio, mainly during summer time. In recent years the government has made great campaign which has minimized the number of cases. This is transmitted through mosquitoes so bring a good mosquito repellent. Be sure to eat well-cooked meat and wash your fruit thoroughly or do not eat the skin.
There are pharmacies at practically every corner. Many do stay open 24 hours a day. In the Copacabana, Ipanema and Leblon neighborhood the major pharmacies Drogaria Pacheco and Drogaria Raia have several locations.
There are two major hospitals in the city. Hospital Ipanema is located on Rua Antonio Parreiras in Ipanema and Miguel Couto Hospital is on Av Bartolomeu Mitre in Gávea, both public hospitals and normally very full. There are execellent private hospitals such as the CopaD’Or in Copacabana,Samaritano Hospital in Botafogo and Casa de Saúde São José in the neighborhood of Humaita. For medical services outside a hospital try the Galdino Campos Clinic on Av. Nossa Senhora in Copacabana. Travelers insurance is accepted in most places. If you plan on using you own health insurance, find out from your provider what you will have to do before you travel in case of a health-related issue.
Staying safe and healthy in Rio just takes some good common sense. Stay out of unsafe areas and take note of what you eat and drink. Come prepared for minor ailments and visit your doctor before you leave to get any required medications or vaccinations.