This dwarf seems to have run out of luck. But for the future, is there any way to put out a flaming dwarf? Maybe set up some sort of emergency dwarf shower?
You can make one fairly easily. I used showers to cool magma into obsidian and to evenly distribute the water to make my tower-cap farm.
To create an emergency "sprinkler" system you could place small amounts of water in pools and in the pools somewhere have hatches attached to a lever. Some drainage hatches on the floor itself after the fire is out would be adviseable as well. This could be important as dwarves dont pay any attention to fire. They will go to pick up a dead friend, even if they are on fire, thus setting themselves on fire.
I wouldn't put this sprinkler system on every floor, but just the one or two floors that are high risk for fires.