Posto de Saude (medical posts) will be set up in various locations on both carnival circuits. You can go to any of these for medical issues you may have. For anything from an upset stomach to a broken arm, they’ll be able to help you. For those more serious and beyond their capacities, they’ll refer you to the appropriate medical provider.
Traveler’s Diarrhea - For those who are just arriving, this is the health issue you are most likely to encounter. By my informal estimate, only 5% of travelers are affected by this, if that. There’s not much one can do to avoid it, so why worry. The simple fact is, if you are just getting to Brazil, it’s not just a new language and a new culture you’ll encounter, your body also is going to have to deal with bacteria it's never dealt with before. And sometimes it takes a while to get acquainted. This is entirely normal and within a couple of days the problem will resolve itself. However, if your stomach is giving you problems and you want to hit the streets and party, go to a pharmacy and buy Imosec (Imodium) over the counter, which should hold you for a while.
The Carnival Cold: By the end of carnival, just about everyone has some kind of cold. It’s just what happens to the immune system when you crowd millions of people together, let them drink copiously, deprive them of sleep, and inspire them to trade kisses with as many willing partners as they can find. What can you do to prevent it? Not much. I always buy Vitamin C dissoluble tablets (ENERGIL C is a nice choice) at the pharmacy and take it religiously during carnival both when I wake up in the morning and before I go to bed, but I could probably just as well pray and get the same result…a cold!