Skip to content

Commit

Permalink
Merge pull request #781 from pepfar-datim/Release-7.3.2
Browse files Browse the repository at this point in the history
Release 7.3.2
  • Loading branch information
JordanBalesBAO authored Jan 30, 2024
2 parents d420d95 + c0ec3fa commit fd06f8c
Show file tree
Hide file tree
Showing 6 changed files with 1,685 additions and 1,664 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.1
Date: 2024-01-25
Version: 7.3.2
Date: 2024-01-30
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.2

## New features
*

## Bug fixes
* Updated `packForDATIM` to included pop indicators for COP24 in `createDATIMExport`.

## Minor improvements and fixes
*

# datapackr 7.3.1

## New features
Expand Down
12 changes: 11 additions & 1 deletion R/packForDATIM.R
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,21 @@ packForDATIM <- function(d, type = NULL) {
value)

# DP-901: Drop SUBNAT/IMPATT data from past and future years. Keep COP Year data only ----
# DP-1195: Keep data from past cop year and current cop year.
if (type == "SUBNAT_IMPATT") {
current_period <- paste0(d$info$cop_year, "Oct")

previous_year_period <- paste0(d$info$cop_year - 1, "Oct")
pop_data <- c("MktYDp33kd6", "KssDaTsGWnS", "iwSejvD8cXl", "lJtpR5byqps",
"nF19GOjcnoD", "xghQXueYJxu", "P2XNbiNnIqV", "zoKiMGRucOY")
if (d$info$cop_year <= 2023) {
data %<>%
dplyr::filter(period == current_period)
} else {
data %<>%
dplyr::filter(period == current_period |
period == previous_year_period & dataElement %in% pop_data
)
}
}

#Nothing should be NA at this point
Expand Down
Loading

0 comments on commit fd06f8c

Please sign in to comment.