Module SEND V3.0 (Runtime)

This is the SEND 3.0 runtime macro library.

Since: V1.5

Macro Summary
external

%sendutil_createformatsfromcrtdds;
Derives codelists from a CRT-DDS data library.
external

%sendutil_createsrcmetafromcrtdds;
Derives source metadata files from a CRT-DDS data library.
external

%sendutil_createsrcmetafromsaslib;
Derives source metadata files from a SAS data library.
external

%sendutil_createtumordataset(_cstSENDInputLibrary=, _cstSENDOutputDSFile=, _cstSENDCreateXPT=1, _cstSENDOutputXPTFile=);
Creates a SEND TUMOR.XPT file and data set.

Macro Detail

%sendutil_createformatsfromcrtdds;

[ Exposure: external ]
Derives codelists from a CRT-DDS data library.

This sample utility macro derives code lists from a CRT-DDS data library that
is derived from define.xml for a CDISC SEND study.

These source metadata files are used by the SAS Clinical Standards Toolkit to
create codelists as provided in the CDISC CRT-DDS (define.xml) files:
codelists
codelistitems
clitemdecodetranslatedtext

This is the general strategy:
1. Combine CRT-DDS data to create the cntlin data set.
2. Read the cntlin data set using PROC FORMAT to create format catalog.


Assumptions:
1. The source data is read from a single SAS library. You can modify the
code to reference multiple libraries by using library concatenation.
2. You can specify only one study reference. Multiple study references
require modification of the code.
3. The following macro variables have been set either before invoking this
macro or be derived from the _cstSASRefs data set:
_cstCTCat (type=fmtsearch, format catalog name)
_cstCTLibrary (type=fmtsearch, target library for formats)
_cstSASrefLib (type=sourcedata, library of derived CRT-DDS data sets)
4. The following macro variables have been set previously:
_cstStandard (for example, CDISC-SEND)
_cstStandardVersion (for example, 3.0)

Expected Macro Variables:
_cstCTCat - Format catalog name
_cstCTLibrary - Target library for formats
_cstGRoot - Root path of the global standards library
_cstResultsDS - Results data set
_cstSASRefs - Run-time SASReferences data set derived in process setup
_cstSASrefLib - Library of derived CDT-DDS data sets
_cstSeqCnt - Results: Sequence number within _cstResultSeq
_cstSrcData - Results: Source entity being evaluated
_cstStandard - Name of a standard registered to the SAS Clinical
        Standards Toolkit
_cstStandardVersion - Version of the standard referenced in _cstStandard
_cstVersion - Version of the SAS Clinical Standards Toolkit
studyRootPath - Root path of the study library
File: sendutil_createformatsfromcrtdds.sas
First available in version: 1.3

%sendutil_createsrcmetafromcrtdds;

[ Exposure: external ]
Derives source metadata files from a CRT-DDS data library.

This sample utility macro derives source metadata files from a CRT-DDS data
library that is derived from the define.xml file for a CDISC SEND study.

These source metadata files are used by the SAS Clinical Standards Toolkit to
support CDISC SEND validation and to derive CDISC CRT-DDS (define.xml) files:
source_study
source_tables
source_columns
source_values
source_documents

This is the general strategy:
1. Use PROC CONTENTS output as the primary source of the information.
2. Use reference_tables and reference_columns for matching the columns.

NOTE: This is ONLY an attempted approximation of source metadata. No
assumptions should be made that the result accurately represents the
study data.

Assumptions:
1. The source data is read from a single SAS library. You can modify the
code to reference multiple libraries by using library concatenation.
2. Only one study reference can be specified. Multiple study references
require modification of the code.

Expected Macro Variables:
_cstCRTDataLib - CRT-DDS source data library
_cstGRoot - Root path of the global standards library
_cstLRECL - Logical record length setting for filename statement
_cstRefColumnDS - SEND reference column data set
_cstRefTableDS - SEND reference table data set
_cstReflib - SEND reference library
_cstResultsDS - Results data set
_cstSASRefs - Run-time SASReferences data set derived in process setup
_cstSENDDataLib - SEND metadata library
_cstSeqCnt - Results: Sequence number within _cstResultSeq
_cstSrcData - Results: Source entity being evaluated
_cstStandard - Name of a standard registered to the SAS Clinical
        Standards Toolkit
_cstStandardVersion - Version of the standard referenced in _cstStandard
_cstTrgColumnDS - Target source column metadata data set
_cstTrgDocumentDS - Target source documents metadata data set
_cstTrgMetaLibrary - Target library for CRT-DDS source data
_cstTrgStudyDS - Target source study metadata data set
_cstTrgTableDS - Target source table metadata data set
_cstTrgValueDS - Target source value metadata data set
_cstVersion - Version of the SAS Clinical Standards Toolkit
studyRootPath - Root path of the study library
File: sendutil_createsrcmetafromcrtdds.sas
First available in version: 1.3

%sendutil_createsrcmetafromsaslib;

[ Exposure: external ]
Derives source metadata files from a SAS data library.

This sample utility macro derives source metadata files from a SAS data
library for a CDISC-SEND study.

These source metadata files are used by the SAS Clinical Standards Toolkit to
support CDISC SEND validation and to derive CDISC CRT-DDS (define.xml) files:
source_study
source_tables
source_columns
source_values
source_documents

This is the general strategy:
1. Use PROC CONTENTS output as the primary source of the information.
2. Use reference_tables and reference_columns for matching the columns.
3. Use class_columns as a generic source for the metadata.

NOTE: This is ONLY an attempted approximation of source metadata. No
assumptions should be made that the result accurately represents the
study data.

Assumptions:
1. The source data is read from a single SAS library. You can modify the
code to reference multiple libraries by using library concatenation.
2. The data set keys are estimated by the sort order of the source data
(if specified). If it is not specified, the data set keys are estimated
based on columns that SAS uses to define keys in the reference standard.
3. For any unknown domain, the domain class (Events, Interventions, or
Findings) is estimated based on the class-specific topic variable (that
is, _TERM (events), _TRT (interventions), and _TESTCD (findings)).
4. 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 below.

Limitations:
1. source_documents and source_values have no SAS library source metadata
and are initialized as 0-observation data sets
2. Split domains have not been addressed

          
History:
   2013-11-17
Removed comment content because this is not the
intended source information for derivation of the define file.
Standardized lengths, labels, and formats.
Added initialization of source_values and source_documents.
Expected Macro Variables:
_cstCRTDataLib - CRT-DDS Source data library
_cstClassColumnDS - Reference class column metadata data set
_cstGRoot - Root path of the global standards library
_cstRefColumnDS - Reference column metadata data set
_cstRefLib - Reference metadata library
_cstResultsDS - Results data set
_cstSASRefs - Run-time SASReferences data set derived in process setup
_cstSENDDataLib - SEND Source data library
_cstSeqCnt - Results: Sequence number within _cstResultSeq
_cstSrcData - Results: Source entity being evaluated
_cstStandard - Name of a standard registered to the SAS Clinical
        Standards Toolkit
_cstStandardVersion - Version of the standard referenced in _cstStandard
_cstTrgMetaLibrary - Target Source metadata library
_cstTrgStudyDS - Target Source study metadata data set
_cstVersion - Version of the SAS Clinical Standards Toolkit
studyRootPath - Root path of the study library
File: sendutil_createsrcmetafromsaslib.sas
First available in version: 1.5

%sendutil_createtumordataset(_cstSENDInputLibrary=, _cstSENDOutputDSFile=, _cstSENDCreateXPT=1, _cstSENDOutputXPTFile=);

[ Exposure: external ]
Creates a SEND TUMOR.XPT file and data set.

This macro creates a TUMOR.XPT file and data set as specified for FDA
submission in the SEND Version 3.0 Implementation Guide, Appendix C.

NOTE: The following source domains are required: DM, TX, EX, DS, MI, and TF.

Expected Macro Variables:
_cstDebug - Turns debugging on or off for the session
_cstGRoot - Root path of the global standards library
_cstResultsDS - Results data set
_cstSASRefs - Run-time SASReferences data set derived in process setup
_cstSeqCnt - Results: Sequence number within _cstResultSeq
_cstSrcData - Results: Source entity being evaluated
_cstStandard - Name of a standard registered to the SAS Clinical
        Standards Toolkit
_cstStandardVersion - Version of the standard referenced in _cstStandard
_cstVersion - Version of the SAS Clinical Standards Toolkit
studyRootPath - Root path to the sample source study
Parameters:
_cstSENDInputLibrary  - required - The libname that points to the SEND
        domains.
_cstSENDOutputDSFile  - required - The libname.SAS data set name
        (for example, study1.tumor) combination that specifies the data set
        name and library in which the content is written.
_cstSENDCreateXPT  - optional - Generate a transport file.
        Default: 1
_cstSENDOutputXPTFile  - conditional - The full path and filename of the
        transport file to generate. If _cstSENDCreateXPT=1, a value is
        required.
        Example: c:\protocol_abc\study123\fda\tumor\rat.xpt
File: sendutil_createtumordataset.sas
First available in version: 1.5