added joins to clinic statistics