SDTM Day 4 : SDTM.AE
Adverse Event is an event that results in unintended harm to the patient by an act of commission or omission rather than by the underlying disease or condition of the patient, thus AE Dataset is very important to Safety analysis for drug testing. It captures Adverse Event dates and various Adverse Event information for each patient. The current MedDRA Version is 20.1.
We will introduce the General Structure and Key Variable Derivation for SDTM.AE dataset.
General Structure SDTM.AE data step
- Read in AE raw data.
- Read in and transform MedDRA(csv) file
- Merge with SDTM.DM for common variables.
- Merge with SDTM.SE for Epoch info
- * Compare with Production dataset
Key Variables in SDTM.AE:
STUDYID, USUBJID, AEDECOD, AEBODSYS, EPOCH, AESTDY, AEENDY,AEACN
Key Variables Derivation Logic and Examples:
STUDYID, Study Identifier, Assigned Variable.
USUBJID, Unique Subject Identifier, Derived from raw.lb.SUBJID.
AEBODSYS, Body System or Organ Class, MedDRA version 20.1
AEDECOD, Dictionary-Derived Term, MedDRA version 20.1
proc sql; create table medae1 as select a.*, b.verbatim_term,b.level_4_text as aedecod1,b.level_1_text as aebodsys1 from aedt1 as a left join (select distinct verbatim_term,level_4_text,level_1_text from meddra1) as b on upcase(strip(a.aeterm))=upcase(strip(b.verbatim_term)) order by usubjid; quit; data medae1; set medae1; aedecod=aedecod1; aebodsys=aebodsys1; run;
AETERM, Reported Term for the Adverse Event, CRF Variable.
AESER, Serious Event, CRF variable
AEACN, Action Taken with Study Treatment, CRF variable
if AEACNCF='DOSE DELAYED AND REDUCED' then AEACN='MULTIPLE'; else if AEACNCF in('DOSE DELAYED','DOSE INTERRUPTED') then AEACN='DRUG INTERRUPTED'; else AEACN=STRIP(AEACNCF);
AEREL, Drug Related Adverse Event, CRF variable
AETOXGRN, Adverse event Toxicity Grade, CRF variable
AEOUT, Outcome of Adverse Event, CRF variable
aeout = ae.aeoutc;
AESDTH, Results in Death, CRF variable
AESDTH = AESDTHF;
EPOCH, Derived Variable base on SDTM.SE(Subject Elements) Start and End Day
proc sql; create table aeqc2 as select a.*, b.epoch from aeqc1 as a left join se as b on case when a.usubjid = b.usubjid and fl=. and b.sestdy <= a.aestdy < b.seendy then "a" when a.usubjid=b.usubjid and fl=1 and b.sestdy <= a.aestdy <= b.seendy then "b" end; quit;
AESTDTC, Start Date/Time of Adverse Event, CRF variable
AEENDTC, End Date/Time of Adverse Event, CRF variable
aeendtc = raw.aeendtc;
AESTDY, Study Day of Start of Adverse Event, Derived variable
If (AESTDTC < DM.RFSTDTC) then AESTDY=AESTDTC-DM.RFSTDTC; Else if (AESTDTC >= DM.RFSTDTC) then AESTDY=(AESTDTC-DM.RFSTDTC)+1.
AEENDY, Study Day of End of Adverse Event, Derived variable
If (AEENDTC < DM.RFSTDTC) then AEENDY=AEENDTC-DM.RFSTDTC; Else if (AEENDTC >= DM.RFSTDTC) then AEENDY=(AEENDTC-DM.RFSTDTC)+1.
AESEQ, Sequence Number, Derived Variable.
The sequential number uniquely identifying the records within the domain by USUBJID and generated using the key sequence from the domain level metadata.
Data aeseq; set ae; by usubjid aebodsys aedecod; retain aeseq; if first.usubjid then aeseq=1; else aeseq=aeseq+1; run;
Sample Dummy SDTM.AE dataset:
AETERM must have a value.
Adverse event Toxicity Grade, in general, has 3 values ( Mild, Moderate , or Serious)
for Oncology, it has 5 values (Mild, Moderate, Severe, Life-threatening, Death)
Happy Studying! 🐰