ut-effectiveness / utValidateR

Validate Data Elements in Warehouse and Reporting Pipelines
Other
0 stars 0 forks source link

G08b - Grad Date out of range #70

Closed andreabringhurst closed 1 year ago

andreabringhurst commented 1 year ago

This is probably a USHE check and not a database check. What is the date range it's looking at?

jpfeifer-dsu commented 1 year ago

Here is the expression and function that checks for a valid graduation date. I don't think this is correct. Expression: "G08b", expr(is_valid_graduation_date(graduation_date))

Function:

is_valid_graduation_date <- function(x) {
  # Between 6/30 and 7/1 -- although I find this suspicious
  # TODO: add check on year if data allow it
  month(x + days(1)) == 7 & day(x + days(1)) <= 2
}
jpfeifer-dsu commented 1 year ago

I changed this to a USHE rule for now.