Skip to content

Commit

Permalink
Closes #2308 #2328 Update ADPP and ADPC templates (#2333)
Browse files Browse the repository at this point in the history
Update ADPP and ADPC templates #2308 #2328

Co-authored-by: Jeffrey Dickinson <dickinson.jeffrey@gene.com>
  • Loading branch information
jeffreyad and jeffreyad authored Feb 13, 2024
1 parent b0e11e8 commit f71778f
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ There is a possibility to get package dependency versions used for the workflows

- The function `dplyr::transmute()` is superseded in favor of `dplyr::mutate(.keep = "none")`. Consequently, all the admiral functions that utilized the former have been updated accordingly. (#2274)

- The templates for ADPP and ADPC are updated for missing variables (#2308) and to make `ATPT` and `ATPTN` consistent. (#2328)

# admiral 1.0.1

- Fix bug in `derive_vars_query()` where if AE terms were in mixed case no terms are flagged. (#2311)
Expand Down
2 changes: 1 addition & 1 deletion inst/templates/ad_adpc.R
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ dtype <- adpc_aval %>%
DOSEA = EXDOSE_next,
BASETYPE = paste(AVISIT_next, "Baseline"),
ATPT = "Pre-dose",
ATPTN = NFRLT,
ATPTN = -0.5,
ABLFL = "Y",
DTYPE = "COPY"
) %>%
Expand Down
15 changes: 6 additions & 9 deletions inst/templates/ad_adpp.R
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ adpp_aval <- adpp_pp %>%
## Calculate AVAL and AVALC ----
mutate(
AVAL = PPSTRESN,
AVALC = PPSTRESC
AVALC = PPSTRESC,
AVALU = PPSTRESU,
) %>%
# Remove variables
select(-PPSTRESN, -PPSTRESC) %>%
Expand All @@ -121,14 +122,10 @@ adpp_aval <- adpp_pp %>%
adpp_avisit <- adpp_aval %>%
# Derive Timing
mutate(
VISIT = "", # /!\ To remove
VISITNUM = NA, # /!\ To remove
AVISIT = case_when(
str_detect(VISIT, "SCREEN|UNSCHED|RETRIEVAL|AMBUL") ~ NA_character_,
!is.na(VISIT) ~ str_to_title(VISIT),
TRUE ~ NA_character_
),
AVISITN = VISITNUM
AVISITN = ADY,
AVISIT = paste("Day", ADY),
VISITNUM = AVISITN,
VISIT = AVISIT
) %>%
## Assign TRTA, TRTP ----
# See also the "Visit and Period Variables" vignette
Expand Down
2 changes: 1 addition & 1 deletion vignettes/pk_adnca.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,7 @@ dtype <- adpc_aval %>%
DOSEA = EXDOSE_next,
BASETYPE = paste(AVISIT_next, "Baseline"),
ATPT = "Pre-dose",
ATPTN = NFRLT,
ATPTN = -0.5,
ABLFL = "Y",
DTYPE = "COPY"
) %>%
Expand Down

0 comments on commit f71778f

Please sign in to comment.