Skip to content

Commit

Permalink
Merge branch 'development' into 00_Sort_BI_Extracts
Browse files Browse the repository at this point in the history
  • Loading branch information
lizihao-anu authored Oct 3, 2023
2 parents 196340a + e5335c4 commit 17f0d00
Show file tree
Hide file tree
Showing 48 changed files with 13 additions and 302 deletions.
2 changes: 2 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 1 addition & 3 deletions R/create_episode_file.R
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ create_episode_file <- function(
}

if (write_to_disk) {
write_file(episode_file, slf_episode_path)
write_file(episode_file, get_slf_episode_path(year, check_mode = "write"))
}

return(episode_file)
Expand Down Expand Up @@ -428,5 +428,3 @@ join_cohort_lookups <- function(

return(join_cohort_lookups)
}

slf_episode_path <- get_slf_episode_path(year, check_mode = "write")
4 changes: 1 addition & 3 deletions R/get_source_extract_path.R
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
}
Expand Down Expand Up @@ -64,8 +63,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(
Expand Down
5 changes: 2 additions & 3 deletions R/process_extract_ae.R
Original file line number Diff line number Diff line change
Expand Up @@ -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(""),
Expand Down Expand Up @@ -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)
}
1 change: 1 addition & 0 deletions R/process_tests_sc_demographics.R
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 0 additions & 2 deletions man/add_acute_columns.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions man/add_ae_columns.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions man/add_all_columns.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions man/add_at_columns.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions man/add_ch_columns.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions man/add_cij_columns.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions man/add_cmh_columns.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions man/add_dd_columns.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions man/add_dn_columns.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions man/add_gls_columns.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions man/add_hc_columns.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions man/add_hl1_columns.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions man/add_ipdc_cols.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions man/add_mat_columns.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions man/add_mh_columns.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions man/add_nrs_columns.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 1 addition & 9 deletions man/add_nsu_cohort.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions man/add_nsu_columns.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions man/add_ooh_columns.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions man/add_op_columns.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions man/add_pis_columns.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 1 addition & 9 deletions man/add_ppa_flag.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions man/add_sds_columns.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions man/add_standard_cols.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 0 additions & 32 deletions man/aggregate_by_chi.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 0 additions & 32 deletions man/aggregate_ch_episodes.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 17f0d00

Please sign in to comment.