Skip to content

Commit

Permalink
patch DP read anc_already_art
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffeaton committed Nov 18, 2024
1 parent fa90b52 commit bf0cd1a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: naomi
Title: Naomi Model for Subnational HIV Estimates
Version: 2.10.0
Version: 2.10.1
Authors@R:
person(given = "Jeff",
family = "Eaton",
Expand Down
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# naomi 2.10.1

* Patch error in reading `anc_already_art` from Spectrum PJNZ file (was errantly
reading number of women initiated ART <4 weeks before delivery).

# naomi 2.10.0

* Update Naomi example and test datasets to current example data for Malawi
Expand Down
4 changes: 2 additions & 2 deletions R/inputs-spectrum.R
Original file line number Diff line number Diff line change
Expand Up @@ -387,9 +387,9 @@ read_dp_anc_testing <- function(dp) {
## Note: these values start 1 column later than other arrays in the .DP file
## If value is 0, interpret as not entered (NA)
if (exists_dptag("<ARVRegimen MV2>")) {
anc_already_art <- dpsub("<ARVRegimen MV2>", 13, timedat.idx+1)
anc_already_art <- dpsub("<ARVRegimen MV2>", 11, timedat.idx+1)
} else if (exists_dptag("<ARVRegimen MV3>")) {
anc_already_art <- dpsub("<ARVRegimen MV3>", 13, timedat.idx+1)
anc_already_art <- dpsub("<ARVRegimen MV3>", 11, timedat.idx+1)
}
anc_already_art <- sapply(anc_already_art, as.integer)
anc_already_art[anc_already_art == 0] <- NA
Expand Down

0 comments on commit bf0cd1a

Please sign in to comment.