Closed github-actions[bot] closed 1 week ago
https://github.com/Public-Health-Scotland/source-linkage-files/blob/bd01b2839561a4978c0a7a91d4974bff6ec0c8af/R/add_activity_after_death_flag.R#L87
final_data <- data %>% dplyr::left_join( flag_data, # TODO: this join_by is not 100% accurate. Consider use ep_file_row_id to join by = c("year", "chi", "record_keydate1", "record_keydate2"), na_matches = "never" ) %>% dplyr::mutate(death_date = lubridate::as_date(ifelse(is.na(death_date) & !(is.na(death_date_boxi)), death_date_boxi, death_date ))) %>% dplyr::select(-death_date_boxi) %>% dplyr::distinct(ep_file_row_id, .keep_all = TRUE)
Closed in 7190e313c09965c7b1609c7bf8b4efd1881fac08.
Closed in ffa3d0c6028a92cab628772c00368f82eb054383.
https://github.com/Public-Health-Scotland/source-linkage-files/blob/bd01b2839561a4978c0a7a91d4974bff6ec0c8af/R/add_activity_after_death_flag.R#L87