From ca6b35e7b8af1d28df57d58bac5c347156f98ea3 Mon Sep 17 00:00:00 2001 From: Jennifer Thom Date: Mon, 30 Oct 2023 15:42:07 +0000 Subject: [PATCH 01/13] simplify selection of test variables --- R/process_tests_sc_ch_episodes.R | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/R/process_tests_sc_ch_episodes.R b/R/process_tests_sc_ch_episodes.R index b66b781f1..68a4c76a9 100644 --- a/R/process_tests_sc_ch_episodes.R +++ b/R/process_tests_sc_ch_episodes.R @@ -51,14 +51,8 @@ produce_sc_ch_episodes_tests <- function(data) { 0L ) ) %>% - # remove variables that won't be summed - dplyr::select(-c( - "chi", "person_id", "gender", "dob", "postcode", - "sending_location", "social_care_id", "ch_name", - "ch_postcode", "record_keydate1", "record_keydate2", - "ch_chi_cis", "ch_sc_id_cis", "ch_provider", - "ch_nursing", "ch_adm_reason", "sc_latest_submission" - )) %>% + # keep variables for comparison + dplyr::select(c("valid_chi":dplyr::last_col())) %>% # use function to sum new test flags calculate_measures(measure = "sum") } From 45ae78b7715372b74a13790bd11304cf060d8fd1 Mon Sep 17 00:00:00 2001 From: Jennifer Thom Date: Mon, 30 Oct 2023 15:53:47 +0000 Subject: [PATCH 02/13] rename test flag function --- R/process_tests_sc_ch_episodes.R | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/R/process_tests_sc_ch_episodes.R b/R/process_tests_sc_ch_episodes.R index 68a4c76a9..ea0cb2b75 100644 --- a/R/process_tests_sc_ch_episodes.R +++ b/R/process_tests_sc_ch_episodes.R @@ -25,17 +25,16 @@ process_tests_sc_ch_episodes <- function(data) { return(comparison) } -#' Care Home All Episodes Tests +#' Social care All Episodes Tests #' -#' @description Produce the test for the Care Home all episodes +#' @description Produce the test for the social care all episodes #' #' @param data new or old data for testing summary flags -#' (data is from [get_sc_ch_episodes_path()]) #' #' @return a dataframe with a count of each flag. #' #' @family social care test functions -produce_sc_ch_episodes_tests <- function(data) { +produce_sc_all_episodes_tests <- function(data) { data %>% # create test flags create_demog_test_flags() %>% From a5f4803b440a17df0403852a1054aa60d6c386c1 Mon Sep 17 00:00:00 2001 From: Jennifer Thom Date: Mon, 30 Oct 2023 15:57:57 +0000 Subject: [PATCH 03/13] split out and use `produce_sc_all_episodes_tests` --- R/process_tests_sc_ch_episodes.R | 34 ++----------------------------- R/produce_sc_all_episodes_tests.R | 30 +++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 32 deletions(-) create mode 100644 R/produce_sc_all_episodes_tests.R diff --git a/R/process_tests_sc_ch_episodes.R b/R/process_tests_sc_ch_episodes.R index ea0cb2b75..813e90375 100644 --- a/R/process_tests_sc_ch_episodes.R +++ b/R/process_tests_sc_ch_episodes.R @@ -11,10 +11,10 @@ #' @export process_tests_sc_ch_episodes <- function(data) { comparison <- produce_test_comparison( - old_data = produce_sc_ch_episodes_tests( + old_data = produce_sc_all_episodes_tests( read_file(get_sc_ch_episodes_path(update = previous_update())) ), - new_data = produce_sc_ch_episodes_tests( + new_data = produce_sc_all_episodes_tests( data ) ) @@ -25,33 +25,3 @@ process_tests_sc_ch_episodes <- function(data) { return(comparison) } -#' Social care All Episodes Tests -#' -#' @description Produce the test for the social care all episodes -#' -#' @param data new or old data for testing summary flags -#' -#' @return a dataframe with a count of each flag. -#' -#' @family social care test functions -produce_sc_all_episodes_tests <- function(data) { - data %>% - # create test flags - create_demog_test_flags() %>% - dplyr::mutate( - n_missing_sending_loc = dplyr::if_else( - is.na(.data$sending_location), - 1L, - 0L - ), - n_missing_sc_id = dplyr::if_else( - is_missing(.data$social_care_id), - 1L, - 0L - ) - ) %>% - # keep variables for comparison - dplyr::select(c("valid_chi":dplyr::last_col())) %>% - # use function to sum new test flags - calculate_measures(measure = "sum") -} diff --git a/R/produce_sc_all_episodes_tests.R b/R/produce_sc_all_episodes_tests.R new file mode 100644 index 000000000..efe980cd4 --- /dev/null +++ b/R/produce_sc_all_episodes_tests.R @@ -0,0 +1,30 @@ +#' Social care All Episodes Tests +#' +#' @description Produce the test for the social care all episodes +#' +#' @param data new or old data for testing summary flags +#' +#' @return a dataframe with a count of each flag. +#' +#' @family social care test functions +produce_sc_all_episodes_tests <- function(data) { + data %>% + # create test flags + create_demog_test_flags() %>% + dplyr::mutate( + n_missing_sending_loc = dplyr::if_else( + is.na(.data$sending_location), + 1L, + 0L + ), + n_missing_sc_id = dplyr::if_else( + is_missing(.data$social_care_id), + 1L, + 0L + ) + ) %>% + # keep variables for comparison + dplyr::select(c("valid_chi":dplyr::last_col())) %>% + # use function to sum new test flags + calculate_measures(measure = "sum") +} From d755afdb786a524d0f3ba24fe6eb5d2ff26a9861 Mon Sep 17 00:00:00 2001 From: Jennifer Thom Date: Mon, 30 Oct 2023 15:59:46 +0000 Subject: [PATCH 04/13] New function for sc all alarms telecare tests --- R/process_tests_sc_all_at_episodes.R | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 R/process_tests_sc_all_at_episodes.R diff --git a/R/process_tests_sc_all_at_episodes.R b/R/process_tests_sc_all_at_episodes.R new file mode 100644 index 000000000..4665aeb4a --- /dev/null +++ b/R/process_tests_sc_all_at_episodes.R @@ -0,0 +1,27 @@ +#' Process Social Care Alarms Telecare all episodes tests +#' +#' @param data The processed Alarms Telecare all episode data produced by +#' [process_sc_all_alarms_telecare()]. +#' +#' @description This script takes the processed all Alarms Telecare file and produces +#' a test comparison with the previous data. +#' +#' @return a [tibble][tibble::tibble-package] containing a test comparison. +#' +#' @export +process_tests_sc_at_episodes <- function(data) { + comparison <- produce_test_comparison( + old_data = produce_sc_all_episodes_tests( + read_file(get_sc_at_episodes_path(update = previous_update())) + ), + new_data = produce_sc_all_episodes_tests( + data + ) + ) + + comparison %>% + write_tests_xlsx(sheet_name = "all_at_episodes", workbook_name = "lookup") + + return(comparison) +} + From 31468280cc34b113357631d3fa537451757129ba Mon Sep 17 00:00:00 2001 From: Jennit07 Date: Mon, 30 Oct 2023 16:03:45 +0000 Subject: [PATCH 05/13] Style code --- R/process_tests_sc_all_at_episodes.R | 1 - R/process_tests_sc_ch_episodes.R | 1 - 2 files changed, 2 deletions(-) diff --git a/R/process_tests_sc_all_at_episodes.R b/R/process_tests_sc_all_at_episodes.R index 4665aeb4a..43e9e86b3 100644 --- a/R/process_tests_sc_all_at_episodes.R +++ b/R/process_tests_sc_all_at_episodes.R @@ -24,4 +24,3 @@ process_tests_sc_at_episodes <- function(data) { return(comparison) } - diff --git a/R/process_tests_sc_ch_episodes.R b/R/process_tests_sc_ch_episodes.R index 813e90375..c5e297ab7 100644 --- a/R/process_tests_sc_ch_episodes.R +++ b/R/process_tests_sc_ch_episodes.R @@ -24,4 +24,3 @@ process_tests_sc_ch_episodes <- function(data) { return(comparison) } - From 126ed9037d05840af302ef76800136a377fba614 Mon Sep 17 00:00:00 2001 From: Zihao Li Date: Wed, 1 Nov 2023 17:22:14 +0000 Subject: [PATCH 06/13] fix year missing causing corruption of case_when --- R/write_tests_xlsx.R | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/R/write_tests_xlsx.R b/R/write_tests_xlsx.R index f280aa69c..8a9852ae8 100644 --- a/R/write_tests_xlsx.R +++ b/R/write_tests_xlsx.R @@ -22,13 +22,15 @@ write_tests_xlsx <- function(comparison_data, workbook_name = c("ep_file", "indiv_file", "lookup", "extract")) { # Set up the workbook ---- - tests_workbook_name <- dplyr::case_when( - workbook_name == "ep_file" ~ stringr::str_glue(latest_update(), "_ep_file_tests"), - workbook_name == "indiv_file" ~ stringr::str_glue(latest_update(), "_indiv_file_tests"), - workbook_name == "lookup" ~ stringr::str_glue(latest_update(), "_lookups_tests"), - workbook_name == "extract" ~ stringr::str_glue(latest_update(), "_{year}_extract_tests") - ) - + if (missing(year) & workbook_name == "lookup") { + tests_workbook_name = stringr::str_glue(latest_update(), "_lookups_tests") + } else{ + tests_workbook_name <- dplyr::case_when( + workbook_name == "ep_file" ~ stringr::str_glue(latest_update(), "_ep_file_tests"), + workbook_name == "indiv_file" ~ stringr::str_glue(latest_update(), "_indiv_file_tests"), + workbook_name == "extract" ~ stringr::str_glue(latest_update(), "_{year}_extract_tests") + ) + } tests_workbook_path <- fs::path( get_slf_dir(), From 23279ed1046e799fbc08b0f0a98dabffa1f8c397 Mon Sep 17 00:00:00 2001 From: lizihao-anu Date: Wed, 1 Nov 2023 17:25:00 +0000 Subject: [PATCH 07/13] Style code --- R/write_tests_xlsx.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/write_tests_xlsx.R b/R/write_tests_xlsx.R index 8a9852ae8..04c0f98a1 100644 --- a/R/write_tests_xlsx.R +++ b/R/write_tests_xlsx.R @@ -23,8 +23,8 @@ write_tests_xlsx <- function(comparison_data, # Set up the workbook ---- if (missing(year) & workbook_name == "lookup") { - tests_workbook_name = stringr::str_glue(latest_update(), "_lookups_tests") - } else{ + tests_workbook_name <- stringr::str_glue(latest_update(), "_lookups_tests") + } else { tests_workbook_name <- dplyr::case_when( workbook_name == "ep_file" ~ stringr::str_glue(latest_update(), "_ep_file_tests"), workbook_name == "indiv_file" ~ stringr::str_glue(latest_update(), "_indiv_file_tests"), From d68ede8797fbc6297bf5a13d657d3d19038782fd Mon Sep 17 00:00:00 2001 From: Jennifer Thom Date: Mon, 6 Nov 2023 11:19:13 +0000 Subject: [PATCH 08/13] rename function to include `all` --- R/process_tests_sc_all_at_episodes.R | 2 +- ...ests_sc_ch_episodes.R => process_tests_sc_all_ch_episodes.R} | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename R/{process_tests_sc_ch_episodes.R => process_tests_sc_all_ch_episodes.R} (93%) diff --git a/R/process_tests_sc_all_at_episodes.R b/R/process_tests_sc_all_at_episodes.R index 43e9e86b3..8b5580334 100644 --- a/R/process_tests_sc_all_at_episodes.R +++ b/R/process_tests_sc_all_at_episodes.R @@ -9,7 +9,7 @@ #' @return a [tibble][tibble::tibble-package] containing a test comparison. #' #' @export -process_tests_sc_at_episodes <- function(data) { +process_tests_sc_all_at_episodes <- function(data) { comparison <- produce_test_comparison( old_data = produce_sc_all_episodes_tests( read_file(get_sc_at_episodes_path(update = previous_update())) diff --git a/R/process_tests_sc_ch_episodes.R b/R/process_tests_sc_all_ch_episodes.R similarity index 93% rename from R/process_tests_sc_ch_episodes.R rename to R/process_tests_sc_all_ch_episodes.R index c5e297ab7..20b438d96 100644 --- a/R/process_tests_sc_ch_episodes.R +++ b/R/process_tests_sc_all_ch_episodes.R @@ -9,7 +9,7 @@ #' @return a [tibble][tibble::tibble-package] containing a test comparison. #' #' @export -process_tests_sc_ch_episodes <- function(data) { +process_tests_sc_all_ch_episodes <- function(data) { comparison <- produce_test_comparison( old_data = produce_sc_all_episodes_tests( read_file(get_sc_ch_episodes_path(update = previous_update())) From bd893599d039cc7f2964337b68c1c5747faa6a0a Mon Sep 17 00:00:00 2001 From: Jennit07 Date: Mon, 6 Nov 2023 11:23:44 +0000 Subject: [PATCH 09/13] Update documentation --- NAMESPACE | 3 ++- man/process_tests_sc_all_at_episodes.Rd | 19 +++++++++++++++++++ ...Rd => process_tests_sc_all_ch_episodes.Rd} | 8 ++++---- ...ts.Rd => produce_sc_all_episodes_tests.Rd} | 15 +++++++-------- man/produce_sc_demog_lookup_tests.Rd | 2 +- man/produce_source_at_tests.Rd | 2 +- man/produce_source_sds_tests.Rd | 2 +- man/produce_tests_sc_client_lookup.Rd | 2 +- 8 files changed, 36 insertions(+), 17 deletions(-) create mode 100644 man/process_tests_sc_all_at_episodes.Rd rename man/{process_tests_sc_ch_episodes.Rd => process_tests_sc_all_ch_episodes.Rd} (71%) rename man/{produce_sc_ch_episodes_tests.Rd => produce_sc_all_episodes_tests.Rd} (50%) diff --git a/NAMESPACE b/NAMESPACE index df103f591..c1be8ee45 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -138,7 +138,8 @@ export(process_tests_mental_health) export(process_tests_nrs_deaths) export(process_tests_outpatients) export(process_tests_prescribing) -export(process_tests_sc_ch_episodes) +export(process_tests_sc_all_at_episodes) +export(process_tests_sc_all_ch_episodes) export(process_tests_sc_client_lookup) export(process_tests_sc_demographics) export(process_tests_sds) diff --git a/man/process_tests_sc_all_at_episodes.Rd b/man/process_tests_sc_all_at_episodes.Rd new file mode 100644 index 000000000..9a7291446 --- /dev/null +++ b/man/process_tests_sc_all_at_episodes.Rd @@ -0,0 +1,19 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/process_tests_sc_all_at_episodes.R +\name{process_tests_sc_all_at_episodes} +\alias{process_tests_sc_all_at_episodes} +\title{Process Social Care Alarms Telecare all episodes tests} +\usage{ +process_tests_sc_all_at_episodes(data) +} +\arguments{ +\item{data}{The processed Alarms Telecare all episode data produced by +\code{\link[=process_sc_all_alarms_telecare]{process_sc_all_alarms_telecare()}}.} +} +\value{ +a \link[tibble:tibble-package]{tibble} containing a test comparison. +} +\description{ +This script takes the processed all Alarms Telecare file and produces +a test comparison with the previous data. +} diff --git a/man/process_tests_sc_ch_episodes.Rd b/man/process_tests_sc_all_ch_episodes.Rd similarity index 71% rename from man/process_tests_sc_ch_episodes.Rd rename to man/process_tests_sc_all_ch_episodes.Rd index 3f3c9ac83..c4ba45751 100644 --- a/man/process_tests_sc_ch_episodes.Rd +++ b/man/process_tests_sc_all_ch_episodes.Rd @@ -1,10 +1,10 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/process_tests_sc_ch_episodes.R -\name{process_tests_sc_ch_episodes} -\alias{process_tests_sc_ch_episodes} +% Please edit documentation in R/process_tests_sc_all_ch_episodes.R +\name{process_tests_sc_all_ch_episodes} +\alias{process_tests_sc_all_ch_episodes} \title{Process Social Care Care Home all episodes tests} \usage{ -process_tests_sc_ch_episodes(data) +process_tests_sc_all_ch_episodes(data) } \arguments{ \item{data}{The processed Care Home all episode data produced by diff --git a/man/produce_sc_ch_episodes_tests.Rd b/man/produce_sc_all_episodes_tests.Rd similarity index 50% rename from man/produce_sc_ch_episodes_tests.Rd rename to man/produce_sc_all_episodes_tests.Rd index 60fd9c9a9..35ef81cb0 100644 --- a/man/produce_sc_ch_episodes_tests.Rd +++ b/man/produce_sc_all_episodes_tests.Rd @@ -1,20 +1,19 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/process_tests_sc_ch_episodes.R -\name{produce_sc_ch_episodes_tests} -\alias{produce_sc_ch_episodes_tests} -\title{Care Home All Episodes Tests} +% Please edit documentation in R/produce_sc_all_episodes_tests.R +\name{produce_sc_all_episodes_tests} +\alias{produce_sc_all_episodes_tests} +\title{Social care All Episodes Tests} \usage{ -produce_sc_ch_episodes_tests(data) +produce_sc_all_episodes_tests(data) } \arguments{ -\item{data}{new or old data for testing summary flags -(data is from \code{\link[=get_sc_ch_episodes_path]{get_sc_ch_episodes_path()}})} +\item{data}{new or old data for testing summary flags} } \value{ a dataframe with a count of each flag. } \description{ -Produce the test for the Care Home all episodes +Produce the test for the social care all episodes } \seealso{ Other social care test functions: diff --git a/man/produce_sc_demog_lookup_tests.Rd b/man/produce_sc_demog_lookup_tests.Rd index a214f1ece..22bd2e05d 100644 --- a/man/produce_sc_demog_lookup_tests.Rd +++ b/man/produce_sc_demog_lookup_tests.Rd @@ -18,7 +18,7 @@ Produce the tests for Social Care Demographic Lookup } \seealso{ Other social care test functions: -\code{\link{produce_sc_ch_episodes_tests}()}, +\code{\link{produce_sc_all_episodes_tests}()}, \code{\link{produce_source_at_tests}()}, \code{\link{produce_source_sds_tests}()}, \code{\link{produce_tests_sc_client_lookup}()} diff --git a/man/produce_source_at_tests.Rd b/man/produce_source_at_tests.Rd index 96033fe0d..7ec4fdd4a 100644 --- a/man/produce_source_at_tests.Rd +++ b/man/produce_source_at_tests.Rd @@ -23,7 +23,7 @@ Produce the test for the Alarm Telecare all episodes } \seealso{ Other social care test functions: -\code{\link{produce_sc_ch_episodes_tests}()}, +\code{\link{produce_sc_all_episodes_tests}()}, \code{\link{produce_sc_demog_lookup_tests}()}, \code{\link{produce_source_sds_tests}()}, \code{\link{produce_tests_sc_client_lookup}()} diff --git a/man/produce_source_sds_tests.Rd b/man/produce_source_sds_tests.Rd index b4cbc8d41..fd228efe2 100644 --- a/man/produce_source_sds_tests.Rd +++ b/man/produce_source_sds_tests.Rd @@ -24,7 +24,7 @@ Produce the test for the SDS all episodes } \seealso{ Other social care test functions: -\code{\link{produce_sc_ch_episodes_tests}()}, +\code{\link{produce_sc_all_episodes_tests}()}, \code{\link{produce_sc_demog_lookup_tests}()}, \code{\link{produce_source_at_tests}()}, \code{\link{produce_tests_sc_client_lookup}()} diff --git a/man/produce_tests_sc_client_lookup.Rd b/man/produce_tests_sc_client_lookup.Rd index 08c5edbad..c1610f490 100644 --- a/man/produce_tests_sc_client_lookup.Rd +++ b/man/produce_tests_sc_client_lookup.Rd @@ -20,7 +20,7 @@ Produce the test for the social care Client all episodes } \seealso{ Other social care test functions: -\code{\link{produce_sc_ch_episodes_tests}()}, +\code{\link{produce_sc_all_episodes_tests}()}, \code{\link{produce_sc_demog_lookup_tests}()}, \code{\link{produce_source_at_tests}()}, \code{\link{produce_source_sds_tests}()} From 7ec87ce18d4fa93ba4bf2955d9d4e57e9b887862 Mon Sep 17 00:00:00 2001 From: Jennifer Thom Date: Mon, 6 Nov 2023 12:10:39 +0000 Subject: [PATCH 10/13] Tests for all HC eps --- R/process_tests_sc_all_hc_episodes.R | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 R/process_tests_sc_all_hc_episodes.R diff --git a/R/process_tests_sc_all_hc_episodes.R b/R/process_tests_sc_all_hc_episodes.R new file mode 100644 index 000000000..7194790c0 --- /dev/null +++ b/R/process_tests_sc_all_hc_episodes.R @@ -0,0 +1,26 @@ +#' Process Social Care Home Care all episodes tests +#' +#' @param data The processed Home Care all episode data produced by +#' [process_sc_all_home_care()]. +#' +#' @description This script takes the processed all Home Care file and produces +#' a test comparison with the previous data. +#' +#' @return a [tibble][tibble::tibble-package] containing a test comparison. +#' +#' @export +process_tests_sc_all_hc_episodes <- function(data) { + comparison <- produce_test_comparison( + old_data = produce_sc_all_episodes_tests( + read_file(get_sc_hc_episodes_path(update = previous_update())) + ), + new_data = produce_sc_all_episodes_tests( + data + ) + ) + + comparison %>% + write_tests_xlsx(sheet_name = "all_hc_episodes", workbook_name = "lookup") + + return(comparison) +} From 1be9cbd5bf8a564f5a80701d52b17d16466b5392 Mon Sep 17 00:00:00 2001 From: Jennifer Thom Date: Mon, 6 Nov 2023 12:10:55 +0000 Subject: [PATCH 11/13] Tests for all SDS eps --- R/process_tests_sc_all_sds_episodes.R | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 R/process_tests_sc_all_sds_episodes.R diff --git a/R/process_tests_sc_all_sds_episodes.R b/R/process_tests_sc_all_sds_episodes.R new file mode 100644 index 000000000..cf87a671c --- /dev/null +++ b/R/process_tests_sc_all_sds_episodes.R @@ -0,0 +1,26 @@ +#' Process Social Care SDS all episodes tests +#' +#' @param data The processed SDS all episode data produced by +#' [process_sc_all_sds()]. +#' +#' @description This script takes the processed all SDS file and produces +#' a test comparison with the previous data. +#' +#' @return a [tibble][tibble::tibble-package] containing a test comparison. +#' +#' @export +process_tests_sc_all_sds_episodes <- function(data) { + comparison <- produce_test_comparison( + old_data = produce_sc_all_episodes_tests( + read_file(get_sc_sds_episodes_path(update = previous_update())) + ), + new_data = produce_sc_all_episodes_tests( + data + ) + ) + + comparison %>% + write_tests_xlsx(sheet_name = "all_sds_episodes", workbook_name = "lookup") + + return(comparison) +} From 935bddfc3fd295d623e5a060b9840a33d16e0106 Mon Sep 17 00:00:00 2001 From: Jennifer Thom Date: Mon, 6 Nov 2023 12:11:43 +0000 Subject: [PATCH 12/13] Update documentation --- NAMESPACE | 2 ++ man/process_tests_sc_all_hc_episodes.Rd | 19 +++++++++++++++++++ man/process_tests_sc_all_sds_episodes.Rd | 19 +++++++++++++++++++ 3 files changed, 40 insertions(+) create mode 100644 man/process_tests_sc_all_hc_episodes.Rd create mode 100644 man/process_tests_sc_all_sds_episodes.Rd diff --git a/NAMESPACE b/NAMESPACE index c1be8ee45..d3b860ee4 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -140,6 +140,8 @@ export(process_tests_outpatients) export(process_tests_prescribing) export(process_tests_sc_all_at_episodes) export(process_tests_sc_all_ch_episodes) +export(process_tests_sc_all_hc_episodes) +export(process_tests_sc_all_sds_episodes) export(process_tests_sc_client_lookup) export(process_tests_sc_demographics) export(process_tests_sds) diff --git a/man/process_tests_sc_all_hc_episodes.Rd b/man/process_tests_sc_all_hc_episodes.Rd new file mode 100644 index 000000000..fc5736d19 --- /dev/null +++ b/man/process_tests_sc_all_hc_episodes.Rd @@ -0,0 +1,19 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/process_tests_sc_all_hc_episodes.R +\name{process_tests_sc_all_hc_episodes} +\alias{process_tests_sc_all_hc_episodes} +\title{Process Social Care Home Care all episodes tests} +\usage{ +process_tests_sc_all_hc_episodes(data) +} +\arguments{ +\item{data}{The processed Home Care all episode data produced by +\code{\link[=process_sc_all_home_care]{process_sc_all_home_care()}}.} +} +\value{ +a \link[tibble:tibble-package]{tibble} containing a test comparison. +} +\description{ +This script takes the processed all Home Care file and produces +a test comparison with the previous data. +} diff --git a/man/process_tests_sc_all_sds_episodes.Rd b/man/process_tests_sc_all_sds_episodes.Rd new file mode 100644 index 000000000..9ec84d9eb --- /dev/null +++ b/man/process_tests_sc_all_sds_episodes.Rd @@ -0,0 +1,19 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/process_tests_sc_all_sds_episodes.R +\name{process_tests_sc_all_sds_episodes} +\alias{process_tests_sc_all_sds_episodes} +\title{Process Social Care SDS all episodes tests} +\usage{ +process_tests_sc_all_sds_episodes(data) +} +\arguments{ +\item{data}{The processed SDS all episode data produced by +\code{\link[=process_sc_all_sds]{process_sc_all_sds()}}.} +} +\value{ +a \link[tibble:tibble-package]{tibble} containing a test comparison. +} +\description{ +This script takes the processed all SDS file and produces +a test comparison with the previous data. +} From 88535dbbca9f26603dfabd80ebcafec0c2869dce Mon Sep 17 00:00:00 2001 From: Jennifer Thom Date: Tue, 21 Nov 2023 10:39:32 +0000 Subject: [PATCH 13/13] Update targets script with social care tests --- _targets.R | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/_targets.R b/_targets.R index 88118eb01..d18b90b24 100644 --- a/_targets.R +++ b/_targets.R @@ -134,6 +134,10 @@ list( ), priority = 0.5 ), + tar_target( + tests_sc_all_at, + process_tests_sc_all_at_episodes(all_at) + ), tar_target( all_home_care_extract, read_sc_all_home_care(), @@ -151,6 +155,10 @@ list( ), priority = 0.5 ), + tar_target( + tests_sc_all_home_care, + process_tests_sc_all_hc_episodes(all_home_care) + ), tar_target( all_care_home_extract, read_sc_all_care_home(), @@ -173,7 +181,7 @@ list( ), tar_target( tests_all_care_home, - process_tests_sc_ch_episodes(all_care_home) + process_tests_sc_all_ch_episodes(all_care_home) ), tar_target( all_sds_extract, @@ -192,6 +200,10 @@ list( ), priority = 0.5 ), + tar_target( + tests_sc_all_sds, + process_tests_sc_all_sds_episodes(all_sds) + ), tar_map( list(year = years_to_run), tar_rds(