Using SAS® Macros to Simplify Preparation of SDTM Data ... · Using SAS® Macros to Simplify...
Transcript of Using SAS® Macros to Simplify Preparation of SDTM Data ... · Using SAS® Macros to Simplify...
![Page 1: Using SAS® Macros to Simplify Preparation of SDTM Data ... · Using SAS® Macros to Simplify Preparation of SDTM Data, Annotated CRFs and Define.xml PhUse 2009, Basel Niels Both](https://reader030.fdocuments.us/reader030/viewer/2022040109/5e9e3e4338a4ae30894fefc1/html5/thumbnails/1.jpg)
Using SAS® Macros to Simplify Preparation of SDTM Data,
Annotated CRFs and Define.xml
PhUse 2009, Basel
Niels BothPrincipal Consultant
S-Cubed
![Page 2: Using SAS® Macros to Simplify Preparation of SDTM Data ... · Using SAS® Macros to Simplify Preparation of SDTM Data, Annotated CRFs and Define.xml PhUse 2009, Basel Niels Both](https://reader030.fdocuments.us/reader030/viewer/2022040109/5e9e3e4338a4ae30894fefc1/html5/thumbnails/2.jpg)
S-cubed ApS | Skovbakken 1 | DK-3500 Værløse | Phone: +45 3644 7677 | [email protected] | www.s-cubed.dk
SDTM Generation
Presentation - Overview
ConclusionAnnotated CRF
Define.xml
Overall Architecture
eCTD
SDTM Step 2: Generic Macros
SDTM Step 1: Mapping
![Page 3: Using SAS® Macros to Simplify Preparation of SDTM Data ... · Using SAS® Macros to Simplify Preparation of SDTM Data, Annotated CRFs and Define.xml PhUse 2009, Basel Niels Both](https://reader030.fdocuments.us/reader030/viewer/2022040109/5e9e3e4338a4ae30894fefc1/html5/thumbnails/3.jpg)
S-cubed ApS | Skovbakken 1 | DK-3500 Værløse | Phone: +45 3644 7677 | [email protected] | www.s-cubed.dk
Background - eCTD
The study data specification
http://www.fda.gov/cder/regulatory/ersr/ectd.htm
![Page 4: Using SAS® Macros to Simplify Preparation of SDTM Data ... · Using SAS® Macros to Simplify Preparation of SDTM Data, Annotated CRFs and Define.xml PhUse 2009, Basel Niels Both](https://reader030.fdocuments.us/reader030/viewer/2022040109/5e9e3e4338a4ae30894fefc1/html5/thumbnails/4.jpg)
S-cubed ApS | Skovbakken 1 | DK-3500 Værløse | Phone: +45 3644 7677 | [email protected] | www.s-cubed.dk
eCTD Study Data
Annotated Case Report Form
Case Report Tabulation, data definition specification
Define.xml
Analysis Datasets- ADaM
Subject Profiles
Data Listings
Data Tabulation Datasets- SDTM
![Page 5: Using SAS® Macros to Simplify Preparation of SDTM Data ... · Using SAS® Macros to Simplify Preparation of SDTM Data, Annotated CRFs and Define.xml PhUse 2009, Basel Niels Both](https://reader030.fdocuments.us/reader030/viewer/2022040109/5e9e3e4338a4ae30894fefc1/html5/thumbnails/5.jpg)
S-cubed ApS | Skovbakken 1 | DK-3500 Værløse | Phone: +45 3644 7677 | [email protected] | www.s-cubed.dk
Annotated Case Report Form
Case Report Tabulation, data definition specification
Define.xml
Analysis Datasets- ADaM
Data Tabulation Datasets- SDTM
eCTD Study Data
![Page 6: Using SAS® Macros to Simplify Preparation of SDTM Data ... · Using SAS® Macros to Simplify Preparation of SDTM Data, Annotated CRFs and Define.xml PhUse 2009, Basel Niels Both](https://reader030.fdocuments.us/reader030/viewer/2022040109/5e9e3e4338a4ae30894fefc1/html5/thumbnails/6.jpg)
S-cubed ApS | Skovbakken 1 | DK-3500 Værløse | Phone: +45 3644 7677 | [email protected] | www.s-cubed.dk
Annotated Case Report Form
Case Report Tabulation, data definition specification
Define.xml
Data Tabulation Datasets- SDTM
eCTD Study Data
![Page 7: Using SAS® Macros to Simplify Preparation of SDTM Data ... · Using SAS® Macros to Simplify Preparation of SDTM Data, Annotated CRFs and Define.xml PhUse 2009, Basel Niels Both](https://reader030.fdocuments.us/reader030/viewer/2022040109/5e9e3e4338a4ae30894fefc1/html5/thumbnails/7.jpg)
S-cubed ApS | Skovbakken 1 | DK-3500 Værløse | Phone: +45 3644 7677 | [email protected] | www.s-cubed.dk
SDTM Generation
Presentation - Overview
ConclusionAnnotated CRF
Define.xml
Overall Architecture
eCTD
SDTM Step 2: Generic Macros
SDTM Step 1: Mapping
![Page 8: Using SAS® Macros to Simplify Preparation of SDTM Data ... · Using SAS® Macros to Simplify Preparation of SDTM Data, Annotated CRFs and Define.xml PhUse 2009, Basel Niels Both](https://reader030.fdocuments.us/reader030/viewer/2022040109/5e9e3e4338a4ae30894fefc1/html5/thumbnails/8.jpg)
S-cubed ApS | Skovbakken 1 | DK-3500 Værløse | Phone: +45 3644 7677 | [email protected] | www.s-cubed.dk
Unannotated CRF
Mapping Specifica-
tions
SAS Metadata Engine
Define.xml
Annotated CRF
SAS SDTM MacrosPre
SDTMSDTMSource
Data
Overall Architecture
![Page 9: Using SAS® Macros to Simplify Preparation of SDTM Data ... · Using SAS® Macros to Simplify Preparation of SDTM Data, Annotated CRFs and Define.xml PhUse 2009, Basel Niels Both](https://reader030.fdocuments.us/reader030/viewer/2022040109/5e9e3e4338a4ae30894fefc1/html5/thumbnails/9.jpg)
S-cubed ApS | Skovbakken 1 | DK-3500 Værløse | Phone: +45 3644 7677 | [email protected] | www.s-cubed.dk
Create Define.xml
Mapping Specifications
Define.xml
SDTM
CRF Page numbers, comments regarding
mappings and derivations
Traditional SAS metadata (variable
names, dataset names etc).
![Page 10: Using SAS® Macros to Simplify Preparation of SDTM Data ... · Using SAS® Macros to Simplify Preparation of SDTM Data, Annotated CRFs and Define.xml PhUse 2009, Basel Niels Both](https://reader030.fdocuments.us/reader030/viewer/2022040109/5e9e3e4338a4ae30894fefc1/html5/thumbnails/10.jpg)
S-cubed ApS | Skovbakken 1 | DK-3500 Værløse | Phone: +45 3644 7677 | [email protected] | www.s-cubed.dk
Annotated CRF(PDF)
Annotate CRF with SAS
Mapping Specifications
CRF page numbers
Unannotated CRF(PDF)
Annotations(FDF ascii
file)
MORE INFORMATION: “Using SAS to Speed up Annotating Case Report Forms in PDF Format prepared by Dirk Spruck and Monika Kawohl (PharmaSug 2004 paper CC02)”
![Page 11: Using SAS® Macros to Simplify Preparation of SDTM Data ... · Using SAS® Macros to Simplify Preparation of SDTM Data, Annotated CRFs and Define.xml PhUse 2009, Basel Niels Both](https://reader030.fdocuments.us/reader030/viewer/2022040109/5e9e3e4338a4ae30894fefc1/html5/thumbnails/11.jpg)
S-cubed ApS | Skovbakken 1 | DK-3500 Værløse | Phone: +45 3644 7677 | [email protected] | www.s-cubed.dk
SDTM Generation
Presentation - Overview
ConclusionAnnotated CRF
Define.xml
Overall Architecture
eCTD
SDTM Step 2: Generic Macros
SDTM Step 1: Mapping
![Page 12: Using SAS® Macros to Simplify Preparation of SDTM Data ... · Using SAS® Macros to Simplify Preparation of SDTM Data, Annotated CRFs and Define.xml PhUse 2009, Basel Niels Both](https://reader030.fdocuments.us/reader030/viewer/2022040109/5e9e3e4338a4ae30894fefc1/html5/thumbnails/12.jpg)
S-cubed ApS | Skovbakken 1 | DK-3500 Værløse | Phone: +45 3644 7677 | [email protected] | www.s-cubed.dk
SDTM Generation
Step 1 Step 2
Mapping Specifica-
tions
SAS Metadata Engine
SAS SDTM MacrosPre
SDTMSDTMSource
Data
![Page 13: Using SAS® Macros to Simplify Preparation of SDTM Data ... · Using SAS® Macros to Simplify Preparation of SDTM Data, Annotated CRFs and Define.xml PhUse 2009, Basel Niels Both](https://reader030.fdocuments.us/reader030/viewer/2022040109/5e9e3e4338a4ae30894fefc1/html5/thumbnails/13.jpg)
S-cubed ApS | Skovbakken 1 | DK-3500 Værløse | Phone: +45 3644 7677 | [email protected] | www.s-cubed.dk
SDTM Generation
Step 1
• Use ETL tool ie SAS (Clinical) Data Integration Studio
• Use traditional SAS code
• Use spreadsheet with mappings entered to auto-generate the transforming SAS program
![Page 14: Using SAS® Macros to Simplify Preparation of SDTM Data ... · Using SAS® Macros to Simplify Preparation of SDTM Data, Annotated CRFs and Define.xml PhUse 2009, Basel Niels Both](https://reader030.fdocuments.us/reader030/viewer/2022040109/5e9e3e4338a4ae30894fefc1/html5/thumbnails/14.jpg)
S-cubed ApS | Skovbakken 1 | DK-3500 Værløse | Phone: +45 3644 7677 | [email protected] | www.s-cubed.dk
SDTM Generation
Step 2
Macro name Macro name%Usubjid %Relrec
%Domain %Studyid
%Dtc %Bl
%Dy %Stc
%Seq %Res
%LongChars %SDTMify
%SuppqualCo %PhysicalTransform
![Page 15: Using SAS® Macros to Simplify Preparation of SDTM Data ... · Using SAS® Macros to Simplify Preparation of SDTM Data, Annotated CRFs and Define.xml PhUse 2009, Basel Niels Both](https://reader030.fdocuments.us/reader030/viewer/2022040109/5e9e3e4338a4ae30894fefc1/html5/thumbnails/15.jpg)
S-cubed ApS | Skovbakken 1 | DK-3500 Værløse | Phone: +45 3644 7677 | [email protected] | www.s-cubed.dk
SDTM Generation – Macros (1/14)
%Usubjid
Creates the USUBJID variable (Unique subject ID) as a concatenation ofSUBJID and Study ID
![Page 16: Using SAS® Macros to Simplify Preparation of SDTM Data ... · Using SAS® Macros to Simplify Preparation of SDTM Data, Annotated CRFs and Define.xml PhUse 2009, Basel Niels Both](https://reader030.fdocuments.us/reader030/viewer/2022040109/5e9e3e4338a4ae30894fefc1/html5/thumbnails/16.jpg)
S-cubed ApS | Skovbakken 1 | DK-3500 Værløse | Phone: +45 3644 7677 | [email protected] | www.s-cubed.dk
SDTM Generation – Macros (2/14)
%Domain
Creates the variable DOMAIN for all Pre SDTM datasets
![Page 17: Using SAS® Macros to Simplify Preparation of SDTM Data ... · Using SAS® Macros to Simplify Preparation of SDTM Data, Annotated CRFs and Define.xml PhUse 2009, Basel Niels Both](https://reader030.fdocuments.us/reader030/viewer/2022040109/5e9e3e4338a4ae30894fefc1/html5/thumbnails/17.jpg)
S-cubed ApS | Skovbakken 1 | DK-3500 Værløse | Phone: +45 3644 7677 | [email protected] | www.s-cubed.dk
SDTM Generation – Macros (3/14)
%DTC
Creates all --DTC variables in ISO8601 format based on date/timecomponents stored as individual variables in Pre SDTM
![Page 18: Using SAS® Macros to Simplify Preparation of SDTM Data ... · Using SAS® Macros to Simplify Preparation of SDTM Data, Annotated CRFs and Define.xml PhUse 2009, Basel Niels Both](https://reader030.fdocuments.us/reader030/viewer/2022040109/5e9e3e4338a4ae30894fefc1/html5/thumbnails/18.jpg)
S-cubed ApS | Skovbakken 1 | DK-3500 Værløse | Phone: +45 3644 7677 | [email protected] | www.s-cubed.dk
SDTM Generation – Macros (4/14)
%Dy
Creates all --DY variables for each --DTC variable based on the RFSTDTC variable in the DM domain. The algorithm used is:
--DY = (date portion of --DTC) - (date portion of RFSTDTC) + 1 if --DTCis on or after RFSTDTC
--DY = (date portion of --DTC) - (date portion of RFSTDTC) if --DTCprecedes RFSTDTC
![Page 19: Using SAS® Macros to Simplify Preparation of SDTM Data ... · Using SAS® Macros to Simplify Preparation of SDTM Data, Annotated CRFs and Define.xml PhUse 2009, Basel Niels Both](https://reader030.fdocuments.us/reader030/viewer/2022040109/5e9e3e4338a4ae30894fefc1/html5/thumbnails/19.jpg)
S-cubed ApS | Skovbakken 1 | DK-3500 Værløse | Phone: +45 3644 7677 | [email protected] | www.s-cubed.dk
SDTM Generation – Macros (5/14)
%Seq
Sorts datasets and assigns --SEQ variables as a unique sequencenumber within each USUBJID
![Page 20: Using SAS® Macros to Simplify Preparation of SDTM Data ... · Using SAS® Macros to Simplify Preparation of SDTM Data, Annotated CRFs and Define.xml PhUse 2009, Basel Niels Both](https://reader030.fdocuments.us/reader030/viewer/2022040109/5e9e3e4338a4ae30894fefc1/html5/thumbnails/20.jpg)
S-cubed ApS | Skovbakken 1 | DK-3500 Værløse | Phone: +45 3644 7677 | [email protected] | www.s-cubed.dk
SDTM Generation – Macros (6/14)
%LongChars
Identifies text strings longer than 200 characters and splits them up intomultiple variables
![Page 21: Using SAS® Macros to Simplify Preparation of SDTM Data ... · Using SAS® Macros to Simplify Preparation of SDTM Data, Annotated CRFs and Define.xml PhUse 2009, Basel Niels Both](https://reader030.fdocuments.us/reader030/viewer/2022040109/5e9e3e4338a4ae30894fefc1/html5/thumbnails/21.jpg)
S-cubed ApS | Skovbakken 1 | DK-3500 Værløse | Phone: +45 3644 7677 | [email protected] | www.s-cubed.dk
SDTM Generation – Macros (7/14)
%SuppqualCo
Creates supplementary datasets from extra columns on Pre SDTMdatasets
Also creates CO datasets where relevant
![Page 22: Using SAS® Macros to Simplify Preparation of SDTM Data ... · Using SAS® Macros to Simplify Preparation of SDTM Data, Annotated CRFs and Define.xml PhUse 2009, Basel Niels Both](https://reader030.fdocuments.us/reader030/viewer/2022040109/5e9e3e4338a4ae30894fefc1/html5/thumbnails/22.jpg)
S-cubed ApS | Skovbakken 1 | DK-3500 Værløse | Phone: +45 3644 7677 | [email protected] | www.s-cubed.dk
SDTM Generation – Macros (7/14)
AESOTHC
QNAM
Desc of Other Event
QLABEL
Neck Injury1AESEQ123AESCUB01
QVALIDVARVALIDVARUSUBJIDRDOMAINSTUDYID
Y
AESER
…
…
Neck InjuryTRAUMA1123AESCUB01
SQ_AESOTHCAETERMAESEQUSUBJIDDOMAINSTUDYID
Y
AESER
…
…
TRAUMA1123AESCUB01
AETERMAESEQUSUBJIDDOMAINSTUDYID
AE (Pre SDTM)
SUPPAE
AE (SDTM)
![Page 23: Using SAS® Macros to Simplify Preparation of SDTM Data ... · Using SAS® Macros to Simplify Preparation of SDTM Data, Annotated CRFs and Define.xml PhUse 2009, Basel Niels Both](https://reader030.fdocuments.us/reader030/viewer/2022040109/5e9e3e4338a4ae30894fefc1/html5/thumbnails/23.jpg)
S-cubed ApS | Skovbakken 1 | DK-3500 Værløse | Phone: +45 3644 7677 | [email protected] | www.s-cubed.dk
SDTM Generation – Macros (8/14)
%Relrec
Creates RELREC dataset describing relationships between records in PreSDTM datasets
![Page 24: Using SAS® Macros to Simplify Preparation of SDTM Data ... · Using SAS® Macros to Simplify Preparation of SDTM Data, Annotated CRFs and Define.xml PhUse 2009, Basel Niels Both](https://reader030.fdocuments.us/reader030/viewer/2022040109/5e9e3e4338a4ae30894fefc1/html5/thumbnails/24.jpg)
S-cubed ApS | Skovbakken 1 | DK-3500 Værløse | Phone: +45 3644 7677 | [email protected] | www.s-cubed.dk
SDTM Generation – Macros (8/14)
Relrec example:
CM number 11&12 is related to AE number 3
AECM13AESEQ123AESCUB01
AECM111CMSEQ123CMSCUB01
RELTYPE
AECM1
RELID
12CMSEQ123CMSCUB01
IDVARVALIDVARUSUBJIDRDOMAINSTUDYID
RELREC
![Page 25: Using SAS® Macros to Simplify Preparation of SDTM Data ... · Using SAS® Macros to Simplify Preparation of SDTM Data, Annotated CRFs and Define.xml PhUse 2009, Basel Niels Both](https://reader030.fdocuments.us/reader030/viewer/2022040109/5e9e3e4338a4ae30894fefc1/html5/thumbnails/25.jpg)
S-cubed ApS | Skovbakken 1 | DK-3500 Værløse | Phone: +45 3644 7677 | [email protected] | www.s-cubed.dk
SDTM Generation – Macros (8/14)
Relrec example:
AE number 3 is related to CM number 11&12
Pre SDTM CM dataset:
The macro identifies the variables starting with ’RELREC-’, then finds the associated records in the AE datasets, and based on that creates the 3 RELRECrecords
STUDYID DOMAIN USUBJID CMSEQ RELREC_AE ...
SCUB01 CM 123 11 AESPID=3 ...
SCUB01 CM 123 12 AESPID=3 ...
... ... ... ... ... ...
![Page 26: Using SAS® Macros to Simplify Preparation of SDTM Data ... · Using SAS® Macros to Simplify Preparation of SDTM Data, Annotated CRFs and Define.xml PhUse 2009, Basel Niels Both](https://reader030.fdocuments.us/reader030/viewer/2022040109/5e9e3e4338a4ae30894fefc1/html5/thumbnails/26.jpg)
S-cubed ApS | Skovbakken 1 | DK-3500 Værløse | Phone: +45 3644 7677 | [email protected] | www.s-cubed.dk
SDTM Generation – Macros (9/14)
%Studyid
Creates the variable STUDYID with the relevant study ID based on whatis assigned in the Pre SDTM DM domain
![Page 27: Using SAS® Macros to Simplify Preparation of SDTM Data ... · Using SAS® Macros to Simplify Preparation of SDTM Data, Annotated CRFs and Define.xml PhUse 2009, Basel Niels Both](https://reader030.fdocuments.us/reader030/viewer/2022040109/5e9e3e4338a4ae30894fefc1/html5/thumbnails/27.jpg)
S-cubed ApS | Skovbakken 1 | DK-3500 Værløse | Phone: +45 3644 7677 | [email protected] | www.s-cubed.dk
SDTM Generation – Macros (10/14)
%Bl
Creates the --BL variables, based on a defined algorithm (for example,by flagging the last assessement prior to RFSTDTC as the baseline value)
Note: The existence of this statistically derived variable in the SDTM model is underreview by the CDISC teams and the variable is expected to disappear from theSDTM model at some stage. Until that happens it is suggested to use a crudemethod like the above to set it and to note in the define document that it will notin all cases match the advanced baseline flags in the ADaM datasets.
![Page 28: Using SAS® Macros to Simplify Preparation of SDTM Data ... · Using SAS® Macros to Simplify Preparation of SDTM Data, Annotated CRFs and Define.xml PhUse 2009, Basel Niels Both](https://reader030.fdocuments.us/reader030/viewer/2022040109/5e9e3e4338a4ae30894fefc1/html5/thumbnails/28.jpg)
S-cubed ApS | Skovbakken 1 | DK-3500 Værløse | Phone: +45 3644 7677 | [email protected] | www.s-cubed.dk
SDTM Generation – Macros (11/14)
%Stc
Creates the various results variables in the finding domains, based onthe Pre SDTM variables --ORRES and --ORESSU (original result and unit)
![Page 29: Using SAS® Macros to Simplify Preparation of SDTM Data ... · Using SAS® Macros to Simplify Preparation of SDTM Data, Annotated CRFs and Define.xml PhUse 2009, Basel Niels Both](https://reader030.fdocuments.us/reader030/viewer/2022040109/5e9e3e4338a4ae30894fefc1/html5/thumbnails/29.jpg)
S-cubed ApS | Skovbakken 1 | DK-3500 Værløse | Phone: +45 3644 7677 | [email protected] | www.s-cubed.dk
SDTM Generation – Macros (12/14)
%Res
Checks if the value of --STRESC is in fact numeric. In that case it istransferred to --STRESN
![Page 30: Using SAS® Macros to Simplify Preparation of SDTM Data ... · Using SAS® Macros to Simplify Preparation of SDTM Data, Annotated CRFs and Define.xml PhUse 2009, Basel Niels Both](https://reader030.fdocuments.us/reader030/viewer/2022040109/5e9e3e4338a4ae30894fefc1/html5/thumbnails/30.jpg)
S-cubed ApS | Skovbakken 1 | DK-3500 Værløse | Phone: +45 3644 7677 | [email protected] | www.s-cubed.dk
SDTM Generation – Macros (13/14)
%SDTMify
Assigns labels and exact formats to all the variables in the created datasets and sorts dataset records and columns according to agreedrules
![Page 31: Using SAS® Macros to Simplify Preparation of SDTM Data ... · Using SAS® Macros to Simplify Preparation of SDTM Data, Annotated CRFs and Define.xml PhUse 2009, Basel Niels Both](https://reader030.fdocuments.us/reader030/viewer/2022040109/5e9e3e4338a4ae30894fefc1/html5/thumbnails/31.jpg)
S-cubed ApS | Skovbakken 1 | DK-3500 Værløse | Phone: +45 3644 7677 | [email protected] | www.s-cubed.dk
SDTM Generation – Macros (14/14)
%PhysicalTransform
Turns the created SAS datasets into SAS transport files
![Page 32: Using SAS® Macros to Simplify Preparation of SDTM Data ... · Using SAS® Macros to Simplify Preparation of SDTM Data, Annotated CRFs and Define.xml PhUse 2009, Basel Niels Both](https://reader030.fdocuments.us/reader030/viewer/2022040109/5e9e3e4338a4ae30894fefc1/html5/thumbnails/32.jpg)
S-cubed ApS | Skovbakken 1 | DK-3500 Værløse | Phone: +45 3644 7677 | [email protected] | www.s-cubed.dk
SDTM Generation
Presentation - Overview
ConclusionAnnotated CRF
Define.xml
Overall Architecture
eCTD
SDTM Step 2: Generic Macros
SDTM Step 1: Mapping
![Page 33: Using SAS® Macros to Simplify Preparation of SDTM Data ... · Using SAS® Macros to Simplify Preparation of SDTM Data, Annotated CRFs and Define.xml PhUse 2009, Basel Niels Both](https://reader030.fdocuments.us/reader030/viewer/2022040109/5e9e3e4338a4ae30894fefc1/html5/thumbnails/33.jpg)
S-cubed ApS | Skovbakken 1 | DK-3500 Værløse | Phone: +45 3644 7677 | [email protected] | www.s-cubed.dk
SDTM Generation
Step 1 Step 2
Mapping Specifica-
tions
SAS Metadata Engine
SAS SDTM MacrosPre
SDTMSDTMSource
Data