Skip to contents

A summary of all the key stats associated with a waiting list

Usage

wl_stats(waiting_list, target_wait = 4, start_date = NULL, end_date = NULL)

Arguments

waiting_list

dataframe. A df of referral dates and removals

target_wait

numeric. The required waiting time

start_date

date. The start date to calculate from

end_date

date. The end date to calculate to

Value

dataframe. A df of important waiting list statistics

Examples


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)
waiting_list_stats <- wl_stats(waiting_list)

# TO DO!!
# Check target_capacity weekly daily
# Error if dates are in the wrong order
# Calculate the number of missed operations
# Start date and end date calculations not working well
#
# MAKE CONSISTENT NOTATION
# default start and end date if empty
# make units of output weekly operations not daily
# mean removal too big
# Z score in capacity calculations
# mean demand and mean capacity not interrarraival and departures plesae.