fixed appointment mailers, found bug in t5/b5 reports linked to presence of db data