I'm using R to query from a redcap project. My code looks like this:
token <- "123456789123456789"
url <- "https://redcap.hospitalname.org/redcap/api/"
dataFromRedcap<-redcap_read(redcap_uri = url,token = token, export_survey_fields = TRUE)
data<-dataFromRedcap$data
Now, I use similar code practically everyday and it works fine. For one particular project, the query keeps failing though.
The record status dashboard looks like this, and I suspect the fact that the record_id column is text names instead of "1","2","3", etc... is probably causing the issue. It says "Personnel Name" there, but in the codebook that is the "record_id" variable.
I've tested my theory by attempting to query other projects designed similarly (record_id is character) and it'll fail, while working on "normal" projects.
Now, first and foremost, I'm not sure why they coded the record_id's that way, I never would have done it, but it is what it is.
Is there a way for redcap_read to still pull the records?