Published on 21/12/2025
SDTM to ADaM Mapping That Survives Review: Inputs, Outputs, and Test Cases for US/UK Regulators
Why SDTM→ADaM mapping is the fulcrum of inspection-readiness
What “defensible mapping” really means
Defensible mapping is the ability to pick any number in an analysis output and travel—quickly and repeatably—back to its source in the raw or standardized data, and forward again to confirm the same number will regenerate under the same conditions. In practice that means one shared vocabulary, explicit lineage, and executable specifications. The shared vocabulary is provided by CDISC conventions; the lineage spans SDTM domains to analysis datasets in ADaM; and the executable specifications live in Define.xml with reviewer narratives in ADRG and SDRG. Statistical intent is anchored to ICH E9(R1) (estimands) and conduct to ICH E6(R3). Inspectors sampling under FDA BIMO will also verify system and signature controls per 21 CFR Part 11 (and EU’s Annex 11), confirm consistency with ClinicalTrials.gov and EU postings under EU-CTR via CTIS, and ensure privacy statements align to HIPAA. Every mapping change should leave a visible audit trail, with systemic issues routed through CAPA and risks tracked against QTLs and governed via RBM. Artifacts must be filed
Outcome targets that keep teams honest
Set three non-negotiables for mapping: (1) Traceability—any value displayed can be reverse-engineered to precisely identified SDTM records and forward-verified via an executable derivation; (2) Reproducibility—re-running the pipeline with the same cut and parameters yields byte-identical ADaM and outputs; (3) Retrievability—a reviewer can open Define.xml, ADRG/SDRG, the derivation spec, and the code run logs within two clicks from a portfolio tile. When you can demonstrate all three on a stopwatch drill, you are inspection-ready.
Regulatory mapping: US-first clarity with EU/UK portability
US (FDA) angle—event → evidence in minutes
US reviewers often pick a result (e.g., change from baseline at Week 24) and ask: which SDTM variables fed the derivation; what windows and tie-breakers applied; how are intercurrent events handled under the estimand; and where is the program that implements the rule? Your mapping must surface that story without a scavenger hunt: titles/footnotes naming analysis sets and estimands, lineage tokens in ADaM metadata, and live pointers from outputs to Define.xml and reviewer guides.
EU/UK (EMA/MHRA) angle—same truth, different wrappers
EMA/MHRA reviewers ask the same questions but emphasize clarity of estimands, deviation handling, accessibility, and alignment with public narratives. The mapping artifact stays the same; labels change. Keep a short label “cheat row” in your standards (e.g., IRB → REC/HRA) so cross-region explanations use the same truth with local words.
| Dimension | US (FDA) | EU/UK (EMA/MHRA) |
|---|---|---|
| Electronic records | Part 11 validation; role attribution | Annex 11 alignment; supplier qualification |
| Transparency | Consistency with ClinicalTrials.gov entries | EU-CTR status via CTIS; UK registry alignment |
| Privacy | Minimum necessary PHI (HIPAA) | GDPR/UK GDPR minimization & residency |
| Traceability set | Define.xml + ADRG/SDRG drill-through | Same artifacts; emphasis on estimands clarity |
| Inspection lens | Event→evidence speed; unit tests present | Completeness & narrative consistency |
Process & evidence: the SDTM→ADaM mapping workflow from inputs to outputs
Inputs that must exist before you write a single derivation
Four input pillars stabilize mapping: (1) a versioned SAP with estimand language and window rules; (2) finalized SDTM dataset specifications with controlled terminology; (3) a mapping charter describing dataset lineage, join keys, and time windows; and (4) a test plan with named edge cases. If any of these are missing, you will code your way into ambiguity and spend cycles re-discovering intent under inspector pressure.
Outputs reviewers actually consume
Outputs should not be “mystery ADaMs.” Produce a compact ADaM data guide: each analysis dataset lists purpose, analysis sets, lineage, and derivation tokens; a one-page map shows domain-to-dataset relationships; and footers embed run timestamp, program path, and parameter file names. Pair datasets with shells that declare titles, footnotes, intercurrent-event handling, and multiplicity hooks so that numbers arrive with their story intact.
Numbered checklist—lock the basics
- Freeze SDTM specs and controlled terms; document known quirks and mitigations.
- Publish a mapping charter (lineage, windows, tie-breakers, join keys) with change control.
- Draft ADaM specs with purpose, lineage tokens, and sensitivity variants flagged.
- Create a minimal but complete test plan with named edge cases and expected outputs.
- Bind programs to a parameters file; save environment hashes for reproducibility.
- Automate run logs and provenance footers; store alongside datasets.
- Generate shells with titles/footnotes matching SAP and estimands.
- Compile ADRG/SDRG pointers to Define.xml and cross-link in outputs.
- File everything to TMF locations referenced from CTMS—two-click retrieval.
- Rehearse a “10 results in 10 minutes” drill; file stopwatch evidence.
Decision Matrix: choose derivation strategies that won’t unravel during review
| Scenario | Option | When to choose | Proof required | Risk if wrong |
|---|---|---|---|---|
| Baseline missing/out-of-window | Pre-specified hunt rule (last non-missing pre-dose) | Simple windows; small pre-dose gaps | Window spec; unit test with border cases | Hidden imputation; inconsistent baselines |
| Multiple records per visit | Tie-breaker chain (chronology → quality flag → mean) | Common duplicates or partials | Algorithm note; reproducible selection | Cherry-picking perception; reprogramming |
| Time-to-event with heavy censoring | Explicit censoring rules + sensitivity | High dropout/admin censoring | ADTTE lineage; tests; SAP citation | Bias claims; late reruns |
| Intercurrent events frequent | Treatment-policy primary + hypothetical sensitivity | E9(R1) estimand declared | SAP excerpt; parallel shells | Estimand drift; inconsistent narratives |
| Dictionary version changed mid-study | Versioned recode with audit notes | MedDRA/WHODrug update | Version tokens; reconciliation plan | Count shifts; reconciliation churn |
How to document decisions so inspectors can follow the thread
Maintain a “Mapping Decision Log”: question → option → rationale → artifacts (SAP clause, spec snippet, unit test ID) → owner → date → effectiveness (e.g., query reduction). File under Sponsor Quality and cross-link from the ADaM spec headers and program comments so the path from a number to a decision is obvious.
QC / Evidence Pack: what to file where so mapping is testable
- ADaM specifications (versioned) containing purpose, lineage, window rules, and sensitivity variants.
- Define.xml pointers and reviewer guides (ADRG/SDRG) aligned to dataset/variable metadata.
- Program headers with lineage tokens, change summaries, and parameter file references.
- Automated unit tests with coverage reports and named edge-case fixtures.
- Run logs with environment hashes; reproducible rerun instructions.
- Change control minutes linking rule edits to SAP amendments and shells.
- Visual diffs of outputs pre/post change; thresholds for acceptable drift.
- Portfolio drill-through (tiles → spec → code/tests → artifact locations) proven by stopwatch drill.
- Vendor qualification/oversight packets for any external programming.
- TMF cross-references so inspectors can open everything without helpdesk tickets.
Vendor oversight & privacy (US/EU/UK)
Qualify external programmers to your standards, enforce least-privilege access, and store interface logs and incident reports near the codebase. Where subject-level listings are tested, apply minimization and redaction consistent with privacy regimes; document residency and transfer safeguards for EU/UK flows.
Build test cases that catch drift before regulators do
Minimal fixtures with named edges
Use tiny, named SDTM fixtures that cover each derivation pattern: partial dates; overlapping visits; duplicate records; out-of-window measurements; dictionary updates; censoring at lock. Keep golden ADaM outputs in version control. Diffs show exactly what changed and why—and reviewers can read them like a storyboard.
Rule coverage, not vanity coverage
Report code coverage but chase rule coverage: every business rule in your spec must have at least one test asserting both the numeric result and the presence of required flags (e.g., imputation indicators). Include failure-path tests that confirm the program rejects illegal inputs with clear, documented messages.
Parameterization and environment locking
Put windows, censoring rules, and reference dates in a parameters file under version control; capture package/library versions in an environment lock. A mapping change should require updating the parameters, specs, and tests—never a silent tweak buried in code.
Traceability that reads in one pass: lineage, tokens, and reviewer navigation
Lineage tokens that matter
At the dataset and variable level, include a one-line token: “SDTM AE (USUBJID, AESTDTC, AETERM) → ADAE (ADT, ADY, AESER). Algorithm: chronology → quality flag → first occurrence tie-breaker.” These tokens make reviewer navigation instant and harmonize code comments, shells, and CSR text.
Define.xml and reviewer guides as living maps
Define.xml should not be a static afterthought. Keep derivation and origin attributes current, with hyperlinks that open the relevant spec section or macro documentation. The ADRG/SDRG should provide the narrative of special handling and known caveats so reviewers see decisions where they expect them.
Make outputs and shells speak the same language
Titles must name endpoint, population, and method; footnotes define censoring, handling of missingness, and any multiplicity. When shells and ADaM metadata share tokens, the CSR can lift sentences verbatim—and inspectors can triangulate facts without meetings.
Templates reviewers appreciate: paste-ready spec tokens, sample language, and quick fixes
Spec tokens (copy/paste)
Purpose: “Supports estimand E1 (treatment policy) for primary endpoint.”
Lineage: “SDTM LB (USUBJID, LBDTC, LBTESTCD) → ADLB (ADT, AVISIT, AVAL).”
Algorithm: “Baseline = last non-missing pre-dose AVAL within [−7,0]; change = AVAL − baseline; if baseline missing, impute per SAP §[ref].”
Windows: “Scheduled visits ±3 days; unscheduled mapped by nearest rule with tie-breaker chronology → quality flag.”
Sensitivity: “Per-protocol window [−3,0]; tipping-point ±[X] sensitivity.”
Sample footnotes that quell queries
“Baseline defined as the last non-missing, pre-dose value within the pre-specified window; if multiple candidate records exist, the earliest value within the window is used. Censoring rules are applied per SAP §[ref], with administrative censoring at database lock. Intercurrent events follow the treatment-policy strategy; a hypothetical sensitivity is provided in Table S[ref].”
Common pitfalls & quick fixes
Pitfall: Silent dictionary version drift → Fix: stamp versions in metadata; run a recode reconciliation listing and file it. Pitfall: Unstated tie-breakers → Fix: add explicit selection chain in both spec and program header. Pitfall: Parameters hard-coded in macros → Fix: externalize to a parameters file with change control and tests that fail when a value is altered without spec updates.
FAQs
What are the minimum inputs to start SDTM→ADaM mapping?
A versioned SAP (with estimands and window rules), finalized SDTM specs with controlled terminology, a mapping charter (lineage, joins, windows, tie-breakers), and a test plan with named edge cases. Coding without these creates ambiguity that surfaces during inspection as rework and delay.
How do we prove traceability without overwhelming reviewers?
Use concise lineage tokens at dataset and variable level; embed provenance in footers (run timestamp, program path, parameters); and provide live links from outputs to Define.xml and ADRG/SDRG sections. During the drill, open two clicks: output → Define.xml/reviewer guide → spec/code. Stop there—less talk, more evidence.
What belongs in an ADaM unit test suite?
Named edge cases for each rule (partial dates, overlapping visits, duplicates, out-of-window values, censoring at lock), expected values and flags, failure-path tests for illegal inputs, and environment snapshots. Golden outputs should be under version control to make diffs explain themselves.
How should we handle mid-study dictionary updates?
Version and document recoding decisions, run reconciliation listings, and show impact on counts. Stamp dictionary versions in metadata and ADRG/SDRG. If exposure or safety tables shift, prepare a short “before/after” exhibit with rationale and change-control references.
Where should mapping decisions live so inspectors can find them?
In a Mapping Decision Log cross-linked from ADaM specs and program headers, and filed in Sponsor Quality. Each entry should show the question, chosen option, rationale, artifacts, and an effectiveness note (e.g., query rate drop). That single table prevents repeated debates.
How do we keep shells, ADaM, and the CSR synchronized?
Centralize tokens (titles, footnotes, estimand labels) in a shared library; bind them into shells and metadata; and reference the same language in CSR templates. When SAP changes, update the library, regenerate shells, and revalidate affected outputs to keep words and numbers aligned.
