Skip to content

Commit

Permalink
Add Running SLF files manually scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Jennit07 committed Aug 7, 2024
1 parent e713058 commit 298cfe7
Show file tree
Hide file tree
Showing 6 changed files with 266 additions and 0 deletions.
81 changes: 81 additions & 0 deletions Run_SLF_Files_manually/run_episode_file_1415.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
library(targets)
library(createslf)

year <- "1415"

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

processed_data_list <- list(
acute = targets::tar_read(
"source_acute_extract_1415",
store = targets_store
),
ae = targets::tar_read(
"source_ae_extract_1415",
store = targets_store
),
cmh = targets::tar_read(
"source_cmh_extract_1415",
store = targets_store
),
cmh = targets::tar_read(
"source_cmh_extract_1415",
store = targets_store
),
dn = targets::tar_read(
"source_dn_extract_1415",
store = targets_store
),
deaths = targets::tar_read(
"source_nrs_deaths_extract_1415",
store = targets_store
),
homelessness = targets::tar_read(
"source_homelessness_extract_1415",
store = targets_store
),
maternity = targets::tar_read(
"source_maternity_extract_1415",
store = targets_store
),
mental_health = targets::tar_read(
"source_mental_health_extract_1415",
store = targets_store
),
outpatients = targets::tar_read(
"source_outpatients_extract_1415",
store = targets_store
),
gp_ooh = targets::tar_read(
"source_ooh_extract_1415",
store = targets_store
),
prescribing = targets::tar_read(
"source_prescribing_extract_1415",
store = targets_store
),
care_home = targets::tar_read(
"source_sc_care_home_1415",
store = targets_store
),
home_care = targets::tar_read(
"source_sc_home_care_1415",
store = targets_store
),
at = targets::tar_read(
"source_sc_alarms_tele_1415",
store = targets_store
),
sds = targets::tar_read(
"source_sc_sds_1415",
store = targets_store
)
)

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

## End of Script ##


79 changes: 79 additions & 0 deletions Run_SLF_Files_manually/run_episode_file_1516.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
library(targets)
library(createslf)

year <- "1516"

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

processed_data_list <- list(
acute = targets::tar_read(
"source_acute_extract_1516",
store = targets_store
),
ae = targets::tar_read(
"source_ae_extract_1516",
store = targets_store
),
cmh = targets::tar_read(
"source_cmh_extract_1516",
store = targets_store
),
cmh = targets::tar_read(
"source_cmh_extract_1516",
store = targets_store
),
dn = targets::tar_read(
"source_dn_extract_1516",
store = targets_store
),
deaths = targets::tar_read(
"source_nrs_deaths_extract_1516",
store = targets_store
),
homelessness = targets::tar_read(
"source_homelessness_extract_1516",
store = targets_store
),
maternity = targets::tar_read(
"source_maternity_extract_1516",
store = targets_store
),
mental_health = targets::tar_read(
"source_mental_health_extract_1516",
store = targets_store
),
outpatients = targets::tar_read(
"source_outpatients_extract_1516",
store = targets_store
),
gp_ooh = targets::tar_read(
"source_ooh_extract_1516",
store = targets_store
),
prescribing = targets::tar_read(
"source_prescribing_extract_1516",
store = targets_store
),
care_home = targets::tar_read(
"source_sc_care_home_1516",
store = targets_store
),
home_care = targets::tar_read(
"source_sc_home_care_1516",
store = targets_store
),
at = targets::tar_read(
"source_sc_alarms_tele_1516",
store = targets_store
),
sds = targets::tar_read(
"source_sc_sds_1516",
store = targets_store
)
)

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

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

year <- "1617"

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

processed_data_list <- list(
acute = targets::tar_read(
"source_acute_extract_1617",
store = targets_store
),
ae = targets::tar_read(
"source_ae_extract_1617",
store = targets_store
),
cmh = targets::tar_read(
"source_cmh_extract_1617",
store = targets_store
),
cmh = targets::tar_read(
"source_cmh_extract_1617",
store = targets_store
),
dn = targets::tar_read(
"source_dn_extract_1617",
store = targets_store
),
deaths = targets::tar_read(
"source_nrs_deaths_extract_1617",
store = targets_store
),
homelessness = targets::tar_read(
"source_homelessness_extract_1617",
store = targets_store
),
maternity = targets::tar_read(
"source_maternity_extract_1617",
store = targets_store
),
mental_health = targets::tar_read(
"source_mental_health_extract_1617",
store = targets_store
),
outpatients = targets::tar_read(
"source_outpatients_extract_1617",
store = targets_store
),
gp_ooh = targets::tar_read(
"source_ooh_extract_1617",
store = targets_store
),
prescribing = targets::tar_read(
"source_prescribing_extract_1617",
store = targets_store
),
care_home = targets::tar_read(
"source_sc_care_home_1617",
store = targets_store
),
home_care = targets::tar_read(
"source_sc_home_care_1617",
store = targets_store
),
at = targets::tar_read(
"source_sc_alarms_tele_1617",
store = targets_store
),
sds = targets::tar_read(
"source_sc_sds_1617",
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_1415.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
library(createslf)

year <- "1415"

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)
9 changes: 9 additions & 0 deletions Run_SLF_Files_manually/run_individual_file_1516.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
library(createslf)

year <- "1516"

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)
9 changes: 9 additions & 0 deletions Run_SLF_Files_manually/run_individual_file_1617.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
library(createslf)

year <- "1617"

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 298cfe7

Please sign in to comment.