From dde070892403e3a69514e58a490b46bd9e06323c Mon Sep 17 00:00:00 2001 From: Jennifer Thom Date: Thu, 28 Sep 2023 11:14:35 +0100 Subject: [PATCH 1/6] Use `get_slf_episode_path` in right place --- R/create_episode_file.R | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/R/create_episode_file.R b/R/create_episode_file.R index b151e665b..f909defef 100644 --- a/R/create_episode_file.R +++ b/R/create_episode_file.R @@ -171,6 +171,7 @@ create_episode_file <- function( } if (write_to_disk) { + slf_episode_path <- get_slf_episode_path(year, check_mode = "write") write_file(episode_file, slf_episode_path) } @@ -429,5 +430,3 @@ join_cohort_lookups <- function( return(join_cohort_lookups) } - - slf_episode_path <- get_slf_episode_path(year, check_mode = "write") \ No newline at end of file From 9d826cd5a0665e8a2f96c411d3ce06bf8d54e489 Mon Sep 17 00:00:00 2001 From: Jennifer Thom Date: Thu, 28 Sep 2023 11:15:20 +0100 Subject: [PATCH 2/6] fix pipe --- R/get_source_extract_path.R | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/R/get_source_extract_path.R b/R/get_source_extract_path.R index f8b3f5d16..9b94f0c94 100644 --- a/R/get_source_extract_path.R +++ b/R/get_source_extract_path.R @@ -64,8 +64,7 @@ get_source_extract_path <- function(year, "outpatients" ~ "outpatients_for_source", "pis" ~ "prescribing_file_for_source", "sds" ~ "sds-for-source" - ) - %>% + ) %>% stringr::str_glue("-{year}.parquet") source_extract_path <- get_file_path( From 36826c525889318b93964a56d0f121b425802b79 Mon Sep 17 00:00:00 2001 From: Jennifer Thom Date: Thu, 28 Sep 2023 11:16:27 +0100 Subject: [PATCH 3/6] Fix typo in string --- R/process_extract_ae.R | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/R/process_extract_ae.R b/R/process_extract_ae.R index 5e16af767..785797395 100644 --- a/R/process_extract_ae.R +++ b/R/process_extract_ae.R @@ -192,7 +192,7 @@ process_extract_ae <- function(data, year, write_to_disk = TRUE) { # Read in data--------------------------------------- ae_cup_file <- read_file( - path = get_boxi_extract_path(year, "ae_cup), + path = get_boxi_extract_path(year, "ae_cup"), col_type = readr::cols( "ED Arrival Date" = readr::col_date(format = "%Y/%m/%d %T"), "ED Arrival Time" = readr::col_time(""), @@ -292,12 +292,11 @@ process_extract_ae <- function(data, year, write_to_disk = TRUE) { ) if (write_to_disk) { - write_file( ae_processed, get_source_extract_path(year, "ae", check_mode = "write") ) - } + } return(ae_processed) } From a55d69a290e2f29b6606e8a51ee3924ebea880f5 Mon Sep 17 00:00:00 2001 From: Jennifer Thom Date: Thu, 28 Sep 2023 11:21:54 +0100 Subject: [PATCH 4/6] Update documentation --- NAMESPACE | 2 ++ man/add_acute_columns.Rd | 2 -- man/add_ae_columns.Rd | 2 -- man/add_all_columns.Rd | 2 -- man/add_at_columns.Rd | 2 -- man/add_ch_columns.Rd | 2 -- man/add_cij_columns.Rd | 2 -- man/add_cmh_columns.Rd | 2 -- man/add_dd_columns.Rd | 2 -- man/add_dn_columns.Rd | 2 -- man/add_gls_columns.Rd | 2 -- man/add_hc_columns.Rd | 2 -- man/add_hl1_columns.Rd | 2 -- man/add_ipdc_cols.Rd | 2 -- man/add_mat_columns.Rd | 2 -- man/add_mh_columns.Rd | 2 -- man/add_nrs_columns.Rd | 2 -- man/add_nsu_cohort.Rd | 10 +--------- man/add_nsu_columns.Rd | 2 -- man/add_ooh_columns.Rd | 2 -- man/add_op_columns.Rd | 2 -- man/add_pis_columns.Rd | 2 -- man/add_ppa_flag.Rd | 10 +--------- man/add_sds_columns.Rd | 2 -- man/add_standard_cols.Rd | 2 -- man/aggregate_by_chi.Rd | 32 ------------------------------- man/aggregate_ch_episodes.Rd | 32 ------------------------------- man/apply_cost_uplift.Rd | 10 +--------- man/clean_up_ch.Rd | 2 -- man/condition_cols.Rd | 2 -- man/correct_cij_vars.Rd | 16 ---------------- man/create_cohort_lookups.Rd | 16 ---------------- man/create_cost_inc_dna.Rd | 16 ---------------- man/create_episode_file.Rd | 17 +--------------- man/create_individual_file.Rd | 2 -- man/fill_missing_cij_markers.Rd | 16 ---------------- man/join_cohort_lookups.Rd | 16 ---------------- man/link_delayed_discharge_eps.Rd | 10 +--------- man/load_ep_file_vars.Rd | 16 ---------------- man/lookup_uplift.Rd | 10 +--------- man/recode_gender.Rd | 2 -- man/remove_blank_chi.Rd | 2 -- man/store_ep_file_vars.Rd | 16 ---------------- 43 files changed, 8 insertions(+), 291 deletions(-) diff --git a/NAMESPACE b/NAMESPACE index d2a9458df..df103f591 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -67,7 +67,9 @@ export(get_slf_ch_name_lookup_path) export(get_slf_chi_deaths_path) export(get_slf_deaths_lookup_path) export(get_slf_dir) +export(get_slf_episode_path) export(get_slf_gpprac_path) +export(get_slf_individual_path) export(get_slf_postcode_path) export(get_source_extract_path) export(get_sparra_path) diff --git a/man/add_acute_columns.Rd b/man/add_acute_columns.Rd index 801708caf..b7be171cf 100644 --- a/man/add_acute_columns.Rd +++ b/man/add_acute_columns.Rd @@ -39,8 +39,6 @@ Other individual_file: \code{\link{add_pis_columns}()}, \code{\link{add_sds_columns}()}, \code{\link{add_standard_cols}()}, -\code{\link{aggregate_by_chi}()}, -\code{\link{aggregate_ch_episodes}()}, \code{\link{clean_up_ch}()}, \code{\link{condition_cols}()}, \code{\link{create_individual_file}()}, diff --git a/man/add_ae_columns.Rd b/man/add_ae_columns.Rd index 027a5ebe2..37d60f466 100644 --- a/man/add_ae_columns.Rd +++ b/man/add_ae_columns.Rd @@ -39,8 +39,6 @@ Other individual_file: \code{\link{add_pis_columns}()}, \code{\link{add_sds_columns}()}, \code{\link{add_standard_cols}()}, -\code{\link{aggregate_by_chi}()}, -\code{\link{aggregate_ch_episodes}()}, \code{\link{clean_up_ch}()}, \code{\link{condition_cols}()}, \code{\link{create_individual_file}()}, diff --git a/man/add_all_columns.Rd b/man/add_all_columns.Rd index eb0b70231..2aba7f5ad 100644 --- a/man/add_all_columns.Rd +++ b/man/add_all_columns.Rd @@ -36,8 +36,6 @@ Other individual_file: \code{\link{add_pis_columns}()}, \code{\link{add_sds_columns}()}, \code{\link{add_standard_cols}()}, -\code{\link{aggregate_by_chi}()}, -\code{\link{aggregate_ch_episodes}()}, \code{\link{clean_up_ch}()}, \code{\link{condition_cols}()}, \code{\link{create_individual_file}()}, diff --git a/man/add_at_columns.Rd b/man/add_at_columns.Rd index cddd7dc2d..537a01f40 100644 --- a/man/add_at_columns.Rd +++ b/man/add_at_columns.Rd @@ -39,8 +39,6 @@ Other individual_file: \code{\link{add_pis_columns}()}, \code{\link{add_sds_columns}()}, \code{\link{add_standard_cols}()}, -\code{\link{aggregate_by_chi}()}, -\code{\link{aggregate_ch_episodes}()}, \code{\link{clean_up_ch}()}, \code{\link{condition_cols}()}, \code{\link{create_individual_file}()}, diff --git a/man/add_ch_columns.Rd b/man/add_ch_columns.Rd index 94aca9618..360bb29db 100644 --- a/man/add_ch_columns.Rd +++ b/man/add_ch_columns.Rd @@ -39,8 +39,6 @@ Other individual_file: \code{\link{add_pis_columns}()}, \code{\link{add_sds_columns}()}, \code{\link{add_standard_cols}()}, -\code{\link{aggregate_by_chi}()}, -\code{\link{aggregate_ch_episodes}()}, \code{\link{clean_up_ch}()}, \code{\link{condition_cols}()}, \code{\link{create_individual_file}()}, diff --git a/man/add_cij_columns.Rd b/man/add_cij_columns.Rd index a708919fe..f8d2528f2 100644 --- a/man/add_cij_columns.Rd +++ b/man/add_cij_columns.Rd @@ -35,8 +35,6 @@ Other individual_file: \code{\link{add_pis_columns}()}, \code{\link{add_sds_columns}()}, \code{\link{add_standard_cols}()}, -\code{\link{aggregate_by_chi}()}, -\code{\link{aggregate_ch_episodes}()}, \code{\link{clean_up_ch}()}, \code{\link{condition_cols}()}, \code{\link{create_individual_file}()}, diff --git a/man/add_cmh_columns.Rd b/man/add_cmh_columns.Rd index b34619fd3..654e03f75 100644 --- a/man/add_cmh_columns.Rd +++ b/man/add_cmh_columns.Rd @@ -39,8 +39,6 @@ Other individual_file: \code{\link{add_pis_columns}()}, \code{\link{add_sds_columns}()}, \code{\link{add_standard_cols}()}, -\code{\link{aggregate_by_chi}()}, -\code{\link{aggregate_ch_episodes}()}, \code{\link{clean_up_ch}()}, \code{\link{condition_cols}()}, \code{\link{create_individual_file}()}, diff --git a/man/add_dd_columns.Rd b/man/add_dd_columns.Rd index 20e956226..a920a7979 100644 --- a/man/add_dd_columns.Rd +++ b/man/add_dd_columns.Rd @@ -39,8 +39,6 @@ Other individual_file: \code{\link{add_pis_columns}()}, \code{\link{add_sds_columns}()}, \code{\link{add_standard_cols}()}, -\code{\link{aggregate_by_chi}()}, -\code{\link{aggregate_ch_episodes}()}, \code{\link{clean_up_ch}()}, \code{\link{condition_cols}()}, \code{\link{create_individual_file}()}, diff --git a/man/add_dn_columns.Rd b/man/add_dn_columns.Rd index a1450ef6d..6d6fa61cb 100644 --- a/man/add_dn_columns.Rd +++ b/man/add_dn_columns.Rd @@ -39,8 +39,6 @@ Other individual_file: \code{\link{add_pis_columns}()}, \code{\link{add_sds_columns}()}, \code{\link{add_standard_cols}()}, -\code{\link{aggregate_by_chi}()}, -\code{\link{aggregate_ch_episodes}()}, \code{\link{clean_up_ch}()}, \code{\link{condition_cols}()}, \code{\link{create_individual_file}()}, diff --git a/man/add_gls_columns.Rd b/man/add_gls_columns.Rd index f724fc28e..84c49848a 100644 --- a/man/add_gls_columns.Rd +++ b/man/add_gls_columns.Rd @@ -39,8 +39,6 @@ Other individual_file: \code{\link{add_pis_columns}()}, \code{\link{add_sds_columns}()}, \code{\link{add_standard_cols}()}, -\code{\link{aggregate_by_chi}()}, -\code{\link{aggregate_ch_episodes}()}, \code{\link{clean_up_ch}()}, \code{\link{condition_cols}()}, \code{\link{create_individual_file}()}, diff --git a/man/add_hc_columns.Rd b/man/add_hc_columns.Rd index a0dcd3ea7..d5154acfd 100644 --- a/man/add_hc_columns.Rd +++ b/man/add_hc_columns.Rd @@ -39,8 +39,6 @@ Other individual_file: \code{\link{add_pis_columns}()}, \code{\link{add_sds_columns}()}, \code{\link{add_standard_cols}()}, -\code{\link{aggregate_by_chi}()}, -\code{\link{aggregate_ch_episodes}()}, \code{\link{clean_up_ch}()}, \code{\link{condition_cols}()}, \code{\link{create_individual_file}()}, diff --git a/man/add_hl1_columns.Rd b/man/add_hl1_columns.Rd index 1af70e711..87df2969b 100644 --- a/man/add_hl1_columns.Rd +++ b/man/add_hl1_columns.Rd @@ -39,8 +39,6 @@ Other individual_file: \code{\link{add_pis_columns}()}, \code{\link{add_sds_columns}()}, \code{\link{add_standard_cols}()}, -\code{\link{aggregate_by_chi}()}, -\code{\link{aggregate_ch_episodes}()}, \code{\link{clean_up_ch}()}, \code{\link{condition_cols}()}, \code{\link{create_individual_file}()}, diff --git a/man/add_ipdc_cols.Rd b/man/add_ipdc_cols.Rd index c943028bc..f78ddd981 100644 --- a/man/add_ipdc_cols.Rd +++ b/man/add_ipdc_cols.Rd @@ -45,8 +45,6 @@ Other individual_file: \code{\link{add_pis_columns}()}, \code{\link{add_sds_columns}()}, \code{\link{add_standard_cols}()}, -\code{\link{aggregate_by_chi}()}, -\code{\link{aggregate_ch_episodes}()}, \code{\link{clean_up_ch}()}, \code{\link{condition_cols}()}, \code{\link{create_individual_file}()}, diff --git a/man/add_mat_columns.Rd b/man/add_mat_columns.Rd index 744c2f528..8c4e26290 100644 --- a/man/add_mat_columns.Rd +++ b/man/add_mat_columns.Rd @@ -39,8 +39,6 @@ Other individual_file: \code{\link{add_pis_columns}()}, \code{\link{add_sds_columns}()}, \code{\link{add_standard_cols}()}, -\code{\link{aggregate_by_chi}()}, -\code{\link{aggregate_ch_episodes}()}, \code{\link{clean_up_ch}()}, \code{\link{condition_cols}()}, \code{\link{create_individual_file}()}, diff --git a/man/add_mh_columns.Rd b/man/add_mh_columns.Rd index f103eced7..64c1ded97 100644 --- a/man/add_mh_columns.Rd +++ b/man/add_mh_columns.Rd @@ -39,8 +39,6 @@ Other individual_file: \code{\link{add_pis_columns}()}, \code{\link{add_sds_columns}()}, \code{\link{add_standard_cols}()}, -\code{\link{aggregate_by_chi}()}, -\code{\link{aggregate_ch_episodes}()}, \code{\link{clean_up_ch}()}, \code{\link{condition_cols}()}, \code{\link{create_individual_file}()}, diff --git a/man/add_nrs_columns.Rd b/man/add_nrs_columns.Rd index 47d5a598d..e793fefb0 100644 --- a/man/add_nrs_columns.Rd +++ b/man/add_nrs_columns.Rd @@ -39,8 +39,6 @@ Other individual_file: \code{\link{add_pis_columns}()}, \code{\link{add_sds_columns}()}, \code{\link{add_standard_cols}()}, -\code{\link{aggregate_by_chi}()}, -\code{\link{aggregate_ch_episodes}()}, \code{\link{clean_up_ch}()}, \code{\link{condition_cols}()}, \code{\link{create_individual_file}()}, diff --git a/man/add_nsu_cohort.Rd b/man/add_nsu_cohort.Rd index 43118a087..b9a988c57 100644 --- a/man/add_nsu_cohort.Rd +++ b/man/add_nsu_cohort.Rd @@ -25,15 +25,7 @@ Add NSU cohort to working file Other episode_file: \code{\link{add_ppa_flag}()}, \code{\link{apply_cost_uplift}()}, -\code{\link{correct_cij_vars}()}, -\code{\link{create_cohort_lookups}()}, -\code{\link{create_cost_inc_dna}()}, -\code{\link{create_episode_file}()}, -\code{\link{fill_missing_cij_markers}()}, -\code{\link{join_cohort_lookups}()}, \code{\link{link_delayed_discharge_eps}()}, -\code{\link{load_ep_file_vars}()}, -\code{\link{lookup_uplift}()}, -\code{\link{store_ep_file_vars}()} +\code{\link{lookup_uplift}()} } \concept{episode_file} diff --git a/man/add_nsu_columns.Rd b/man/add_nsu_columns.Rd index 9626686aa..bb72fab58 100644 --- a/man/add_nsu_columns.Rd +++ b/man/add_nsu_columns.Rd @@ -39,8 +39,6 @@ Other individual_file: \code{\link{add_pis_columns}()}, \code{\link{add_sds_columns}()}, \code{\link{add_standard_cols}()}, -\code{\link{aggregate_by_chi}()}, -\code{\link{aggregate_ch_episodes}()}, \code{\link{clean_up_ch}()}, \code{\link{condition_cols}()}, \code{\link{create_individual_file}()}, diff --git a/man/add_ooh_columns.Rd b/man/add_ooh_columns.Rd index 345ae89e3..9caf53eac 100644 --- a/man/add_ooh_columns.Rd +++ b/man/add_ooh_columns.Rd @@ -39,8 +39,6 @@ Other individual_file: \code{\link{add_pis_columns}()}, \code{\link{add_sds_columns}()}, \code{\link{add_standard_cols}()}, -\code{\link{aggregate_by_chi}()}, -\code{\link{aggregate_ch_episodes}()}, \code{\link{clean_up_ch}()}, \code{\link{condition_cols}()}, \code{\link{create_individual_file}()}, diff --git a/man/add_op_columns.Rd b/man/add_op_columns.Rd index 9749c8f28..52ba219cf 100644 --- a/man/add_op_columns.Rd +++ b/man/add_op_columns.Rd @@ -39,8 +39,6 @@ Other individual_file: \code{\link{add_pis_columns}()}, \code{\link{add_sds_columns}()}, \code{\link{add_standard_cols}()}, -\code{\link{aggregate_by_chi}()}, -\code{\link{aggregate_ch_episodes}()}, \code{\link{clean_up_ch}()}, \code{\link{condition_cols}()}, \code{\link{create_individual_file}()}, diff --git a/man/add_pis_columns.Rd b/man/add_pis_columns.Rd index fc2175b62..1b94ba8f7 100644 --- a/man/add_pis_columns.Rd +++ b/man/add_pis_columns.Rd @@ -39,8 +39,6 @@ Other individual_file: \code{\link{add_op_columns}()}, \code{\link{add_sds_columns}()}, \code{\link{add_standard_cols}()}, -\code{\link{aggregate_by_chi}()}, -\code{\link{aggregate_ch_episodes}()}, \code{\link{clean_up_ch}()}, \code{\link{condition_cols}()}, \code{\link{create_individual_file}()}, diff --git a/man/add_ppa_flag.Rd b/man/add_ppa_flag.Rd index f19f81009..8493cff05 100644 --- a/man/add_ppa_flag.Rd +++ b/man/add_ppa_flag.Rd @@ -21,15 +21,7 @@ was preventable or not. Other episode_file: \code{\link{add_nsu_cohort}()}, \code{\link{apply_cost_uplift}()}, -\code{\link{correct_cij_vars}()}, -\code{\link{create_cohort_lookups}()}, -\code{\link{create_cost_inc_dna}()}, -\code{\link{create_episode_file}()}, -\code{\link{fill_missing_cij_markers}()}, -\code{\link{join_cohort_lookups}()}, \code{\link{link_delayed_discharge_eps}()}, -\code{\link{load_ep_file_vars}()}, -\code{\link{lookup_uplift}()}, -\code{\link{store_ep_file_vars}()} +\code{\link{lookup_uplift}()} } \concept{episode_file} diff --git a/man/add_sds_columns.Rd b/man/add_sds_columns.Rd index fd9ed0324..167290d54 100644 --- a/man/add_sds_columns.Rd +++ b/man/add_sds_columns.Rd @@ -39,8 +39,6 @@ Other individual_file: \code{\link{add_op_columns}()}, \code{\link{add_pis_columns}()}, \code{\link{add_standard_cols}()}, -\code{\link{aggregate_by_chi}()}, -\code{\link{aggregate_ch_episodes}()}, \code{\link{clean_up_ch}()}, \code{\link{condition_cols}()}, \code{\link{create_individual_file}()}, diff --git a/man/add_standard_cols.Rd b/man/add_standard_cols.Rd index 6dba5de0d..3d0e1e69e 100644 --- a/man/add_standard_cols.Rd +++ b/man/add_standard_cols.Rd @@ -50,8 +50,6 @@ Other individual_file: \code{\link{add_op_columns}()}, \code{\link{add_pis_columns}()}, \code{\link{add_sds_columns}()}, -\code{\link{aggregate_by_chi}()}, -\code{\link{aggregate_ch_episodes}()}, \code{\link{clean_up_ch}()}, \code{\link{condition_cols}()}, \code{\link{create_individual_file}()}, diff --git a/man/aggregate_by_chi.Rd b/man/aggregate_by_chi.Rd index 1234db3ed..84c9c0ad3 100644 --- a/man/aggregate_by_chi.Rd +++ b/man/aggregate_by_chi.Rd @@ -13,35 +13,3 @@ aggregate_by_chi(episode_file, exclude_sc_var = FALSE) Aggregate episode file by CHI to convert into individual file. } -\seealso{ -Other individual_file: -\code{\link{add_acute_columns}()}, -\code{\link{add_ae_columns}()}, -\code{\link{add_all_columns}()}, -\code{\link{add_at_columns}()}, -\code{\link{add_ch_columns}()}, -\code{\link{add_cij_columns}()}, -\code{\link{add_cmh_columns}()}, -\code{\link{add_dd_columns}()}, -\code{\link{add_dn_columns}()}, -\code{\link{add_gls_columns}()}, -\code{\link{add_hc_columns}()}, -\code{\link{add_hl1_columns}()}, -\code{\link{add_ipdc_cols}()}, -\code{\link{add_mat_columns}()}, -\code{\link{add_mh_columns}()}, -\code{\link{add_nrs_columns}()}, -\code{\link{add_nsu_columns}()}, -\code{\link{add_ooh_columns}()}, -\code{\link{add_op_columns}()}, -\code{\link{add_pis_columns}()}, -\code{\link{add_sds_columns}()}, -\code{\link{add_standard_cols}()}, -\code{\link{aggregate_ch_episodes}()}, -\code{\link{clean_up_ch}()}, -\code{\link{condition_cols}()}, -\code{\link{create_individual_file}()}, -\code{\link{recode_gender}()}, -\code{\link{remove_blank_chi}()} -} -\concept{individual_file} diff --git a/man/aggregate_ch_episodes.Rd b/man/aggregate_ch_episodes.Rd index 2d284a2c3..3223e6d25 100644 --- a/man/aggregate_ch_episodes.Rd +++ b/man/aggregate_ch_episodes.Rd @@ -12,35 +12,3 @@ aggregate_ch_episodes(episode_file) \description{ Aggregate CH variables by CHI and CIS. } -\seealso{ -Other individual_file: -\code{\link{add_acute_columns}()}, -\code{\link{add_ae_columns}()}, -\code{\link{add_all_columns}()}, -\code{\link{add_at_columns}()}, -\code{\link{add_ch_columns}()}, -\code{\link{add_cij_columns}()}, -\code{\link{add_cmh_columns}()}, -\code{\link{add_dd_columns}()}, -\code{\link{add_dn_columns}()}, -\code{\link{add_gls_columns}()}, -\code{\link{add_hc_columns}()}, -\code{\link{add_hl1_columns}()}, -\code{\link{add_ipdc_cols}()}, -\code{\link{add_mat_columns}()}, -\code{\link{add_mh_columns}()}, -\code{\link{add_nrs_columns}()}, -\code{\link{add_nsu_columns}()}, -\code{\link{add_ooh_columns}()}, -\code{\link{add_op_columns}()}, -\code{\link{add_pis_columns}()}, -\code{\link{add_sds_columns}()}, -\code{\link{add_standard_cols}()}, -\code{\link{aggregate_by_chi}()}, -\code{\link{clean_up_ch}()}, -\code{\link{condition_cols}()}, -\code{\link{create_individual_file}()}, -\code{\link{recode_gender}()}, -\code{\link{remove_blank_chi}()} -} -\concept{individual_file} diff --git a/man/apply_cost_uplift.Rd b/man/apply_cost_uplift.Rd index 5461d15be..e88b36b76 100644 --- a/man/apply_cost_uplift.Rd +++ b/man/apply_cost_uplift.Rd @@ -19,15 +19,7 @@ Uplift costs Other episode_file: \code{\link{add_nsu_cohort}()}, \code{\link{add_ppa_flag}()}, -\code{\link{correct_cij_vars}()}, -\code{\link{create_cohort_lookups}()}, -\code{\link{create_cost_inc_dna}()}, -\code{\link{create_episode_file}()}, -\code{\link{fill_missing_cij_markers}()}, -\code{\link{join_cohort_lookups}()}, \code{\link{link_delayed_discharge_eps}()}, -\code{\link{load_ep_file_vars}()}, -\code{\link{lookup_uplift}()}, -\code{\link{store_ep_file_vars}()} +\code{\link{lookup_uplift}()} } \concept{episode_file} diff --git a/man/clean_up_ch.Rd b/man/clean_up_ch.Rd index fda979372..9dadbd808 100644 --- a/man/clean_up_ch.Rd +++ b/man/clean_up_ch.Rd @@ -38,8 +38,6 @@ Other individual_file: \code{\link{add_pis_columns}()}, \code{\link{add_sds_columns}()}, \code{\link{add_standard_cols}()}, -\code{\link{aggregate_by_chi}()}, -\code{\link{aggregate_ch_episodes}()}, \code{\link{condition_cols}()}, \code{\link{create_individual_file}()}, \code{\link{recode_gender}()}, diff --git a/man/condition_cols.Rd b/man/condition_cols.Rd index c8c73921a..8cbbda825 100644 --- a/man/condition_cols.Rd +++ b/man/condition_cols.Rd @@ -35,8 +35,6 @@ Other individual_file: \code{\link{add_pis_columns}()}, \code{\link{add_sds_columns}()}, \code{\link{add_standard_cols}()}, -\code{\link{aggregate_by_chi}()}, -\code{\link{aggregate_ch_episodes}()}, \code{\link{clean_up_ch}()}, \code{\link{create_individual_file}()}, \code{\link{recode_gender}()}, diff --git a/man/correct_cij_vars.Rd b/man/correct_cij_vars.Rd index 5fd265d22..558514dc6 100644 --- a/man/correct_cij_vars.Rd +++ b/man/correct_cij_vars.Rd @@ -15,19 +15,3 @@ The data with CIJ variables corrected. \description{ Correct the CIJ variables } -\seealso{ -Other episode_file: -\code{\link{add_nsu_cohort}()}, -\code{\link{add_ppa_flag}()}, -\code{\link{apply_cost_uplift}()}, -\code{\link{create_cohort_lookups}()}, -\code{\link{create_cost_inc_dna}()}, -\code{\link{create_episode_file}()}, -\code{\link{fill_missing_cij_markers}()}, -\code{\link{join_cohort_lookups}()}, -\code{\link{link_delayed_discharge_eps}()}, -\code{\link{load_ep_file_vars}()}, -\code{\link{lookup_uplift}()}, -\code{\link{store_ep_file_vars}()} -} -\concept{episode_file} diff --git a/man/create_cohort_lookups.Rd b/man/create_cohort_lookups.Rd index 934354375..109869074 100644 --- a/man/create_cohort_lookups.Rd +++ b/man/create_cohort_lookups.Rd @@ -19,19 +19,3 @@ The data unchanged (the cohorts are written to disk) \description{ Create the cohort lookups } -\seealso{ -Other episode_file: -\code{\link{add_nsu_cohort}()}, -\code{\link{add_ppa_flag}()}, -\code{\link{apply_cost_uplift}()}, -\code{\link{correct_cij_vars}()}, -\code{\link{create_cost_inc_dna}()}, -\code{\link{create_episode_file}()}, -\code{\link{fill_missing_cij_markers}()}, -\code{\link{join_cohort_lookups}()}, -\code{\link{link_delayed_discharge_eps}()}, -\code{\link{load_ep_file_vars}()}, -\code{\link{lookup_uplift}()}, -\code{\link{store_ep_file_vars}()} -} -\concept{episode_file} diff --git a/man/create_cost_inc_dna.Rd b/man/create_cost_inc_dna.Rd index d78e9c907..47c38b176 100644 --- a/man/create_cost_inc_dna.Rd +++ b/man/create_cost_inc_dna.Rd @@ -15,19 +15,3 @@ The data with cost including dna. \description{ Create cost total net inc DNA } -\seealso{ -Other episode_file: -\code{\link{add_nsu_cohort}()}, -\code{\link{add_ppa_flag}()}, -\code{\link{apply_cost_uplift}()}, -\code{\link{correct_cij_vars}()}, -\code{\link{create_cohort_lookups}()}, -\code{\link{create_episode_file}()}, -\code{\link{fill_missing_cij_markers}()}, -\code{\link{join_cohort_lookups}()}, -\code{\link{link_delayed_discharge_eps}()}, -\code{\link{load_ep_file_vars}()}, -\code{\link{lookup_uplift}()}, -\code{\link{store_ep_file_vars}()} -} -\concept{episode_file} diff --git a/man/create_episode_file.Rd b/man/create_episode_file.Rd index 3ce6c815d..5d85744e2 100644 --- a/man/create_episode_file.Rd +++ b/man/create_episode_file.Rd @@ -8,6 +8,7 @@ create_episode_file( processed_data_list, year, dd_data = read_file(get_source_extract_path(year, "DD")), + homelessness_lookup = create_homelessness_lookup(year), nsu_cohort = read_file(get_nsu_path(year)), ltc_data = read_file(get_ltcs_path(year)), slf_pc_lookup = read_file(get_slf_postcode_path()), @@ -47,19 +48,3 @@ a \link[tibble:tibble-package]{tibble} containing the episode file \description{ Produce the Source Episode file } -\seealso{ -Other episode_file: -\code{\link{add_nsu_cohort}()}, -\code{\link{add_ppa_flag}()}, -\code{\link{apply_cost_uplift}()}, -\code{\link{correct_cij_vars}()}, -\code{\link{create_cohort_lookups}()}, -\code{\link{create_cost_inc_dna}()}, -\code{\link{fill_missing_cij_markers}()}, -\code{\link{join_cohort_lookups}()}, -\code{\link{link_delayed_discharge_eps}()}, -\code{\link{load_ep_file_vars}()}, -\code{\link{lookup_uplift}()}, -\code{\link{store_ep_file_vars}()} -} -\concept{episode_file} diff --git a/man/create_individual_file.Rd b/man/create_individual_file.Rd index 8222fa81d..128819711 100644 --- a/man/create_individual_file.Rd +++ b/man/create_individual_file.Rd @@ -57,8 +57,6 @@ Other individual_file: \code{\link{add_pis_columns}()}, \code{\link{add_sds_columns}()}, \code{\link{add_standard_cols}()}, -\code{\link{aggregate_by_chi}()}, -\code{\link{aggregate_ch_episodes}()}, \code{\link{clean_up_ch}()}, \code{\link{condition_cols}()}, \code{\link{recode_gender}()}, diff --git a/man/fill_missing_cij_markers.Rd b/man/fill_missing_cij_markers.Rd index 7918329a7..4795eed7a 100644 --- a/man/fill_missing_cij_markers.Rd +++ b/man/fill_missing_cij_markers.Rd @@ -15,19 +15,3 @@ A data frame with CIJ markers filled in for those missing. \description{ Fill any missing CIJ markers for records that should have them } -\seealso{ -Other episode_file: -\code{\link{add_nsu_cohort}()}, -\code{\link{add_ppa_flag}()}, -\code{\link{apply_cost_uplift}()}, -\code{\link{correct_cij_vars}()}, -\code{\link{create_cohort_lookups}()}, -\code{\link{create_cost_inc_dna}()}, -\code{\link{create_episode_file}()}, -\code{\link{join_cohort_lookups}()}, -\code{\link{link_delayed_discharge_eps}()}, -\code{\link{load_ep_file_vars}()}, -\code{\link{lookup_uplift}()}, -\code{\link{store_ep_file_vars}()} -} -\concept{episode_file} diff --git a/man/join_cohort_lookups.Rd b/man/join_cohort_lookups.Rd index 142a2c1ee..3ef549cc3 100644 --- a/man/join_cohort_lookups.Rd +++ b/man/join_cohort_lookups.Rd @@ -29,19 +29,3 @@ The data including the Demographic and Service Use lookups. \description{ Join cohort lookups } -\seealso{ -Other episode_file: -\code{\link{add_nsu_cohort}()}, -\code{\link{add_ppa_flag}()}, -\code{\link{apply_cost_uplift}()}, -\code{\link{correct_cij_vars}()}, -\code{\link{create_cohort_lookups}()}, -\code{\link{create_cost_inc_dna}()}, -\code{\link{create_episode_file}()}, -\code{\link{fill_missing_cij_markers}()}, -\code{\link{link_delayed_discharge_eps}()}, -\code{\link{load_ep_file_vars}()}, -\code{\link{lookup_uplift}()}, -\code{\link{store_ep_file_vars}()} -} -\concept{episode_file} diff --git a/man/link_delayed_discharge_eps.Rd b/man/link_delayed_discharge_eps.Rd index 981c01dc3..173fc8706 100644 --- a/man/link_delayed_discharge_eps.Rd +++ b/man/link_delayed_discharge_eps.Rd @@ -29,14 +29,6 @@ Other episode_file: \code{\link{add_nsu_cohort}()}, \code{\link{add_ppa_flag}()}, \code{\link{apply_cost_uplift}()}, -\code{\link{correct_cij_vars}()}, -\code{\link{create_cohort_lookups}()}, -\code{\link{create_cost_inc_dna}()}, -\code{\link{create_episode_file}()}, -\code{\link{fill_missing_cij_markers}()}, -\code{\link{join_cohort_lookups}()}, -\code{\link{load_ep_file_vars}()}, -\code{\link{lookup_uplift}()}, -\code{\link{store_ep_file_vars}()} +\code{\link{lookup_uplift}()} } \concept{episode_file} diff --git a/man/load_ep_file_vars.Rd b/man/load_ep_file_vars.Rd index 965e8bfce..509b0e00c 100644 --- a/man/load_ep_file_vars.Rd +++ b/man/load_ep_file_vars.Rd @@ -17,19 +17,3 @@ The full SLF data. \description{ Load the unneeded episode file variables } -\seealso{ -Other episode_file: -\code{\link{add_nsu_cohort}()}, -\code{\link{add_ppa_flag}()}, -\code{\link{apply_cost_uplift}()}, -\code{\link{correct_cij_vars}()}, -\code{\link{create_cohort_lookups}()}, -\code{\link{create_cost_inc_dna}()}, -\code{\link{create_episode_file}()}, -\code{\link{fill_missing_cij_markers}()}, -\code{\link{join_cohort_lookups}()}, -\code{\link{link_delayed_discharge_eps}()}, -\code{\link{lookup_uplift}()}, -\code{\link{store_ep_file_vars}()} -} -\concept{episode_file} diff --git a/man/lookup_uplift.Rd b/man/lookup_uplift.Rd index 356a25d4a..d5ae92d24 100644 --- a/man/lookup_uplift.Rd +++ b/man/lookup_uplift.Rd @@ -20,14 +20,6 @@ Other episode_file: \code{\link{add_nsu_cohort}()}, \code{\link{add_ppa_flag}()}, \code{\link{apply_cost_uplift}()}, -\code{\link{correct_cij_vars}()}, -\code{\link{create_cohort_lookups}()}, -\code{\link{create_cost_inc_dna}()}, -\code{\link{create_episode_file}()}, -\code{\link{fill_missing_cij_markers}()}, -\code{\link{join_cohort_lookups}()}, -\code{\link{link_delayed_discharge_eps}()}, -\code{\link{load_ep_file_vars}()}, -\code{\link{store_ep_file_vars}()} +\code{\link{link_delayed_discharge_eps}()} } \concept{episode_file} diff --git a/man/recode_gender.Rd b/man/recode_gender.Rd index 2ea26b5cc..4d1094b4d 100644 --- a/man/recode_gender.Rd +++ b/man/recode_gender.Rd @@ -36,8 +36,6 @@ Other individual_file: \code{\link{add_pis_columns}()}, \code{\link{add_sds_columns}()}, \code{\link{add_standard_cols}()}, -\code{\link{aggregate_by_chi}()}, -\code{\link{aggregate_ch_episodes}()}, \code{\link{clean_up_ch}()}, \code{\link{condition_cols}()}, \code{\link{create_individual_file}()}, diff --git a/man/remove_blank_chi.Rd b/man/remove_blank_chi.Rd index 4e5efa740..8133d5313 100644 --- a/man/remove_blank_chi.Rd +++ b/man/remove_blank_chi.Rd @@ -36,8 +36,6 @@ Other individual_file: \code{\link{add_pis_columns}()}, \code{\link{add_sds_columns}()}, \code{\link{add_standard_cols}()}, -\code{\link{aggregate_by_chi}()}, -\code{\link{aggregate_ch_episodes}()}, \code{\link{clean_up_ch}()}, \code{\link{condition_cols}()}, \code{\link{create_individual_file}()}, diff --git a/man/store_ep_file_vars.Rd b/man/store_ep_file_vars.Rd index 687bdcecb..880266d58 100644 --- a/man/store_ep_file_vars.Rd +++ b/man/store_ep_file_vars.Rd @@ -20,19 +20,3 @@ will be stored.} \description{ Store the unneeded episode file variables } -\seealso{ -Other episode_file: -\code{\link{add_nsu_cohort}()}, -\code{\link{add_ppa_flag}()}, -\code{\link{apply_cost_uplift}()}, -\code{\link{correct_cij_vars}()}, -\code{\link{create_cohort_lookups}()}, -\code{\link{create_cost_inc_dna}()}, -\code{\link{create_episode_file}()}, -\code{\link{fill_missing_cij_markers}()}, -\code{\link{join_cohort_lookups}()}, -\code{\link{link_delayed_discharge_eps}()}, -\code{\link{load_ep_file_vars}()}, -\code{\link{lookup_uplift}()} -} -\concept{episode_file} From 2e1cc9c3a6d423af270dcea240768c3a44ed2f1c Mon Sep 17 00:00:00 2001 From: Jennit07 <67372904+Jennit07@users.noreply.github.com> Date: Mon, 2 Oct 2023 10:23:42 +0100 Subject: [PATCH 5/6] Remove outdated comment (#841) * Remove outdated comment * Style code --------- Co-authored-by: Jennit07 --- R/get_source_extract_path.R | 1 - .../All_years/04-Social_Care/03-Alarms_Telecare_data.R | 2 -- 2 files changed, 3 deletions(-) diff --git a/R/get_source_extract_path.R b/R/get_source_extract_path.R index 9b94f0c94..6be47d61a 100644 --- a/R/get_source_extract_path.R +++ b/R/get_source_extract_path.R @@ -31,7 +31,6 @@ get_source_extract_path <- function(year, "sds" ), ...) { - if (year %in% type) { cli::cli_abort("{.val {year}} was supplied to the {.arg year} argument.") } diff --git a/_SPSS_archived/All_years/04-Social_Care/03-Alarms_Telecare_data.R b/_SPSS_archived/All_years/04-Social_Care/03-Alarms_Telecare_data.R index f41c5b670..663989afd 100644 --- a/_SPSS_archived/All_years/04-Social_Care/03-Alarms_Telecare_data.R +++ b/_SPSS_archived/All_years/04-Social_Care/03-Alarms_Telecare_data.R @@ -46,8 +46,6 @@ at_full_data <- tbl( service_end_date ) %>% # fix bad period (2017, 2020 & 2021) - # TODO - ask SC team as last meeting they said to look at extract date - these dont relate. - # e.g. extract date later than period mutate( period = if_else(period == "2017", "2017Q4", period), period = if_else(period == "2020", "2020Q4", period), From e5335c445503906e13db9e36fac3a11bb41297ad Mon Sep 17 00:00:00 2001 From: Jennit07 <67372904+Jennit07@users.noreply.github.com> Date: Mon, 2 Oct 2023 10:51:05 +0100 Subject: [PATCH 6/6] Use `create_sending_location_test_flags` in demographic tests (#843) Use `create_sending_location_test_flags`in tests Co-authored-by: Megan McNicol <43570769+SwiftySalmon@users.noreply.github.com> --- R/process_tests_sc_demographics.R | 1 + 1 file changed, 1 insertion(+) diff --git a/R/process_tests_sc_demographics.R b/R/process_tests_sc_demographics.R index ec6a7ab19..30321dc1d 100644 --- a/R/process_tests_sc_demographics.R +++ b/R/process_tests_sc_demographics.R @@ -41,6 +41,7 @@ produce_sc_demog_lookup_tests <- function(data) { n_missing_sending_loc = is.na(.data$sending_location), n_missing_sc_id = is.na(.data$social_care_id) ) %>% + create_sending_location_test_flags(.data$sending_location) %>% # remove variables that won't be summed dplyr::select( -c(