Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

patch DP read anc_already_art #452

Merged
merged 1 commit into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading