diff --git a/DESCRIPTION b/DESCRIPTION index 61b1e1015..c52f2c7f5 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -2,8 +2,8 @@ Type: Package Package: datapackr Title: A Package that Packs and Unpacks all Data Packs and Target Setting Tools -Version: 7.3.0 -Date: 2024-01-12 +Version: 7.3.1 +Date: 2024-01-25 Authors@R: c( person("Scott", "Jackson", , "sjackson@baosystems.com", role = c("aut", "cre")), person("Jason", "Pickering", , "jason.p.pickering@gmail.com", role = c("aut", "rev")), diff --git a/NEWS.md b/NEWS.md index 49e7311f8..7e041b988 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,14 @@ +# datapackr 7.3.1 + +## New features +* + +## Bug fixes +* Updated how `checkMechanisms` handles dedupe mechs. + +## Minor improvements and fixes +* + # datapackr 7.3.0 ## New features diff --git a/R/checkMechanisms.R b/R/checkMechanisms.R index eb9d8a24c..fa48c85fa 100644 --- a/R/checkMechanisms.R +++ b/R/checkMechanisms.R @@ -36,20 +36,9 @@ checkMechanisms <- function(d, #Default should only be allowable with certain data elements. #Allow for the default mechanism mechs_datim <- append("default", mechs_datim) - #Allow for the dedupe mechanisms in COP21/COP22/COP23 DataPacks and OPUs - #TODO: There is some discrepancy here regarding - #the use of OPU Data Pack and PSNUxIM. - #Get rid of OPU Data Pack completely and only use PSNUxIM. - - can_have_dedupe <- - (d$info$tool %in% c("Data Pack", "OPU Data Pack") && - d$info$cop_year %in% c(2021:2023)) || - (d$info$tool == "PSNUxIM" && d$info$cop_year == 2023) - - if (can_have_dedupe) { - mechs_datim <- append(c("00000", "00001"), mechs_datim) - } + #Append the dedupe mechanisms in DataPacks and OPUs + mechs_datim <- append(c("00000", "00001"), mechs_datim) bad_mechs <- sort(mechs_data[!(mechs_data %in% mechs_datim)]) diff --git a/R/getMechanismView.R b/R/getMechanismView.R index 14587376c..d87d848e0 100644 --- a/R/getMechanismView.R +++ b/R/getMechanismView.R @@ -125,7 +125,6 @@ mechs %<>% dplyr::filter(!(mechanism_code %in% c("00000", "00001", "00100", "002 if (!is.null(cop_year)) { cop_year %<>% check_cop_year(cop_year = cop_year) - mechs %<>% dplyr::filter( (startdate < paste0(as.numeric(cop_year) + 1, "-10-01") &