Cardinal
  • Home
  • Template Catalog
  • About
  • Resources
  • Help
    • Getting Started
    • Report a Bug
    • FAQ

Subjects With Serious Adverse Events by Organ System, OCMQ (Narrow) and Preferred Term, Safety Population, Pooled Analysis (or Trial X)

FDA Table 29

table
FDA
safety
adverse events

FDA IG Shell

FDA IG example table shell

Programming Notes

Background and Instructions

Table 29: Subjects With Serious Adverse Events by Organ System presents preferred terms under each OCMQ listed in Table 11 Subjects With Serious Adverse Events by Organ System and OCMQ (Narrow), Safety Population, Pooled Analysis (or Trial X).

Customization

If deemed necessary, clinical reviewers may request CDS to add OCMQs (broad) to the table. Based on the assessment of the OCMQ results, clinical reviewers may request Table 41: Subjects With Select Narrow FDA Medical Queries from Section 4.1 Optional Adverse Event Analyses to explore the data for specific subjects.

Output

  • Full Code
  • Table
  • ARD
Code
# FDA TABLE 29 ---------------------------------------------------------------
# Self-contained template. Run top-to-bottom to build the objects below.
# Used by tests via run_template() and published in the catalog.

library(dplyr)
library(cards)
library(gtsummary)

adae <- pharmaverseadam::adae
adsl <- pharmaverseadam::adsl

set.seed(1)
adae <- adae |>
  rename(OCMQ01SC = AEHLTCD) |>
  mutate(
    AESER = sample(c("Y", "N"), size = nrow(adae), replace = TRUE),
    OCMQ01NAM = sample(c("OCMQ1", "OCMQ2", "OCMQ3"), size = nrow(adae), replace = TRUE)
  ) |>
  # truncating table for demonstration
  filter(AESOC == "VASCULAR DISORDERS")
adae$OCMQ01SC[is.na(adae$OCMQ01SC)] <- "NARROW"

# Pre-processing --------------------------------------------
adsl <- adsl |>
  # safety population
  filter(
    SAFFL == "Y"
  )

data <- adae |>
  filter(
    # safety population
    SAFFL == "Y",
    # serious AEs
    AESER == "Y",
    # treatment-emergent
    TRTEMFL == "Y",
    # narrow OCMQ scope
    OCMQ01SC == "NARROW"
  )

ard <- ard_stack_hierarchical(
  data,
  variables = c(AEBODSYS, OCMQ01NAM, AEDECOD),
  by = TRT01A,
  id = USUBJID,
  denominator = adsl,
  # variables to include AE rates for
  include = c(OCMQ01NAM, AEDECOD)
)

# create table using ARD-first approach (ARD -> table)
tbl <-
  tbl_ard_hierarchical(
    ard,
    variables = c(AEBODSYS, OCMQ01NAM, AEDECOD),
    by = TRT01A,
    # variables to display AE rates for
    include = c(OCMQ01NAM, AEDECOD)
  ) |>
  # add custom variable label
  modify_header(label = "**Organ System**")


ard <- gtsummary::gather_ard(tbl)
Code
tbl
Organ System Placebo
N = 861
Xanomeline Low Dose
N = 961
VASCULAR DISORDERS

    OCMQ1 1 (1.2%) 1 (1.0%)
        HYPOTENSION 1 (1.2%) 1 (1.0%)
    OCMQ2 1 (1.2%) 1 (1.0%)
        HOT FLUSH 0 (0.0%) 1 (1.0%)
        HYPOTENSION 1 (1.2%) 0 (0.0%)
    OCMQ3 2 (2.3%) 0 (0.0%)
        HYPERTENSION 1 (1.2%) 0 (0.0%)
        HYPOTENSION 1 (1.2%) 0 (0.0%)
1 n (%)
Code
withr::local_options(width = 9999, tibble.print_max = Inf)
print(ard, columns = "all")
$tbl_ard_hierarchical
# An ARD data frame: 57 × 17
   group1 group1_level        group2   group2_level       group3    group3_level variable  variable_level       context      stat_name stat_label     stat stat_fmt fmt_fun warning error  gts_column
   <chr>  <list>              <chr>    <list>             <chr>     <list>       <chr>     <list>               <chr>        <chr>     <chr>        <list> <list>   <list>  <list>  <list> <chr>     
 1 <NA>   <NULL>              <NA>     <NULL>             <NA>      <NULL>       TRT01A    Placebo              tabulate     n         n           86      86       0       <NULL>  <NULL> stat_1    
 2 <NA>   <NULL>              <NA>     <NULL>             <NA>      <NULL>       TRT01A    Placebo              tabulate     N         N          254      254      0       <NULL>  <NULL> stat_1    
 3 <NA>   <NULL>              <NA>     <NULL>             <NA>      <NULL>       TRT01A    Placebo              tabulate     p         %            0.339  33.9     <fn>    <NULL>  <NULL> stat_1    
 4 <NA>   <NULL>              <NA>     <NULL>             <NA>      <NULL>       TRT01A    Xanomeline High Dose tabulate     n         n           72      72       0       <NULL>  <NULL> stat_2    
 5 <NA>   <NULL>              <NA>     <NULL>             <NA>      <NULL>       TRT01A    Xanomeline High Dose tabulate     N         N          254      254      0       <NULL>  <NULL> stat_2    
 6 <NA>   <NULL>              <NA>     <NULL>             <NA>      <NULL>       TRT01A    Xanomeline High Dose tabulate     p         %            0.283  28.3     <fn>    <NULL>  <NULL> stat_2    
 7 <NA>   <NULL>              <NA>     <NULL>             <NA>      <NULL>       TRT01A    Xanomeline Low Dose  tabulate     n         n           96      96       0       <NULL>  <NULL> stat_3    
 8 <NA>   <NULL>              <NA>     <NULL>             <NA>      <NULL>       TRT01A    Xanomeline Low Dose  tabulate     N         N          254      254      0       <NULL>  <NULL> stat_3    
 9 <NA>   <NULL>              <NA>     <NULL>             <NA>      <NULL>       TRT01A    Xanomeline Low Dose  tabulate     p         %            0.378  37.8     <fn>    <NULL>  <NULL> stat_3    
10 TRT01A Placebo             AEBODSYS VASCULAR DISORDERS <NA>      <NULL>       OCMQ01NAM OCMQ1                hierarchical n         n            1      1        0       <NULL>  <NULL> stat_1    
11 TRT01A Placebo             AEBODSYS VASCULAR DISORDERS <NA>      <NULL>       OCMQ01NAM OCMQ1                hierarchical N         N           86      86       0       <NULL>  <NULL> stat_1    
12 TRT01A Placebo             AEBODSYS VASCULAR DISORDERS <NA>      <NULL>       OCMQ01NAM OCMQ1                hierarchical p         %            0.0116 1.2      <fn>    <NULL>  <NULL> stat_1    
13 TRT01A Xanomeline Low Dose AEBODSYS VASCULAR DISORDERS <NA>      <NULL>       OCMQ01NAM OCMQ1                hierarchical n         n            1      1        0       <NULL>  <NULL> stat_2    
14 TRT01A Xanomeline Low Dose AEBODSYS VASCULAR DISORDERS <NA>      <NULL>       OCMQ01NAM OCMQ1                hierarchical N         N           96      96       0       <NULL>  <NULL> stat_2    
15 TRT01A Xanomeline Low Dose AEBODSYS VASCULAR DISORDERS <NA>      <NULL>       OCMQ01NAM OCMQ1                hierarchical p         %            0.0104 1.0      <fn>    <NULL>  <NULL> stat_2    
16 TRT01A Placebo             AEBODSYS VASCULAR DISORDERS OCMQ01NAM OCMQ1        AEDECOD   HYPOTENSION          hierarchical n         n            1      1        0       <NULL>  <NULL> stat_1    
17 TRT01A Placebo             AEBODSYS VASCULAR DISORDERS OCMQ01NAM OCMQ1        AEDECOD   HYPOTENSION          hierarchical N         N           86      86       0       <NULL>  <NULL> stat_1    
18 TRT01A Placebo             AEBODSYS VASCULAR DISORDERS OCMQ01NAM OCMQ1        AEDECOD   HYPOTENSION          hierarchical p         %            0.0116 1.2      <fn>    <NULL>  <NULL> stat_1    
19 TRT01A Xanomeline Low Dose AEBODSYS VASCULAR DISORDERS OCMQ01NAM OCMQ1        AEDECOD   HYPOTENSION          hierarchical n         n            1      1        0       <NULL>  <NULL> stat_2    
20 TRT01A Xanomeline Low Dose AEBODSYS VASCULAR DISORDERS OCMQ01NAM OCMQ1        AEDECOD   HYPOTENSION          hierarchical N         N           96      96       0       <NULL>  <NULL> stat_2    
21 TRT01A Xanomeline Low Dose AEBODSYS VASCULAR DISORDERS OCMQ01NAM OCMQ1        AEDECOD   HYPOTENSION          hierarchical p         %            0.0104 1.0      <fn>    <NULL>  <NULL> stat_2    
22 TRT01A Placebo             AEBODSYS VASCULAR DISORDERS <NA>      <NULL>       OCMQ01NAM OCMQ2                hierarchical n         n            1      1        0       <NULL>  <NULL> stat_1    
23 TRT01A Placebo             AEBODSYS VASCULAR DISORDERS <NA>      <NULL>       OCMQ01NAM OCMQ2                hierarchical N         N           86      86       0       <NULL>  <NULL> stat_1    
24 TRT01A Placebo             AEBODSYS VASCULAR DISORDERS <NA>      <NULL>       OCMQ01NAM OCMQ2                hierarchical p         %            0.0116 1.2      <fn>    <NULL>  <NULL> stat_1    
25 TRT01A Xanomeline Low Dose AEBODSYS VASCULAR DISORDERS <NA>      <NULL>       OCMQ01NAM OCMQ2                hierarchical n         n            1      1        0       <NULL>  <NULL> stat_2    
26 TRT01A Xanomeline Low Dose AEBODSYS VASCULAR DISORDERS <NA>      <NULL>       OCMQ01NAM OCMQ2                hierarchical N         N           96      96       0       <NULL>  <NULL> stat_2    
27 TRT01A Xanomeline Low Dose AEBODSYS VASCULAR DISORDERS <NA>      <NULL>       OCMQ01NAM OCMQ2                hierarchical p         %            0.0104 1.0      <fn>    <NULL>  <NULL> stat_2    
28 TRT01A Placebo             AEBODSYS VASCULAR DISORDERS OCMQ01NAM OCMQ2        AEDECOD   HOT FLUSH            hierarchical n         n            0      0        0       <NULL>  <NULL> stat_1    
29 TRT01A Placebo             AEBODSYS VASCULAR DISORDERS OCMQ01NAM OCMQ2        AEDECOD   HOT FLUSH            hierarchical N         N           86      86       0       <NULL>  <NULL> stat_1    
30 TRT01A Placebo             AEBODSYS VASCULAR DISORDERS OCMQ01NAM OCMQ2        AEDECOD   HOT FLUSH            hierarchical p         %            0      0.0      <fn>    <NULL>  <NULL> stat_1    
31 TRT01A Xanomeline Low Dose AEBODSYS VASCULAR DISORDERS OCMQ01NAM OCMQ2        AEDECOD   HOT FLUSH            hierarchical n         n            1      1        0       <NULL>  <NULL> stat_2    
32 TRT01A Xanomeline Low Dose AEBODSYS VASCULAR DISORDERS OCMQ01NAM OCMQ2        AEDECOD   HOT FLUSH            hierarchical N         N           96      96       0       <NULL>  <NULL> stat_2    
33 TRT01A Xanomeline Low Dose AEBODSYS VASCULAR DISORDERS OCMQ01NAM OCMQ2        AEDECOD   HOT FLUSH            hierarchical p         %            0.0104 1.0      <fn>    <NULL>  <NULL> stat_2    
34 TRT01A Placebo             AEBODSYS VASCULAR DISORDERS OCMQ01NAM OCMQ2        AEDECOD   HYPOTENSION          hierarchical n         n            1      1        0       <NULL>  <NULL> stat_1    
35 TRT01A Placebo             AEBODSYS VASCULAR DISORDERS OCMQ01NAM OCMQ2        AEDECOD   HYPOTENSION          hierarchical N         N           86      86       0       <NULL>  <NULL> stat_1    
36 TRT01A Placebo             AEBODSYS VASCULAR DISORDERS OCMQ01NAM OCMQ2        AEDECOD   HYPOTENSION          hierarchical p         %            0.0116 1.2      <fn>    <NULL>  <NULL> stat_1    
37 TRT01A Xanomeline Low Dose AEBODSYS VASCULAR DISORDERS OCMQ01NAM OCMQ2        AEDECOD   HYPOTENSION          hierarchical n         n            0      0        0       <NULL>  <NULL> stat_2    
38 TRT01A Xanomeline Low Dose AEBODSYS VASCULAR DISORDERS OCMQ01NAM OCMQ2        AEDECOD   HYPOTENSION          hierarchical N         N           96      96       0       <NULL>  <NULL> stat_2    
39 TRT01A Xanomeline Low Dose AEBODSYS VASCULAR DISORDERS OCMQ01NAM OCMQ2        AEDECOD   HYPOTENSION          hierarchical p         %            0      0.0      <fn>    <NULL>  <NULL> stat_2    
40 TRT01A Placebo             AEBODSYS VASCULAR DISORDERS <NA>      <NULL>       OCMQ01NAM OCMQ3                hierarchical n         n            2      2        0       <NULL>  <NULL> stat_1    
41 TRT01A Placebo             AEBODSYS VASCULAR DISORDERS <NA>      <NULL>       OCMQ01NAM OCMQ3                hierarchical N         N           86      86       0       <NULL>  <NULL> stat_1    
42 TRT01A Placebo             AEBODSYS VASCULAR DISORDERS <NA>      <NULL>       OCMQ01NAM OCMQ3                hierarchical p         %            0.0233 2.3      <fn>    <NULL>  <NULL> stat_1    
43 TRT01A Xanomeline Low Dose AEBODSYS VASCULAR DISORDERS <NA>      <NULL>       OCMQ01NAM OCMQ3                hierarchical n         n            0      0        0       <NULL>  <NULL> stat_2    
44 TRT01A Xanomeline Low Dose AEBODSYS VASCULAR DISORDERS <NA>      <NULL>       OCMQ01NAM OCMQ3                hierarchical N         N           96      96       0       <NULL>  <NULL> stat_2    
45 TRT01A Xanomeline Low Dose AEBODSYS VASCULAR DISORDERS <NA>      <NULL>       OCMQ01NAM OCMQ3                hierarchical p         %            0      0.0      <fn>    <NULL>  <NULL> stat_2    
46 TRT01A Placebo             AEBODSYS VASCULAR DISORDERS OCMQ01NAM OCMQ3        AEDECOD   HYPERTENSION         hierarchical n         n            1      1        0       <NULL>  <NULL> stat_1    
47 TRT01A Placebo             AEBODSYS VASCULAR DISORDERS OCMQ01NAM OCMQ3        AEDECOD   HYPERTENSION         hierarchical N         N           86      86       0       <NULL>  <NULL> stat_1    
48 TRT01A Placebo             AEBODSYS VASCULAR DISORDERS OCMQ01NAM OCMQ3        AEDECOD   HYPERTENSION         hierarchical p         %            0.0116 1.2      <fn>    <NULL>  <NULL> stat_1    
49 TRT01A Xanomeline Low Dose AEBODSYS VASCULAR DISORDERS OCMQ01NAM OCMQ3        AEDECOD   HYPERTENSION         hierarchical n         n            0      0        0       <NULL>  <NULL> stat_2    
50 TRT01A Xanomeline Low Dose AEBODSYS VASCULAR DISORDERS OCMQ01NAM OCMQ3        AEDECOD   HYPERTENSION         hierarchical N         N           96      96       0       <NULL>  <NULL> stat_2    
51 TRT01A Xanomeline Low Dose AEBODSYS VASCULAR DISORDERS OCMQ01NAM OCMQ3        AEDECOD   HYPERTENSION         hierarchical p         %            0      0.0      <fn>    <NULL>  <NULL> stat_2    
52 TRT01A Placebo             AEBODSYS VASCULAR DISORDERS OCMQ01NAM OCMQ3        AEDECOD   HYPOTENSION          hierarchical n         n            1      1        0       <NULL>  <NULL> stat_1    
53 TRT01A Placebo             AEBODSYS VASCULAR DISORDERS OCMQ01NAM OCMQ3        AEDECOD   HYPOTENSION          hierarchical N         N           86      86       0       <NULL>  <NULL> stat_1    
54 TRT01A Placebo             AEBODSYS VASCULAR DISORDERS OCMQ01NAM OCMQ3        AEDECOD   HYPOTENSION          hierarchical p         %            0.0116 1.2      <fn>    <NULL>  <NULL> stat_1    
55 TRT01A Xanomeline Low Dose AEBODSYS VASCULAR DISORDERS OCMQ01NAM OCMQ3        AEDECOD   HYPOTENSION          hierarchical n         n            0      0        0       <NULL>  <NULL> stat_2    
56 TRT01A Xanomeline Low Dose AEBODSYS VASCULAR DISORDERS OCMQ01NAM OCMQ3        AEDECOD   HYPOTENSION          hierarchical N         N           96      96       0       <NULL>  <NULL> stat_2    
57 TRT01A Xanomeline Low Dose AEBODSYS VASCULAR DISORDERS OCMQ01NAM OCMQ3        AEDECOD   HYPOTENSION          hierarchical p         %            0      0.0      <fn>    <NULL>  <NULL> stat_2    
Source Code
---
title: Subjects With Serious Adverse Events by Organ System, OCMQ (Narrow) and Preferred Term, Safety Population, Pooled Analysis (or Trial X)
subtitle: FDA Table 29
categories: [table, FDA, safety, adverse events]
---

::::: columns

:::: {.column width="52%"}
### FDA IG Shell

![](ig_shell.png){fig-alt="FDA IG example table shell" .lightbox width=100%}

### Programming Notes

**Background and Instructions**

Table 29: Subjects With Serious Adverse Events by Organ System presents preferred terms under each OCMQ listed in Table 11 Subjects With Serious Adverse Events by Organ System and OCMQ (Narrow), Safety Population, Pooled Analysis (or Trial X).

**Customization**

If deemed necessary, clinical reviewers may request CDS to add OCMQs (broad) to the table. Based on the assessment of the OCMQ results, clinical reviewers may request Table 41: Subjects With Select Narrow FDA Medical Queries from Section 4.1 Optional Adverse Event Analyses to explore the data for specific subjects.

::::

:::: {.column width="4%"}
::::

:::: {.column width="44%"}
### Output

```{r out-result, echo=FALSE, fig.align='center', out.width='100%'}
knitr::include_graphics("result.png")
```

::::

:::::

::: panel-tabset
## Full Code

```{r fullcode, file="../../../inst/templates/fda-table_29.R", message=FALSE, warning=FALSE, results='hide'}
```

## Table

```{r tbl}
tbl
```

## ARD

```{r ard, message=FALSE, warning=FALSE}
withr::local_options(width = 9999, tibble.print_max = Inf)
print(ard, columns = "all")
```

:::
 
  • This website as well as code examples are licensed under the Apache License, Version 2.0.
Cookie Preferences