Metodo upsert appointment.