Before you collect a single data point, define seven fields in your data dictionary: the variable name, its plain-language definition, the data type, the permitted values or range, the unit of measure, the collection method, and the missing-data rule. These seven fields determine whether your dataset can be analyzed, audited, and reproduced later. This article walks through each field, explains why it matters in clinical and rehabilitation research, and shows how to build a dictionary your team will actually use.
Why a Data Dictionary Belongs at the Start, Not the End
In clinic-based research, the biggest data headaches rarely come from statistics. They come from a column labeled “pain” that three different clinicians scored three different ways. A data dictionary prevents that by fixing meaning before collection begins.
A data dictionary is a structured document that defines every variable in a dataset. It tells anyone reading the data what each field means, how it was captured, and what values are acceptable. When it is written before collection, it functions as a contract among everyone entering data.
- It prevents two assessors from recording the same concept differently.
- It supports reproducibility when a reviewer or journal asks how a variable was measured.
- It speeds up cleaning, because errors can be checked against defined rules.
- It makes handover to a statistician or new team member far easier.
Regulatory and reporting frameworks reinforce this. The STROBE reporting guidelines for observational studies and the CONSORT and SPIRIT guidance for trials both expect clear description of how variables were defined and measured. A dictionary is the practical tool that makes those descriptions possible.
The Seven Fields to Define Before Collection
Seven fields cover the essentials for most clinical and rehabilitation datasets. You can add more, but skipping any of these seven usually creates problems downstream.
| Field | What It Records | Example |
|---|---|---|
| 1. Variable name | Short, unique, machine-friendly label | knee_flex_deg |
| 2. Definition | Plain-language meaning and how it is operationalized | Active knee flexion measured with a long-arm goniometer, supine |
| 3. Data type | Numeric, categorical, date, or text | Numeric (continuous) |
| 4. Permitted values or range | Allowed codes, categories, or numeric limits | 0–150 |
| 5. Unit of measure | Standard unit used across all sites | Degrees |
| 6. Collection method | Instrument, assessor, and timing | Goniometer, trained physiotherapist, baseline visit |
| 7. Missing-data rule | How blanks and “not done” are coded | Leave blank if not assessed; code 999 if refused |
Field 1: The Variable Name
The variable name is the label your database and analysis software will use. It should be short, unique, and readable without a legend. Consistency here saves hours later.
- Use lowercase letters and underscores, avoiding spaces and special characters.
- Keep names under about 32 characters so they export cleanly.
- Encode the unit in the name when it is not obvious, such as walk_speed_mps.
- Never reuse a name for a different concept across datasets.
Avoid names like “var1” or “score2.” A reviewer reading your data file should be able to guess what tug_seconds means without opening the dictionary. That small habit makes your dataset far more usable.
Field 2: The Definition
The definition explains precisely what the variable captures and how it is operationalized. This is where ambiguous concepts get pinned down. “Pain” becomes “worst pain in the past 24 hours during weight-bearing activity, rated on a 0–10 numeric rating scale.”
If two experienced clinicians can read the definition and disagree about what to record, the definition is not finished.
Write definitions in plain language, then add any technical detail needed for accuracy. For standardized instruments, cite the source instrument and version so the exact wording and scoring are traceable.
Field 3: The Data Type
The data type tells your database and analyst how a value should be stored and handled. Choosing the wrong type creates errors that are hard to fix after collection.
- Numeric (continuous): measured quantities such as range of motion in degrees.
- Categorical: named groups such as diagnosis or assistive device used.
- Ordinal: ranked categories such as a 0–4 pain scale.
- Date and time: visit dates and assessment timestamps.
- Text: free notes, kept to a minimum and never used for analysis without coding.
Decide early whether a number is a true measurement or a code. A “1” for “yes” is categorical, not a quantity. Mixing the two confuses both software and readers.
Field 4: Permitted Values or Range
This field lists the acceptable entries for each variable. For numeric variables, give the plausible range. For categorical variables, list every allowed code and its meaning.
- For a 0–10 pain scale, define the full set of integer codes and what each represents.
- For diagnosis, list the exact codes or categories the team will use.
- For yes/no variables, fix the coding as 0/1 and state which is which.
- For dates, state the accepted format so entries stay consistent.
Where a recognized classification exists, reference it directly. For example, the WHO International Classification of Diseases provides standardized diagnostic codes that make comparisons across sites possible.
Field 5: The Unit of Measure
The unit field prevents the classic error of mixing degrees, centimeters, and seconds across sites or assessors. One unit per variable, applied everywhere, is the rule.
Where a measurement can be reported in different units, state the unit and the conversion approach. Walking speed, for instance, can be recorded in meters per second or kilometers per hour; pick one and note how any other value is converted. For patient-reported outcomes, note the scale and scoring method so results are comparable.
Field 6: The Collection Method
The collection method records how the data is captured: the instrument, the assessor, and the timing. This is the field that makes your data auditable.
- Name the instrument or tool, such as a goniometer or a validated questionnaire.
- State who collects the data and their training requirements.
- Record the timing relative to treatment, such as before or after a session.
- Note any standardized instructions given to the participant.
For patient-reported measures, identify the exact instrument and version, since wording changes affect scores. The EQUATOR Network hosts reporting guidance that can help you describe measurement methods clearly and consistently.
Field 7: The Missing-Data Rule
The missing-data rule defines how blanks, refusals, and “not applicable” entries are handled. Without it, a blank could mean many things, and your analyst cannot tell them apart.
- Distinguish “not assessed,” “refused,” and “not applicable” with separate codes.
- Never use a real value, such as 0, to stand for missing data.
- Record the reason for missingness where possible, since that affects analysis.
- Document the rule so it is applied the same way by everyone.
Plan how you will handle missing values before data collection, not after. The ICH efficacy guidelines provide useful context on handling missing data in clinical research.
A Practical Example: Building the Dictionary for a Knee Study
Imagine a small study on knee range of motion after rehabilitation. Before the first participant, the team defines knee_flex_deg as active knee flexion in degrees, measured with a long-arm goniometer by a trained physiotherapist at baseline and follow-up, with a permitted range of 0–150 and a missing-data rule for refused assessments.
They also define a pain variable as worst pain in the past 24 hours on a 0–10 scale, captured before each session. Two clinicians review the definitions and agree they would record the same values. That agreement check is the real test of a good dictionary.
- Every variable has one clear meaning.
- Every value has a defined code or range.
- Every measurement has a named instrument and assessor.
- Every blank has a rule.
Common Mistakes to Avoid
Most data problems trace back to a handful of avoidable habits. Recognizing them early keeps your dataset clean.
- Writing the dictionary after collection, when meanings are already inconsistent.
- Leaving “pain” or “function” undefined and relying on clinician intuition.
- Mixing units across sites or assessors.
- Using blanks for multiple different reasons.
- Storing free text where a coded value would work better.
- Failing to update the dictionary when a new variable is added.
How to Keep the Dictionary Usable Over Time
A dictionary is a living document. Give one person ownership, version it, and review it whenever the protocol changes. Keep it alongside the dataset so anyone who picks up the data can find it.
Store it in a format the whole team can open and edit, and keep a short change log. When you share data or submit for publication, the dictionary should be ready to accompany the dataset. A clear dictionary is one of the simplest ways to strengthen the trustworthiness of your research.
Conclusion
Defining seven fields before collection—name, definition, data type, permitted values, unit, collection method, and missing-data rule—turns a vague dataset into something analyzable and auditable. Write them early, test them with a colleague, and keep them current. The effort is small compared with the cost of cleaning up ambiguous data later.
Frequently Asked Questions
What exactly is a data dictionary in medical research?
A data dictionary is a structured document that defines every variable in a dataset, including its meaning, type, allowed values, unit, collection method, and missing-data rule. It serves as a shared reference so everyone records and interprets data the same way.
Why should the dictionary be written before data collection starts?
Writing it first fixes the meaning of each variable before anyone enters data. That prevents inconsistent recording, reduces cleaning work, and makes the dataset easier to analyze and reproduce. A dictionary written afterward often just documents existing inconsistencies.
Are seven fields enough for every study?
Seven fields cover the essentials for most clinical and rehabilitation datasets, but complex studies may need extra fields, such as a source form reference or a validation rule. Start with the seven and add fields only when they serve a clear purpose.
How do I handle missing data in my dictionary?
Define separate codes for “not assessed,” “refused,” and “not applicable,” and never use a real value like 0 to represent missing data. Record the reason for missingness where possible, because it affects how the data can be analyzed.
Should I use standardized instruments in my definitions?
Yes, where a validated instrument exists. Name the exact instrument and version so the wording and scoring are traceable. This improves comparability and helps readers understand how each variable was measured.
What is the difference between a data type and a permitted value?
The data type describes how a value is stored, such as numeric, categorical, or date. Permitted values define which specific entries are acceptable, such as a 0–10 range or a fixed list of diagnosis codes.
How detailed should the definition field be?
Detailed enough that two trained clinicians would record the same value. Write in plain language, then add technical detail where accuracy requires it. If readers can interpret the definition differently, refine it.
Can I change the dictionary after collection begins?
You can, but changes should be documented in a change log and communicated to the whole team. Updating the dictionary mid-study without recording the change risks inconsistent data and confusion during analysis.
Who should own the data dictionary?
Assign one person to maintain it, usually the lead researcher or data manager. Clear ownership keeps the document current and ensures new variables and rules are recorded consistently.
Does a data dictionary help with publication and peer review?
Yes. Reporting guidelines such as STROBE and CONSORT expect clear description of how variables were defined and measured. A well-maintained dictionary makes those descriptions straightforward and supports reproducibility.