Clinical Data Mappings

SDTM DM, AE, and LB — source-shaped pitfalls

Why a perfectly loadable table can still be the wrong grain or the wrong precision for DM, AE, and LB.

\n

The problem

An EDC or warehouse extract already looks like a demographics table, an adverse-event listing, and a lab listing. Copying column names into STUDYID / USUBJID / AETERM is not the same as building SDTM. Official CDISC SDTM IGs (see CDISC standards) define domain purpose, required identifiers, timing variables, and controlled terminology. This page is a data engineer’s short list of grain and precision failures, not a domain implementation guide.

A working example

Synthetic source, two subjects. An illustrative DM-like projection executed in DuckDB 2.0.0:

STUDYID USUBJID SUBJID SEX_SOURCE BRTHDAT
STUDY-SYN-001 SYN-001 SYN-001 female 1985-03-17
STUDY-SYN-001 SYN-002 SYN-002 male 1979-11-02

Three issues already:

  1. SEX_SOURCE is still source language (female / male). Official SDTM demographics use controlled terminology for sex. This site does not republish that list. Recode from a licensed/official CT source, and keep the raw value in a supplemental or source-value field if you need traceability.
  2. USUBJID uniqueness is a study-level concern. If two studies reuse 001, a warehouse primary key of subject number alone will collide when you stack studies. Official SDTM practice is a unique subject identifier across the submission (commonly including study).
  3. Birth date precision and privacy are policy questions as well as modeling questions. Do not “complete” a year-only source value to YYYY-01-01.

Illustrative AE-like rows from the same synthetic extract:

USUBJID source id AETERM_SOURCE AESTDTC_ILLUSTRATIVE AESER_SOURCE_TEXT
SYN-001 AE-001 mild headache after first dose 2026-02-14T15:30:00 non-serious
SYN-002 AE-002 upset stomach 2026-02-15 (null)

The first onset had a time; the second was a date only. See ISO 8601 and –DTC for why padding the second value to T00:00:00 invents midnight.

LB grain. Labs are often delivered “wide” (one column per test) or with repeat tests on the same visit. SDTM LB is typically one row per finding, with a test name/code, a result, units, and timing. A wide load will silently drop the second blood pressure of the day unless you unpivot and give each finding its own sequence. This site does not publish official LB test codes.

The gotcha

AETERM-like verbatim text is not a coded dictionary term. Downstream ADaM and safety reviews depend on a coded term from a licensed dictionary (often MedDRA for adverse events — see MedDRA levels). Leaving the verbatim in a “code” column, or pasting a guessed code from memory, is how mappings become unreproducible.

Required SDTM identifier variables (study, subject, domain, sequence) are easy to omit in a “flat listing” extract. Official IGs, not this page, list what is required for a given domain version.

When not to use this

Verification

The synthetic DM- and AE-shaped result tables were produced by SQL in DuckDB 2.0.0. They are not validated SDTM datasets. Official variable expectations come from public CDISC SDTM materials linked below, not from a reproduced IG table.

Official docs