Skip to content

Check the ADaM data

In this chapter

  • Check the data sets against rules of the ADaM Implementation Guide.
  • Tell an error from a warning of the check, and know its limits.
  • Trace a variable: where it comes from and where it is used.
Time
15 minutes
At the end you have
the ADaM data checked against 27 rules of the ADaMIG v1.2 (0 errors, 6 warnings, one of them a real question about the baseline of the vital signs), and the trace of the efficacy flag.

13.1 The idea: two questions about the data

Section titled “13.1 The idea: two questions about the data”

A data set can be wrong in two ways. Its form can break the standard: a name too long, a label that the guide fixes differently, a flag with other values than Y and N. Or its content can break the plan: a derivation that is not the rule of the SAP. The first is a check against the ADaM Implementation Guide (ADaMIG). The second is a trace: from the SAP block to the specification rule to the SDTM source.

Terminal
$ sapling adam conform
adam conform ADAM CONFORMANCE PASS: 27 rules of the ADaMIG v1.2 on 7 data set(s): 0 error(s), 6 warning(s) (out/adam/conformance.md)
The ADaM conformance summary of the pilot: seven data sets with their structure, variables, rows, errors and warnings. ADSL has 254 rows, ADQSADAS 983, ADAE 1191; no data set has an error.
The seven data sets of the pilot: their class, their size, and the findings of the check. ADSL has one row per randomized patient: 254.Source: out/adam/conformance.md (sapling adam conform)
out/adam/conformance.md: the summary
| Data set | Structure | Variables | Rows | Errors | Warnings |
|---|---|---|---|---|---|
| ADAE | OCCDS | 33 | 1191 | 0 | 0 |
| ADLBC | BDS | 43 | 32740 | 0 | 1 |
| ADLBH | BDS | 43 | 21919 | 0 | 1 |
| ADQSADAS | BDS | 40 | 983 | 0 | 1 |
| ADQSCIBI | BDS | 36 | 730 | 0 | 1 |
| ADSL | ADSL | 32 | 254 | 0 | 0 |
| ADVS | BDS | 41 | 29643 | 0 | 2 |

An error stops a submission. A warning is for you to read. Open out/adam/conformance.md: here are the six.

out/adam/conformance.md: the findings
## Findings
- **warning** ADLBC.ANL01FL [ig-label; ADaMIG 3.2, 3.3: label]: The label of ANL01FL is "Analysis Record Flag 01"; the guide (3.3.8.1 Flag Variables for BDS Datasets) gives "Analysis Flag 01".
fix: Use the label of the guide, unless the variable has another meaning (then another name).
- **warning** ADLBH.ANL01FL [ig-label; ADaMIG 3.2, 3.3: label]: The label of ANL01FL is "Analysis Record Flag 01"; the guide (3.3.8.1 Flag Variables for BDS Datasets) gives "Analysis Flag 01".
fix: Use the label of the guide, unless the variable has another meaning (then another name).
- **warning** ADQSADAS.ANL01FL [ig-label; ADaMIG 3.2, 3.3: label]: The label of ANL01FL is "Analysis Record Flag 01"; the guide (3.3.8.1 Flag Variables for BDS Datasets) gives "Analysis Flag 01".
fix: Use the label of the guide, unless the variable has another meaning (then another name).
- **warning** ADQSCIBI.ANL01FL [ig-label; ADaMIG 3.2, 3.3: label]: The label of ANL01FL is "Analysis Record Flag 01"; the guide (3.3.8.1 Flag Variables for BDS Datasets) gives "Analysis Flag 01".
fix: Use the label of the guide, unless the variable has another meaning (then another name).
- **warning** ADVS.ANL01FL [ig-label; ADaMIG 3.2, 3.3: label]: The label of ANL01FL is "Analysis Record Flag 01"; the guide (3.3.8.1 Flag Variables for BDS Datasets) gives "Analysis Flag 01".
fix: Use the label of the guide, unless the variable has another meaning (then another name).
- **warning** ADVS.ABLFL [baseline; ADaMIG 3.3.4.1 (BASE), 3.3.8.1 (ABLFL)]: 762 subject and parameter pair(s) have more than one record flagged by ABLFL (e.g. 01-701-1015, DIABP: 3 records).
fix: The guide identifies one baseline record for each subject, parameter and baseline type: add BASETYPE when a parameter has more than one baseline (e.g. one for each time point).
...

Five of them say one thing: the label of ANL01FL is Analysis Record Flag 01, and the guide gives Analysis Flag 01. A label is the programmer’s to change in the specification.

The sixth is about content. In ADVS, 762 pairs of subject and parameter have more than one record flagged as the baseline: subject 01-701-1015 has three for the diastolic blood pressure. The vital signs of the pilot measure the blood pressure after lying down and two times after standing, so one visit has three records of a parameter. A baseline is one record per subject and parameter ADaMIG 3.3.4.1. The specification must say which record is the baseline, or the parameter must keep the positions apart. That is a question for you and the programmer. The primary analysis does not use ADVS, so the efficacy result does not change.

sapling find follows the links of the plan. Here is the efficacy flag:

Terminal
$ sapling find ADSL.EFFFL --kind adam
adam:ADSL.EFFFL Efficacy Population Flag [sap.qmd section 7.1.2 (Analysis populations)]
type: text
length: 1
origin: Derived
codelist: YN
protocol: 4.1: In general, all patients will be included in all analyses of efficacy if they have a baseline measurement and at least one postrandomization measurement.
Y if SAFFL = "Y" and any QS(QSCAT = "ALZHEIMER'S DISEASE ASSESSMENT SCALE" and VISITNUM > 3) and any QS(QSCAT = "CLINICIAN'S INTERVIEW-BASED IMPRESSION OF CHANGE (CIBIC+)" and VISITNUM > 3), N otherwise
is in (adam.dataset): adam:ADSL
comes from (adam.variable): adam:ADSL.SAFFL
comes from (sdtm.variable): sdtm:QS.QSCAT
is the source of (adam.variable): adam:ADLBC.EFFFL, adam:ADLBH.EFFFL, adam:ADQSADAS.EFFFL, adam:ADQSCIBI.EFFFL, adam:ADVS.EFFFL
is used by (sap): sap:population:EFF, sap:grouping:T14_1_1_EFF_GRP
is defined by (sap): sap:adam:ADSL.EFFFL:flag
is used by (analysis): analysis:T14_1_1_EFF_SUMM, analysis:T14_3_1_N, analysis:T14_3_1_BL_SUMM, analysis:T14_3_1_V_SUMM, analysis:T14_3_1_CHG_SUMM, analysis:T14_3_1_CHG_CMP, analysis:T14_3_2_N, analysis:T14_3_2_V_SUMM, analysis:T14_3_2_V_CMP
...
The whole output (22 lines)
Terminal
$ sapling find ADSL.EFFFL --kind adam
adam:ADSL.EFFFL Efficacy Population Flag [sap.qmd section 7.1.2 (Analysis populations)]
type: text
length: 1
origin: Derived
codelist: YN
protocol: 4.1: In general, all patients will be included in all analyses of efficacy if they have a baseline measurement and at least one postrandomization measurement.
Y if SAFFL = "Y" and any QS(QSCAT = "ALZHEIMER'S DISEASE ASSESSMENT SCALE" and VISITNUM > 3) and any QS(QSCAT = "CLINICIAN'S INTERVIEW-BASED IMPRESSION OF CHANGE (CIBIC+)" and VISITNUM > 3), N otherwise
is in (adam.dataset): adam:ADSL
comes from (adam.variable): adam:ADSL.SAFFL
comes from (sdtm.variable): sdtm:QS.QSCAT
is the source of (adam.variable): adam:ADLBC.EFFFL, adam:ADLBH.EFFFL, adam:ADQSADAS.EFFFL, adam:ADQSCIBI.EFFFL, adam:ADVS.EFFFL
is used by (sap): sap:population:EFF, sap:grouping:T14_1_1_EFF_GRP
is defined by (sap): sap:adam:ADSL.EFFFL:flag
is used by (analysis): analysis:T14_1_1_EFF_SUMM, analysis:T14_3_1_N, analysis:T14_3_1_BL_SUMM, analysis:T14_3_1_V_SUMM, analysis:T14_3_1_CHG_SUMM, analysis:T14_3_1_CHG_CMP, analysis:T14_3_2_N, analysis:T14_3_2_V_SUMM, analysis:T14_3_2_V_CMP
adam:ADLBC.EFFFL Efficacy Population Flag [sap.qmd section 7.6 (Laboratory values: chemistry (ADLBC))]
type: text
length: 1
origin: Predecessor
source: ADSL.EFFFL
...

Read it from the top: the variable, its type and codelist, the protocol sentence of section 4.1, the rule, the data set, the variables and the SDTM domain it comes from, the data sets that copy it, the SAP blocks that define and use it, and the analyses that read it. One command answers a reviewer’s question: why is this patient in the efficacy population, and which tables does that change?

Your turn 13.1 Trace the change from baseline

Where does ADQSADAS.CHG come from, and which analyses use it?

Show the answer
Terminal
$ sapling find ADQSADAS.CHG --kind adam
adam:ADQSADAS.CHG Change from Baseline [sap.qmd section 7.3 (ADAS-Cog (11) (ADQSADAS))]
type: number
length: 8
origin: Derived
protocol: 4.3.1: As stated in Section 3.9.1.2, the primary outcome measures are the ADAS-Cog (11) and CIBIC+ instruments.
CHG = AVAL - BASE on the records with AVISITN > 0
is in (adam.dataset): adam:ADQSADAS
comes from (adam.variable): adam:ADQSADAS.AVAL, adam:ADQSADAS.BASE, adam:ADQSADAS.AVISITN
is used by (sap): sap:analysis:T14_3_1_CHG
is defined by (sap): sap:adam:ADQSADAS.CHG:changefrombase
is used by (analysis): analysis:T14_3_1_CHG_SUMM, analysis:T14_3_1_CHG_CMP

CHG = AVAL - BASE on the records after baseline (AVISITN > 0). It comes from AVAL, BASE and AVISITN of the same data set. Two analyses use it: the summary of the change in Table 14.3.1 (T14_3_1_CHG_SUMM) and the comparison by treatment (T14_3_1_CHG_CMP), the dose response with the p-value of chapter 15.

What you learned

  • sapling adam conform checks the data sets against 27 rules of the ADaMIG v1.2; it does not replace a validator.
  • An error stops a submission; a warning is for you to read: here one warning is a real question (more than one baseline record in ADVS).
  • sapling find traces a variable from the protocol to the SAP, the specification, SDTM and the analyses.

Next: 14 · The shells →

Found an error or have a question? Write to datastep.studio@gmail.com· The plan is written in Sapling; every R program runs in DataStep Studio for R.

Data: the CDISC pilot study (cdiscpilot01). The protocol as CDISC USDM from the CDISC 360i project (MIT licence); the SDTM data from the PhUSE scripts repository (MIT licence). Public example data: no real patient.

R is a project of the R Foundation. SAS is a registered trademark of SAS Institute Inc. CDISC, SDTM, ADaM and USDM are trademarks of the Clinical Data Interchange Standards Consortium. Claude is a trademark of Anthropic. This book is not affiliated with or endorsed by any of them.

© 2026 DataStep Labs. All rights reserved.