Added function "getAppointmentById(long id)"