Added ajax function for appointment setup