View source: R/check_ex_infusion_exstdtc_exendtc.R
check_ex_infusion_exstdtc_exendtc | R Documentation |
This check identifies that an infusion drug has same EXSTDTC and EXENDTC dateparts. If time is available for both dates, also check that end time is after start time. Missing start/end dates are also included.
check_ex_infusion_exstdtc_exendtc(EX)
EX |
Exposure SDTM dataset with variables USUBJID,EXTRT,EXSTDTC,EXENDTC,EXROUTE |
boolean value if check failed or passed with 'msg' attribute if the test failed
Anastasiia Khmelnytska, Stella Banjo(HackR 2021)
EX <- data.frame(
STUDYID = 1,
USUBJID = 1:12,
EXTRT = "SOME DRUG",
EXROUTE = "INTRAVENOUS",
EXSTDTC = c("2017-01-01","2017-01-02","2017-01-01T14:36","2015","2017-02","2017" ,"" ,
"2017" ,"2017-01-01T14:26","2017-01-01T14:26","2017-01-01T14","2017-01-01T14:26:01")
,
EXENDTC = c("2017-01-01","2017-01-03","2017-01-01T14:35","2017","2017-01","2016-01-01","2000",
"2017-02","2017-01-01" ,"2017-01","2017-01-01T13","2017-01-02T14:26:02")
,
EXOCCUR = "Y",
VISIT = "CYCLE 1 DAY 1",
stringsAsFactors=FALSE
)
check_ex_infusion_exstdtc_exendtc(EX)
EX2 <- data.frame(
STUDYID = 1,
USUBJID = 1:4,
EXTRT = "SOME DRUG",
EXROUTE = "INTRAVENOUS",
EXSTDTC = c("2017-01-03", "", "2017-02-01T14:26", ""),
EXENDTC = c("", "2017-02-03", "", "2017-02-02T14:26:02"),
EXOCCUR = "Y",
VISIT = "CYCLE 1 DAY 1",
stringsAsFactors = FALSE
)
check_ex_infusion_exstdtc_exendtc(EX2)
EX3 <- data.frame(
STUDYID = 1,
USUBJID = 1:3,
EXTRT = "SOME DRUG",
EXROUTE = "INTRAVENOUS",
EXSTDTC = c("2017-01-01", "2017-01-01T14:26", "2017-01-01T14:26"),
EXENDTC = c("2017-01-01", "2017-01-01", "2017-01"),
EXOCCUR = "Y",
VISIT = "CYCLE 1 DAY 1",
stringsAsFactors=FALSE
)
check_ex_infusion_exstdtc_exendtc(EX3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.