R/calc_priority_to_target.R

Defines functions calc_priority_to_target

#' @title Calculates target days from priority code
#'
#' @description Internal Helper function number of days from priority code
#'
#' @param priority number 1,2,3 or 4
#'
#' @return number of days
#'
#'
#' @noRd

calc_priority_to_target <- function(priority) {
  if (priority == 1) {
    7
  } else if (priority == 2) {
    28
  } else if (priority == 3) {
    84
  } else {
    365
  }
}

Try the NHSRwaitinglist package in your browser

Any scripts or data that you put into this service are public.

NHSRwaitinglist documentation built on April 3, 2025, 10:28 p.m.