-
Notifications
You must be signed in to change notification settings - Fork 86
redcap export file
Jonathan Chan edited this page Aug 17, 2018
·
7 revisions
redcap-export-file
exports a file from a REDCap project.
Note: The response is either a string, in case errors are encountered, or a list with the header in the first field and the u8vector data in the second field. The filename can be retrieved from the header using (redcap-get-filename).
Parameter | Description |
---|---|
host | Server hostname |
token | Authentication token (project and user specific!) |
record | Primary id of record |
field | Field variable name for which the file to be downloaded |
xargs | Optional parameters; see below |
Optional parameters must come in pairs of 'symbol "string"
.
Optional Parameter | Description |
---|---|
'event "[event]" | Downloads from the record with the given event in longitudinal projects. |
'repeat "[repeat]" | Downloads from the record with the given instance number in projects with repeatable events. |
Example 1: Export a file from a project, filed under the field file2
, which exists in study 1 but not study 4.
> (define redcap:token "54CC....CC10")
> (define redcap:hostname "redcap.INSTITUTIONNAME.ca")
> (let ((fileout (redcap-export-file redcap:hostname redcap:token "4" "file2")))
(if (string? fileout) (display fileout))
(if (list? fileout) (display (u8vector->string (cadr fileout)))))
There is no file to download for this record
> (let ((fileout (redcap-export-file redcap:hostname redcap:token "1" "file2")))
(if (string? fileout) (display fileout))
(if (list? fileout) (display (u8vector->string (cadr fileout)))))
"Name","Color","Number"
"Sven","red",3
"Tom","green",44
-
- accelerometer
- alist
- audio
- audioaux
- base64
- btle-scan
- camera
- cdb
- cgi
- config
- csv
- curl
- digest
- dmtx
- download
- eventloop
- fcgi
- fft
- generalized-arrays
- gps
- graph
- gyro
- hidapi
- hpdf
- html
- httpsclient
- hybridapp
- json
- lmdb
- ln_core
- ln_glcore
- ln_glgui
- ln_store
- localization
- localization_gui
- localnotification
- magnetometer
- mdns
- mqtt
- mqtt-store
- multitouch
- oauth
- orientation
- p256ecdsa
- png
- portaudio
- pregexp
- pressure
- prime
- pushnotification
- redcap
- rsa
- rtaudio
- rupi
- rotation
- sanestring
- scheduler
- serial
- sets
- settings
- simplexnoise
- sqlite
- ssax
- syntax-case
- timestamp
- ttf
- uiform
- url
- uuid
- vibrate
- videoplayer
- watchdog
- website
- xml
- zip