check_pr_missing_month {sdtmchecks} | R Documentation |
Check for procedure dates with year and day known but month unknown
Description
This check looks for partial missing dates in PR Procedures start date and end date, if end date exists. If the day of the month is known, the month should be known.
Usage
check_pr_missing_month(PR, preproc = identity, ...)
Arguments
PR |
Procedures SDTM dataset with variables USUBJID, PRTRT, PRSTDTC, PRENDTC (optional), PRSPID (optional) |
preproc |
An optional company specific preprocessing script |
... |
Other arguments passed to methods |
Value
boolean value if check failed or passed with 'msg' attribute if the test failed
Examples
PR <- data.frame(
USUBJID = 1:3,
PRTRT = c("Surgery Name","Procedure Name","Procedure"),
PRSTDTC = c("2017-01-01","2017---01","2017-01-02"),
PRENDTC = c("2017-02-01","2017-03-01","2017---01"),
PRSPID = "/F:SURG-D:12345-R:1",
PRCAT = "Form 1",
stringsAsFactors=FALSE
)
check_pr_missing_month(PR)
check_pr_missing_month(PR,preproc=roche_derive_rave_row)
PR$PRENDTC = NULL
check_pr_missing_month(PR)
[Package sdtmchecks version 1.0.0 Index]