bug fixed for viewAppointment