Modified refAppointment to extend AppointmentTemplate