From 2cbe927b13602d8bfaafbd3ed76400d343b7dbca Mon Sep 17 00:00:00 2001 From: Zihao Li Date: Thu, 28 Nov 2024 10:16:06 +0000 Subject: [PATCH] filter na episodes by filtering period --- R/replace_sc_id_with_latest.R | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/R/replace_sc_id_with_latest.R b/R/replace_sc_id_with_latest.R index 9478ebefe..35e1f660c 100644 --- a/R/replace_sc_id_with_latest.R +++ b/R/replace_sc_id_with_latest.R @@ -48,6 +48,8 @@ replace_sc_id_with_latest <- function(data) { .data$latest_sc_id, .data$social_care_id ) - ) + ) %>% + dplyr::filter(!is.na(period)) + return(return_data) }