SDTM mapping takes a raw CRF value and writes it to the SDTM variable a submission dataset expects. These three examples are the ones people look up: vital signs to VS, demographics to DM, and an adverse event term to AE.
SDTM mapping examples
Vital signs: blood pressure to VS
A vital signs CRF records sitting blood pressure of 128/82 mmHg. That is two tests, so it is two VS rows. Do not store 128/82 in a single VSORRES. The CRF word "Sitting" is not the stored value: VSPOS holds the CDISC submission value SITTING.
| Variable | Systolic row | Diastolic row |
|---|---|---|
VSTESTCD | SYSBP | DIABP |
VSTEST | Systolic Blood Pressure | Diastolic Blood Pressure |
VSORRES | 128 | 82 |
VSORRESU | mmHg | mmHg |
VSSTRESC | 128 | 82 |
VSSTRESN | 128 | 82 |
VSSTRESU | mmHg | mmHg |
Both rows set DOMAIN to VS, VSPOS to SITTING, and VSDTC to 2026-03-14T08:30:00. VSSEQ is 1 on the systolic row and 2 on the diastolic row. STUDYID ABC123 and USUBJID ABC123-001 are the same subject as the demographics example. SYSBP is the CDISC submission value for systolic blood pressure (NCI concept C25298). DIABP is the submission value for diastolic blood pressure (NCI concept C25299). VSTEST carries the paired test name, not the concept code.
Demographics to DM
DM is one row per subject. It is not a findings domain, so there is no test code. Store the CDISC submission value, not the label printed on the CRF.
| CRF value | SDTM variable | Mapped value |
|---|---|---|
| Study identifier | STUDYID | ABC123 |
| Domain abbreviation | DOMAIN | DM |
| Subject number 001 | SUBJID | 001 |
| STUDYID, hyphen, SUBJID | USUBJID | ABC123-001 |
| Sex: Female | SEX | F |
| Age: 54 | AGE | 54 |
| Years | AGEU | YEARS |
| Race: Asian | RACE | ASIAN |
| Ethnicity: Not Hispanic or Latino | ETHNIC | NOT HISPANIC OR LATINO |
| Country: United States | COUNTRY | USA |
SEX F, RACE ASIAN, ETHNIC NOT HISPANIC OR LATINO, AGEU YEARS, and COUNTRY USA are CDISC submission values (COUNTRY is ISO 3166-1 alpha-3). When the CRF collects a date of birth instead of age, that date maps to BRTHDTC and AGE is derived.
Adverse event term to AE
The words the site wrote stay in AETERM. Coding picks a MedDRA lowest level term, and AEDECOD stores the Preferred Term derived from it, not a tidied copy of the verbatim and not the numeric MedDRA code.
| CRF value | SDTM variable | Mapped value |
|---|---|---|
| Reported term: heart attack | AETERM | heart attack |
| MedDRA lowest level term | AELLT | Heart attack |
| MedDRA Preferred Term | AEDECOD | Myocardial infarction |
| MedDRA primary System Organ Class | AEBODSYS | Cardiac disorders |
| Severity: Severe | AESEV | SEVERE |
| Serious: Yes | AESER | Y |
AESEV uses the CDISC terms MILD, MODERATE, and SEVERE. AESER uses Y or N. A serious event is not automatically AESEV SEVERE, and a severe event is not automatically AESER Y. This row happens to be both. DOMAIN is AE, AESEQ is 1, and STUDYID and USUBJID match the DM row. A collected start date goes in AESTDTC as an ISO 8601 date or datetime.
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" on the Vital Signs form, and map the collected result to VSORRES, the unit to VSORRESU, and the standardized number to VSSTRESN, in domain VS, with VSTESTCD set to DIABP. DIABP is the CDISC submission value. The NCI concept code for diastolic blood pressure is C25299. That code identifies the concept. The value in VSTESTCD is DIABP. 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.
The failure catalog (missing variables, wrong controlled terminology, cross-domain breaks, supplemental-qualifier conventions, dates, Define-XML mismatches) is a separate note: the SDTM submission errors that cause Pinnacle 21 failures. This page is the review. Which proposals a model can make, in what order a DM lead should read them, and what must stay in the Decision Queue on Core.
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.
One row, reviewed
Take a field the pattern knows well. The CRF calls it "Diastolic" and it sits on the Vital Signs form. A conforming map keeps the collected result in VSORRES, the unit in VSORRESU, and the standardized number in VSSTRESN, and sets VSTESTCD to DIABP. The useful part is the packet a reviewer should see beside that submission value.
| Check | What you are confirming |
|---|---|
| Source field | "Diastolic" on Vital Signs, not a similarly named field on another form. |
| Domain and variable | Domain VS. The collected result is VSORRES, the unit is VSORRESU, and the standardized number is VSSTRESN. The domain choice constrains every variable that follows. |
| Controlled terminology | VSTESTCD DIABP, the submission value in the CDISC CT version the study pinned. The NCI concept code is C25299. The concept code identifies the term. The variable holds DIABP. |
| Rationale | The SDTM IG section that supports the choice, and the codelist that was consulted. A mapping without that sentence is a guess with a variable name. |
| Confidence | A score. High-confidence standard vitals can be confirmed quickly. The score does not replace the pin to the CT version. |
| Flags | None expected on a standard vital. Novel domains, derived variables, and more than one plausible map stay in the queue even when the score looks calm. |
Systolic blood pressure is the same shape of problem with the submission value SYSBP. The NCI concept code for that term is C25298. The Pinnacle 21 note walks the failure mode: a concept code or a unit code stored in VSTESTCD, and a CT version other than the one the study pinned. This page is the review. That page is the error catalog.
The order of a three-hour review
The point of the mapper is a document a DM lead can review in three hours instead of three days. The order matters as much as the total.
First, the flags. Novel domains, sponsor conventions the model cannot know, derived variables, and rows with more than one plausible mapping. This is the expertise. Read the rationale and the source passage. Revise in the queue. The revision is attributed.
Second, a sample of the high-confidence majority. Demographics, standard vitals, common labs, MedDRA adverse events. Confirm the domain and that the code is in the pinned CT version. You are checking the pattern, not re-deriving it.
Last, the study-level rules. STUDYID and USUBJID have to be consistent across domains. Timing (--DTC and the visit variables) has to agree with the trial design. When records in different domains describe the same event, the relationship is represented in RELREC. --SEQ, such as VSSEQ, only makes a row unique for a subject inside one dataset. A row that is right in VS can still break the package. That cross-domain pass is also where submission errors hide when each domain was mapped on its own.
After a study has shown that the high-confidence category holds, the agency dial can move that category to supervised: auto-commit above a threshold the DM lead sets, flags still queued. The default, including the first study, is every row in the queue. The mapping still starts from one USDM object, so the CRF, the SDTM map, and the Define-XML are reading the same visit and the same endpoint.
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. STUDYID and USUBJID are built the same way in every domain. Visit timing and --DTC line up with the trial design, and relationships across domains are carried in RELREC. --SEQ stays inside its dataset. 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.