Skip to content

Commit

Permalink
Deselect term_date_is_accurate in project functions
Browse files Browse the repository at this point in the history
Revise update_billable_by_ownership() and update_billable_if_owned_by_ctsit().
  • Loading branch information
pbchase committed Sep 4, 2024
1 parent eb6943a commit e86b3dc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions R/redcap_projects.R
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ update_billable_by_ownership <- function(conn) {
) |>
# correct non-staff NA values
dplyr::mutate(billable = dplyr::if_else(is.na(.data$billable), 1, .data$billable)) |>
dplyr::select(-c("employment_interval")) |>
dplyr::select(-c("employment_interval", "term_date_is_accurate")) |>
# address "duplicate" rows from ctsit staff with multiple employment periods, keep the non-billable entry
dplyr::arrange(.data$pid, .data$billable) |>
dplyr::distinct(.data$pid, .keep_all = TRUE) |>
Expand Down Expand Up @@ -397,7 +397,7 @@ update_billable_if_owned_by_ctsit <- function(conn) {
) |>
# correct non-staff NA values
dplyr::mutate(billable = dplyr::if_else(is.na(.data$billable), 1, .data$billable)) |>
dplyr::select(-c("employment_interval")) |>
dplyr::select(-c("employment_interval", "term_date_is_accurate")) |>
# address "duplicate" rows from ctsit staff with multiple employment periods, keep the non-billable entry
dplyr::arrange(.data$pid, .data$billable) |>
dplyr::distinct(.data$pid, .keep_all = TRUE) |>
Expand Down Expand Up @@ -543,3 +543,4 @@ get_research_projects_not_using_viable_pi_data <- function(redcap_projects,

return(result)
}

0 comments on commit e86b3dc

Please sign in to comment.