remove comma(,) from the end of diagnosis list