Skip to content

Commit

Permalink
add case_when
Browse files Browse the repository at this point in the history
  • Loading branch information
Jennit07 committed Jan 10, 2025
1 parent b4375a0 commit 38198ae
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion R/process_extract_outpatients.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ process_extract_outpatients <- function(data, year, write_to_disk = TRUE) {
# Allocate the costs to the correct month
create_day_episode_costs(.data$record_keydate1, .data$cost_total_net) %>%
# sort by chi record_keydate1
dplyr::arrange(.data$chi, .data$record_keydate1)
dplyr::arrange(.data$chi, .data$record_keydate1) %>%
# clean up commhosp values
dplyr::mutate(commhosp = dplyr::if_else(.data$commhosp == 1L, "Y", "N"))

# Factors ---------------------------------------
outpatients_clean <- outpatients_clean %>%
Expand Down

0 comments on commit 38198ae

Please sign in to comment.