Uses information from the project and a record to link to the form on which a data element is recorded. This is intended to be used within the report of invalid results when exporting or importing records. It should be noted that when importing records, the records may not yet exist and the links may not work.
constructLinkToRedcapForm(rcon, form_name, record_id, event_id = NULL, ...)# S3 method for redcapApiConnection
constructLinkToRedcapForm(rcon, form_name, record_id, event_id = NULL, ...)
# S3 method for redcapOfflineConnection
constructLinkToRedcapForm(rcon, form_name, record_id, event_id = NULL, ...)
Returns a character vector the same length of form_name
.
A redcapConnection
object.
character
. The name of the form on which the field
name exists.
character
. The ID of the record being linked to.
If passed as a numeric value, it will be coerced to character.
Must have the same length as form_name
.
character
or NULL
. For classical projects, use either
NULL
or NA
(NA
support is permitted to assist with vectorization).
For longitudinal projects, the ID of the unique event. If passed
as a numeric value, it will be coerced to character.
Arguments to pass to other methods
Constructing a link to a REDCap form requires knowledge of the following:
The REDCap instance url (usually 'redcap.institution.domain').
The REDCap instance version number.
The REDCap project ID number
The record ID
The form name
The event ID number (if the project is longitudinal).
If any of these items in unknown, a missing value will be returned. For
redcapOfflineConnection
s, the user will need to provide the version
number, the project information, and the events (if the project
is longitudinal) as part of the call to offlineConnection
. Note that
the REDCap User Interface does not include the event ID number with the
file download for events.