Skip to content

BYOC_ID: 45936 - Refactor sc care homes#1318

Draft
Jennit07 wants to merge 73 commits into
developmentfrom
refactor-sc-care-homes
Draft

BYOC_ID: 45936 - Refactor sc care homes#1318
Jennit07 wants to merge 73 commits into
developmentfrom
refactor-sc-care-homes

Conversation

@Jennit07

@Jennit07 Jennit07 commented Apr 30, 2026

Copy link
Copy Markdown
Collaborator

WIP - #1299

Refactoring of ALL care homes and FY care homes

As Care Homes and SC Demographics are interlinked, this PR must be merged into #1313 first before merging into the development branch for testing.

TODO:

  • Refactoring of care home costs
  • clean up care home costs script comments
  • refactoring of FY care homes in targets
  • Test data with code

Data not ready in SDL - On hold for testing locally/in BYOC

@lizihao-anu lizihao-anu changed the title Refactor sc care homes BYOC_ID: 45936 - Refactor sc care homes May 13, 2026
Jennit07 and others added 6 commits May 13, 2026 14:19
Merge branch 'refactor-sc-demog' into refactor-sc-care-homes

# Conflicts:
#	DESCRIPTION
#	_targets.R
#	man/get_byoc_intermediate_path.Rd
#	man/get_byoc_output_files.Rd
#	man/get_dd_path.Rd
#	man/get_demographic_cohorts_path.Rd
#	man/get_file_path.Rd
#	man/get_homelessness_completeness_path.Rd
#	man/get_ltcs_path.Rd
#	man/get_nsu_path.Rd
#	man/get_practice_details_path.Rd
#	man/get_readcode_lookup_path.Rd
#	man/get_service_use_cohorts_path.Rd
#	man/get_sg_homelessness_pub_path.Rd
@Jennit07

Copy link
Copy Markdown
Collaborator Author

TODO: See PR from @LucyEmma22 #1327 Should also include logs for CH costs on this PR.

Comment thread R/get_costs_paths.R
if (isTRUE(BYOC_MODE)) {
ch_costs_path <- file.path(
denodo_output_path(),
stringr::str_glue("Cost_CH_Lookup.parquet")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we are now using cost_ch_lookup.parquet, changing everything to small letters for consistency. NSS's copy_to_s3 will take cost_ch_lookup.parquet as it has been effected on their end as small letters.

Comment thread R/get_costs_paths.R
ch_costs_path <- get_file_path(
directory = fs::path(get_slf_dir(), "Costs"),
file_name = stringr::str_glue(
"Cost_CH_Lookup.parquet"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comment as above


# Join data together -----------------------------------------------------

## TODO - do we still continue with this check?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No needed to continue. The data created is used to generate the graph which we no longer check.

Comment on lines +24 to +28
sc_demog_lookup = read_file(get_sc_demog_lookup_path(BYOC_MODE)),
refined_death = read_file(get_combined_slf_deaths_lookup_path(BYOC_MODE)),
BYOC_MODE = FALSE,
run_id = NA,
run_date_time = NA,

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This pc lookup should be specified as a parameter here

uk_pc_directory <- get_uk_postcode_data(BYOC_MODE)

Comment thread R/get_costs_paths.R
...
)

get_ch_costs_path <- function(BYOC_MODE..., update = NULL) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
get_ch_costs_path <- function(BYOC_MODE..., update = NULL) {
get_ch_costs_path <- function(BYOC_MODE, ...) {

remove update as this is redundant. Also need to check where this update parameter is used

@lizihao-anu lizihao-anu changed the base branch from refactor-sc-demog to development June 16, 2026 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BYOC On hold Waiting for something / someone outside of our control PR ready for review Preprod data not available

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants