Skip to content

Commit

Permalink
Update run_slf_manually scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Jennit07 committed Aug 28, 2024
1 parent bfed637 commit 0e19c5f
Show file tree
Hide file tree
Showing 9 changed files with 84 additions and 28 deletions.
4 changes: 0 additions & 4 deletions Run_SLF_Files_manually/run_episode_file_1718.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ processed_data_list <- list(
"source_cmh_extract_1718",
store = targets_store
),
cmh = targets::tar_read(
"source_cmh_extract_1718",
store = targets_store
),
dn = targets::tar_read(
"source_dn_extract_1718",
store = targets_store
Expand Down
4 changes: 0 additions & 4 deletions Run_SLF_Files_manually/run_episode_file_1819.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ processed_data_list <- list(
"source_cmh_extract_1819",
store = targets_store
),
cmh = targets::tar_read(
"source_cmh_extract_1819",
store = targets_store
),
dn = targets::tar_read(
"source_dn_extract_1819",
store = targets_store
Expand Down
4 changes: 0 additions & 4 deletions Run_SLF_Files_manually/run_episode_file_1920.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ processed_data_list <- list(
"source_cmh_extract_1920",
store = targets_store
),
cmh = targets::tar_read(
"source_cmh_extract_1920",
store = targets_store
),
dn = targets::tar_read(
"source_dn_extract_1920",
store = targets_store
Expand Down
4 changes: 0 additions & 4 deletions Run_SLF_Files_manually/run_episode_file_2021.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ processed_data_list <- list(
"source_cmh_extract_2021",
store = targets_store
),
cmh = targets::tar_read(
"source_cmh_extract_2021",
store = targets_store
),
dn = targets::tar_read(
"source_dn_extract_2021",
store = targets_store
Expand Down
4 changes: 0 additions & 4 deletions Run_SLF_Files_manually/run_episode_file_2122.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ processed_data_list <- list(
"source_cmh_extract_2122",
store = targets_store
),
cmh = targets::tar_read(
"source_cmh_extract_2122",
store = targets_store
),
dn = targets::tar_read(
"source_dn_extract_2122",
store = targets_store
Expand Down
4 changes: 0 additions & 4 deletions Run_SLF_Files_manually/run_episode_file_2223.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ processed_data_list <- list(
"source_cmh_extract_2223",
store = targets_store
),
cmh = targets::tar_read(
"source_cmh_extract_2223",
store = targets_store
),
dn = targets::tar_read(
"source_dn_extract_2223",
store = targets_store
Expand Down
4 changes: 0 additions & 4 deletions Run_SLF_Files_manually/run_episode_file_2324.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ processed_data_list <- list(
"source_cmh_extract_2324",
store = targets_store
),
cmh = targets::tar_read(
"source_cmh_extract_2324",
store = targets_store
),
dn = targets::tar_read(
"source_dn_extract_2324",
store = targets_store
Expand Down
75 changes: 75 additions & 0 deletions Run_SLF_Files_manually/run_episode_file_2425.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
library(targets)
library(createslf)

year <- "2425"

targets_store <- fs::path("/conf/sourcedev/Source_Linkage_File_Updates/", "_targets")

processed_data_list <- list(
acute = targets::tar_read(
"source_acute_extract_2425",
store = targets_store
),
ae = targets::tar_read(
"source_ae_extract_2425",
store = targets_store
),
cmh = targets::tar_read(
"source_cmh_extract_2425",
store = targets_store
),
dn = targets::tar_read(
"source_dn_extract_2425",
store = targets_store
),
deaths = targets::tar_read(
"source_nrs_deaths_extract_2425",
store = targets_store
),
homelessness = targets::tar_read(
"source_homelessness_extract_2425",
store = targets_store
),
maternity = targets::tar_read(
"source_maternity_extract_2425",
store = targets_store
),
mental_health = targets::tar_read(
"source_mental_health_extract_2425",
store = targets_store
),
outpatients = targets::tar_read(
"source_outpatients_extract_2425",
store = targets_store
),
gp_ooh = targets::tar_read(
"source_ooh_extract_2425",
store = targets_store
),
prescribing = targets::tar_read(
"source_prescribing_extract_2425",
store = targets_store
),
care_home = targets::tar_read(
"source_sc_care_home_2425",
store = targets_store
),
home_care = targets::tar_read(
"source_sc_home_care_2425",
store = targets_store
),
at = targets::tar_read(
"source_sc_alarms_tele_2425",
store = targets_store
),
sds = targets::tar_read(
"source_sc_sds_2425",
store = targets_store
)
)

# Run episode file
create_episode_file(processed_data_list, year = year) %>%
process_tests_episode_file(year = year)

## End of Script ##
9 changes: 9 additions & 0 deletions Run_SLF_Files_manually/run_individual_file_2425.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
library(createslf)

year <- "2425"

episode_file <- arrow::read_parquet(get_slf_episode_path(year))

# Run individual file
create_individual_file(episode_file, year = year) %>%
process_tests_individual_file(year = year)

0 comments on commit 0e19c5f

Please sign in to comment.