Manuel B. Garcia

Manuel B. Garcia serves as the Senior Director for Educational Technology and Digital Learning at FEU Institute of Technology, Manila, Philippines. Read More

Contact Info

1607, FEU Tech Building,
P. Paredes St, Sampaloc,
Manila, Philippines
mbgarcia@feutech.edu.ph

Follow Me

How Do You Define Exposures and Outcomes Using Routine Records?

Routine records rarely contain research-ready exposure and outcome variables. Learn how to translate research concepts into reproducible definitions using recorded events, codes, observation windows, and validation evidence.

532
Defining Exposures and Outcomes in Routine Records Guide 532 of 1272
01 · The Question

How Can Routine Records Identify What Participants Experienced and What Happened to Them?

You want to investigate whether a medication is associated with a clinical outcome, whether participation in an educational program predicts subsequent performance, or whether an administrative policy is associated with changes in service use.

The database contains diagnoses, prescriptions, attendance records, transactions, or other routinely recorded events. But it may not contain variables explicitly labeled as your research exposure and outcome.

You must decide which recorded information represents each concept, what combination of records qualifies, and when the relevant events must occur.

These decisions are not simply data-cleaning tasks. They determine what your study actually measures and whether its conclusions correspond to the research question.

02 · The Short Answer

Translate Each Research Concept into an Explicit, Reproducible Definition

In Brief

Define exposures and outcomes in routine records by specifying the exact recorded events, codes, measurements, eligibility rules, and time windows that will identify each concept, then evaluate whether those definitions validly represent what the study intends to measure.

A diagnosis code, prescription, or administrative status may provide useful evidence, but it is not automatically equivalent to the underlying condition, treatment received, or event of interest. The operational definition must reflect the data source, study design, and available validation evidence.

03 · What You Need to Know

Building Defensible Exposure and Outcome Definitions from Routine Data

Start with the Concept, Not the Available Database Field

An exposure is a characteristic, experience, condition, intervention, or event whose relationship with an outcome is being investigated. An outcome is the event, condition, measurement, or state the study seeks to explain, predict, or compare.

These terms describe analytical roles rather than fixed properties of particular variables. Hospital admission might be an outcome in one study and an exposure in another.

Before examining available codes, state precisely what the exposure and outcome mean in the research question.

For example, "medication use" could mean a prescription was written, a prescription was dispensed, a medication was administered, or a patient actually consumed it. These are different constructs, even though each may be represented by a medication-related record.

Similarly, "academic engagement" might refer to class attendance, interaction with learning resources, participation in activities, or a broader psychological construct. Login counts alone do not necessarily represent all these dimensions.

First define the intended construct. Then assess whether the available data can support an appropriate operational measurement.

Identify the Records That Could Represent the Exposure or Outcome

Routine databases contain different forms of evidence. Their suitability depends partly on why the information was originally recorded.

Record type Possible research use Important limitation
Diagnosis codes Identify recorded conditions or clinical events Coding may reflect suspected diagnoses, reimbursement, or documentation practices
Prescription records Identify prescribing decisions A prescription does not establish dispensing or consumption
Pharmacy dispensing claims Identify medications supplied through covered channels Dispensing does not establish actual ingestion
Laboratory results Define outcomes using measured biological indicators Testing may be selective, and thresholds or assays may differ
Hospital admission records Identify documented admissions Events outside the contributing system may be unobserved
Learning-platform activity logs Identify recorded online participation Offline activity and meaningful engagement may not be captured
Administrative status records Identify eligibility, enrollment, or program participation Status may not establish actual receipt of the intended service

Researchers should inspect the underlying data dictionary and collection procedures rather than assume that a familiar variable name has a universally consistent meaning.

Choose Between Single-Record and Algorithm-Based Definitions

Some exposures and outcomes can reasonably be identified using one record. Others require a combination of observations.

A single-record definition might classify a patient as having a recorded diagnosis when a specified diagnostic code appears at least once. A more restrictive algorithm might require repeated qualifying codes, a particular care setting, or supporting laboratory evidence.

In routine health-data research, such rules are often described as phenotype algorithms or computable phenotypes. They translate a clinical concept into executable criteria that can be applied consistently to records.

More restrictive definitions may improve positive predictive value in some settings, but they can also exclude genuine cases. Requiring repeated diagnoses, for example, may systematically omit patients with limited healthcare access or those who experience only one documented encounter.

There is no universal rule that two codes are better than one. The appropriate algorithm depends on the condition, data source, research purpose, and empirical validation evidence.

The Observational Health Data Sciences and Informatics (OHDSI) framework illustrates how computable cohort definitions can combine concept sets, domain-specific attributes, and temporal criteria.

Specify Codes and Classification Rules Completely

If a definition uses diagnostic, procedure, medication, or administrative codes, identify the applicable coding system and its version where relevant.

Examples include ICD classifications for diagnoses and standardized terminology systems used within particular electronic health record environments. Administrative and educational systems may use institution-specific categories instead.

Document whether the algorithm includes:

  • Exact codes or a defined code set.
  • Broader categories and their included subcategories.
  • Required numbers or combinations of records.
  • Qualifying care settings, departments, or record sources.
  • Measurement thresholds and units.
  • Exclusions and exceptions.
  • Applicable dates and temporal relationships.

Code selection should follow the substantive definition rather than simply include every available code with a similar description.

Where coding systems changed, determine whether historical codes represent the same concept. The implications of coding changes over time may be particularly important for longitudinal analyses.

Establish the Index Date and Observation Windows

The index date is a reference date used to organize eligibility, exposure assessment, baseline characteristics, and follow-up. Depending on the design, it may be the date of treatment initiation, enrollment, diagnosis, or another qualifying event.

Researchers must distinguish at least three temporal questions:

  • When is an individual eligible to enter the study?
  • During which period is exposure status determined?
  • During which period can the outcome be observed?

For a study comparing new users of two medications, the index date might be the first qualifying dispensing date after a prespecified period without either medication. The period before index could be used to establish prior medication history and baseline characteristics. Outcomes would then be evaluated during a defined follow-up period.

The required length of prior observation depends on the research question, data availability, and the likelihood of misclassifying prevalent exposure as new exposure.

Importantly, a patient's first recorded event is not necessarily their first event in reality. It may simply be the first event visible within the database.

Prevent Temporal Misclassification and Immortal Time Bias

Exposure definitions can introduce serious bias when they use information that becomes available only after follow-up has begun.

Suppose patients are classified as exposed if they receive a treatment at any point during the first six months after hospital admission. If follow-up begins at admission and patients are classified as treated from that date, the period before actual treatment may be incorrectly assigned to the treated group.

Depending on the design, this can create immortal time bias because patients must remain alive or otherwise event-free long enough to qualify for the exposure classification.

Potential solutions include defining exposure at a common baseline, using time-varying exposure methods, or designing an appropriate target-trial emulation. These approaches require their own assumptions and should be selected according to the causal question.

Watch Out

Do not classify participants using future exposure information while treating them as exposed from an earlier date unless the design and analysis explicitly accommodate that timing. Correct temporal alignment is essential even when the recorded codes themselves are accurate.

Distinguish Recorded Events from Actual Events

Routine records generally establish that something was documented within a particular system. They may not establish that the underlying event occurred exactly as recorded, or that an undocumented event did not occur.

A diagnosis code may represent a confirmed condition, a working diagnosis, or a billing-related classification. A recorded absence of treatment may mean no treatment occurred, or that treatment occurred outside the available system.

For outcomes, distinguish between incident events, prevalent conditions, repeated events, and administrative recording dates.

For example, the date a diagnosis was entered may not equal the date symptoms began. A researcher studying time to disease onset should not automatically substitute the first available diagnosis date without explaining what that date represents.

Likewise, the absence of a recorded diagnosis should not automatically be interpreted as evidence that a person does not have the condition.

Evaluate Exposure and Outcome Misclassification

Misclassification occurs when an operational definition assigns an incorrect exposure or outcome category.

False positives occur when a record-based algorithm identifies an event or condition that is not present according to the chosen reference standard. False negatives occur when genuine events are not identified.

Four familiar validation measures can help characterize binary definitions:

Measure Question answered
Sensitivity Among true cases, what proportion does the algorithm identify?
Specificity Among true noncases, what proportion does the algorithm correctly exclude?
Positive predictive value Among algorithm-positive records, what proportion are true cases?
Negative predictive value Among algorithm-negative records, what proportion are true noncases?

Predictive values depend partly on the prevalence of the condition in the population being evaluated. A definition with favorable performance in one setting may perform differently in another.

Misclassification may also differ between exposure groups, institutions, or periods. For instance, patients receiving a particular treatment may undergo more frequent monitoring, increasing the probability that an outcome is detected and recorded.

Such differential ascertainment can distort estimated associations. Misclassification does not invariably weaken an association toward the null, and the direction of bias should not be assumed without considering the study design and error structure.

Validate Definitions Against Appropriate Evidence

Validation should examine whether the operational definition identifies the intended concept with sufficient accuracy for the research purpose.

Potential reference sources include adjudicated clinical records, independently reviewed charts, registries, laboratory evidence, or other sufficiently credible sources.

Where possible, evaluate validation performance in the same population and recording environment used for the study.

A validation study from another country, institution, or period may be informative, but its transportability requires consideration. Differences in coding incentives, clinical practice, disease prevalence, and data coverage can change algorithm performance.

When validation is unavailable, researchers should explain the basis for the definition, assess face and construct validity where appropriate, compare alternative definitions, and acknowledge unresolved uncertainty.

Reproducibility alone is not validation. An algorithm can produce identical classifications every time it is run and still identify the wrong construct.

Use Sensitivity Analyses to Examine Definition Dependence

Researchers can often assess whether substantive conclusions depend heavily on particular operational choices.

For example, an outcome might be defined using one qualifying diagnosis, two diagnoses within a specified period, or a diagnosis combined with a relevant laboratory result.

Comparing these definitions can show how estimated event counts and associations change under alternative assumptions.

However, agreement across several imperfect definitions does not establish that any of them is correct. Alternative algorithms may share the same systematic errors.

Where feasible, prespecify a primary definition and justify secondary definitions before examining their associations with the main exposure.

Make the Operational Definitions Reproducible

Another researcher should be able to understand exactly how exposure and outcome status were assigned, even when the underlying individual-level records cannot be shared.

Document the source tables, code sets, inclusion and exclusion criteria, thresholds, date rules, observation windows, handling of repeated events, and software logic used to construct each variable.

Where permitted, provide executable code or detailed pseudocode. Maintain versioned definitions when algorithms change during study development.

The RECORD reporting statement specifically addresses the disclosure of codes and algorithms used to classify exposures, outcomes, and other analytical variables in studies using routinely collected health data.

Transparent definitions make it possible for readers to evaluate methodological choices rather than treating derived variables as unexplained properties of the database.

04 · A Practical Example

Defining Medication Exposure and Hospitalization Outcomes

Hypothetical Example

Comparing New Users of Two Medications

A research team wants to examine whether initiation of Medication A, compared with Medication B, is associated with hospitalization for a specified condition within 180 days.

The available database contains pharmacy dispensing claims, encounter records, diagnostic codes, and dates of recorded healthcare activity.

The team must translate both medication initiation and hospitalization into executable rules before estimating any association.

Step 1: Define the eligible population. Include individuals meeting prespecified clinical and demographic criteria who have sufficiently observable prior records to evaluate medication history and baseline characteristics.
Step 2: Define exposure. Identify the first qualifying dispensing claim for Medication A or B after a specified washout period. Use the dispensing date as the index date. The operational exposure is recorded dispensing, not confirmed ingestion.
Step 3: Define the outcome. Identify qualifying inpatient admissions associated with a prespecified diagnosis code set. Establish whether the code must appear as the principal diagnosis or may appear in another position, based on clinical rationale and validation evidence.
Step 4: Define follow-up. Begin outcome observation at the prespecified time relative to index and follow individuals for up to 180 days, accounting for death, loss of observable coverage, and other censoring rules as appropriate to the estimand.
Step 5: Evaluate the definitions. Examine prior validation evidence, the availability of inpatient claims, differences in healthcare utilization, and the possibility that relevant hospitalizations occurred outside the observed system.
Step 6: Test reasonable alternatives. Compare the primary outcome definition with a more restrictive validated definition if available, and assess whether conclusions are sensitive to the outcome algorithm or exposure washout period.

The resulting analysis can estimate an association between recorded medication dispensing and recorded qualifying hospitalizations under the specified design. It does not automatically establish actual medication consumption, complete capture of hospitalizations, or a causal treatment effect.

Those distinctions should remain explicit when interpreting and reporting the findings.

05 · What Researchers Often Get Wrong

Common Errors in Defining Exposures and Outcomes

Misconception

A Recorded Prescription Proves That the Patient Took the Medication

Prescribing, dispensing, administration, and consumption are distinct events. Use terminology that matches the recorded evidence, and avoid claiming adherence or actual use unless the data support that interpretation.

Misconception

One Diagnosis Code Always Establishes a Confirmed Condition

The meaning and validity of a code depend on its context. Some conditions can be identified adequately using a single validated code, while others require additional evidence. Neither approach should be assumed universally correct.

Misconception

More Restrictive Algorithms Are Always More Valid

Additional requirements may reduce false positives while increasing false negatives. The balance depends on the condition, data source, and purpose of the analysis.

Misconception

The First Recorded Diagnosis Is Necessarily the First Occurrence

A database may begin observing someone after a condition has already developed. The first recorded event can represent an existing condition rather than a new onset.

Misconception

Exposure Can Be Defined Using Any Event During Follow-Up

Classifying participants using events that occur after follow-up begins can create temporal bias, including immortal time bias. Exposure classification and follow-up must be aligned with the study design.

Misconception

An Algorithm Validated Elsewhere Needs No Further Evaluation

Validation performance may differ across populations, institutions, coding systems, and periods. Existing evidence should be assessed for applicability rather than accepted without qualification.

06 · What This Means for You

Choose Definitions That Match the Research Question and Available Evidence

Begin by deciding what you genuinely need to measure. If the study concerns treatment initiation, dispensing records may be appropriate. If it concerns actual medication adherence, the same records may provide only an indirect measure.

For outcomes, determine whether the research question concerns clinically confirmed events, recorded diagnoses, administrative encounters, or another explicitly defined endpoint.

A simple decision framework

If the construct is directly and reliably recorded
Use a clearly specified definition, confirm its temporal relevance, and evaluate available evidence of accuracy.
If several records are needed to identify the construct
Develop or adapt an algorithm using justified codes, combinations, thresholds, and observation windows.
If the recorded measure is only a proxy
Name the measured construct precisely, evaluate the proxy's limitations, and avoid stronger claims than the evidence supports.
If definitions vary across institutions or periods
Assess comparability and consider harmonization, restrictions, or setting-specific analyses where defensible.
If the central exposure or outcome cannot be identified credibly
Reconsider the data source or refine the research question rather than rely on an unjustified operational definition.

For multi-site or longitudinal studies, examine whether definitions can be applied consistently across the relevant records. If the same code has different implications across institutions, technical standardization alone may not establish comparability.

Finally, distinguish a reproducible classification rule from evidence that the classification is valid. Both matter, but they answer different methodological questions.

07 · A Quick Checklist

What to Verify Before Finalizing Exposure and Outcome Definitions

Before constructing your analytical variables, check:
Define the substantive meaning of each exposure and outcome independently of the available database fields.
Identify which record types can represent each concept and what those records actually establish.
Specify complete code sets, classification rules, thresholds, and qualifying record combinations.
Establish the index date, baseline observation period, exposure window, and outcome follow-up window.
Check that exposure classification does not improperly depend on future information.
Distinguish first recorded events from genuinely incident events where relevant.
Review available validation evidence and its applicability to the study population and data source.
Assess possible false positives, false negatives, and differential ascertainment.
Prespecify defensible alternative definitions for sensitivity analysis where useful.
Preserve reproducible documentation of code lists, decision rules, and implementation logic.
08 · Frequently Asked Questions

Frequently Asked Questions About Exposure and Outcome Definitions

Can a single diagnosis code be used to define a research outcome?

Yes, when the code and recording context provide sufficient evidence for the intended outcome. Its appropriateness should be supported by clinical reasoning, validation evidence, or other relevant methodological justification.

Is a prescription record an exposure measure?

It can measure recorded prescribing. It should not automatically be interpreted as dispensing, administration, or consumption. The correct definition depends on the research question and the type of medication record available.

What is a phenotype algorithm in routine health-data research?

It is a set of executable criteria used to identify a clinical condition, event, or patient characteristic from recorded information. It may combine diagnosis codes, procedures, laboratory results, medications, and temporal rules.

What is the difference between an index date and an outcome date?

The index date is a reference point for study entry or another specified analytical event. The outcome date identifies when the qualifying outcome was recorded or otherwise determined. Their relationship depends on the study design.

How much prior observation time is needed to identify new medication users?

There is no universally appropriate duration. The washout period should reflect the medication, expected use patterns, data coverage, and study objective. Researchers should justify the chosen period and evaluate sensitivity to reasonable alternatives.

Can I use an exposure or outcome definition from a published study?

Yes, provided the definition is applicable to your population, data source, coding system, and study purpose. Reusing an algorithm does not remove the need to examine its validity and implementation in your setting.

What should I do if no validated outcome algorithm exists?

Develop a defensible definition using substantive expertise and available records, seek independent validation where feasible, and evaluate alternative definitions. Report uncertainty rather than presenting an unvalidated algorithm as established.

Can the same variable be an exposure in one study and an outcome in another?

Yes. These labels describe the role of a variable within a particular research question and analytical design. The same event can serve different roles in different studies.

09 · The Bottom Line

Defensible Definitions Connect Recorded Evidence to Research Concepts

The Bottom Line

Exposures and outcomes in routine records should be defined through explicit, reproducible rules that connect recorded information to the concepts the research question actually concerns.

Specify the evidence, codes, dates, and classification criteria; evaluate possible misclassification and validation evidence; and preserve the distinction between what the records document and what can reasonably be inferred from them. A precise operational definition strengthens a study only when it is also substantively defensible.

10 · Sources and Further Reading

Authoritative Resources on Exposure and Outcome Definitions

11 · Cite this Guide

How to Cite This Guide

This guide is intended to be read, shared, and used in research, teaching, and academic work. If you draw on its ideas, explanations, or other content, please acknowledge the source by citing the guide. Doing so gives appropriate credit and helps your readers locate the original resource.

Has the Field Guide helped your research?

If a guide helped clarify a question, inform a research decision, or move your work forward, I would love to hear about your experience. Your story may also help other researchers discover the Field Guide.

Share Your Experience
Takes only a few minutes