TL Catalog
  1. Listings
  2. Adverse Events
  3. LSFAE03
  • Introduction

  • Index

  • Tables
    • Adverse Events
      • TSFAE01A
      • TSFAE01B
      • TSFAE02
      • TSFAE02A
      • TSFAE03
      • TSFAE03A
      • TSFAE04
      • TSFAE04A
      • TSFAE05
      • TSFAE05A
      • TSFAE06A
      • TSFAE06B
      • TSFAE07A
      • TSFAE07B
      • TSFAE08
      • TSFAE09
      • TSFAE10
      • TSFAE11
      • TSFAE12
      • TSFAE13
      • TSFAE14
      • TSFAE15
      • TSFAE16
      • TSFAE17A
      • TSFAE17B
      • TSFAE17C
      • TSFAE17D
      • TSFAE19A
      • TSFAE19B
      • TSFAE19C
      • TSFAE19D
      • TSFAE20A
      • TSFAE20B
      • TSFAE20C
      • TSFAE21A
      • TSFAE21B
      • TSFAE21C
      • TSFAE21D
      • TSFAE22A
      • TSFAE22B
      • TSFAE22C
      • TSFAE23A
      • TSFAE23B
      • TSFAE23C
      • TSFAE23D
      • TSFAE24A
      • TSFAE24B
      • TSFAE24C
      • TSFAE24D
      • TSFAE24F
      • TSFDTH01
    • Clinical Laboratory Evaluation
      • TSFLAB01
      • TSFLAB01A
      • TSFLAB02
      • TSFLAB02A
      • TSFLAB02B
      • TSFLAB03
      • TSFLAB03A
      • TSFLAB04A
      • TSFLAB04B
      • TSFLAB05
      • TSFLAB06
      • TSFLAB07
    • Demographic
      • TSIDEM01
      • TSIDEM02
      • TSIMH01
    • Disposition of Subjects
      • TSIDS01
      • TSIDS02
      • TSIDS02A
    • Electrocardiograms
      • TSFECG01
      • TSFECG01A
      • TSFECG02
      • TSFECG03
      • TSFECG04
      • TSFECG05
    • Exposure
      • TSIEX01
      • TSIEX02
      • TSIEX03
      • TSIEX04
      • TSIEX06
      • TSIEX07
      • TSIEX08
      • TSIEX09
      • TSIEX10
      • TSIEX11
    • Pharmacokinetics
      • TPK01A
      • TPK01B
      • TPK02
      • TPK03
    • Prior and Concomitant Therapies
      • TSICM01
      • TSICM02
      • TSICM03
      • TSICM04
      • TSICM05
      • TSICM06
      • TSICM07
      • TSICM08
    • Vital Signs and Physical Findings
      • TSFVIT01
      • TSFVIT01A
      • TSFVIT02
      • TSFVIT03
      • TSFVIT04
      • TSFVIT05
      • TSFVIT06
  • Listings
    • Adverse Events
      • LSFAE01
      • LSFAE02
      • LSFAE03
      • LSFAE04
      • LSFAE05
      • LSFAE06A
      • LSFAE06B
      • LSFDTH01
    • Clinical Laboratory Evaluation
      • LSFLAB01
    • Demographic
      • LSIDEM01
      • LSIDEM02
      • LSIMH01
    • Disposition of Subjects
      • LSIDS01
      • LSIDS02
      • LSIDS03
      • LSIDS04
      • LSIDS05
    • Electrocardiograms
      • LSFECG01
      • LSFECG02
    • Exposure
      • LSIEX01
      • LSIEX02
      • LSIEX03
    • Prior and Concomitant Therapies
      • LSICM01
    • Vital Signs and Physical Findings
      • LSFVIT01
      • LSFVIT02

  • Reproducibility

  • Changelog

On this page

  • Output
  • Edit this page
  • Report an issue
  1. Listings
  2. Adverse Events
  3. LSFAE03

LSFAE03

Listing of Treatment-emergent Adverse Events Leading to Permanent Discontinuation of Study Treatment


Output

  • Preview
Code
# Program Name:              lsfae03.R

# Prep environment

library(envsetup)
library(tern)
library(dplyr)
library(rtables)
library(rlistings)
library(junco)
library(stringi)

# Define script level parameters

tblid <- "LSFAE03"
fileid <- tblid
popfl <- "SAFFL"
trtvar <- "TRT01A"
key_cols <- c("COL0", "COL1", "COL2")
disp_cols <- paste0("COL", 0:9)
concat_sep <- " / "
tab_titles <- get_titles_from_file(input_path = '../../_data/', tblid)
string_map <- default_str_map
# Parameter to control whether time should be displayed
include_time <- TRUE

# Process data

adae <- pharmaverseadamjnj::adae %>%
  filter(
    !!rlang::sym(popfl) == "Y" & TRTEMFL == "Y" & AEACN == "DRUG WITHDRAWN"
  )

adsl <- pharmaverseadamjnj::adsl %>%
  filter(!!rlang::sym(popfl) == "Y") %>%
  select(STUDYID, USUBJID, EOSDY)

adae_adsl <- adae %>%
  inner_join(adsl, by = c("STUDYID" = "STUDYID", "USUBJID" = "USUBJID"))

lsting <- adae_adsl %>%
  mutate(
    AGE = explicit_na(as.character(AGE), ""),
    SEX = explicit_na(SEX, ""),
    RACE_DECODE = explicit_na(RACE_DECODE, ""),
    DOSEON = explicit_na(as.character(DOSEON), ""),
    DOSEU = explicit_na(DOSEU, ""),
    DOSEDY = explicit_na(as.character(DOSEDY), ""),
    AEDECOD = explicit_na(AEDECOD, ""),
    AETERM = ifelse(
      is.na(AETERM),
      "",
      stringi::stri_trans_totitle(gsub("\\$", "", AETERM))
    ),
    ASTDT = ifelse(
      nchar(as.character(ASTDT)) == 10,
      toupper(format(ASTDT, "%d%b%Y")),
      ""
    ),
    ASTTM = ifelse(
      include_time & !is.na(ASTDTM),
      substr(as.character(ASTDTM), 12, 16),
      ""
    ),
    ASTDYN = ifelse(!is.na(ASTDY), ASTDY, NA),
    ASTDY = ifelse(!is.na(ASTDY), ASTDY, ""),
    ASTDTFS = ifelse(!is.na(ASTDTF), "*", ""),
    AENDT = explicit_na(as.character(AENDT), ""),
    AENDT = ifelse(
      nchar(AENDT) == 10,
      toupper(format(as.Date(AENDT), "%d%b%Y")),
      ""
    ),
    AENTM = ifelse(
      include_time & !is.na(AENDTM),
      substr(as.character(AENDTM), 12, 16),
      ""
    ),
    AENDY = ifelse(!is.na(AENDY), AENDY, ""),
    AENDTFS = ifelse(!is.na(AENDTF), "*", ""),
    AEOUTC = explicit_na(AEOUT_DECODE, ""),
    # Optional Variable: COL9/AESEV/AETOXGR
    # AESEV = explicit_na(AESEV,""),
    AETOXGR = explicit_na(AETOXGR, ""),
    AESER_DECODE = explicit_na(AESER_DECODE, ""),
    COL0 = explicit_na(.data[[trtvar]], ""),
    COL1 = explicit_na(USUBJID, ""),
    COL2 = paste(AGE, SEX, RACE_DECODE, sep = concat_sep),
    COL3 = paste0(paste0(DOSEON, " ", DOSEU), concat_sep, DOSEDY),
    COL4 = paste(AEDECOD, AETERM, sep = concat_sep),
    COL5 = case_when(
      ASTDT == "" ~ "",
      include_time & ASTDT != "" & ASTTM != "" & ASTDY != "" & ASTDTFS != "" ~
        paste0(ASTDT, concat_sep, ASTTM, " (", ASTDY, ")", ASTDTFS),
      include_time & ASTDT != "" & ASTTM != "" & ASTDY != "" & ASTDTFS == "" ~
        paste0(ASTDT, concat_sep, ASTTM, " (", ASTDY, ")"),
      include_time & ASTDT != "" & ASTTM == "" & ASTDY != "" & ASTDTFS != "" ~
        paste0(ASTDT, concat_sep, "--:--", " (", ASTDY, ")", ASTDTFS),
      include_time & ASTDT != "" & ASTTM == "" & ASTDY != "" & ASTDTFS == "" ~
        paste0(ASTDT, concat_sep, "--:--", " (", ASTDY, ")"),
      ASTDT != "" & ASTDY != "" & ASTDTFS != "" ~
        paste0(ASTDT, " (", ASTDY, ")", ASTDTFS),
      ASTDT != "" & ASTDY != "" & ASTDTFS == "" ~
        paste0(ASTDT, " (", ASTDY, ")"),
    ),
    COL6 = case_when(
      AENDT == "" ~ "",
      include_time & AENDT != "" & AENTM != "" & AENDY != "" & AENDTFS != "" ~
        paste0(AENDT, concat_sep, AENTM, " (", AENDY, ")", AENDTFS),
      include_time & AENDT != "" & AENTM != "" & AENDY != "" & AENDTFS == "" ~
        paste0(AENDT, concat_sep, AENTM, " (", AENDY, ")"),
      include_time & AENDT != "" & AENTM == "" & AENDY != "" & AENDTFS != "" ~
        paste0(AENDT, concat_sep, "--:--", " (", AENDY, ")", AENDTFS),
      include_time & AENDT != "" & AENTM == "" & AENDY != "" & AENDTFS == "" ~
        paste0(AENDT, concat_sep, "--:--", " (", AENDY, ")"),
      AENDT != "" & AENDY != "" & AENDTFS != "" ~
        paste0(AENDT, " (", AENDY, ")", AENDTFS),
      AENDT != "" & AENDY != "" & AENDTFS == "" ~
        paste0(AENDT, " (", AENDY, ")"),
    ),
    COL7 = case_when(
      !is.na(ADURN) & !is.na(EOSDY) ~ paste(ADURN, EOSDY, sep = concat_sep),
      !is.na(ADURN) & is.na(EOSDY) ~ paste0(ADURN, concat_sep),
      is.na(ADURN) & !is.na(EOSDY) ~ paste0(concat_sep, EOSDY),
      is.na(ADURN) & is.na(EOSDY) ~ ""
    ),
    COL8 = explicit_na(AEREL_DECODE, ""),
    # Optional Variable: COL9/AESEV/AETOXGR
    # COL9 = paste(AEOUTC, AESEV, AESER_DECODE, sep = concat_sep)
    COL9 = paste(AEOUTC, AETOXGR, AESER_DECODE, sep = concat_sep)
  ) %>%
  arrange(
    COL0,
    COL1,
    COL2,
    !is.na(ASTDYN),
    ASTDYN,
    if (include_time) ASTDTM else ASTDT,
    AEDECOD,
    AETERM
  )

lsting <- var_relabel(
  lsting,
  COL0 = "Treatment Group",
  COL1 = "Subject ID",
  COL2 = paste("Age (years)", "Sex", "Race", sep = concat_sep),
  COL3 = paste(
    "Onset Dose (unit)",
    "Day of Last Dose~[super a,b]",
    sep = concat_sep
  ),
  COL4 = paste("Preferred Term", "Reported Term", sep = concat_sep),
  COL5 = if (include_time) {
    paste("Start Date", "Time (Study Day~[super b])", sep = concat_sep)
  } else {
    "Start Date (Study Day~[super b])"
  },
  COL6 = if (include_time) {
    paste("End Date", "Time (Study Day~[super b])", sep = concat_sep)
  } else {
    "End Date (Study Day~[super b])"
  },
  COL7 = paste(
    "AE Duration (Days)",
    "Day of Discontinuation or Completion of Study~[super b]",
    sep = concat_sep
  ),
  COL8 = "Relationship to Study Treatment~[super c]",
  # Optional Variable: COL9/AESEV/AETOXGR
  # COL9 = paste("Outcome", "Severity", "Serious", sep = concat_sep)
  COL9 = paste("Outcome", "Toxicity Grade", "Serious", sep = concat_sep)
)

# Build listing

result <- rlistings::as_listing(
  df = lsting,
  key_cols = key_cols,
  disp_cols = disp_cols
)

# Add titles and footnotes

result <- set_titles(result, tab_titles)

# Output listing

tt_to_tlgrtf(string_map = string_map, tt = head(result, 100), file = fileid, orientation = "landscape")

LSFAE03: Listing of Treatment-emergent Adverse Events Leading to Permanent Discontinuation of Study Treatment; Safety Analysis Set (Study jjcs - core)

Treatment Group

Subject ID

Age (years) / Sex / Race

Onset Dose (unit) / Day of Last Dosea,b

Preferred Term / Reported Term

Start Date / Time (Study Dayb)

End Date / Time (Study Dayb)

AE Duration (Days) / Day of Discontinuation or Completion of Studyb

Relationship to Study Treatmentc

Outcome / Toxicity Grade / Serious

Xanomeline High Dose

01-701-1148

57 / M / Not reported

10 mg / 37

APPLICATION SITE PRURITUS / Application Site Pruritus

25AUG2013 / 00:00 (3)

/ 182

Probable

Not Recovered/Not Resolved / 2 / Yes

01-701-1239

56 / M / White

10 mg / 37

UPPER RESPIRATORY TRACT INFECTION / Upper Respiratory Tract Infection

20FEB2014 / 00:00 (41)

12MAR2014 / 23:59 (61)

21 / 182

Not Related

Not Recovered/Not Resolved / 4 / Yes

01-701-1275

61 / M / White

10 mg / 37

PRURITUS / Pruritus

24FEB2014 / 00:00 (18)

12JUN2014 / 23:59 (126)

109 / 128

Possible

Not Recovered/Not Resolved / 4 / No

01-701-1302

61 / M / Asian

10 mg / 37

HEADACHE / Headache

15SEP2013 / 00:00 (18)

/ 69

Not Related

Not Recovered/Not Resolved / 3 / No

10 mg / 37

RESPIRATORY TRACT CONGESTION / Respiratory Tract Congestion

23OCT2013 / 00:00 (56)

/ 69

Not Related

Not Recovered/Not Resolved / 4 / No

10 mg / 37

LISTLESS / Listless

24OCT2013 / 00:00 (57)

/ 69

Possible

Not Recovered/Not Resolved / 3 / Yes

01-701-1383

72 / F / Native Hawaiian or other Pacific Islander

10 mg / 37

APPLICATION SITE IRRITATION / Application Site Irritation

12APR2013 / 00:00 (68)

/ 184

Possible

Not Recovered/Not Resolved / 1 / No

01-701-1444

63 / M / American Indian or Alaska Native

10 mg / 37

APPLICATION SITE PRURITUS / Application Site Pruritus

19JAN2013 / 00:00 (15)

/ 40

Probable

Not Recovered/Not Resolved / 0 / No

10 mg / 37

SALIVARY HYPERSECRETION / Salivary Hypersecretion

19JAN2013 / 00:00 (15)

/ 40

Possible

Not Recovered/Not Resolved / 5 / Yes

01-704-1017

77 / M / Asian

10 mg / 37

MYOCARDIAL INFARCTION / Myocardial Infarction

19OCT2013 / 00:00 (14)

/ 50

Not Related

Not Recovered/Not Resolved / 0 / Yes

01-704-1093

79 / M / American Indian or Alaska Native

10 mg / 37

RASH / Rash

04MAY2013 / 00:00 (51)

/ 98

Probable

Not Recovered/Not Resolved / 3 / Yes

01-705-1281

73 / F / Not reported

10 mg / 37

PRURITUS / Pruritus

30JAN2014 / 00:00 (64)

/ 110

Possible

Not Recovered/Not Resolved / 2 / Yes

01-705-1310

74 / F / Native Hawaiian or other Pacific Islander

10 mg / 37

WOUND HAEMORRHAGE / Wound Haemorrhage

09JAN2014 / 00:00 (69)

/ 83

Possible

Not Recovered/Not Resolved / 5 / Yes

01-708-1347

61 / F / White

10 mg / 37

ERYTHEMA / Erythema

13JUN2013 / 00:00 (55)

25JUN2013 / 23:59 (67)

13 / 60

Probable

Recovered/Resolved / 0 / Yes

01-709-1099

79 / F / Multiple

10 mg / 37

APPLICATION SITE DERMATITIS / Application Site Dermatitis

12NOV2013 / 00:00 (19)

/ 183

Probable

Not Recovered/Not Resolved / 3 / Yes

01-709-1168

72 / F / American Indian or Alaska Native

10 mg / 37

SKIN IRRITATION / Skin Irritation

17AUG2013 / 00:00 (16)

06SEP2013 / 23:59 (36)

21 / 57

Probable

Recovered/Resolved / 1 / No

10 mg / 37

RASH / Rash

06SEP2013 / 00:00 (36)

11OCT2013 / 23:59 (71)

36 / 57

Probable

Recovered/Resolved / 1 / Yes

01-709-1309

65 / M / American Indian or Alaska Native

10 mg / 37

NASAL CONGESTION / Nasal Congestion

19JUN2013 / 00:00 (1)

20JUN2013 / 23:59 (2)

2 / 184

Related

Recovered/Resolved / 2 / No

10 mg / 37

ALLERGIC GRANULOMATOUS ANGIITIS / Allergic Granulomatous Angiitis

04JUL2013 / 00:00 (16)

04JUL2013 / 23:59 (16)

1 / 184

Not Related

Recovered/Resolved / 5 / Yes

01-710-1006

77 / M / Asian

10 mg / 37

CONTUSION / Contusion

08AUG2013 / 00:00 (180)

/ 182

Not Related

Not Recovered/Not Resolved / 0 / No

01-710-1021

79 / M / Native Hawaiian or other Pacific Islander

10 mg / 37

CHEST PAIN / Chest Pain

10OCT2013 / 00:00 (14)

10OCT2013 / 23:59 (14)

1 / 47

Related

Recovered/Resolved / 3 / Yes

01-710-1142

76 / F / Not reported

10 mg / 37

HEADACHE / Headache

04OCT2012 / 00:00 (3)

06OCT2012 / 23:59 (5)

3 / 22

Related

Recovered/Resolved / 1 / No

01-710-1408

80 / M / Multiple

10 mg / 37

NASOPHARYNGITIS / Nasopharyngitis

31JAN2013 / 00:00 (27)

09FEB2013 / 23:59 (36)

10 / 189

Not Related

Recovered/Resolved / 3 / Yes

01-713-1141

79 / M / White

10 mg / 37

RASH PRURITIC / Rash Pruritic

21JUN2013 / 00:00 (22)

15JUL2013 / 23:59 (46)

25 / 68

Probable

Not Recovered/Not Resolved / 4 / Yes

10 mg / 37

RASH PRURITIC / Rash Pruritic

21JUN2013 / 00:00 (22)

15JUL2013 / 23:59 (46)

25 / 68

Probable

Recovered/Resolved / 2 / No

10 mg / 37

DELIRIUM / Delirium

01JUL2013 / 00:00 (32)

15JUL2013 / 23:59 (46)

15 / 68

Possible

Recovered/Resolved / 1 / No

01-714-1288

77 / M / Multiple

10 mg / 37

DIZZINESS / Dizziness

13DEC2013 / 00:00 (10)

13DEC2013 / 23:59 (10)

1 / 196

Possible

Recovered/Resolved / 0 / Yes

01-716-1071

78 / F / Black or African American

10 mg / 37

SYNCOPE / Syncope

31JUL2013 / 00:00 (54)

31JUL2013 / 23:59 (54)

1 / 55

Probable

Recovered/Resolved / 1 / Yes

01-716-1447

72 / F / Unknown

10 mg / 37

ERYTHEMA / Erythema

14JAN2014 / 00:00 (30)

/ 184

Probable

Not Recovered/Not Resolved / 4 / No

01-718-1371

69 / F / Unknown

10 mg / 37

FATIGUE / Fatigue

09MAY2013 / 00:00 (14)

11MAY2013 / 23:59 (16)

3 / 105

Possible

Recovered/Resolved / 1 / Yes

Xanomeline Low Dose

01-701-1115

84 / M / Black or African American

10 mg / 37

APPLICATION SITE ERYTHEMA / Application Site Erythema

02DEC2012 / 00:00 (3)

/ 55

Probable

Not Recovered/Not Resolved / 0 / Yes

10 mg / 37

APPLICATION SITE PRURITUS / Application Site Pruritus

02DEC2012 / 00:00 (3)

/ 55

Probable

Not Recovered/Not Resolved / 2 / No

10 mg / 37

APPLICATION SITE IRRITATION / Application Site Irritation

26DEC2012 / 00:00 (27)

26DEC2012 / 23:59 (27)

1 / 55

Possible

Not Recovered/Not Resolved / 1 / No

10 mg / 37

APPLICATION SITE IRRITATION / Application Site Irritation

26DEC2012 / 00:00 (27)

26DEC2012 / 23:59 (27)

1 / 55

Possible

Recovered/Resolved / 4 / Yes

01-701-1192

80 / F / Not reported

10 mg / 37

APPLICATION SITE IRRITATION / Application Site Irritation

05DEC2012 / 00:00 (137)

16DEC2012 / 23:59 (148)

12 / 183

Probable

Not Recovered/Not Resolved / 4 / Yes

01-701-1211

76 / F / Other

10 mg / 37

INCONTINENCE / Incontinence

22NOV2012 / 00:00 (8)

/ 61

Not Related

Not Recovered/Not Resolved / 5 / Yes

10 mg / 37

DYSPNOEA / Dyspnoea

11JAN2013 / 00:00 (58)

/ 61

Not Related

Not Recovered/Not Resolved / 3 / No

01-701-1317

68 / M / Unknown

10 mg / 37

DYSPHONIA / Dysphonia

03NOV2014 / 00:00 (166)

/ 183

Related

Not Recovered/Not Resolved / 0 / Yes

01-701-1360

67 / M / Multiple

10 mg / 37

APPLICATION SITE PRURITUS / Application Site Pruritus

02AUG2013 / 00:00 (3)

/ 15

Probable

Not Recovered/Not Resolved / 5 / No

01-703-1119

81 / F / Native Hawaiian or other Pacific Islander

10 mg / 37

APPLICATION SITE IRRITATION / Application Site Irritation

16MAR2013 / 00:00 (25)

/ 114

Probable

Not Recovered/Not Resolved / 4 / No

10 mg / 37

PRURITUS / Pruritus

04MAY2013 / 00:00 (74)

/ 114

Probable

Not Recovered/Not Resolved / 3 / No

01-703-1403

67 / M / Multiple

10 mg / 37

WEIGHT DECREASED / Weight Decreased

12DEC2012 / 00:00 (1)

19DEC2012 / 23:59 (8)

8 / 8

Not Related

Not Recovered/Not Resolved / 2 / Yes

10 mg / 37

WEIGHT DECREASED / Weight Decreased

12DEC2012 / 00:00 (1)

19DEC2012 / 23:59 (8)

8 / 8

Not Related

Recovered/Resolved / 0 / Yes

10 mg / 37

DIARRHOEA / Diarrhoea

13DEC2012 / 00:00 (2)

14DEC2012 / 23:59 (3)

2 / 8

Probable

Recovered/Resolved / 4 / No

10 mg / 37

VOMITING / Vomiting

13DEC2012 / 00:00 (2)

14DEC2012 / 23:59 (3)

2 / 8

Probable

Recovered/Resolved / 0 / No

01-704-1025

81 / F / Asian

10 mg / 37

PALPITATIONS / Palpitations

28SEP2013 / 00:00 (2)

30SEP2013 / 23:59 (4)

3 / 64

Related

Recovered/Resolved / 4 / No

01-708-1272

82 / M / Not reported

10 mg / 37

DIARRHOEA / Diarrhoea

11FEB2013 / 00:00 (6)

11FEB2013 / 23:59 (6)

1 / 58

Not Related

Recovered/Resolved / 5 / Yes

01-708-1353

87 / F / Native Hawaiian or other Pacific Islander

10 mg / 37

DIZZINESS / Dizziness

18AUG2013 / 00:00 (46)

10SEP2013 / 23:59 (69)

24 / 69

Related

Recovered/Resolved / 3 / Yes

01-709-1217

77 / M / American Indian or Alaska Native

10 mg / 37

DIZZINESS / Dizziness

01APR2013 / 00:00 (29)

11APR2013 / 23:59 (39)

11 / 114

Possible

Recovered/Resolved / 0 / Yes

01-710-1166

81 / F / White

10 mg / 37

SYNCOPE / Syncope

19MAR2013 / 00:00 (110)

19MAR2013 / 23:59 (110)

1 / 121

Possible

Recovered/Resolved / 3 / No

01-710-1385

77 / M / Multiple

10 mg / 37

BLISTER / Blister

27DEC2012 / 00:00 (60)

/ 113

Possible

Not Recovered/Not Resolved / 3 / No

01-711-1143

76 / F / Black or African American

10 mg / 37

NASOPHARYNGITIS / Nasopharyngitis

28APR2013 / 00:00 (26)

11MAY2013 / 23:59 (39)

14 / 60

Not Related

Not Recovered/Not Resolved / 0 / Yes

01-711-1433

84 / F / Asian

10 mg / 37

ASTHENIA / Asthenia

05FEB2013 / 00:00 (10)

/ 11

Related

Not Recovered/Not Resolved / 0 / No

01-714-1068

79 / F / Other

10 mg / 37

APPLICATION SITE PRURITUS / Application Site Pruritus

20SEP2013 / 00:00 (44)

/ 70

Probable

Not Recovered/Not Resolved / 2 / Yes

01-716-1311

78 / M / Black or African American

10 mg / 37

ULCER / Ulcer

02AUG2014 / 00:00 (81)

/ 140

Not Related

Not Recovered/Not Resolved / 4 / Yes

01-717-1004

80 / F / Not reported

10 mg / 37

SKIN IRRITATION / Skin Irritation

09MAR2014 / 00:00 (55)

15MAR2014 / 23:59 (61)

7 / 184

Probable

Recovered/Resolved / 0 / No

01-718-1170

80 / F / Not reported

10 mg / 37

DIZZINESS / Dizziness

07OCT2013 / 00:00 (22)

07OCT2013 / 23:59 (22)

1 / 49

Possible

Recovered/Resolved / 0 / No

01-718-1250

82 / F / Black or African American

10 mg / 37

CONTUSION / Contusion

15OCT2013 / 00:00 (25)

02NOV2013 / 23:59 (43)

19 / 141

Related

Recovered/Resolved / 2 / Yes

10 mg / 37

APPLICATION SITE PRURITUS / Application Site Pruritus

29DEC2013 / 00:00 (100)

19FEB2014 / 23:59 (152)

53 / 141

Probable

Not Recovered/Not Resolved / 3 / No

Placebo

01-701-1047

85 / F / Native Hawaiian or other Pacific Islander

10 mg / 37

HIATUS HERNIA / Hiatus Hernia

12FEB2013 / 00:00 (1)

12FEB2013 / 23:59 (1)

1 / 46

Not Related

Not Recovered/Not Resolved / 2 / No

10 mg / 37

UPPER RESPIRATORY TRACT INFECTION / Upper Respiratory Tract Infection

06MAR2013 / 00:00 (23)

/ 46

Not Related

Not Recovered/Not Resolved / 0 / No

01-701-1130

84 / M / Other

10 mg / 37

URINARY TRACT INFECTION / Urinary Tract Infection

09MAR2014 / 00:00 (23)

16MAR2014 / 23:59 (30)

8 / 183

Not Related

Not Recovered/Not Resolved / 2 / Yes

10 mg / 37

URINARY TRACT INFECTION / Urinary Tract Infection

09MAR2014 / 00:00 (23)

16MAR2014 / 23:59 (30)

8 / 183

Not Related

Recovered/Resolved / 3 / No

10 mg / 37

EYE PRURITUS / Eye Pruritus

22MAY2014 / 00:00 (97)

/ 183

Related

Not Recovered/Not Resolved / 5 / Yes

01-701-1387

87 / F / Unknown

10 mg / 37

HYPERHIDROSIS / Hyperhidrosis

18MAR2014 / 00:00 (7)

18MAR2014 / 23:59 (7)

1 / 14

Related

Recovered/Resolved / 5 / Yes

01-701-1415

85 / M / Not reported

10 mg / 37

UPPER RESPIRATORY TRACT INFECTION / Upper Respiratory Tract Infection

21OCT2013 / 00:00 (29)

04NOV2013 / 23:59 (43)

15 / 183

Not Related

Not Recovered/Not Resolved / 1 / No

10 mg / 37

UPPER RESPIRATORY TRACT INFECTION / Upper Respiratory Tract Infection

21JAN2014 / 00:00 (121)

10FEB2014 / 23:59 (141)

21 / 183

Related

Not Recovered/Not Resolved / 0 / No

10 mg / 37

DIARRHOEA / Diarrhoea

09MAR2014 / 00:00 (168)

09MAR2014 / 23:59 (168)

1 / 183

Not Related

Recovered/Resolved / 3 / No

01-703-1100

84 / F / Other

10 mg / 37

CATARACT OPERATION / Cataract Operation

25APR2013 / 00:00 (44)

25APR2013 / 23:59 (44)

1 / 186

Not Related

Recovered/Resolved / 3 / Yes

10 mg / 37

OEDEMA PERIPHERAL / Oedema Peripheral

17JUL2013 / 00:00 (127)

14SEP2013 / 23:59 (186)

60 / 186

Related

Recovered/Resolved / 5 / Yes

01-703-1210

72 / F / Not reported

10 mg / 37

DISORIENTATION / Disorientation

02APR2013 / 00:00 (18)

/ 175

Related

Not Recovered/Not Resolved / 1 / No

10 mg / 37

DECREASED APPETITE / Decreased Appetite

04MAY2013 / 00:00 (50)

/ 175

Possible

Not Recovered/Not Resolved / 3 / No

01-704-1435

74 / M / Not reported

10 mg / 37

PARKINSON'S DISEASE / Parkinson's Disease

06JAN2013 / 00:00 (51)

/ 57

Not Related

Not Recovered/Not Resolved / 5 / Yes

01-707-1206

65 / M / Native Hawaiian or other Pacific Islander

10 mg / 37

BLOOD CREATINE PHOSPHOKINASE INCREASED / Blood Creatine Phosphokinase Increased

26NOV2013 / 00:00 (30)

09DEC2013 / 23:59 (43)

14 / 182

Possible

Recovered/Resolved / 2 / Yes

10 mg / 37

POSTNASAL DRIP / Postnasal Drip

03DEC2013 / 00:00 (37)

10DEC2013 / 23:59 (44)

8 / 182

Not Related

Not Recovered/Not Resolved / 4 / Yes

01-708-1316

74 / F / American Indian or Alaska Native

10 mg / 37

APPLICATION SITE ERYTHEMA / Application Site Erythema

15FEB2014 / 00:00 (177)

/ 191

Probable

Not Recovered/Not Resolved / 1 / Yes

01-709-1259

82 / M / Other

10 mg / 37

LOCALISED INFECTION / Localised Infection

05FEB2013 / 00:00 (11)

13FEB2013 / 23:59 (19)

9 / 139

Not Related

Not Recovered/Not Resolved / 5 / No

10 mg / 37

CYSTOSCOPY / Cystoscopy

17MAR2013 / 00:00 (51)

17MAR2013 / 23:59 (51)

1 / 139

Not Related

Recovered/Resolved / 2 / No

01-709-1306

60 / F / Asian

10 mg / 37

DRUG ERUPTION / Drug Eruption

20MAY2014 / 00:00 (107)

23MAY2014 / 23:59 (110)

4 / 143

Not Related

Recovered/Resolved / 2 / Yes

01-710-1060

82 / M / Other

10 mg / 37

APPLICATION SITE INDURATION / Application Site Induration

21JAN2013 / 00:00 (21)

21JAN2013 / 23:59 (21)

1 / 186

Possible

Recovered/Resolved / 4 / No

01-713-1269

73 / M / White

10 mg / 37

SHOULDER PAIN / Shoulder Pain

01JUN2014 / 00:00 (126)

/ 183

Possible

Not Recovered/Not Resolved / 4 / No

10 mg / 37

RASH / Rash

10JUL2014 / 00:00 (165)

/ 183

Related

Not Recovered/Not Resolved / 2 / Yes

01-714-1375

78 / F / Black or African American

10 mg / 37

ERYTHEMA / Erythema

16JUN2013 / 00:00 (111)

/ 194

Probable

Not Recovered/Not Resolved / 0 / Yes

01-716-1024

87 / F / Asian

10 mg / 37

NASOPHARYNGITIS / Nasopharyngitis

20AUG2012 / 00:00 (43)

27SEP2012 / 23:59 (81)

39 / 196

Not Related

Not Recovered/Not Resolved / 4 / No

01-716-1026

73 / F / Unknown

10 mg / 37

ELECTROCARDIOGRAM T WAVE AMPLITUDE DECREASED / Electrocardiogram T Wave Amplitude Decreased

31JUL2014 / 00:00 (121)

/ 198

Related

Not Recovered/Not Resolved / 0 / Yes

01-717-1201

85 / F / Native Hawaiian or other Pacific Islander

10 mg / 37

SKIN IRRITATION / Skin Irritation

19DEC2013 / 00:00 (1)

/ 65

Probable

Not Recovered/Not Resolved / 3 / Yes

01-718-1355

79 / M / Native Hawaiian or other Pacific Islander

10 mg / 37

APPLICATION SITE DERMATITIS / Application Site Dermatitis

20MAY2013 / 00:00 (82)

20MAY2013 / 23:59 (82)

1 / 183

Probable

Recovered/Resolved / 4 / No

10 mg / 37

APPLICATION SITE REACTION / Application Site Reaction

23JUN2013 / 00:00 (116)

13AUG2013 / 23:59 (167)

52 / 183

Probable

Not Recovered/Not Resolved / 3 / No

Key: *=imputed date, day, or duration

a Study day of last administration of [study treatment] prior to or on AE start date.

b Study day is relative to [the start of [study treatment]].

c Relationship is assessed by the investigator.

Note: Adverse events are coded using MedDRA version 26.0; toxicity grade is evaluated according to NCI-CTCAE version 5.0..

[lsfae03.docx][/usr/lib/rstudio-server/bin/quarto/share/rmd/rmd.R] 12JAN2026, 16:09

Download RTF file

LSFAE02
LSFAE04
Source Code
---
title: LSFAE03
subtitle: Listing of Treatment-emergent Adverse Events Leading to Permanent Discontinuation of Study Treatment
---

------------------------------------------------------------------------

{{< include ../../_utils/envir_hook.qmd >}}

```{r setup, echo = FALSE, warning = FALSE, message = FALSE}
options(docx.add_datetime = FALSE, tidytlg.add_datetime = FALSE)
envsetup_config_name <- "default"

# Path to the combined config file
envsetup_file_path <- file.path("../..", "envsetup.yml")

Sys.setenv(ENVSETUP_ENVIRON = '')
library(envsetup)
loaded_config <- config::get(config = envsetup_config_name, file = envsetup_file_path)
envsetup::rprofile(loaded_config)


dpscomp <- compound
dpspdr <- paste(protocol,dbrelease,rpteff,sep="__")

aptcomp <- compound
aptpdr <- paste(protocol,dbrelease,rpteff,sep="__")

###### Study specific updates (formerly in envre)

dpscomp <- "standards"
dpspdr <- "jjcs__NULL__jjcs - core"

apt <- FALSE
library(junco)
default_str_map <- rbind(default_str_map, c("&ctcae", "5.0"))

```

## Output

:::: panel-tabset
## {{< fa regular file-lines sm fw >}} Preview

```{r variant1, results='hide', warning = FALSE, message = FALSE}

# Program Name:              lsfae03.R

# Prep environment

library(envsetup)
library(tern)
library(dplyr)
library(rtables)
library(rlistings)
library(junco)
library(stringi)

# Define script level parameters

tblid <- "LSFAE03"
fileid <- tblid
popfl <- "SAFFL"
trtvar <- "TRT01A"
key_cols <- c("COL0", "COL1", "COL2")
disp_cols <- paste0("COL", 0:9)
concat_sep <- " / "
tab_titles <- get_titles_from_file(input_path = '../../_data/', tblid)
string_map <- default_str_map
# Parameter to control whether time should be displayed
include_time <- TRUE

# Process data

adae <- pharmaverseadamjnj::adae %>%
  filter(
    !!rlang::sym(popfl) == "Y" & TRTEMFL == "Y" & AEACN == "DRUG WITHDRAWN"
  )

adsl <- pharmaverseadamjnj::adsl %>%
  filter(!!rlang::sym(popfl) == "Y") %>%
  select(STUDYID, USUBJID, EOSDY)

adae_adsl <- adae %>%
  inner_join(adsl, by = c("STUDYID" = "STUDYID", "USUBJID" = "USUBJID"))

lsting <- adae_adsl %>%
  mutate(
    AGE = explicit_na(as.character(AGE), ""),
    SEX = explicit_na(SEX, ""),
    RACE_DECODE = explicit_na(RACE_DECODE, ""),
    DOSEON = explicit_na(as.character(DOSEON), ""),
    DOSEU = explicit_na(DOSEU, ""),
    DOSEDY = explicit_na(as.character(DOSEDY), ""),
    AEDECOD = explicit_na(AEDECOD, ""),
    AETERM = ifelse(
      is.na(AETERM),
      "",
      stringi::stri_trans_totitle(gsub("\\$", "", AETERM))
    ),
    ASTDT = ifelse(
      nchar(as.character(ASTDT)) == 10,
      toupper(format(ASTDT, "%d%b%Y")),
      ""
    ),
    ASTTM = ifelse(
      include_time & !is.na(ASTDTM),
      substr(as.character(ASTDTM), 12, 16),
      ""
    ),
    ASTDYN = ifelse(!is.na(ASTDY), ASTDY, NA),
    ASTDY = ifelse(!is.na(ASTDY), ASTDY, ""),
    ASTDTFS = ifelse(!is.na(ASTDTF), "*", ""),
    AENDT = explicit_na(as.character(AENDT), ""),
    AENDT = ifelse(
      nchar(AENDT) == 10,
      toupper(format(as.Date(AENDT), "%d%b%Y")),
      ""
    ),
    AENTM = ifelse(
      include_time & !is.na(AENDTM),
      substr(as.character(AENDTM), 12, 16),
      ""
    ),
    AENDY = ifelse(!is.na(AENDY), AENDY, ""),
    AENDTFS = ifelse(!is.na(AENDTF), "*", ""),
    AEOUTC = explicit_na(AEOUT_DECODE, ""),
    # Optional Variable: COL9/AESEV/AETOXGR
    # AESEV = explicit_na(AESEV,""),
    AETOXGR = explicit_na(AETOXGR, ""),
    AESER_DECODE = explicit_na(AESER_DECODE, ""),
    COL0 = explicit_na(.data[[trtvar]], ""),
    COL1 = explicit_na(USUBJID, ""),
    COL2 = paste(AGE, SEX, RACE_DECODE, sep = concat_sep),
    COL3 = paste0(paste0(DOSEON, " ", DOSEU), concat_sep, DOSEDY),
    COL4 = paste(AEDECOD, AETERM, sep = concat_sep),
    COL5 = case_when(
      ASTDT == "" ~ "",
      include_time & ASTDT != "" & ASTTM != "" & ASTDY != "" & ASTDTFS != "" ~
        paste0(ASTDT, concat_sep, ASTTM, " (", ASTDY, ")", ASTDTFS),
      include_time & ASTDT != "" & ASTTM != "" & ASTDY != "" & ASTDTFS == "" ~
        paste0(ASTDT, concat_sep, ASTTM, " (", ASTDY, ")"),
      include_time & ASTDT != "" & ASTTM == "" & ASTDY != "" & ASTDTFS != "" ~
        paste0(ASTDT, concat_sep, "--:--", " (", ASTDY, ")", ASTDTFS),
      include_time & ASTDT != "" & ASTTM == "" & ASTDY != "" & ASTDTFS == "" ~
        paste0(ASTDT, concat_sep, "--:--", " (", ASTDY, ")"),
      ASTDT != "" & ASTDY != "" & ASTDTFS != "" ~
        paste0(ASTDT, " (", ASTDY, ")", ASTDTFS),
      ASTDT != "" & ASTDY != "" & ASTDTFS == "" ~
        paste0(ASTDT, " (", ASTDY, ")"),
    ),
    COL6 = case_when(
      AENDT == "" ~ "",
      include_time & AENDT != "" & AENTM != "" & AENDY != "" & AENDTFS != "" ~
        paste0(AENDT, concat_sep, AENTM, " (", AENDY, ")", AENDTFS),
      include_time & AENDT != "" & AENTM != "" & AENDY != "" & AENDTFS == "" ~
        paste0(AENDT, concat_sep, AENTM, " (", AENDY, ")"),
      include_time & AENDT != "" & AENTM == "" & AENDY != "" & AENDTFS != "" ~
        paste0(AENDT, concat_sep, "--:--", " (", AENDY, ")", AENDTFS),
      include_time & AENDT != "" & AENTM == "" & AENDY != "" & AENDTFS == "" ~
        paste0(AENDT, concat_sep, "--:--", " (", AENDY, ")"),
      AENDT != "" & AENDY != "" & AENDTFS != "" ~
        paste0(AENDT, " (", AENDY, ")", AENDTFS),
      AENDT != "" & AENDY != "" & AENDTFS == "" ~
        paste0(AENDT, " (", AENDY, ")"),
    ),
    COL7 = case_when(
      !is.na(ADURN) & !is.na(EOSDY) ~ paste(ADURN, EOSDY, sep = concat_sep),
      !is.na(ADURN) & is.na(EOSDY) ~ paste0(ADURN, concat_sep),
      is.na(ADURN) & !is.na(EOSDY) ~ paste0(concat_sep, EOSDY),
      is.na(ADURN) & is.na(EOSDY) ~ ""
    ),
    COL8 = explicit_na(AEREL_DECODE, ""),
    # Optional Variable: COL9/AESEV/AETOXGR
    # COL9 = paste(AEOUTC, AESEV, AESER_DECODE, sep = concat_sep)
    COL9 = paste(AEOUTC, AETOXGR, AESER_DECODE, sep = concat_sep)
  ) %>%
  arrange(
    COL0,
    COL1,
    COL2,
    !is.na(ASTDYN),
    ASTDYN,
    if (include_time) ASTDTM else ASTDT,
    AEDECOD,
    AETERM
  )

lsting <- var_relabel(
  lsting,
  COL0 = "Treatment Group",
  COL1 = "Subject ID",
  COL2 = paste("Age (years)", "Sex", "Race", sep = concat_sep),
  COL3 = paste(
    "Onset Dose (unit)",
    "Day of Last Dose~[super a,b]",
    sep = concat_sep
  ),
  COL4 = paste("Preferred Term", "Reported Term", sep = concat_sep),
  COL5 = if (include_time) {
    paste("Start Date", "Time (Study Day~[super b])", sep = concat_sep)
  } else {
    "Start Date (Study Day~[super b])"
  },
  COL6 = if (include_time) {
    paste("End Date", "Time (Study Day~[super b])", sep = concat_sep)
  } else {
    "End Date (Study Day~[super b])"
  },
  COL7 = paste(
    "AE Duration (Days)",
    "Day of Discontinuation or Completion of Study~[super b]",
    sep = concat_sep
  ),
  COL8 = "Relationship to Study Treatment~[super c]",
  # Optional Variable: COL9/AESEV/AETOXGR
  # COL9 = paste("Outcome", "Severity", "Serious", sep = concat_sep)
  COL9 = paste("Outcome", "Toxicity Grade", "Serious", sep = concat_sep)
)

# Build listing

result <- rlistings::as_listing(
  df = lsting,
  key_cols = key_cols,
  disp_cols = disp_cols
)

# Add titles and footnotes

result <- set_titles(result, tab_titles)

# Output listing

tt_to_tlgrtf(string_map = string_map, tt = head(result, 100), file = fileid, orientation = "landscape")
```
```{r result1, echo=FALSE, message=FALSE, warning=FALSE, test = list(result_v1 = "result")}
tt_to_flextable_j(head(result,100), tblid, string_map = string_map)
```

[Download RTF file](`r paste0(tolower(tblid), '.rtf')`)
::::

Made with ❤️ by the J&J Team

  • Edit this page
  • Report an issue
Cookie Preferences