myCSG © |Area: ADaM| Concept: C1001 : Subject Level Analysis Data | Lesson: L101 : Derivation of key date variables which are commonly used on ADSL |

  • In clinical trials, data specified in the protocol is collected using case report forms
  • The data collected using case report forms is called raw data
  • Raw data is then transformed into CDISC compliant SDTM datasets 
  • SDTM data is used as input to create analysis datasets
  • Analysis datasets compliant with CDISC ADaM standard are called ADaM datasets
  • CDISC ADaM standard has three standard dataset structures
    • ADSL- Subject Level Analysis Dataset
    • BDS - Basic Data Structure
    • OCCDS - Occurrence Data Structure
  • ADSL dataset is a required dataset (must be created) for a CDISC compliant submission
  • The structure of the ADSL is 1 record per subject, regardless of the type of clinical trial design.
  • The overall variables present in ADSL can be grouped into below logical categories
    • Identifier variables like STUDYID, USUBJID, SUBJID, SITEID, REGION etc
    • Subject Demographic variables like AGE, SEX, RACE etc
    • Population Indicator variables like ENRLFL, RANDFL, FASFL, SAFFL, PPROTFL etc
    • Treatment variables like ARM, ACTARM, TRT, TRT01P, TRT02P, TRT01A, TRT02A, TRTSEQP, TRTSEQA etc
    • Treatment timing variables like TRTSDT, TRTEDT, TR01SDT, TR02SDT, TR01EDT, TR02EDT etc
    • Period level variables like AP01SDT, AP01EDT, AP02SDT, AP02EDT etc
    • Subject level trial-experience variables like EOTSTT, EOSSTT, DCTREAS, DCSREAS etc
      • This includes some key date variables like RFICDT, ENRLDT, RANDDT,EOTDT, EOSDT, LSTALVDT, DTHDT
    • Stratification variables like STRATAR, STRATAV

In this lesson we will see how to derive some of the key date variables in ADSL dataset.

  • Variables based on disposition data (SDTM.DS)
    • Date of informed consent (RFICDT)
    • Date of randomization (RANDDT)

 

  • Variables based on exposure data (SDTM.EX)
    • Date of first exposure to treatment (TRTSDT)
    • Date of last exposure to treatment (TRTEDT)

 

  • Variables based on subject visits data (SDTM.SV)
    • Date of first visit
    • Date of last visit

SAS programming aspects covered in this lesson are:

  • Filtering required records using where statement or if statement
  • Selecting earliest or latest records using first. or last. approach
  • Extracting a substring from a string
  • Converting character date values to numeric date values
  • Usage of keep statement to select only required variables from an input dataset
  • Sorting observations in ascending or descending order based on required variables
  • Merging two or more datasets based on key variables
  • Usage of in= dataset option to identify whether a dataset contributed to an observation when merging
VARIABLE_NAMEVARIABLE_LABELDERIVATION
RFICDT Date of Informed Consent Using DS dataset - get RFICDT as the numeric(datepart(DSSTDTC)) on the record where DSCAT="PROTOCOL MILESTONE" and DSSCAT="INFORMED CONSENT OBTAINED" and DSDECOD="SUBJECT INFORMED CONSENT". Note that this date will be missing if the subject has not signed the informed consent (or in case the team fails to capture the data in the DS dataset)
RANDDT Date of Randomization Using DS dataset - get RANDDT as the numeric(datepart(DSSTDTC)) on the record where DSCAT="PROTOCOL MILESTONE" and DSDECOD="RANDOMIZED". Note that this date will be missing if the subject has not been randomized for any reason (or in case the team fails to capture the data in the DS dataset)
TRTSDT Date of First Exposure to Treatment Using EX dataset - get TRTSDT as the numeric(datepart(EXSTDTC)) of the earliest record of a subject where EXCAT="TREATMENT PERIOD". Note that this date will be missing the subject has not been exposed to study treatment for any reason (or in case the team fails to capture the data in the EX dataset). Details: Subset the records from EX with the above given condition and sort by USUBJID and EXSTDTC and pick the earliest non-missing date.
TRTEDT Date of Last Exposure to Treatment Using EX dataset - get TRTEDT as the numeric(datepart(EXENDTC)) of the latest record of a subject where EXCAT="TREATMENT PERIOD". Note that this date will be missing the subject has not been exposed to study treatment for any reason (or in case the team fails to capture the data in the EX dataset). Details: Subset the records from EX with the above given condition and sort by USUBJID and EXENDTC and pick the latest non-missing date. Also note that this is the simplest case of derivation of TRTEDT - there can be multiple conditions to check for depending on how to handle ongoing subjects - which will be protocol specific
FVISDT Date of First Visit Using SV dataset - get FVISDT as numeric(datepart(SVSTDTC)) of the earliest record of a subject. Details: Sort the SV dataset by USUBJID and SVSTDTC and pick the earliest non-missing date.
LVISDT Date of Last Visit Using SV dataset - get LVISDT as numeric(datepart(Maximum of SVSTDTC,SVENDTC of a subject)) of the latest record of a subject. Details: If a subject has started a visit, but not ended the visit yet (ongoing visit), picking the last visit date solely by using SVENDTC will not provide accurate information- so a combination of SVSTDTC and SVENDTC has to be used to pick latest availabe date for a subject in SV
Complete SAS code to generate the output is available for registered users!

Already registered! Login
Not registered, you can signup here! Signup

Dont want to register?
You can directly purchase this lesson (code+input data) here


You can purchase this lesson (code+input data) here

If you are looking to purchase subscription for full access to data and programs for all lessons (TASKS+SDTM+ADaM+TFLs), you can send us a message on +91-7330--77--66--49-- on Whatsapp.
R data is available only for R subscribers.
You can contact us on +91-7330--77--66---49 for purchasing subscription to R programs and data
R codes are available only for R subscribers.
You can contact us on +91-7330--77--66---49 for purchasing subscription to R programs and data