StatAgentWeekly email

First SDTM mapping spec from CRF pages

Paste CRF page text, get a draft SDTM mapping spec with every guess flagged and the open questions listed.

About 20 minExcelDemonstration only

What you get

12
F9fxWrong
ABCDEF
1CRF fieldSDTM variableOriginTerminology or formatCRF pageChecked against define.xml
2Header "H2Q-MC-LZZT" with annotation "STUDYID" and fragment "CDISCPILOT01"STUDYID (all domains)AssignedLiteral "CDISCPILOT01" (fragment read in full)7Partly correct
3Patient initials (First / Middle / Last)Nonen/an/a7Correct
4Patient and site identifiersNone legible. The "PATIENT ... IDENTIFICATION" heading is interleaved with another fragment (partial).n/an/a7Real gap
5Visit date (MM/DD/YY)SV.SVSTDTC. A fragment reads "SVSTDTC" (partial). The same date is also routed to other --DTC variables, as in the next row.CRFISO 8601. The CRF format is MM/DD/YY.7Partly correct
6(Visit date annotation list)The fragments read AEDTC, CMDTC, DMDTC, DSSTDTC, DSDTC, QSDTC, VSDTC, MHDTC and SCDTC (partial, in scrambled order).CRFISO 86017Correct
7(no printed label)VISITNUMAssigned"1" (fragment VISITNUM="1" appears more than once, legible)7Partly correct
9Date of birth (MM/DD/YY)DM.BRTHDTC (suggestion)CRFISO 86017Wrong
10Sex: "F Female", "M Male"DM.SEXCRFF, M (printed codes). Suggestion: these match the CDISC SEX codelist.7Correct
11Race "Origin": CA Caucasian (European, Mediterranean, Middle Eastern); AF African Descent (Negro, Black); EA East/Southeast Asian; AS Western Asian (Pakistani, Indian Sub-continent); HP Hispanic (Mexican-American, Mexico, Central and South America); O Other (Mixed-racial parentage, American Indian, Eskimo)DM.RACE (suggestion). The HP option may belong in DM.ETHNIC instead (Q6).CRFThe 2-letter codes are CRF codes only. Do not copy them into RACE.7Correct
12Number of years of education completedSC.SCORRESCRFNumeric, in years8Partly correct
13(SCTESTCD)SC.SCTESTCDAssigned"YEARSEDU"8Partly correct
14HABITS: SMOKING, "Information not obtained"Suggestion: SU.SUSTAT = "NOT DONE"CRFn/a8Not in source
15Number of cigarettes, cigars, pipesful (average current daily use)Suggestion: SU (SUTRT = CIGARETTES, CIGARS, PIPE; SUDOSE; SUDOSFRQ = per day)CRF0 = None; L = Less than one; 1, 2, 3... whole numbers8Not in source
16Number of years (past or current) patient has smoked; enter 0 if never smokedSuggestion: SU.SUDURCRFSuggestion: ISO 8601 duration, "P#Y"8Not in source
17Month and year that the patient quit smoking (MM/YY)Suggestion: SU.SUENDTCCRFISO 8601 partial date, YYYY-MM8Not in source
18HABITS: ALCOHOL, "Information not obtained"Suggestion: SU.SUSTAT = "NOT DONE"CRFn/a8Not in source
19Number of beers or wine coolers/spritzers; glasses of wine; drinks containing distilled spirits (average current weekly consumption)Suggestion: SU (SUTRT = ALCOHOL, with SUDOSE and SUDOSFRQ = per week)CRF0 = None; L = Less than one; whole numbers8Not in source
20Weight, "Information not obtained"Suggestion: VS.VSSTAT = "NOT DONE"CRFn/a16Correct
21Weight (__ __ __ . __)VS.VSORRESCRFNumeric, rounded to the nearest tenth. The width is not shown.16Correct
22Weight unit: kg Kilogram, lb PoundVS.VSORRESUCRFThe printed codes are "kg" and "lb". Whether these match the CDISC UNIT terms is Q8.16Partly correct
23(VSTESTCD)VS.VSTESTCDAssigned"WEIGHT"16Correct
24Height, "Information not obtained"Suggestion: VS.VSSTAT = "NOT DONE"CRFn/a16Correct
25Height (__ __ __ . __)VS.VSORRESCRFNumeric, rounded to the nearest tenth. The format shown is `___ . ___`.16Correct
26Height unit: cm Centimeter, in InchVS.VSORRESUCRFThe printed codes are "cm" and "in". See Q8.16Partly correct
27(VSTESTCD)VS.VSTESTCDAssigned"HEIGHT"16Correct
28Vital signs table: Reference Timing, Position, Time CodeVS.VSPOS, VS.VSTPT, VS.VSTPTNUM (annotated; fragment names read)CRF / AssignedPosition codes printed: SU = Supine, ST = Standing.16Correct
29Time Code 815 / 816 / 817VS.VSTPTNUMAssigned815, 816, 81716Correct
30Heart RateVS.VSORRES with VSTESTCD "PULSE"CRFNumeric16Correct
31Blood Pressure (mmHg), Systolic/DiastolicVS.VSORRES with VSTESTCD "SYSBP" and "DIABP"CRFNumeric. The unit "mmHg" is printed in the column header.16Correct
32Vital signs, "Information not obtained"Suggestion: VS.VSSTAT = "NOT DONE"CRFn/a16Correct
33(visit date for VS)VS.VSDTCCRFISO 860116Correct
MappingRead meOpen questionsCheck countsShowing 18 of 32 rows

Swipe sideways to see every column.

All 32 mapping rows. The XLSX also has the 11 open questions and the define.xml check column.

Draft for review. Public data only.

Get the next workflow by email

The prompt

Draft an SDTM mapping spec from the CRF text below.
Table: CRF field | SDTM domain.variable | origin (CRF / Assigned / Derived) | controlled terminology |
derivation or comment | CRF page.
Use only the CRF text and the SDTM-IG. Do not trust annotation fragments you cannot read in full.
Invent no codelist values, visit numbers or domains. Mark anything from general SDTM knowledge "suggestion".
End with numbered open questions for the data manager, each tied to a CRF page.

CRF PAGES (text): [paste]

Works in any chat assistant. Not tested in Microsoft 365 Copilot.

Sample input used here

CRF text, PDF pages 7, 8 and 16 (raw text layer)

[CRF PDF p. 7 (Visit 1, page 1 of 14)]
H2Q-MC-LZZT STUDYID
when
PATIENT ANSDTUVDIYSIDIT= IDENTIFICATION
"CDISCPIL
OT01"
Not Entered In Database
Patient initials ______ ______ _____
First Middle Last
--STDTC --DTC
Visit date _____[S/_V_S_T_D_/T_C___[_AEDTC
MM , DD YY ,
DSSTDTC] CMDTC
INFORMED CONwShEenNT ,

CDISC SDTM/ADaM Pilot Project annotated blank CRF; the text layer is copyright Eli Lilly and Co. 2006. Short excerpts with attribution to CDISC.

How this was checked

Result

Generated by Claude on 2026-10-20 (cold run, no tools).

Demonstration only. Invented or synthetic input and no answer key. It shows the format, not a verified result.

No false readingNo wrong statement about what the three pages show; no codelist values invented.
Checked rowsOf 22 checked statements and questions: 13 correct (4 real gaps), 6 partly correct, 1 wrong (BRTHDTC), 2 not in source (SU domain, century rule).
Source clashThe CRF annotation reads YEARSEDU; define.xml uses EDLEVEL. Two CDISC files disagree; not resolved here.
LimitsThree pages of 157; one reader of define.xml; the CRF text already carries CDISC SDTM annotations, so the task was easier than a clean paper CRF.
Table of checked statementsThe table lists the 22 good-run statements, then 11 from the one-line prompt run (labelled 'One-line prompt run:'). The good run has 1 wrong; the one-line prompt run has 3 wrong (ARM codes, baseline flag, BRTHDTC).

Prompt shortened for this page. The output shown came from the earlier run of the longer prompt (2026-10-20).

The longer prompt that was checked

You are helping a clinical programmer draft an SDTM mapping specification from case report form (CRF) pages. Use ONLY the CRF text above plus your knowledge of the CDISC SDTM Implementation Guide. Produce a mapping table with these columns: CRF field (as printed) | SDTM domain.variable | Origin (CRF / Assigned / Derived) | Controlled terminology or format | Derivation or comment | CRF page. The text layer contains annotation fragments printed over the form; use them where legible, but do not trust a fragment you cannot read in full. Where the pages do not settle something (a variable, a codelist, a unit rule, which domain a field belongs in), do not guess: list it in a final section "Open questions for the data manager", numbered, each tied to a CRF page. Do not invent codelist values, visit numbers, or domains that the pages do not support. Mark anything you add from general SDTM knowledge as "suggestion".

A one-line prompt for comparison

Prompt: Write an SDTM mapping spec for the CRF of an Alzheimer's trial.

# SDTM Mapping Specification: Alzheimer's Disease Trial

## 1. Overview
This specification maps the case report form (CRF) data of the Alzheimer's disease study to CDISC SDTM (SDTMIG v3.2). Source CRF data are captured in EDC and delivered as raw datasets.

## 2. Domains
| Domain | Description | Source CRF |
|---|---|---|
| DM | Demographics | Demographics form |
| AE | Adverse Events | Adverse Events form |
| CM | Concomitant Medications | Con Med form |
| EX | Exposure | Study Drug Administration form |
| VS | Vital Signs | Vital Signs form |
| LB | Laboratory Test Results | Central lab transfer |
...

33 statements checked: 16 right, 10 partly right, 4 wrong, 3 not in source.

Show all 33 checked statements
StatementVerdictSource check
Good run: STUDYID is the literal CDISCPILOT01, taken from a legible annotation fragment; origin AssignedPartly right correctdefine.xml DM.STUDYID: Origin 'CRF Page 7'. Value CDISCPILOT01 is correct; the origin label differs (Assigned vs CRF page 7).
Good run: Open question 2: printed H2Q-MC-LZZT is the sponsor protocol number, so which is STUDYIDRightReal gap. CRF p. 7 prints H2Q-MC-LZZT; define.xml uses CDISCPILOT01. The CRF alone does not say where the other value goes.
Good run: Patient initials are not mappedRightNo initials variable in any define.xml domain.
Good run: Visit date maps to SV.SVSTDTC (marked partial)Partly right correctdefine.xml SV.SVSTDTC is Origin 'Derived' (earliest date data were collected for the visit), not a direct CRF field. DM.DMDTC, SC.SCDTC and VS.VSDTC take the CRF date.
Good run: AEDTC and CMDTC in the visit-date annotation list are not standard IG variablesRightdefine.xml has AE.AESTDTC and CM.CMSTDTC (CRF pp. 121-123, 124-126) and no AEDTC or CMDTC.
Good run: VISITNUM is Assigned, value 1Partly right correctdefine.xml VISITNUM codelist: 1 = 'SCREENING 1'. Value correct; define lists VISITNUM origin as CRF pages.
Good run: Consent date: candidates DS.DSSTDTC or DM.RFICDTCPartly right correctdefine.xml DM.RFICDTC is Origin 'Derived' with comment 'Date of informed consent was not entered in database'. DS.DSSTDTC comes from CRF pp. 106 and 139, not p. 7. So the date is not mapped from this page.
Good run: Date of birth maps to DM.BRTHDTC; AGE derived from it if DOB is in the databaseWrongdefine.xml DM has no BRTHDTC. AGE is Derived 'at start of study drug (RFSTDTC)'. The hedge about 'Not Entered In Database' was right, the suggested variable was not used.
Good run: Sex maps to DM.SEX with codes F and MRightdefine.xml SEX codelist: F, M, U. Origin CRF page 7.
Good run: Race maps to DM.RACE; Hispanic may belong in ETHNIC; the 2-letter CRF codes are not copiedRightdefine.xml DM.ETHNIC is Derived: 'HISPANIC OR LATINO' if Origin = Hispanic, otherwise 'NOT HISPANIC OR LATINO'. RACE codelist has four terms (WHITE, BLACK OR AFRICAN AMERICAN, AMERICAN INDIAN OR ALASKA NATIVE, ASIAN). The cold run proposed no term mapping, so it was not wrong, but it was not complete.
Good run: Years of education maps to SC.SCORRES, in years, SCTESTCD 'YEARSEDU' (from an annotation fragment)Partly right correctdefine.xml: SC domain, SCORRES and SCORRESU Origin 'CRF Page 8', SCUNIT codelist = YEARS. But the SCTESTCD value is EDLEVEL (label 'EDUCATION LEVEL'), SCCAT = EDUCATION is Assigned, and the cold run did not mention SCCAT. The CRF annotation and define.xml disagree on the test code; not resolved here.
Good run: Smoking and alcohol items go to an SU domain (suggestion); Q7 asks SU, MH or SCNot in sourcedefine.xml has no SU domain and no smoking, alcohol or caffeine variables. These CRF items appear not to have been tabulated. The question was reasonable; the suggested domain did not exist in this study.
Good run: Weight to VS.VSORRES with VSTESTCD WEIGHT; height to VS.VSORRES with HEIGHTRightdefine.xml VS.VSTESTCD value list: DIABP, HEIGHT, PULSE, SYSBP, TEMP, WEIGHT. VSORRES Origin CRF pages 16 onward.
Good run: VSORRESU uses the printed unit; suggestion to standardize to kg and cm; Q8 asks whether printed codes match controlled termsPartly right correctdefine.xml VSUNIT codelist: kg, cm, LB, IN, mmHg, BEATS/MIN, C, F. The case differences (lb vs LB, in vs IN) justify Q8. VSSTRESU is 'Assigned ... defined per parameter'; define.xml does not state a conversion rule, so the kg and cm suggestion is not confirmed.
Good run: Heart rate maps to VSTESTCD PULSE and BP to SYSBP and DIABP, one entry giving two recordsRightdefine.xml VS.VSTESTCD value list has PULSE, SYSBP and DIABP as separate tests. Units BEATS/MIN and mmHg are in VSUNIT.
Good run: Rows pair 815 with 5 minutes supine, 816 with 1 minute standing, 817 with 3 minutes standingRightdefine.xml VSTPTNUM: 815 = AFTER LYING DOWN FOR 5 MINUTES, 816 = AFTER STANDING FOR 1 MINUTE, 817 = AFTER STANDING FOR 3 MINUTES. VSPOS terms are STANDING and SUPINE.
Good run: Open question 9: the VSPOS and VSTPT terms are not on the pageRightReal gap. The exact VSTPT wording and the spelled-out VSPOS terms are only in define.xml (codelists VSPOS, VSTPT).
Good run: 'Information not obtained' boxes map to VSSTAT = NOT DONERightdefine.xml VS.VSSTAT, codelist ND = NOT DONE, Origin CRF pages.
Good run: VSDTC comes from the visit dateRightdefine.xml VS.VSDTC Origin CRF pages 16 onward; the p. 7 annotation lists VSDTC against the visit date.
Good run: Open question 11: whether VISITNUM = 1 applies to p. 8 and p. 16, and what VISIT isRightReal gap. define.xml VISITNUM 1 = SCREENING 1; VISIT value 'SCREENING 1'. Neither is printed on the pages.
Good run: Open question 3: SUBJID, SITEID and USUBJID derivations are not legibleRightReal gap. define.xml: SUBJID Origin CRF Page 7; SITEID Assigned; USUBJID Derived, 'Concatenation of STUDYID, DM.SITEID and DM.SUBJID'. See the unresolved length note in errors_found.
Good run: Open question 4: two-digit years need a century ruleNot in sourceNeither the CRF pages nor define.xml states a rule.
One-line prompt run: Domain list DM, AE, CM, EX, VS, LB, MH, DS, QS, EGPartly right correctdefine.xml has DM, AE, CM, EX, VS, LB, MH, DS, QS plus SC, SV, SE and trial design domains. EG does not exist; SC and SV are missing from the bad list.
One-line prompt run: STUDYID is a protocol constantPartly right correctdefine.xml: Origin 'CRF Page 7', value CDISCPILOT01.
One-line prompt run: USUBJID = STUDYID + SITEID + SUBJID joined with '-'Partly right correctdefine.xml comment: concatenation of STUDYID, SITEID and SUBJID. The separator is not stated.
One-line prompt run: RFSTDTC and RFENDTC from the first and last exposureRightdefine.xml DM.RFSTDTC and RFENDTC: derived from EX.
One-line prompt run: BRTHDTC from date of birth; AGE from BRTHDTCWrongdefine.xml DM has no BRTHDTC; AGE is derived at RFSTDTC.
One-line prompt run: ARM and ARMCD map to Placebo or Xanomeline, PBO or XANWrongdefine.xml ARMCD: Scrnfail, Pbo, Xan_Lo, Xan_Hi; ARM: Screen Failure, Placebo, Xanomeline Low Dose, Xanomeline High Dose.
One-line prompt run: COUNTRY from the site country, ISO 3166 alpha-3Rightdefine.xml DM.COUNTRY: Derived from site information; codelist USA.
One-line prompt run: AEDECOD and AEBODSYS from MedDRARightdefine.xml AEDICT: MEDDRA version 8.0. The CRF p. 122 text mentions a COSTART class term, which the bad run could not have known.
One-line prompt run: QS holds ADAS-Cog, CIBIC+, MMSE, ADCS-ADLPartly right correctdefine.xml QSCAT includes Alzheimer's Disease Assessment Scale, CIBIC+, Mini-Mental State, DAD, NPI-X and Modified Hachinski. ADCS-ADL is not among them (the study used DAD).
One-line prompt run: Baseline flag is the last non-missing value before first doseWrongdefine.xml VS.VSBLFL: 'If VISIT = BASELINE then VSBLFL = Y' (a visit rule, not a pre-dose rule).
One-line prompt run: No open questions; SC, SV, vital-sign terms and units are not addressedNot in sourceThe bad output has no SC or SV domain, no controlled terms or units for VS, and no list of what it did not know. Nothing flags that the DOB and consent date are not in the database.

All 5 checks

  1. Treat the open questions as the data manager's agenda. Most real gaps (VISIT labels, USUBJID rule, VSPOS terms) are answered only in the define file.
  2. Run a few dummy records through your mapping code before you rely on the spec; nothing was executed here.

Sources

Scripts

Related workflows

All workflows. How we check. Public data only. Drafts for review, not validated output.

Get one workflow a week

Unsubscribe anytime. Privacy.