Presentation is loading. Please wait.

Presentation is loading. Please wait.

A SAS macro to check SDTM domains against controlled terminology

Similar presentations


Presentation on theme: "A SAS macro to check SDTM domains against controlled terminology"— Presentation transcript:

1 A SAS macro to check SDTM domains against controlled terminology

2 When do we need this? During SAS development of SDTM domains
Checking overall compliance to Controlled terminology (CT) for a study. Checking CT of one domain across multiple studies e.g. for pooling.

3 Process Flow: The metadata
Let‘s focus on the Meta first.

4 Controlled terminology (CDISC)
The first Metadata is the CT itself. Notice that the structure of the SAS dataset is slightly different: Headline information is maintained as rows.

5 CDISC SDTM 3.1.2 Validation Rules for controlled terminology (CT)

6 Derive variables that have to comply to CT
+ In the next step I show how to determine the variables that have to comply to CT (ctvarsel) For simplicity of presentation I focus on one domain: AE

7 Intersection of two lists of values
Assume we are looking at a single dataset AE. Which variables need to comply to CT? This comes down to creating the intersection of variables

8 Join metadata information (and create instructions)
I will show how instructions are built for one domain ae and one variable

9 Build values list This is the end result of the following step

10 Creating a list iteratively
For variables in ctvarsel.sas7bdat multiple observations could be present with different where conditions (e.g. TSPARMCD values in the TS domain). Therefore we need maintain all combinations of “variable” and “where”. Furthermore, assuming they are always allowed, empty values are added to the end of each list.

11 + The violations dataset is the major dataset required for reporting

12 Creating the violations dataset

13 Violations dataset: One OBS per violation
The violations dataset combines the SDTM dataset and the metadata needed to formulate the CT violation conditions (ctvarmd.sas7bdat). This is implemented via a %syscall set() statement to convert the values of the data step variables of dataset ctvarmd.sas7bdat into macro variables. These macro variables are then used in subsetting if statements to only keep observations of the SDTM dataset that contain a CT violation. Note that the where condition is only added to the if-statement if the variable “where” contains a value.

14 Extension: Multiple studies and multiple domains
domains/datasets Studies (libnames) LIBNAMES = List of Libnames DSETLIST = List of domains/datasets Index _J Index _I

15 Extentsion: Multiple domains/datasets
&DSETLIST.= ae eg vs … e.g.: &_dset1. = ae &_dset2. = eg &_dset3. = vs etc. How to create list of elements for later looping. The extensions are implemented applying appropriate macro-looping, starting with splitting up the lists (libnames and datasets) into single elements, e.g. where &DSETLIST is the list of user-specified datasets:

16 Extension: Multiple libnames
When setting together SDTM Domain datasets their common variable attributes - label, type, length - have to be accounted for. This paper focuses on the length of the variables as this is probably the most critical attribute when dealing with SDTM domains. The following statements were used to create a macro variable &_lengthv that contains a length statement. It accounts for the maximum length of the variable observed across all libnames. This statement occurs within the looping through the datasets indicated by loop variable &_i; It assigns to all variables the maximum length across the all libnames.

17 Reporting and tabulation

18 Xml-Output (in Excel)

19 XML Output

20 Conclusion Can be used within SAS programs ADaM or SDTM
Multiple studies can be checked simultaneously Users can control and modify input metadata (sponsor or study specific codelists) Scope is addressed via macro parameters All domains of current study Specific domains across various studies etc.

21 Questions?


Download ppt "A SAS macro to check SDTM domains against controlled terminology"

Similar presentations


Ads by Google