Driver location:
sample study library directory/cst-framework-1.5/programs/validate_standard.sas
This driver module performs
all standard-specific validation checks. This excludes checks that
target the
global standards library directory/metadata
folder
files. Essentially, this is any check defined in validation_master,
where checktype NE ‘GLMETA’.
Here is the validate_standard
driver workflow:
-
Select the standards
of interest in work._cstStandardsforIV:
*************************************************************************;
* User defines standard(s) of interest in the following data step *;
*************************************************************************;
data work._cstStandardsforIV;
set work._cstAllStandards (where=(
(upcase(standard) = 'CDISC-ADAM' and standardversion='2.1')
or (upcase(standard) = 'CDISC-CRTDDS' and standardversion='1.0')
/*
or (upcase(standard) = 'CDISC-CT' and standardversion='1.0.0')
or (upcase(standard) = 'CDISC-ODM' and standardversion='1.3.0')
or (upcase(standard) = 'CDISC-ODM' and standardversion='1.3.1')
or (upcase(standard) = 'CDISC-SDTM' and standardversion='3.1.1')
or (upcase(standard) = 'CDISC-SDTM' and standardversion='3.1.2')
or (upcase(standard) = 'CDISC-SDTM' and standardversion='3.1.3')
or (upcase(standard) = 'CDISC-SEND' and standardversion='3.0')
or (upcase(standard) = 'CDISC-TERMINOLOGY' and standardversion='NCI_THESAURUS')
or (upcase(standard) = 'CST-FRAMEWORK' and standardversion='1.2')
*/
));
run;
In this example, validation
is performed only for the CDISC ADaM and CDISC CRT-DDS standards.
-
Modify the standard
validation SASReferences data set to point to the validation_control
view of interest.
In the SAS Clinical
Standards Toolkit 1.5, views have been provided to make defining the
various check subsets more dynamic. Physical SAS data sets can be
used, if preferred.
******************************************************************************;
* Modify the sample SASReferences data set to point to the run-time *;
* validation_control data set identifying the validation checks of interest. *;
* *;
* The validation_control_std view of the validation_master data set includes *;
* just those checks specific to one or more standards and excludes those core*;
* framework checks that look only within the <cstGlobalLibrary>/metadata *;
* folder. *;
*****************************************************************************;
libname _cstTemp "&studyrootpath/control";
data work.stdvalidation_sasrefs;
set _cstTemp.stdvalidation_sasrefs;
if type='control' and subtype='validation' then
do;
filetype='view';
memname='validation_control_std.sas7bvew';
end;
run;
-
Call the process setup
macro to perform all CST-FRAMEWORK file and library allocations.
The returned &_cstSASRefs
data set contains fully resolved path and memname values.
%cstutil_processsetup(_cstSASReferencesLocation=&workpath,_cstSASReferencesName=stdvalidation_sasrefs);
-
(Optional) Re-create
work.stdvalidation_sasrefs, and replace _srcfile=‘STDVAL’
with_srcfile=‘FWVAL’
*****************************************************************************;
* work.stdvalidation_sasrefs will accumulate SASReferences records from all *;
* sources for later use by cstvalidate(). *;
*****************************************************************************;
data work.stdvalidation_sasrefs;
set &_cstSASRefs
attrib _srcfile format=$8. label='File source for record';
**********************************************************************;
* Framework validation sasreferences: cstcntl.stdvalidation_sasrefs *;
**********************************************************************;
_srcfile='STDVAL';
run;
Note: This step is optional because
it merely provides an indication of the sources and purposes of specific
SASReferences data set records.
-
Call the code-generator
macro to build the job stream for each standard:
filename incCode CATALOG "work._cstCode.stds.source" LRECL=255;
%cstutilbuildstdvalidationcode(_cstStdDS=work._cstStandardsforIV,
_cstSampleRootPath=_DEFAULT_, _cstSampleSASRefDSPath=_DEFAULT_,
_cstSampleSASRefDSName=_DEFAULT_);
This macro call populates
the work._cstCode.stds.source catalog entry with standard-specific
code, which is subsequently %included. For information about macro
parameters, see the cstutilbuildstdvalidationcode() macro header comments
in the online API documentation.
The workflow of this
catalog entry is summarized in the following steps:
-
Initialize work._cstTempSASRefDS
to accumulate SASReferences records from all of the standards of interest
for later use by cstvalidate().
-
Look for the standard-specific
StandardSASReferences data set from the global standards library.
If found, run cstutil_processsetup() using this data set.
-
Append the fully resolved
work._cstSASRefs to the work._cstTempSASRefDS that was created in
validate_standard driver workflow step 1. Set _srcfile=‘STD’.
-
Look for the standard-specific
sdtvalidation_sasrefs data set from the sample library. If found,
run cstutil_processsetup() using this data set.
-
Append the fully resolved
work._cstSASRefs to the work._cstTempSASRefDS that was created in
step a. Set _srcfile=‘STUDY’.
-
Remove any duplicate
records from work._cstTempSASRefDS using these key values: standard,
standardversion, type, and subtype.
This significantly reduces
the number of records given the commonalities of SASReferences data
sets, but it is assumed that it is irrelevant which record is retained.
-
Run %cstutilbuildmetadatafromsasrefs(cstSRefsDS=work._cstTempSASRefDS,
cstSrcTabDS=work.source_tables, cstSrcColDS=work.source_columns).
-
Set _cstSASRefs=work._cstTempSASRefDS,
which is the cumulative ready-to-go SASReferences data set.
-
-
Remove standard-specific
records from work._cstTempSASRefDS to anticipate appending new records
for the next standard to the remaining framework records.
-
For each standard selected
in validate_standard driver workflow step 1, repeat steps a through
j in step 5.
Sample of Dynamically Derived work.reference_tables**
Note: **This is an excerpt only.
Not all records and columns are shown.
Sample of Dynamically Derived work.reference_columns**
Note: **This is an excerpt only.
Not all records and columns are shown.
Sample Results Data Set: validate_standard**
Note: **This is an excerpt only.
Not all records and columns are shown.