From f829d605b39fedda93d37574bbd17ea284d494e0 Mon Sep 17 00:00:00 2001 From: "SPUJ (Siddhesh Pujari)" Date: Mon, 16 Dec 2024 13:00:19 +0100 Subject: [PATCH] adcoeq (#41) : Updated AVISIT logic for Baseline --- inst/templates/ad_adcoeq.R | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/inst/templates/ad_adcoeq.R b/inst/templates/ad_adcoeq.R index dd5c6a6..30fb146 100644 --- a/inst/templates/ad_adcoeq.R +++ b/inst/templates/ad_adcoeq.R @@ -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_ )