SDTM mapping is the process of transforming clinical trial data — collected in an EDC in whatever form made sense at the CRF design stage — into the standardized tabular structure that the FDA expects to receive in a submission package.
It is, in the abstract, a pattern-matching problem: take this field, which is called "Diastolic" in the CRF and lives in the Vitals Signs form, and map it to SDTM variable VS.VSSTRESN in domain VS, with controlled terminology code C49668 for VSTESTCD. The pattern is known. The rules are documented. The SDTM Implementation Guide specifies what goes where.
In practice, SDTM mapping is one of the most expensive, error-prone, and consequential steps in the entire clinical data pipeline. A submission package with non-conforming SDTM can fail Pinnacle 21 validation. A Pinnacle 21 failure at submission time is not a small event — it triggers a deficiency letter that adds months to review time. Understanding where LLMs help and where they don't requires understanding why SDTM mapping is hard despite being, in principle, a pattern-matching problem.
Why SDTM mapping is hard
The SDTM Implementation Guide is 400+ pages. It specifies rules at multiple levels: study-level design, domain-level structure, variable-level constraints, and controlled terminology assignments. The rules interact. A decision made at the domain level (which domain does this data live in?) constrains the variable-level decisions. A controlled terminology choice affects the derivation logic for derived variables. The interactions are non-trivial and the documentation does not enumerate all of them.
The second source of difficulty is sponsor-specific variation. The SDTM IG allows for sponsor-defined domains (SD domains) and supplemental qualifiers (SUPP-- datasets) for data that does not fit standard domains. Every sponsor has accumulated conventions about how to handle their specific CRF designs. These conventions are rarely documented comprehensively. They live in the heads of senior SDTM programmers and in SAS macro libraries written years ago by people who no longer work at the company.
The third difficulty is CDISC controlled terminology. The CDISC CT is a large, versioned vocabulary of code lists. The right code for a given field depends on the CDISC CT version the study is pinned to, the domain, the variable, and sometimes the therapeutic area. The same clinical concept — "systolic blood pressure" — may have different representations depending on context. Applying the right code requires knowing the full context, not just the field name.
Where LLMs work well
LLMs are very good at the majority case: standard CRF fields that map cleanly to well-documented SDTM domains. Demographic fields, standard vital signs, common lab panels, adverse events using MedDRA — these follow clear patterns that are well-represented in the training data and well-documented in the SDTM IG. An LLM that has been fine-tuned on CDISC documentation and given the relevant context will map these correctly at high confidence almost all of the time.
LLMs are also good at recognizing controlled terminology matches. Given a CRF field name and a controlled terminology code list, an LLM can identify the best matching code with high accuracy for common terms. This is exactly the kind of lookup problem that LLMs excel at — it requires broad knowledge of medical terminology, the ability to handle synonyms and abbreviations, and judgment about semantic equivalence.
The confidence scoring is important here. A well-designed SDTM mapping system does not just produce mappings — it produces confidence scores for each mapping. High-confidence mappings (above ~90%) can be reviewed quickly. Low-confidence mappings require careful human review. The DM lead's time goes to the hard cases, not the easy ones.
Where it doesn't work — and should never be autonomous
The failure modes for LLM-assisted SDTM mapping cluster around novelty and ambiguity.
Novel domains. When a study collects data in a domain that is not well-represented in standard SDTM — emerging biomarkers, patient-reported outcome instruments that do not map to standard CDASH forms, device data from wearables — the LLM is working with less training signal. Confidence scores drop. Human review is essential.
Sponsor-specific conventions. LLMs have no knowledge of your organization's undocumented SDTM conventions. If your sponsor always handles concomitant medications a specific way, or has a house standard for how to structure SUPPAE for a particular type of AE data, the LLM will not know this. It will propose a mapping that conforms to the SDTM IG but may not conform to your historical practice — which creates inconsistency across studies and potential issues with pooled analyses.
Derived variables. Derived SDTM variables — variables that are computed from other variables rather than directly transcribed from CRF fields — require derivation logic. The LLM can identify which variables need derivation and propose the derivation rule, but the derivation logic involves clinical judgment (what counts as a baseline value?) that requires human confirmation.
Cross-domain consistency. SDTM has rules that span domains: the STUDYID, DOMAIN, USUBJID, SEQNUM structure must be consistent across all domains. Timing variables must be internally consistent. A mapping that is correct for a single domain might create cross-domain inconsistencies that only a study-level review would catch.
The TrialNexus approach
Our SDTM mapper produces a mapping specification with field-level confidence scores, a rationale for each mapping (including the SDTM IG section that supports the choice and the controlled terminology code list consulted), and flags for the categories of decisions described above: novel domains, derived variables, fields with multiple plausible mappings.
The default behavior is that every mapping enters the Decision Queue regardless of confidence score. A DM lead using TrialNexus for the first time should see every mapping we propose. As they validate our proposals across a study, they can move to supervised autonomy for the high-confidence category — auto-committing above a threshold they set — while keeping human review on the flagged categories.
The goal is not to produce a SDTM mapping document without a DM lead. It is to produce a SDTM mapping document that a DM lead can review in three hours instead of three days — because the translation work is done, and the review surfaces only the decisions that require expertise.
Pinnacle 21 is the objective function. If an output passes Pinnacle 21 on the first run, we have done our job. If it fails, we failed — not partially, not "good enough for a first pass." The DM lead is not a proofreader for our mistakes. They are the expert who owns the output.