render_redcap_instrument function

Render REDCap Instrument

Render REDCap Instrument

This function will select the appropriate shiny widget translation function based on the provided parameters. Used to loop over REDCap project information to create an entire data collection instrument which may consist of multiple questions/question types.

render_redcap_instrument( shinyREDCap_type, id, field_label, required, choices, current_subject_data = NULL, ... )

Arguments

  • shinyREDCap_type: A string indicating a supported shinyREDCap question type. Valid options include: "shinyREDCap_text", "shinyREDCap_date", "shinyREDCap_dropdown", "shinyREDCap_truefalse", "shinyREDCap_yesno", "shinyREDCap_radio", "shinyREDCap_checkbox", "shinyREDCap_notes", "shinyREDCap_integer"
  • id: A string, containing a globally unique REDCap question identifier. Used to create a valid Shiny inputID.
  • field_label: A string containing the question being asked. May contain html formatting.
  • required: A string, "yes" or "no". Is this a required REDCap question type?
  • choices: REDCap choices for the question.
  • current_subject_data: Previously saved REDCap data on the current subject.
  • ...: Any additional parameters to pass to shiny widget inputs.

Returns

A shiny input widget for the UI

  • Maintainer: David Mayer
  • License: BSD_3_clause + file LICENSE
  • Last published: 2023-09-01