redcap export ids - part-cw/lambdanative GitHub Wiki

(redcap-export-ids host token . xargs)

redcap-export-ids exports all primary ids for a given project from REDCap.

Parameter Description
host Server hostname
token Authentication token (project and user specific!)
xargs Optional parameters; see below

Optional parameters must come in pairs of 'symbol "string".

Optional Parameter Description
'event "[event]" Gets primary ids of studies for which there exists a record for the given event in longitudinal projects.

Examples

Example 1: Exporting all primary ids of a project.

> (define redcap:token "54CC....CC10")
> (define redcap:hostname "redcap.INSTITUTIONNAME.ca")
> (redcap-export-ids redcap:hostname redcap:token)
("1" "2" "4" "4")

Example 2: Exporting the primary ids of a project with records for event event_a_arm_1.

> (define redcap:token "54CC....CC10")
> (define redcap:hostname "redcap.INSTITUTIONNAME.ca")
> (redcap-export-ids redcap:hostname redcap:token 'event "event_a_arm_1")
("1" "2")