diff --git a/DESCRIPTION b/DESCRIPTION index 27626c74..92dd162c 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -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", diff --git a/NEWS.md b/NEWS.md index 393c2bfa..cfd72066 100644 --- a/NEWS.md +++ b/NEWS.md @@ -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. diff --git a/R/input-time-series.R b/R/input-time-series.R index 92ad2061..10522470 100644 --- a/R/input-time-series.R +++ b/R/input-time-series.R @@ -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") |> diff --git a/inst/metadata/time_series_plot_metadata.csv b/inst/metadata/time_series_plot_metadata.csv index 613feb13..4d24a101 100644 --- a/inst/metadata/time_series_plot_metadata.csv +++ b/inst/metadata/time_series_plot_metadata.csv @@ -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""" diff --git a/inst/traduire/en-translation.json b/inst/traduire/en-translation.json index 84b9ef28..fa56f80e 100644 --- a/inst/traduire/en-translation.json +++ b/inst/traduire/en-translation.json @@ -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 pos", + "ANC_TOTAL_POS_DESC": "Anc total pos desc", + "ANC_ALREADY_ART_DESC": "ANC already ART desc", + "ANC_STATUS": "ANC status", + "ANC_STATUS_DESC": "ANC status desc", + "ANC_ART_AMONG_KNOWN": "ANC ART among known", + "ANC_ART_AMONG_KNOWN_DESC": "ANC ART among known desc" } diff --git a/inst/traduire/fr-translation.json b/inst/traduire/fr-translation.json index db8c5e35..bbb5d046 100644 --- a/inst/traduire/fr-translation.json +++ b/inst/traduire/fr-translation.json @@ -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": "Anc total pos", + "ANC_TOTAL_POS_DESC": "Anc total pos desc", + "ANC_ALREADY_ART_DESC": "ANC already ART desc", + "ANC_STATUS": "ANC status", + "ANC_STATUS_DESC": "ANC status desc", + "ANC_ART_AMONG_KNOWN": "ANC ART among known", + "ANC_ART_AMONG_KNOWN_DESC": "ANC ART among known desc" } diff --git a/inst/traduire/pt-translation.json b/inst/traduire/pt-translation.json index fdaa15e0..81d42d58 100644 --- a/inst/traduire/pt-translation.json +++ b/inst/traduire/pt-translation.json @@ -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 pos", + "ANC_TOTAL_POS_DESC": "Anc total pos desc", + "ANC_ALREADY_ART_DESC": "ANC already ART desc", + "ANC_STATUS": "ANC status", + "ANC_STATUS_DESC": "ANC status desc", + "ANC_ART_AMONG_KNOWN": "ANC ART among known", + "ANC_ART_AMONG_KNOWN_DESC": "ANC ART among known desc" } diff --git a/tests/testthat/test-input-time-series.R b/tests/testthat/test-input-time-series.R index 4b55aba2..2efa4e03 100644 --- a/tests/testthat/test-input-time-series.R +++ b/tests/testthat/test-input-time-series.R @@ -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}")