Skip to content

Commit

Permalink
removed select from join_sc_client in episode file script
Browse files Browse the repository at this point in the history
Remove part of function that sets missing sc end dates to the first day of the next period - this should be fixed with new changes to sc scripts and seems to be causing an error due to no cases having NA values
  • Loading branch information
marjom02 committed Dec 7, 2023
1 parent bde322c commit 854eb70
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
4 changes: 2 additions & 2 deletions R/create_episode_file.R
Original file line number Diff line number Diff line change
Expand Up @@ -445,8 +445,8 @@ join_sc_client <- function(data,
sc_client,
by = "chi",
relationship = "one-to-one"
) %>%
dplyr::select(!c("sending_location", "social_care_id", "sc_latest_submission"))
) #%>%
# dplyr::select(!c("sending_location", "social_care_id", "sc_latest_submission"))
}

return(data_file)
Expand Down
7 changes: 1 addition & 6 deletions R/create_individual_file.R
Original file line number Diff line number Diff line change
Expand Up @@ -484,12 +484,6 @@ add_ch_columns <- function(episode_file, prefix, condition) {
eval(condition),
.data$record_keydate2,
lubridate::NA_Date_
),
# If end date is missing use the first day of next FY quarter
ch_ep_end = dplyr::if_else(
eval(condition) & is.na(.data$ch_ep_end),
start_next_fy_quarter(.data$sc_latest_submission),
.data$ch_ep_end
)
)
}
Expand All @@ -500,6 +494,7 @@ add_ch_columns <- function(episode_file, prefix, condition) {
#' @family individual_file
add_hc_columns <- function(episode_file, prefix, condition) {
condition <- substitute(condition)

episode_file <- episode_file %>%
add_standard_cols(prefix, condition, episode = TRUE) %>%
dplyr::mutate(
Expand Down

0 comments on commit 854eb70

Please sign in to comment.