Cross-Standard Validation

Overview

The implementation of the ADaM 2.1 standard in the SAS Clinical Standards Toolkit 1.4 introduces six cross-standard validation checks that require metadata checks and data checks between two different standards. These two standards are ADaM 2.1 and SDTM 3.1.2.
Earlier releases of the SAS Clinical Standards Toolkit did not need to address cross-standard validation. Therefore, macros to handle cross validation were not developed. With the release of the SAS Clinical Standards Toolkit 1.4, two macros were developed: cstcheck_crossstdcomparedomains.sas and cstcheck_crossstdmetamismatch.sas. These macros are located in !sasroot/cstframework/sasmacro.

The cstcheck_crossstdcomparedomains Macro

The cstcheck_crossstdcomparedomains macro compares values for one or more columns in one table with those same columns in another domain in another standard. Or, it compares the values against metadata from the comparison standard. The macro requires use of _cstCodeLogic as a full DATA step or PROC SQL invocation. This DATA or SQL step assumes as input a work copy of the column metadata data set returned by the cstutil_buildcollist macro. Any resulting records in the derived data set represent errors to be reported.
Here are example validation checks that use the cstcheck_crossstdcomparedomains macro:
  • ADaM subject not found in the SDTM DM domain
  • ADaM SDTM domain reference (for traceability), but the SDTM domain is unknown
An ADaM 2.1 validation check that uses this macro is ADAM0053. Here is the rule description for this check, taken from the CDISC ADaM Validation document:
Invalid STUDYID/USUBJID combination not found in the SDTM Demographics domain.
Here is the message text for this check:
The values of USUBJID are not present in SDTM.DM
Here is sample code from the codelogic field from the ADaM 2.1 Validation Master data set for validation check ADAM0053. In this example, &_cstSQLColList and &_cstCrossDataLib are generated by the macro prior to execution of codelogic.
proc sql noprint;
create table work._cstproblems as
  select &_cstSQLColList from &_cstDSName
 	except select &_cstSQLColList from &_cstCrossDataLib..dm;
quit;

The cstcheck_crossstdmetamismatch Macro

The cstcheck_crossstdmetamismatch macro identifies inconsistencies in metadata across registered standards. The macro requires use of _cstCodeLogic as a full DATA step or PROC SQL invocation. This DATA step or SQL step assumes as input a work copy of the column metadata data set returned by the cstutil_buildcollist macro. Any resulting records in the derived data set represent errors to be reported.
Assumptions:
  1. No data content is accessed for this check.
  2. Both study and reference metadata are available to assess compliance.
  3. The _cstProblems macro includes at least two columns. The mnemonics are from the global standards library data set:
    • &_cstStMnemonic._value (for example, ADAM_value containing the value of the column of interest from the primary standard)
    • &_cstCrMnemonic._value (for example, SDTM_value containing the value of the column of interest from the comparison standard)
Required global macro variables:
  • _cstcrossstd: The name of the comparison standard. It is also used as a parameter to initialize _cstCrMnemonic.
  • _cstcrossstdver: The version of the comparison standard.
  • _cstrunstd: The primary standard. It is also used as a parameter to initialize _cstStMnemonic.
  • _cstrunstdver: The version of the primary standard.
An ADaM 2.1 validation check that uses this macro is ADAM0002. Here is the rule description for this check, taken from the CDISC ADaM Validation document:
Any ADaM variable whose name is the same as an SDTM variable must be a copy of the SDTM variable, and its label and values must not be modified.
Here is the message text for this check:
A variable is present in ADaM with the same name as a variable present in 
SDTM but the variables do not have identical labels
Here is sample code from the codelogic field from the ADaM 2.1 Validation Master data set for validation check ADAM0002. In this example, &_cstStMnemonic=ADAM and &_cstCrMnemonic=SDTM are generated by the macro prior to execution of codelogic.
%let _cstAttr=label;
proc sql noprint;
create table work._cstProblems as 
   select &_cstStMnemonic..table, &_cstStMnemonic..column, 
   &_cstStMnemonic..&_cstAttr as &_cstStMnemonic._value, 
   &_cstCrMnemonic..&_cstAttr as &_cstCrMnemonic._value 
from work._cstcolumnmetadata &_cstStMnemonic left join 
  work._cstcrosscolumnmetadata &_cstCrMnemonic on 
  upcase(&_cstStMnemonic..column)=upcase(&_cstCrMnemonic..column) 
  where &_cstCrMnemonic..column ne "" and 
  (&_cstStMnemonic..&_cstAttr ne  &_cstCrMnemonic..&_cstAttr);
quit;