Skip to content

Commit

Permalink
adcoeq (#41) : Updated AVISIT logic for Baseline
Browse files Browse the repository at this point in the history
  • Loading branch information
SPUJ (Siddhesh Pujari) committed Dec 16, 2024
1 parent 5d41c7d commit f829d60
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions inst/templates/ad_adcoeq.R
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,11 @@ adcoeq <- adcoeq %>%
AVISIT = case_when(
is.na(VISIT) ~ NA_character_,
str_detect(VISIT, "UNSCHED|RETRIEVAL|AMBUL") ~ NA_character_,
str_detect(VISIT, "SCREEN") ~ "SCREENING",
ADT <= TRTSDT ~ "Baseline",
TRUE ~ str_to_title(VISIT)
),
AVISITN = case_when(
AVISIT == "Baseline" ~ 0,
str_detect(AVISIT, "SCREEN") ~ -1,
str_detect(AVISIT, "Screen") ~ -1,
str_detect(VISIT, "WEEK") ~ as.integer(str_extract(VISIT, "\\d+")),
TRUE ~ NA_integer_
)
Expand Down

0 comments on commit f829d60

Please sign in to comment.