Skip to content

Commit

Permalink
Merge pull request #456 from mrc-ide/nm-99
Browse files Browse the repository at this point in the history
[NM-99] Return all indicators for input time series
  • Loading branch information
r-ash authored Dec 4, 2024
2 parents 5ddb5f0 + f7f8e03 commit 70c46b7
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 11 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.2
Version: 2.10.3
Authors@R:
person(given = "Jeff",
family = "Eaton",
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# naomi 2.10.3

* Return `anc_already_art`, `anc_status`, `anc_art_among_known` and `anc_total_pos` indicators from ANC input time series data.

# naomi 2.10.2

* Add ANC testing outputs to T4 projection period for including in PEPFAR datapack output.
Expand Down
7 changes: 1 addition & 6 deletions R/input-time-series.R
Original file line number Diff line number Diff line change
Expand Up @@ -503,12 +503,7 @@ prepare_input_time_series_anc <- function(anc, shape) {

anc_plot_data_long <- anc_long |>
dplyr::mutate(!!!mutate_exprs) |>
dplyr::select(area_id, area_name, area_level, area_level_label, parent_area_id,
area_sort_order, age_group, time_period, year, quarter,
calendar_quarter, anc_clients, anc_tested, anc_tested_pos,
anc_prevalence, anc_known_pos, anc_known_neg,
anc_art_coverage, births_facility, births_clients_ratio,
area_hierarchy) |>
dplyr::select(-sex) |>
tidyr::pivot_longer(cols = c(dplyr::starts_with("anc"), "births_facility", "births_clients_ratio"),
names_to = "plot",
values_to = "value") |>
Expand Down
4 changes: 4 additions & 0 deletions inst/metadata/time_series_plot_metadata.csv
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ anc_tested,t_(ANC_TESTED),t_(ANC_TESTED_DESC),,"""0,0"""
anc_tested_pos,t_(ANC_TESTED_POS),t_(ANC_TESTED_POS_DESC),,"""0,0"""
anc_known_pos,t_(ANC_KNOWN_POS),t_(ANC_KNOWN_POS_DESC),,"""0,0"""
anc_known_neg,t_(ANC_KNOWN_NEG),t_(ANC_KNOWN_NEG_DESC),,"""0,0"""
anc_already_art,t_(ANC_ALREADY_ART),t_(ANC_ALREADY_ART_DESC),,"""0,0"""
anc_total_pos,t_(ANC_TOTAL_POS),t_(ANC_TOTAL_POS_DESC),,"""0,0"""
anc_status,t_(ANC_STATUS),t_(ANC_STATUS_DESC),,"""0,0"""
anc_art_among_known,t_(ANC_ART_AMONG_KNOWN),t_(ANC_ART_AMONG_KNOWN_DESC),,"""0,0"""
births_clients_ratio,t_(BIRTHS_CLIENTS_RATIO),t_(BIRTHS_CLIENTS_RATIO_DESC),,"""0%"""
births_facility,t_(BIRTHS_FACILITY),t_(BIRTHS_FACILITY_DESC),,"""0,0"""
art_new_total,t_(ART_NEW_TOTAL),t_(ART_NEW_TOTAL_DESC),,"""0,0"""
Expand Down
9 changes: 8 additions & 1 deletion inst/traduire/en-translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -276,5 +276,12 @@
"DOWNLOAD_AGYW_DESCRIPTION": "Naomi AGYW tool uploaded from Naomi web app",
"NUMBER_ON_ART": "Number on ART",
"NUMBER_ON_ART_DESC": "Number on ART description",
"POPULATION_PROPORTION": "Population proportion"
"POPULATION_PROPORTION": "Population proportion",
"ANC_TOTAL_POS": "ANC total HIV positive",
"ANC_TOTAL_POS_DESC": "Total HIV positive women at ANC (known positive and tested positive)",
"ANC_ALREADY_ART_DESC": "Women already on lifelong ART before first ANC visit during this pregnancy",
"ANC_STATUS": "ANC HIV status ascertained",
"ANC_STATUS_DESC": "Number of women with HIV status ascertained during ANC (either known or tested at least once)",
"ANC_ART_AMONG_KNOWN": "ANC ART coverage among known positive",
"ANC_ART_AMONG_KNOWN_DESC": "Proportion of women known HIV positive at first ANC visit who were already on ART"
}
9 changes: 8 additions & 1 deletion inst/traduire/fr-translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -273,5 +273,12 @@
"DOWNLOAD_COMPARISON_DESCRIPTION": "Rapport de comparaison Naomi téléchargé à partir de l'application web Naomi",
"NUMBER_ON_ART": "Nombre de personnes sous TARV",
"NUMBER_ON_ART_DESC": "Number on ART description",
"POPULATION_PROPORTION": "Proportion de la population"
"POPULATION_PROPORTION": "Proportion de la population",
"ANC_TOTAL_POS": "CPN total VIH positif",
"ANC_TOTAL_POS_DESC": "Total des femmes séropositives lors de la CPN (séropositives connues et testées positives)",
"ANC_ALREADY_ART_DESC": "Femmes déjà sous traitement antirétroviral à vie avant la première consultation de soins prénatals au cours de cette grossesse",
"ANC_STATUS": "Statut VIH de la CPN vérifié",
"ANC_STATUS_DESC": "Nombre de femmes dont le statut VIH a été vérifié lors de la CPN (soit connu, soit testé au moins une fois)",
"ANC_ART_AMONG_KNOWN": "Couverture ART de la CPN parmi les séropositifs connus",
"ANC_ART_AMONG_KNOWN_DESC": "Proportion de femmes dont la séropositivité est connue lors de la première visite de CPN et qui sont déjà sous traitement antirétroviral"
}
9 changes: 8 additions & 1 deletion inst/traduire/pt-translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -273,5 +273,12 @@
"DOWNLOAD_COMPARISON_DESCRIPTION": "Relatório de comparação Naomi carregado a partir da aplicação web Naomi",
"NUMBER_ON_ART": "Nombre de personnes sous TARV",
"NUMBER_ON_ART_DESC": "Number on ART description",
"POPULATION_PROPORTION": "Proporção da população"
"POPULATION_PROPORTION": "Proporção da população",
"ANC_TOTAL_POS": "ANC total VIH positivo",
"ANC_TOTAL_POS_DESC": "Total de mulheres seropositivas nos CPN (seropositivas conhecidas e seropositivas testadas)",
"ANC_ALREADY_ART_DESC": "Mulheres que já estão a receber TAR ao longo da vida antes da primeira consulta de ANC durante esta gravidez",
"ANC_STATUS": "ANC VIH verificado",
"ANC_STATUS_DESC": "Número de mulheres com o estatuto de VIH verificado durante os CPN (conhecido ou testado pelo menos uma vez)",
"ANC_ART_AMONG_KNOWN": "Cobertura de TARV nos CPN entre os seropositivos conhecidos",
"ANC_ART_AMONG_KNOWN_DESC": "Proporção de mulheres seropositivas conhecidas na primeira consulta de ANC que já estavam a receber TARV"
}
4 changes: 3 additions & 1 deletion tests/testthat/test-input-time-series.R
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,9 @@ test_that("data can be formatted for ANC input time series", {
expect_setequal(unique(data$plot),
c("anc_clients", "anc_tested", "anc_tested_pos",
"anc_prevalence", "anc_known_pos", "anc_known_neg",
"anc_art_coverage", "births_clients_ratio", "births_facility"))
"anc_art_coverage", "births_clients_ratio",
"births_facility", "anc_already_art", "anc_status",
"anc_art_among_known", "anc_total_pos"))

# Time period has correct format
expect_match(as.character(data$time_period), "\\d{4}")
Expand Down

0 comments on commit 70c46b7

Please sign in to comment.