Skip to contents

Generates a REDCap-compatible data dictionary for the Hierarchical Taxonomy of Psychopathology - Self-Report (HiTOP-SR) and packages it into an Instrument ZIP file for easy uploading.

Usage

generate_redcap_hitopsr(
  file = "hitopsr_redcap.zip",
  form_name = "hitopsr_questionnaire",
  required = TRUE,
  breaks = 15,
  subset = NULL
)

Arguments

file

Character string. The destination path for the output ZIP file. Defaults to "hitopsr_redcap.zip".

form_name

Character string. The internal name of the form in REDCap. Defaults to "hitopsr_questionnaire".

required

Logical. Whether the items should be marked as required. Defaults to TRUE.

breaks

Integer or NULL. The number of items to display before inserting a page break. Set to 0 or NULL to disable pagination entirely. Defaults to 15.

subset

An optional hitop_subset() object restricting the instrument to the items of the chosen scales, keeping their original HiTOP-SR item numbers. (default = NULL)

Value

Invisibly returns the path to the created file (file).

See also

Step-by-step import instructions for Qualtrics and REDCap: https://jmgirard.github.io/hitop/articles/import-instructions.html

Examples

# Write a HiTOP-SR REDCap instrument ZIP to a temporary location
generate_redcap_hitopsr(file = tempfile(fileext = ".zip"))
#>  Instrument successfully zipped to /tmp/RtmpuFQlRn/file1b411b21a9d8.zip

# A two-scale subset, original numbering preserved
generate_redcap_hitopsr(
  file = tempfile(fileext = ".zip"),
  subset = hitop_subset("hitopsr", c("Agoraphobia", "Appetite Loss"))
)
#>  Instrument successfully zipped to /tmp/RtmpuFQlRn/file1b417837f6b3.zip