Skip to content

Commit

Permalink
Merge pull request #1943 from pharmaverse/1796_derive_var_basetype_re…
Browse files Browse the repository at this point in the history
…name@devel

Closes #1796 derive_var_basetype_rename: update templates
  • Loading branch information
bms63 authored Jun 6, 2023
2 parents c8963f4 + a52bff3 commit 948673e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions inst/templates/ad_adeg.R
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,8 @@ adeg <- adeg %>%
## Derive baseline flags ----
adeg <- adeg %>%
# Calculate BASETYPE
derive_var_basetype(
basetypes = rlang::exprs(
derive_basetype_records(
basetypes = exprs(
"LAST: AFTER LYING DOWN FOR 5 MINUTES" = ATPTN == 815,
"LAST: AFTER STANDING FOR 1 MINUTE" = ATPTN == 816,
"LAST: AFTER STANDING FOR 3 MINUTES" = ATPTN == 817,
Expand Down
6 changes: 3 additions & 3 deletions inst/templates/ad_adlb.R
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ adlb <- adlb %>%
order = exprs(AVAL, ADT, AVISITN),
mode = "first",
# "AVISITN < 9997" to evaluate only real visits
filter = (!is.na(AVAL) & ONTRTFL == "Y" & AVISITN < 9997),
filter_add = (!is.na(AVAL) & ONTRTFL == "Y" & AVISITN < 9997),
set_values_to = exprs(
AVISITN = 9997,
AVISIT = "POST-BASELINE MINIMUM",
Expand All @@ -398,7 +398,7 @@ adlb <- adlb %>%
order = exprs(desc(AVAL), ADT, AVISITN),
mode = "first",
# "AVISITN < 9997" to evaluate only real visits
filter = (!is.na(AVAL) & ONTRTFL == "Y" & AVISITN < 9997),
filter_add = (!is.na(AVAL) & ONTRTFL == "Y" & AVISITN < 9997),
set_values_to = exprs(
AVISITN = 9998,
AVISIT = "POST-BASELINE MAXIMUM",
Expand All @@ -411,7 +411,7 @@ adlb <- adlb %>%
order = exprs(ADT, AVISITN),
mode = "last",
# "AVISITN < 9997" to evaluate only real visits
filter = (ONTRTFL == "Y" & AVISITN < 9997),
filter_add = (ONTRTFL == "Y" & AVISITN < 9997),
set_values_to = exprs(
AVISITN = 9999,
AVISIT = "POST-BASELINE LAST",
Expand Down
4 changes: 2 additions & 2 deletions inst/templates/ad_advs.R
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ advs <- advs %>%
## Derive baseline flags ----
advs <- advs %>%
# Calculate BASETYPE
derive_var_basetype(
derive_basetype_records(
basetypes = exprs(
"LAST: AFTER LYING DOWN FOR 5 MINUTES" = ATPTN == 815,
"LAST: AFTER STANDING FOR 1 MINUTE" = ATPTN == 816,
Expand Down Expand Up @@ -251,7 +251,7 @@ advs <- advs %>%
by_vars = exprs(STUDYID, USUBJID, PARAMCD, ATPTN),
order = exprs(ADT, AVISITN, AVAL),
mode = "last",
filter = (4 < AVISITN & AVISITN <= 13 & ANL01FL == "Y" & is.na(DTYPE)),
filter_add = (4 < AVISITN & AVISITN <= 13 & ANL01FL == "Y" & is.na(DTYPE)),
set_values_to = exprs(
AVISIT = "End of Treatment",
AVISITN = 99,
Expand Down

0 comments on commit 948673e

Please sign in to comment.