adds appointment ajax functionality