Module ADaM V2.1 (Run Time)

Overview

This is the CDISC ADaM 2.1 run-time macro library.
Since: V1.4
Module ADaM V2.1 (Run Time) Macro Summary
Exposure
Macro
External ADAM Reporting
%macro adam_createdisplay (displaysrc=Metadata,displaycode=, useanalysisresults=,usetlfddt=,displayid=,displaypath=) /des='CST: Create ADaM analysis result';
External ADAM Validation Process
%macro adam_validate /des='CST: Validate CDISC ADAM model files';
Check: See %adam_validate
Internal ADAM Utility
%macro adamutil_buildcheckdomainlist(_cstCheckDS= ,_cstWhereClause=,_cstOutputDS=) /des="CST: Build table list by checkid";
External ADAM Tool
%macro adamutil_createsrcmetafromsaslib /des='CST: Create ADAM metadata from SAS library';
External ADAM Reporting
%macro adamutil_gettlfmetadata(_cstOutLib= WORK, _cstMetaDataType=);

Macro Detail

%adam_createdisplay

%adam_createdisplay (displaysrc=Metadata,displaycode=, useanalysisresults=, usetlfddt=, displayid=, displaypath=) /des='CST: Create ADaM analysis result';
[ Exposure: external ] [ Macro Type: ADAM Reporting ]
Generate an analysis result from ADaM analysis data sets.
The basic function of this code module is to create an analysis result display. The path to the code to create the display is provided either directly in the macro parameters or is derived from a metadata source. Examples of metadata sources are analysis results metadata or tables, listings, and figures data definition metadata (TLFDDT) that you maintain and reference in the SASReferences data set.
Two primary paths (parameter settings) are supported:
  1. A code source is specified. A fully qualified path is required. The expectation is that this module will be %included below to generate an analysis result (display).
  2. Metadata provides the information necessary to generate an analysis result (display). This metadata is in the form of the CDISC ADaM analysis results metadata, supplemental tables, listings, and figures data definition metadata (TLFDDT), or both.
Parameters:
  • (Required) displaysrc: Specifies where information comes from to generate the result. Valid values are: Code | Metadata (default).
  • displaycode: Specifies either a valid filename or the fully qualified path to the code that produces an analysis result. If displaysrc=Code, this parameter is used and is required. All of the remaining parameters below are ignored.
  • useanalysisresults: Specifies whether the study-specific analysis results metadata are used to provide report metadata. Valid values are: N | Y (default). Either this parameter or usetlfddt must be set to Y if displaysrc=Metadata. If both useanalysisresults and usetlfddt parameters are set to Y, useanalysisresults takes precedence.
  • usetlfddt: Specifies whether the study-specific mock table shell’s metadata (known as tables, listings, and figures data definition metadata (TLFDDT)) are used to provide report metadata. Valid values are: N | Y (default). Either this parameter or useanalysisresults must be set to Y if displaysrc=Metadata. If both useanalysisresults and usetlfddt parameters are set to Y, useanalysisresults takes precedence.
  • displayid: The ID of the display from the designated metadata source. This parameter is required if displaysrc=Metadata.
  • (Optional) displaypath: Either a valid filename or the fully qualified path to the generated display. If not provided, the code looks in SASReferences for type=report.
File: adam_createdisplay.sas

%adam_validate

%adam_validate /des='CST: Validate CDISC ADAM model files';
[ Exposure: external ] [ Macro Type: ADAM Validation Process ]
Validate CDISC ADAM model files.
The basic function of this code module is to cycle through the validation checks to be run and to write validation results to the process results and metrics data sets. These results are persisted to any permanent location based on type=results records in SASReferences. Process cleanup is based on the _cstDebug global macro variable.
Required global macro variables (beyond reporting and debugging variables): (none)
Required file inputs: run time (type=control,subtype=validation in SASReferences) check data set
File: adam_validate.sas

%adamutil_buildcheckdomainlist

%adamutil_buildcheckdomainlist(_cstCheckDS=, _cstWhereClause=, _cstOutputDS= ) /des="CST: Build table list by checkid";
[ Exposure: internal ] [ Macro Type: ADAM Utility ]
Builds a data set that identifies the domains to be validated by each check. This is based on the contents of the validation check data set columns tableScope and columnScope.
Required global macro variables: (none)
Required file inputs: only as specified in the parameters
Parameters:
  • _cstCheckDS: The validation check data set containing the checks for any standard and standardversion. Typically, this is the Validation Master data set.
  • _cstWhereClause: An optional WHERE clause to subset _cstCheckDS. The syntax should comply with a SAS statement argument such as: VAR1=1, upcase(var2)="Y", or checkstatus>0.
  • _cstOutputDS: The output data set returned to the calling program. This data set contains a record for each domain referenced by any checkid, standardversion, and checksource.
File: adamutil_buildcheckdomainlist.sas

%adamutil_createsrcmetafromsaslib

%adamutil_createsrcmetafromsaslib /des='CST: Create ADAM metadata from SAS library';
[ Exposure: external ] [ Macro Type: ADAM Tool ]
This sample utility macro attempts to derive source metadata files from a SAS library for a CDISC ADAM study.
These source metadata files are used by the SAS Clinical Standards Toolkit to support CDISC ADaM validation and derivation of CDISC CRT-DDS (define.xml) files: source_tables, source_columns, and source_study.
This is the general strategy:
  1. Use PROC CONTENTS output as the primary source of information.
  2. Use reference_tables and reference_columns for matching columns.
Note: This is only an attempted approximation of source metadata. No assumptions should be made that the results accurately represent the study data.
Assumptions:
  • Source data is read from a single SAS library. The code can be modified to reference multiple libraries using library concatenation.
  • Data set keys are estimated by the sort order of the source data (if set). If it is not set, data set keys are estimated based on columns that SAS uses to define keys in the reference standard.
  • Most column values in source_study are hardcoded because there is no metadata source. These values are used only to build the define.xml file. These values are marked as <--- HARDCODE.
Limitations: Only those listed above.
File: adamutil_createsrcmetafromsaslib.sas

%adamutil_gettlfmetadata

%adamutil_gettlfmetadata(_cstOutLib=WORK,_cstMetaDataType=);
[ Exposure: external ] [ Macro Type: ADAM Reporting ]
Module to read TLF metadata from the sources defined in SASReferences that point to the TLF XML file and a SAS XML map fileto render that XML metadata in SAS.
Assumptions:
  • This module references a specific XML representation of the mock table shell’s metadata. Alternative representations of the metadata require modifications to this macro to read that metadata content.
  • The implementation of the sample ADaM reports provided with the SAS Clinical Standards Toolkit is intended to provide a sample workflow of report generation within the context of the SAS Clinical Standards Toolkit framework. You should use alternative means to capture and use metadata to support the reports to be submitted.
Parameters:
  • (Optional) _cstOutLib: Library for SAS representation of TLF metadata. The default is Work.
  • (Optional) _cstMetaDataType: Identifies a specific type of metadata. Example: tlf_master. If this parameter is not specified, all available metadata is created in _cstOutLib.
File: adamutil_ gettlfmetadata.sas