REDCap Variable Naming Standards

REDCap Variable Naming

It is recommended that variable naming in projects created on the Brain-CODE REDCap instance follow the convention below. A section of a variable can be omitted if it is not applicable, for example, if a form does not have multiple sections or questions then the variables do not need to be numbered.

Due to the limitations of some statistics programs not being able to handle variables longer than 26 characters, all of the variable components below are typically shortened words. Words can be shortened by using the first part of the word, removing vowels, or substituting words with acronyms. Use your own discretion to best maintain the word’s meaning while keeping the variable names at a reasonable length. If a specific short form is used for a word when naming your variables, it is recommended to use the same short form or acronym in all future variable naming within the form and/or project.

Form_Section_Question_Number_Desc

Form

Part of the variable used to designate which instrument/form a variable is on.

demog_

Demographics

mh_

Medical History

sf_

Self-Reported Questionnaire

 

 

Section

Part of the variable used to designate which section a variable is in. This part is applicable if a form has multiple sections.

sf_conmed_

Concomitant medications on a self-reported questionnaire

cg_seprof_

Drug side effect profile questions on a caregiver-reported questionnaire

 

 

Question

Part of the variable used to designate the question itself. This can be multiple parts if there are multiple parts to a question (i.e a sub-section). This part is applicable if questions are not numbered or if you want to have the variables be more representative of the question text.

demog_date

Date the demographics form was completed

sf_mh_cndtn_text_

Medical History item number 2/10 on a self-reported questionnaire

 

 

Number

Part of the variable used to designate the question number or item number; it should contain enough preceding zeroes to keep the variables’ lengths the same throughout the form. This part is applicable if a questionnaire has question numbers or if creating a log where multiple sets of the same variables are needed.

cg_mh_cndtn_text_002

Medical History condition 2/10 on a caregiver-reported questionnaire

gad_005

Question 5 on the GAD-7

 

 

Desc

Part of the variable used to designate if the variable is a Descriptive Text field. Typically, these variables will be named the same as the question variable they are associated with, with this suffix added.

sf_psqi_001_desc

Question text for PSQI Q1 on a self-reported questionnaire

gad_desc

Questionnaire instructions for the GAD-7

Option Coding

To ensure consistent coding of common options across Brain-CODE, some standard coding options were created. These should be followed unless there is a valid reason for an exemption. This coding should still be used if there are options that are similar but not the exact same, for example, “Do not know” and “Unknown”.

Coding

Field Option Label

1

Yes

0

No

9996

Other

9997

N/A

9998

Prefer not to answer

9999

Unknown