Adds a study visit variable to the dataset