I had a very similar thing happen once (I think a quote from my thread about it is still in somebody's signature...).
Rotting animals/peoples will cause miasma. Prepare for this. Butcher the infected animals, I don't know if they'll yield viable meat, but if not, that's what the refuse stockpile is for.
Now, the hospital IS equipped to deal with necrotized tissue, I'm fairly sure. When it's on the outer limbs, your doctors will excise it (surgery required). I'm not sure about internal organs, they may do surgery on that, but I can't say for sure. Prepare for a shit-tonne of miasma in your hospital. When this happened in my fort, I couldn't even see the doctors and patients because of the massive clouds of purple smoke. The impromptu miasma vents I dug did not help a lot, so don't bother.
Now, if only the feet are rotting, your dwarves stand a good chance of survival. They may become walking-impaired, but crutches work now, so hurray. If a lot of other stuff is rotting too, chances of survival get slimmer. I had one child in the last incident whose...well, everything that I could see was rotten. He died (ironically, he was the son of the chief medical dwarf...I felt very sad after that).
Hope you've got a fucktonne of suturing thread, doctors, cloth for wrapping the wounds, and nice things around the fortress to inspire happy thoughts, mate!