From 965ab4c35ec83e1c07eb2f6847aa4b1398e11d6c Mon Sep 17 00:00:00 2001
From: Thomas  OBADIA <tobadia@ml24-0166.corp.pasteur.fr>
Date: Tue, 19 Nov 2024 12:03:07 +0100
Subject: [PATCH] Fix an issue where the population inventory would mistakenly
 drop individuals when one of their demographics (age OR gender) was missing
 instead of when both are missing concomitantly.

---
 01_INVENTORY/INVENTORY_02_list_all_inventory_participants.R | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/01_INVENTORY/INVENTORY_02_list_all_inventory_participants.R b/01_INVENTORY/INVENTORY_02_list_all_inventory_participants.R
index 6b5b17a..a921694 100644
--- a/01_INVENTORY/INVENTORY_02_list_all_inventory_participants.R
+++ b/01_INVENTORY/INVENTORY_02_list_all_inventory_participants.R
@@ -77,7 +77,7 @@ inventory_list_p <- dat_inventory_raw %>%
                               country %in% c("E", "Ethiopia") & agey > 24              ~ "y24_inf")) %>% 
   
   # Discard rows for whom no data was filled, i.e. empty placeholders in REDCap
-  filter(!is.na(sex) & !is.na(agey)) %>% 
+  filter(!is.na(sex) | !is.na(agey)) %>% 
   
   # Retain only columns of interest for derived data (list of everyone in inventory) 
   select(
-- 
GitLab