%%capture
%%R
<- redcap_instruments(
instruments = url,
redcap_uri = token,
token = TRUE,
verbose = NULL
config_options )$data
13 Forms/Instruments
13.1 Instrument Names and Labels
You can export a list of instrument names and their corresponding instrument labels.
redcap_instruments()
export_instruments()
= "df") project.export_instruments(format_type
instrument_name | instrument_label | |
---|---|---|
0 | demographics | Demographics |
1 | symptoms | Symptoms |
2 | test_information | Test Information |
3 | close_contacts | Close Contacts |
4 | work_information | Work Information |
Note: Use the value under instrument_name
(not instrument_label
) when specifying specific instruments as arguments in the REDCapR and PyCap API functions.
13.2 Download PDF of Instruments
These functions will download the instrument specified and all of the fields as a cleanly formatted questionnaire pdf file.
redcap_instrument_download()
%%capture
%%R
redcap_instrument_download(= "symptoms",
instrument = "./files/instruments/",
directory = "symptoms_instrument.pdf",
file_name = url,
redcap_uri = TRUE,
overwrite = token
token )
export_pdf()
= project.export_pdf(instrument = 'close_contacts')
close_contact with open("files/instruments/close_contacts.pdf","wb") as binary_file:
0]) binary_file.write(close_contact[
from IPython.display import IFrame
"files/instruments/close_contacts.pdf", width=750, height=500) IFrame(