CancerRegistryOfNorway / nordcancore

Other
0 stars 0 forks source link

Global setting - end of follow up #9

Closed CotterpinDoozer closed 3 years ago

CotterpinDoozer commented 3 years ago

Charlotte just sent an e-mail saying that she has problems running the program/problems validating the data in the R-modules because "end of follow up" is fixed to 27.11.20.

Two tasks: 1) Can you check if it is correct that "end of follow up" is currently fixed to 27.11.20 2) If "yes" to point 1 - should we maybe make it flexible? Probably meaning that the user has to input this information him-/herself

HuidongTian commented 3 years ago

The date of "end of follow up" was written into the package when the package was compiled. I think it's a bug because it will be a fixed value if no further development occurs. The "end of follow up" should be the date when the user runs the programe, so it should not be fixed. If you (Siri & Joonas) agree, then I will change it as I described.

CotterpinDoozer commented 3 years ago

I agree to this. Having it flexible based on when the user runs the program enables us to be flexible but still be able to validate that we don't allow newer data than of that current date (no date dating on future dates).

@WetRobot If you have other thoughts, please let us know.

WetRobot commented 3 years ago

Huh? I actually feel pretty certain this is not fixed anywhere. Or if it is, then where?

HuidongTian commented 3 years ago

sysdata.R, line 53,

column_specifications.R, line 104.

WetRobot commented 3 years ago

Now I understand. Yes the maximum value is taken as the date when the sysdata.R is run. Sure, this is worth changing.

HuidongTian commented 3 years ago

9

HuidongTian commented 3 years ago

Fixed by assigning system date when user runs the programe. column_checks, column_specification[["max"]] <- Sys.Date() for Date & if (levels[1] == 1800L) {1800L:data.table::year(Sys.Date())} for Categorical