This check looks for partial missing dates in medical history start and end dates. That is, with only the month missing while the year and day are known

check_mh_missing_month(MH)

Arguments

MH

Medical History SDTM dataset with variables USUBJID, MHTERM and MHSTDTC

Value

Boolean value for whether the check passed or failed, with 'msg' attribute if the check failed

Author

Chandra Mannem

Examples


MH <- data.frame(USUBJID = LETTERS[1:5],
                 MHTERM = LETTERS[5:1],
                 MHSTDTC = c("2014", NA, "2014-01", "", "2014---02"),
                 stringsAsFactors = FALSE)

check_mh_missing_month(MH)
#> [1] FALSE
#> attr(,"msg")
#> [1] "MH has date(s) with known year and day but missing month. "
#> attr(,"data")
#>   USUBJID MHTERM   MHSTDTC
#> 1       E      A 2014---02