diff --git a/NEWS.md b/NEWS.md index 5a07b8266..6d0b32537 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# September 2024 Update - Unreleased +# September 2024 Update - released 13-Sep-24 * New 24/25 files created * New NSU cohort for 23/24 available * New SPARRA scores calculated from April 24/25 diff --git a/R/fill_geographies.R b/R/fill_geographies.R index 7d3d71aa6..9b7721391 100644 --- a/R/fill_geographies.R +++ b/R/fill_geographies.R @@ -191,7 +191,6 @@ fill_gpprac_geographies <- function( #' #' @return data with matched HSCP and LCA codes cascade_geographies <- function(data) { - # TODO rework this function into a series of smaller functions which operate on vectors # e.g. cascade_hscp_lca <- function(hscp, lca) {...} # Would take HSCP and populate any missing LCA using it data <- data %>% diff --git a/R/process_extract_alarms_telecare.R b/R/process_extract_alarms_telecare.R index 9d47dd5f0..0769197cd 100644 --- a/R/process_extract_alarms_telecare.R +++ b/R/process_extract_alarms_telecare.R @@ -41,7 +41,6 @@ process_extract_alarms_telecare <- function( "smrtype", "chi", "dob", - # "person_id", "gender", "postcode", "sc_send_lca", diff --git a/R/process_extract_care_home.R b/R/process_extract_care_home.R index dbf817af4..bdaba4767 100644 --- a/R/process_extract_care_home.R +++ b/R/process_extract_care_home.R @@ -115,7 +115,6 @@ process_extract_care_home <- function( "recid", "smrtype", "chi", - # "person_id", "dob", "gender", "postcode", diff --git a/R/process_extract_gp_ooh.R b/R/process_extract_gp_ooh.R index e8d07b9e8..720688421 100644 --- a/R/process_extract_gp_ooh.R +++ b/R/process_extract_gp_ooh.R @@ -88,7 +88,6 @@ process_extract_gp_ooh <- function(year, ) # Keep the location descriptions as a lookup. - # TODO write the GP OoH lookup out using some functions location_lookup <- ooh_clean %>% dplyr::group_by(.data$location) %>% dplyr::summarise( diff --git a/R/process_extract_home_care.R b/R/process_extract_home_care.R index 651be172d..8f866e9f0 100644 --- a/R/process_extract_home_care.R +++ b/R/process_extract_home_care.R @@ -95,8 +95,7 @@ process_extract_home_care <- function( tidyselect::starts_with("hc_cost_"), "cost_total_net", "hc_provider", - "hc_reablement", - # "person_id" + "hc_reablement" ) %>% slfhelper::get_anon_chi() diff --git a/R/process_extract_homelessness.R b/R/process_extract_homelessness.R index 49bf3935e..86324e043 100644 --- a/R/process_extract_homelessness.R +++ b/R/process_extract_homelessness.R @@ -154,7 +154,6 @@ process_extract_homelessness <- function( dplyr::rename(hl1_completeness = "pct_complete_all") %>% dplyr::mutate(hl1_completeness = round(.data$hl1_completeness, 1)) - # TODO - Include person_id (from client_id) final_data <- hl1_data %>% dplyr::select( "year", diff --git a/R/process_extract_sds.R b/R/process_extract_sds.R index f8e5f8579..bb2c648ea 100644 --- a/R/process_extract_sds.R +++ b/R/process_extract_sds.R @@ -41,7 +41,6 @@ process_extract_sds <- function( "smrtype", "chi", "dob", - # "person_id", "gender", "postcode", "sc_send_lca", diff --git a/R/process_sc_all_alarms_telecare.R b/R/process_sc_all_alarms_telecare.R index aafc3d727..cd20f412b 100644 --- a/R/process_sc_all_alarms_telecare.R +++ b/R/process_sc_all_alarms_telecare.R @@ -87,11 +87,6 @@ process_sc_all_alarms_telecare <- function( # Replace social_care_id with latest if needed (assuming replace_sc_id_with_latest is a custom function) data <- replace_sc_id_with_latest(data) - # data$person_id <- paste0( - # data$sending_location, - # "-", - # data$social_care_id - # ) # Deal with episodes that have a package across quarters data[, pkg_count := seq_len(.N), by = list( @@ -125,7 +120,6 @@ process_sc_all_alarms_telecare <- function( dob = data.table::last(dob), postcode = data.table::last(postcode), recid = data.table::last(recid), - # person_id = data.table::last(person_id), sc_send_lca = data.table::last(sc_send_lca) ), by = list( sending_location, diff --git a/R/process_sc_all_care_home.R b/R/process_sc_all_care_home.R index 5478d50cc..6cbce20f6 100644 --- a/R/process_sc_all_care_home.R +++ b/R/process_sc_all_care_home.R @@ -385,7 +385,6 @@ process_sc_all_care_home <- function( )) %>% dplyr::select( "chi", - # "person_id", "gender", "dob", "postcode", diff --git a/R/process_sc_all_sds.R b/R/process_sc_all_sds.R index c5b7d43eb..b48be79ad 100644 --- a/R/process_sc_all_sds.R +++ b/R/process_sc_all_sds.R @@ -128,11 +128,6 @@ process_sc_all_sds <- function( "SDS", convert_sc_sending_location_to_lca(sending_location) )] - # sds_full_clean_long$person_id <- paste0( - # sds_full_clean_long$sending_location, - # "-", - # sds_full_clean_long$social_care_id - # ) # Group, arrange and create flags for episodes sds_full_clean_long[, @@ -176,7 +171,6 @@ process_sc_all_sds <- function( dob = data.table::last(dob), postcode = data.table::last(postcode), recid = data.table::last(recid), - # person_id = data.table::last(person_id), sc_send_lca = data.table::last(sc_send_lca) ), by = list(sending_location, social_care_id, smrtype, episode_counter)] rm(sds_full_clean_long) diff --git a/_SPSS_archived/All_years/04-Social_Care/00-Social_Care_functions.R b/_SPSS_archived/All_years/04-Social_Care/00-Social_Care_functions.R index 9e924e474..47d2fe0a2 100644 --- a/_SPSS_archived/All_years/04-Social_Care/00-Social_Care_functions.R +++ b/_SPSS_archived/All_years/04-Social_Care/00-Social_Care_functions.R @@ -50,7 +50,6 @@ phs_db_connection <- function(dsn, username = Sys.getenv("USER")) { } -# TODO- check R conversion for SC demog lookup. This may differ #' Social Care Demographic Lookup File Path #' #' @description Get the file path for the Social Care Demographic lookup file diff --git a/_SPSS_archived/All_years/04-Social_Care/02-Home_care_data.R b/_SPSS_archived/All_years/04-Social_Care/02-Home_care_data.R index bd35a0d89..69945ce2b 100644 --- a/_SPSS_archived/All_years/04-Social_Care/02-Home_care_data.R +++ b/_SPSS_archived/All_years/04-Social_Care/02-Home_care_data.R @@ -14,7 +14,6 @@ source("All_years/04-Social_Care/00-Social_Care_functions.R") sc_con <- phs_db_connection(dsn = "DVPROD") # Read demographic file -# TODO replace the demographic file with R code demog_file <- read_demog_file( social_care_dir = social_care_dir, latest_update = latest_update()