Completed insertAppointment() method