exportFieldNames: Export the Export Field Names for a Project

Description Usage Arguments Value REDCap API Documentation REDCap Version Known REDCap Limitations Author(s) References

View source: R/exportFieldNames.R

Description

Retrieve a data frame giving the original (as defined in REDCap) field name, choice values (for checkboxes), and the export field name.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
exportFieldNames(
  rcon,
  ...,
  error_handling = getOption("redcap_error_handling")
)

## S3 method for class 'redcapDbConnection'
exportFieldNames(
  rcon,
  fields = NULL,
  bundle = NULL,
  ...,
  error_handling = getOption("redcap_error_handling")
)

## S3 method for class 'redcapApiConnection'
exportFieldNames(
  rcon,
  fields = NULL,
  bundle = NULL,
  ...,
  error_handling = getOption("redcap_error_handling")
)

Arguments

rcon

A REDCap connection object as generated by redcapConnection.

...

Arguments to be passed to other methods.

error_handling

An option for how to handle errors returned by the API. see redcap_error

fields

Field name to be returned. If NULL, all fields are returned.

bundle

A redcapProject object as created by redcapProjectInfo.

Value

A data frame containing three fields:

REDCap API Documentation

This function returns a list of the export/import-specific version of field names for all fields (or for one field, if desired) in a project. This is mostly used for checkbox fields because during data exports and data imports, checkbox fields have a different variable name used than the exact one defined for them in the Online Designer and Data Dictionary, in which *each checkbox option* gets represented as its own export field name in the following format: field_name + triple underscore + converted coded value for the choice. For non-checkbox fields, the export field name will be exactly the same as the original field name. Note: The following field types will be automatically removed from the list returned by this method since they cannot be utilized during the data import process: "calc", "file", and "descriptive".

The list that is returned will contain the three following attributes for each field/choice: "original_field_name", "choice_value", and "export_field_name". The choice_value attribute represents the raw coded value for a checkbox choice. For non-checkbox fields, the choice_value attribute will always be blank/empty. The export_field_name attribute represents the export/import-specific version of that field name.

REDCap Version

6.5.0+ (perhaps earlier; need to confirm its introduction)

Known REDCap Limitations

In 6.5.0, it has been observed that "slider" fields are not returned.

Signature fields are also not included, but these are effectively the same as "file" fields. This isn't a true limitation, but is documented here just to avoid confusion.

Author(s)

Stephen Lane

References

Please refer to your institution's API documentation (https://YOUR_REDCAP_URL/redcap/api/help)

Additional details on API parameters are found on the package wiki at https://github.com/nutterb/redcapAPI/wiki/REDCap-API-Parameters


redcapAPI documentation built on Feb. 18, 2020, 1:09 a.m.