The Adverse Events Narrative NarrText Derivations Table
The narrtext dataset output by the Adverse Events Narrative report contains variables that are used by the template to create the narrative.
NarrText Variable Name | Description | Derivation |
---|---|---|
invhead | Investigator Name, Investigator Identifier, or Study Site Identifier for subject header | If DM.INVNAM exists, set to "Investigator Name". Else if DM.INVID exists, set to "Investigator Identifier". Else set to "Study Site Identifier". |
invheadtxt | Text for subject header for Investigator Name, Investigator Identifier, or Study Site Identifier | If DM.INVNAM exists, set to INVNAM. Else if DM.INVID exists, set to INVID. Else set to SITEID. |
racetxt | Race text | Set to DM.RACE. |
aestdaytxt | AE start day text | If AESTDY is not missing, set to (Day X) where X = AESTDY. |
aeendaytxt | AE end day text | If AEENDY is not missing, set to (Day X) where X = AEENDY. |
aesevtxt | AE severity or toxicity grade text |
If AETOXGR exists, set to (Grade X) where X = AETOXGR. Else if AESEV exists, then set to (lowcase(AESEV)). |
dsstdaytxt | Start day of disposition event text | If DSSTDY is not missing, set to (Day X) where X = DSSTDY. |
exstdaytxt | Exposure start day text | If EXSTDY_MIN is not missing, set to (Day X) where X = EXSTDY_MIN. |
aereltxt | Causality text | If AEREL = "Y" or "Yes", then set to "related". Else if AEREL = "N", "No", "Not", or "None", then set to "not related". Else if AEREL = "Unlikely", then set to "unlikely related". Else if AEREL = "Probable" or "Probably", then set to "probably related". Else if AEREL = "Definite" or "Definitely", then set to "definitely related". Else if AEREL = "Remote" or "Remotely", then set to "remotely related". Else set to lowcase(AEREL). |
aeacntxt | Action taken with study treatment text | If AEACN = "N", "No", "Not", or "None", then set to "no". Else if AEACN = "Y" or "Yes", then set to "yes". Else set to lowcase(AEACN). |
aeacnothtxt | Other action taken with study treatment text | If AEACNOTH = "N", "No", "Not", or "None", then set to "no". Else if AEACNOTH = "Y" or "Yes", then set to "yes". Else set to lowcase(AEACNOTH). This variable exists if AE.AEACNOTH exists. |
exstdt_mintxt | First treatment date (character) | Character version of EXSTDT_MIN. |
PredaytxtA | Date, study day, and period (if multiple treatment periods exist) for Findings A for the closest record on or prior to the start of the event | If multiple treatment periods exist, set to (PREDTA, Day X, Period Y) where X is PRESTDYA and Y is PREPERIODA. Else set to (PREDTA, Day X) where X is PRESTDYA. |
PostdaytxtA | Date, study day, and period (if multiple treatment periods exist) for Findings A for the closest record subsequent to the start of the event | If multiple treatment periods exist, set to (POSTDTA, Day X, Period Y) where X is POSTSTDYA and Y is POSTPERIODA. Else set to (POSTDTA, Day X) where X is POSTSTDYA. |
saetext | Reason the event was considered serious | If AESCAN, AESCONG, AESDISAB, AESDTH, AESHOSP, AESLIFE, AESOD, or AESMIE exist, then concatenate the labels of these variables that have a value of "Y" using the delimiter ~. |
All Variables from ADSL and DM | ADSL/DM variables | All variables from the ADSL and DM datasets are retained in NarrText, except RACE. |
All variables from ADAE or AE | ADAE/AE variables | All variables from the ADAE or AE dataset are retained in NarrText, except AEREL. |
partial_AESTDTC | AE start date partial date flag (only when AE.AESTDY is missing) | If .AESTDTC is missing or it is partial, then set to 1. If AESTDTC is complete, then set to 0. If we are dealing with an ADaM ADAE data table, then check for ASTDTF variable. If it contains "Y" or "M" or "D", then set to 1, otherwise set to 0. |
partial_AEENDTC | AE end date partial date flag (only when AE.AEENDY is missing) | If AEENDTC is missing or it is partial, then set to 1. If AEENDTC is complete, then set to 0. If we are dealing with an ADaM ADAE data table, then check for AENDTF variable. If it contains "Y" or "M" or "D", then set to 1, otherwise set to 0. |
Trt | Treatment received in the period the AE started in | If the ADaM variable TRTA exists in ADAE, then set to TRTA. Else if the ADaM variable TRTP exists in ADAE, then set to TRTP. Otherwise, Trt is determined by comparing the AE start date to the treatment start date of each period. Start by comparing the AE start date to the last treatment period start date. If the AE occurs after the treatment date, then set to the treatment associated with that period. Otherwise, compare the AE start date to the start date of the second to last treatment period and so on. If the AE started before the first period start date, then set Trt to "Pre-Treatment". |
TrtPeriod | Period the AE started in and treatment received in that period | Set to Trt (Period). |
Period | Period the AE started in | If the ADaM variable APERIOD exists, then set Period to APERIOD. Otherwise, Period is determined by comparing the AE start date to the treatment start date of each period. Start by comparing the AE start date to the last treatment period start date. If the AE occurs after the treatment date, then set the period to the number of the last treatment period. Otherwise, compare the AE start date to the start date of the second to last treatment period and so on. If the AE started before the first period start date, then set Period to 0. |
aestdt | AE start date (numeric) | Numeric version of AESTDTC. If day and month are missing, impute as January 1st. If day is missing, impute day as the 1st of the month. |
aeendt | AE end date (numeric) | Numeric version of AEENDTC. If day and month are missing, impute as January 1st. If day is missing, impute day as the 1st of the month. |
aeterm2 | Dictionary-Derived Term and Severity/Toxicity Grade of AE (* indicates partial start date) | If AETOXGR exists, then set to lowcase(AEDECOD) (Grade X) where X is AETOXGR. Else if AESEV exists, then set to lowcase(AEDECOD) (AESEV). Else set to lowcase(AEDECOD). If the AE has a partial start date, then add a * to the end of aeterm2. |
aestdtcp | AE start date (Character) (* indicates partial date) | Character version of AESTDT. If AE start date is a partial date, then a * is appended to the end. |
aeendtcp | AE end date (Character) (* indicates partial date) | Character version of AEENDT. If AE end date is a partial date, then a * is appended to the end. |
Pre treatment events | Pre treatment flag | Set to 1 if the event occured before the first dose of study drug. Else set to 0. |
Treatment emergent events | Treatment emergent flag | If treatment emergent flags exist and Ignore available treatment emergent flags is not checked, then set to 1 if the treatment emergent flag is "Y" or "Yes" and set to 0 otherwise. If treatment emergent flags do not exist or Ignore available treatment emergent flags is checked, then set to 1 if the event occurred on or after the first dose of study drug and set to 0 otherwise. |
On treatment events | On treatment flag | Set to 1 if the event occurred on or after the first dose of study drug and at or before the last dose of drug (+ the offset for end of dosing). Else set to 0. |
Off treatment follow up events | Off treatment follow up flag | Set to 1 if the event occurred after the last dose of drug (+ the offset). Else set to 0. |
nearaetext | Other AEs that occurred within a specified window of the onset of the AE | Concatenate all other AEs with a start date occurring within X number of days of the start date of the AE, where X is the number of days selected in Number of days around Adverse Event start date for reported related events. Format is similar to AETERM2. |
flag | Indicates No treatment, Pre treatment, On treatment, or Post treatment | If exstdt_min = missing, set to "No Treatment". Else if On treatment events = 1, set to "On Treatment". Else if Off treatment follow up events = 1, set to "Post Treatment". Else if Treatment emergent events = 1, set to "Pre Treatment". |
exstdt_min | First treatment date | Set to the earliest non-missing value of EXSTDTC per subject. |
exendt_max | Last treatment date | Set to the latest non-missing value of EXENDTC per subject. |
exstdy_min | First treatment study day | Set to the study day corresponding to EXSTDT_MIN. |
exendy_max | Last treatment study day | Set to the study day corresponding to EXENDT_MAX. |
drugatfirstdose | Drug(s) given on first treatment date | If EXTRT = "Vehicle" or "Placebo" then set to EXTRT. Else set to EXDOSE EXDOSU of EXTRT. Concatenate all values that occur on EXSTDT_MIN. |
drugatlastdose | Drug(s) given on last treatment date | If EXTRT = "Vehicle" or "Placebo" then set to EXTRT. Else set to EXDOSE EXDOSU of EXTRT. Concatenate all values that occur on EXENDT_MAX. |
aedaysfromfirstdose | Days from first treatment date to AE start date | AESTDT - EXSTDT_MIN |
aedaysfromlastdose | Days from last treatment date to AE start date | AESTDT - EXENDT_MAX |
drugatevent | Study treatment(s) taken on AE start date | If EXTRT = "Vehicle" or "Placebo" then set to EXTRT. Else set to EXDOSE EXDOSU of EXTRT. Concatenate all values that occur on the AE start date. |
numdaysdrugattime | Number of days from treatment start date to AE start date for treatments taken on AE start date | Set to the number of days from treatment start date of the drugs in DRUGATEVENT to AE start date. Concatenate all values corresponding to the treatments in DRUGATEVENT. |
cumdrugatevent1 | The total dose received of each treatment at AE start date | The total dose received of each treatment at AE start date. Concatenate all drugs given at the time of AE start date. If only one treatment period occurs, then only this variable will exist. If multiple treatment periods exist, one cumdrugatevent variable will be present for each period, containing the treatments given in that period. The number at the end of cumdrugatevent will correspond to the period in which treatment was given. |
cmtext | Concomitant medications started on or before AE start date or started within a specified window before AE start date | Concatenate all values of either CMDECOD (Standardized Medication Name) or CMTRT (Reported name of drug) depending on which option is selected in Concomitant medications are reported in text using:. If the Include concomitant medication indication in narrative text box is checked, then append CMINDC to each medication in parentheses. Keep only concomitant medications that started on or before the AE start date. If Number of days prior to Adverse Event start date for reporting concomitant medications is greater than 0, then keep only concomitant medications that started on AE start date and up to X days prior to AE start date, where X is the number of days selected in the option. |
presccmtext | Medications administered to treat the AE | Concatenate all values of either CMDECOD (Standardized Medication Name) or CMTRT (Reported name of drug) depending on which option is selected in Concomitant medications are reported in text using: for medications administered to treat the event. If the " option is selected, then RELREC is used to link events to concomitant medications. Otherwise events are linked to concomitant medications using AETERM and CMINDC. |
basetext1A | Baseline results for Findings A (for period 1 if multiple periods exist) | Set to the results at baseline for the domain given in Findings A. Baseline is determined using the baseline flag if it exists or the last record before treatment starts if the baseline flag does not exist. If domain = LB and Original units is selected in the options, then set to lowcase (LBNRIND) upcase(LBTESTCD) [LBORRES LBORRESU, Range = (LBORNRLO - LBORNRHI)]. If domain = LB and standard units is selected in the options, then set to lowcase(LBNRIND) upcase(LBTESTCD) [LBSTRESN LBSTRESU, Range = (LBSTNRLO - LBSTNRHI)]. If test name is selected in the options replace LBTESTCD with lowcase(LBTEST). If one end of the reference range is missing, then replace the missing value with NA. If both ends of the reference range are missing, remove the Range = piece. If LBSTRESN is missing, but LBSTRESC is not missing, then use LBSTRESC in place of LBSTRESN and LBSTNRC for the range. If domain is not LB and Original units is selected in the options, then set to upcase(xxTESTCD) (xxORRES xxORRESU). If domain is not LB and standard units is selected in the options, then set to upcase(xxTESTCD) (xxSTRESN xxSTRESU). If test name is selected in the options, replace xxTESTCD with lowcase(xxTEST). If xxSTRESN is missing, but xxSTRESC is not missing, then use xxSTRESC in place of xxSTRESN. If multiple timepoints exist for the study day, concatenate all values of xxORRES and xxORRESU on the given study day and add the times each result was collected. If multiple treatment periods exist, one basetext variable will be present for each period, containing the treatments given in that period. The number at the end of basetext will correspond to the period in which treatment was given. |
pretextA | Closest results from Findings A on or prior to the start of the AE | Set to the closest results on or prior to the start of the adverse event for the domain given in Findings A. If domain = LB and Original units is selected in the options, then set to lowcase(LBNRIND) upcase(LBTESTCD) [LBORRES LBORRESU, Range = (LBORNRLO - LBORNRHI)]. If domain = LB and standard units is selected in the options, then set to lowcase(LBNRIND) upcase(LBTESTCD) [LBSTRESN LBSTRESU, Range = (LBSTNRLO - LBSTNRHI)]. If "Different compared to baseline" is selected for the "Include on-study lab tests where reference range indicator is:" option, then append the baseline value after the reference range. If test name is selected in the options replace LBTESTCD with lowcase(LBTEST). If one end of the reference range is missing, then replace the missing value with NA. If both ends of the reference range are missing, remove the Range = piece. If LBSTRESN is missing, but LBSTRESC is not missing, then use LBSTRESC in place of LBSTRESN and LBSTNRC for the range. If domain is not LB and Original units is selected in the options, then set to upcase(xxTESTCD) (xxORRES xxORRESU). If domain is not LB and standard units is selected in the options, then set to upcase(xxTESTCD) (xxSTRESN xxSTRESU). If test name is selected in the options, replace xxTESTCD with lowcase(xxTEST). If xxSTRESN is missing, but xxSTRESC is not missing, then use xxSTRESC in place of xxSTRESN. If multiple timepoints exist for the study day, concatenate all values of xxORRES and xxORRESU on the given study day and add the times each result was collected. |
predtA | Date of closest results from Findings A on or prior to the start of the AE | Set to the value of xxDTC corresponding to the results in pretextA where xx is the domain selected in Findings A. |
prestdyA | Study day of closest results from Findings A on or prior to the start of the AE | Set to the value of xxDY corresponding to the results in pretextA where xx is the domain selected in Findings A. |
posttextA | Closest results from Findings A subsequent to the start of the AE | Set to the closest results subsequent to the start of the adverse event for the domain given in Findings A. If domain = LB and Original units is selected in the options, then set to lowcase(LBNRIND) upcase(LBTESTCD) [LBORRES LBORRESU, Range = (LBORNRLO - LBORNRHI)]. If domain = LB and standard units is selected in the options, then set to lowcase(LBNRIND) upcase(LBTESTCD) [LBSTRESN LBSTRESU, Range = (LBSTNRLO - LBSTNRHI)]. If "Different compared to baseline" is selected for the "Include on-study lab tests where reference range indicator is:" option, then append the baseline value after the reference range. If test name is selected in the options replace LBTESTCD with lowcase(LBTEST). If one end of the reference range is missing, then replace the missing value with NA. If both ends of the reference range are missing, remove the Range = piece. If LBSTRESN is missing, but LBSTRESC is not missing, then use LBSTRESC in place of LBSTRESN and LBSTNRC for the range. If domain is not LB and Original units is selected in the options, then set to upcase(xxTESTCD) (xxORRES xxORRESU). If domain is not LB and standard units is selected in the options, then set to upcase(xxTESTCD) (xxSTRESN xxSTRESU). If test name is selected in the options, replace xxTESTCD with lowcase(xxTEST). If xxSTRESN is missing, but xxSTRESC is not missing, then use xxSTRESC in place of xxSTRESN. If multiple timepoints exist for the study day, concatenate all values of xxORRES and xxORRESU on the given study day and add the times each result was collected. |
postdtA | Date of closest results from Findings A subsequent to the start of the AE | Set to the value of xxDTC corresponding to the results in posttextA where xx is the domain selected in Findings A. |
poststdyA | Study day of closest results from Findings A subsequent to the start of the AE | Set to the value of xxDY corresponding to the results in posttextA where xx is the domain selected in Findings A. |
aerelmultterm2 | Multiple causality | This variable is created if upcase(AEREL) = "MULTIPLE". For records in SUPPAE where QNAM starts with "REL" or "AEREL", concatenate QVAL with the treatment name from QLABEL separated by to for a value like "related to Treatment 1". Concatenate all values of this type per AE using a ~. |
aeacnmultterm2 | Multiple action taken with study drug | This variable is created if upcase(AEACN) = "MULTIPLE". For records in SUPPAE where QNAM starts with "ACN" or "AEACN", concatenate QVAL with the treatment name from QLABEL separated by for to get a value like "drug withdrawn for Treatment 1". Concatenate all values of this type per AE using a ~. |
inexdoseimp | Partial or missing EX start or end date flag | Set to 1 if subject has any EX records with a partial or missing EXSTDTC or EXENDTC. Set to 0 otherwise. |
mhtext | Medical history terms and year | If MHSTDTC exists, then set to MHDECOD(Dictionary derived term) or MHTERM(Reported term for the medical history) depending on the option selected concatenated with (year of MHSTDTC). If year is missing, then replace with Unknown. If MHSTDTC does not exist, then set to MHDECOD or MHTERM. If MHDECOD is empty, replace with Unknown. Concatenate all values together per subject using a ~ as the delimiter. |
MHCancerText | Cancer diagnosis | Concatenate all unique values per USUBJID of MHTERM(Reported term for the medical history) or MHDECOD(Dictionary derived term) where MHCAT = "Cancer History". If MHDECOD is selected and the value is missing, use MHTERM in its place. |
MHGenText | General medical history | Concatenate all unique values per USUBJID of MHTERM(Reported term for the medical history) or MHDECOD(Dictionary derived term) where MHCAT = "General Medical History". If MHDECOD is selected and the value is missing, use MHTERM in its place. |
DSTERM | Reported term for the disposition event | Set to DS.DSTERM. |
DSDECOD | Standardized disposition term | Set to DS.DSDECOD. |
DSSTDTC | Start date/time of disposition event | Set to DS.DSSTDTC. |
DSSTDY | Study day of start of disposition event | If DS.DSSTDY is not missing, then set to DS.DSSTDY. If DS.DSSTDY is missing, then DSSTDY is calculated using the difference between DSSTDTC and RFSTDTC. |
dsstdt | Start date/time of disposition event (numeric) | Numeric version of DSSTDTC. If day and month are missing, impute as January 1st. If day is missing, impute day as the 1st of the month. |
dsstdtcp | Start date/time of disposition event (* indicates partial date) | Character version of DSSTDTC. If DSSTDTC is a partial date, then a * is appended to the end. |
totalcmcnt | Total concomitant medication count | Set to the number of records in CM per USUBJID. |
CMPriorText | Prior systemic therapy | Concatenate all values of either CMDECOD (Standardized Medication Name) or CMTRT (Reported name of drug) where CMCAT = "PRIOR THERAPY". If the Include concomitant medication indication in narrative text box is checked, then append CMINDC in parentheses to each medication. |
CMRadioText | Prior radiotherapy | Concatenate all values of either CMDECOD (Standardized Medication Name) or CMTRT (Reported name of drug) where CMCAT = "PRIOR RADIOTHERAPY". If the Include concomitant medication indication in narrative text box is checked, then append CMINDC in parentheses to each medication. |
CMSurgText | Prior surgery | Concatenate all values of either CMDECOD (Standardized Medication Name) or CMTRT (Reported name of drug) where CMCAT = "PRIOR SURGERY". If the Include concomitant medication indication in narrative text box is checked, then append CMINDC in parentheses to each medication. |
CMPriorMedsText | Prior medications | Concatenate all values of either CMDECOD (Standardized Medication Name) or CMTRT (Reported name of drug) for all prior medications. If the Include concomitant medication indication in narrative text box is checked, then append CMINDC in parentheses to each medication. Prior medications are any medication in the CM dataset where CM start day is less than 1 and CMCAT is not equal to "PRIOR THERAPY", "PRIOR RADIOTHERAPY", or "PRIOR SURGERY". |
CMConMedsText | Concomitant medications | Concatenate all values of either CMDECOD (Standardized Medication Name) or CMTRT (Reported name of drug) for all concomitant medications. If the Include concomitant medication indication in narrative text box is checked, then append CMINDC in parentheses to each medication. Concomitant medications are any medication in the CM dataset where CM end day is greater than or equal to 1 or missing and CMCAT is not equal to "PRIOR THERAPY", "PRIOR RADIOTHERAPY", or "PRIOR SURGERY". |
CMRegimenText | Number of prior regimens | Subset CM on CMCAT = "PRIOR THERAPY". For each unique CMDOSRGM per USUBJID, concatenate CMDOSRGM with all corresponding values of CMDECOD(Standardized Medication Name) or CMTRT(Reported name of drug) using a : to separate CMDOSRGM from CMDECOD/CMTRT and a + to separate each CMDECOD/CMTRT if there is more than one per CMDOSRGM. If the Include concomitant medication indication in narrative text box is checked, then append CMINDC in parentheses to each CMDECOD/CMTRT. Concatenate all records per USUBJID using a ~ as a separator. |
subjectID | Subject identifier or unique subject identifier | If "Use Subject Identifier for study in lieu of Unique Subject Identifier" is checked, set to SUBJID. Else set to USUBJID. |
exendaytxt | Last treatment study day text | If EXENDY_MAX is not missing, set to (Day X) where X = EXENDY_MAX. |
exendt_maxtxt | Last treatment date (character) | Character version of EXENDT_MAX. |
flagtxt | Indicates No treatment, Pre treatment, On treatment, or Post treatment (* indicates partial EX date) | Set to FLAG. If Include Exposure (EX) in the narrative is checked and EXSTDTC or EXENDTC is a partial date, then add an * to the end. |
_eventTypeSortCode_ | Narrative Category per event (fatal, SAE, discontinuation, or AESI) | Used to set the narrative category for each AE. If AEOUT contains "FATAL", set to 1. Else if AESER = "Y", set to 2. Else if AEACN contains "WITHDRAWN" or AEACN variables in SUPPAE contain "WITHDRAWN", set to 3. Else if AESIFL = "Y" or AESI = "Y" or "1", set to 4. Else set to 99. |
AESIFL | Adverse event of special interest flag | Set to AESIFL from either ADAE or SUPPAE. If AESIFL comes from SUPPAE, transpose data where QNAM = "AESIFL" and use corresponding values in QVAL. |
AESI | Adverse event of special interest | Set to AESI from either ADAE or SUPPAE. If AESI comes from SUPPAE, transpose data where QNAM = "AESI" and use corresponding values in QVAL. |
NarrCatType | Narrative Category per subject (fatal, SAE, discontinuation, or AESI) | Set to the minimum value of _eventTypeSortCode_ per USUBJID. For example, if a subject has one AE that is fatal and one AE that is serious, NarrCatType would be set to 1 for that subject. |
PrePeriodA | Period of closest results from Findings A on or prior to the start of the AE | Set to the period that PREDTA falls in. Only for studies with multiple treatment periods. |
PostPeriodA | Period of closest results from Findings A subsequent to the start of the AE | Set to the period that POSTDTA falls in. Only for studies with multiple treatment periods. |
Severity | AE severity (numeric) | If AESEV="MILD", set to 1. If AESEV="MODERATE", set to 2. If AESEV="SEVERE", set to 3. If AESEV="LIFE THREATENING", set to 4. If AESEV="DEATH", set to 5. |