Take "miasma" and give it the random properties of an "evil fog". Make sure bodies will rot and have miasma regardless if they are underground or up top, if the random effect creates undead zombies, so be it. There's a reason "cleanliness is next to godliness"
Good, but if the miasma-like dispersal pattern only takes effect
after death, that's a pretty small window of communication. I say any infected dwarf should be contagious 24/7 (after the disease is past its dormancy stage, that is), and the miasma method is excellent for modelling airborne contagions. Some should instead be waterborne [bathing at a well could contaminate the well for a while], some could require direct skin contact [assume chatting with friends would involve
some such contact, while interactions between spouses would involve much more], infected Cooks & Butchers could contaminate the products of their labor, and some diseases could be passed with
other animals [pets, livestock, fish, parasitic insects] as an intermediary vector.
To mimic RL diseases, most (all?) should affect only
some creatures, leaving others completely untouched. Foot-and-mouth disease can be devastating to most mammalian livestock, but birds are immune, and humans almost-completely so.