Skip to content

Commit

Permalink
Merge pull request #778 from pepfar-datim/Release-7.3.1
Browse files Browse the repository at this point in the history
Release 7.3.1
  • Loading branch information
JordanBalesBAO authored Jan 26, 2024
2 parents 70fb068 + 197b690 commit d420d95
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 16 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -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")),
Expand Down
11 changes: 11 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
15 changes: 2 additions & 13 deletions R/checkMechanisms.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)])

Expand Down
1 change: 0 additions & 1 deletion R/getMechanismView.R
Original file line number Diff line number Diff line change
Expand Up @@ -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") &
Expand Down

0 comments on commit d420d95

Please sign in to comment.