Setup spout inside repository, added `studyid` variable