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) }