nutterb/redcap — pull request #1 by nutterb (2013-07-26 19:06:09+00:00)
Title: Update exportRecords.R

This is a great package and looks like it will be very useful for me and my team. As I was working with it, I came across one issue. Your exportRecords functions assume that the REDCap database has a 'study_id' field. However, it is possible in REDCap to change the name of this field. For example, in the database I am experimenting with, the field has been renamed to 'mrn'. As a result, I could not pull select fields unless I removed 'study_id' as a default field.

I do like the idea of always pulling the id variable, but there ought to be flexibility in what this field is. I would recommend either not forcing 'study_id' to be pulled, or to add an additional argument, id = 'study_id' At least this way I could change what my id variable is.