wl_schedule | R Documentation |
Takes a list of dates and schedules them to a waiting list, by adding a removal date to the data.frame. This is done in referral date order, I.e. earlier referrals are scheduled first (FIFO).
wl_schedule(
waiting_list,
schedule,
referral_index = 1,
removal_index = 2,
unscheduled = FALSE
)
waiting_list |
data.frame. A df of referral dates and removals |
schedule |
vector of dates. Should be formatted as year-month-date, e.g. "2024-04-01". The dates to schedule open referrals into (i.e. dates of unbooked future capacity) |
referral_index |
integer. The column number in the waiting_list which contains the referral dates |
removal_index |
integer. The column number in the waiting_list which contains the removal dates |
unscheduled |
logical. If TRUE, returns a list of scheduled and unscheduled procedures If FALSE, only returns the updated waiting list |
data.frame. A df of the updated waiting list with removal dates added according to the schedule
referrals <- c.Date("2024-01-01", "2024-01-04", "2024-01-10", "2024-01-16")
removals <- c.Date("2024-01-08", NA, NA, NA)
waiting_list <- data.frame("referral" = referrals, "removal" = removals)
schedule <- c.Date("2024-01-03", "2024-01-05", "2024-01-18")
updated_waiting_list <- wl_schedule(waiting_list, schedule)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.