diff --git a/index.html b/index.html
index b5266db..f5cf216 100644
--- a/index.html
+++ b/index.html
@@ -62,7 +62,7 @@
-
To install the package, run:
diff --git a/pkgdown.yml b/pkgdown.yml
index 63fc25a..52d910f 100644
--- a/pkgdown.yml
+++ b/pkgdown.yml
@@ -3,7 +3,7 @@ pkgdown: 2.0.7
pkgdown_sha: ~
articles:
example_walkthrough: example_walkthrough.html
-last_built: 2023-12-14T22:24Z
+last_built: 2023-12-18T15:02Z
urls:
reference: https://nhs-r-community.github.io/NHSRwaitinglist/reference
article: https://nhs-r-community.github.io/NHSRwaitinglist/articles
diff --git a/search.json b/search.json
index abae6ef..2048941 100644
--- a/search.json
+++ b/search.json
@@ -1 +1 @@
-[{"path":[]},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/CODE_OF_CONDUCT.html","id":"our-pledge","dir":"","previous_headings":"","what":"Our Pledge","title":"Contributor Covenant Code of Conduct","text":"members, contributors, leaders pledge make participation community harassment-free experience everyone, regardless age, body size, visible invisible disability, ethnicity, sex characteristics, gender identity expression, level experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, sexual identity orientation. pledge act interact ways contribute open, welcoming, diverse, inclusive, healthy community.","code":""},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/CODE_OF_CONDUCT.html","id":"our-standards","dir":"","previous_headings":"","what":"Our Standards","title":"Contributor Covenant Code of Conduct","text":"Examples behavior contributes positive environment community include: Demonstrating empathy kindness toward people respectful differing opinions, viewpoints, experiences Giving gracefully accepting constructive feedback Accepting responsibility apologizing affected mistakes, learning experience Focusing best just us individuals, overall community Examples unacceptable behavior include: use sexualized language imagery, sexual attention advances kind Trolling, insulting derogatory comments, personal political attacks Public private harassment Publishing others’ private information, physical email address, without explicit permission conduct reasonably considered inappropriate professional setting","code":""},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/CODE_OF_CONDUCT.html","id":"enforcement-responsibilities","dir":"","previous_headings":"","what":"Enforcement Responsibilities","title":"Contributor Covenant Code of Conduct","text":"Community leaders responsible clarifying enforcing standards acceptable behavior take appropriate fair corrective action response behavior deem inappropriate, threatening, offensive, harmful. Community leaders right responsibility remove, edit, reject comments, commits, code, wiki edits, issues, contributions aligned Code Conduct, communicate reasons moderation decisions appropriate.","code":""},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/CODE_OF_CONDUCT.html","id":"scope","dir":"","previous_headings":"","what":"Scope","title":"Contributor Covenant Code of Conduct","text":"Code Conduct applies within community spaces, also applies individual officially representing community public spaces. Examples representing community include using official e-mail address, posting via official social media account, acting appointed representative online offline event.","code":""},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/CODE_OF_CONDUCT.html","id":"enforcement","dir":"","previous_headings":"","what":"Enforcement","title":"Contributor Covenant Code of Conduct","text":"Instances abusive, harassing, otherwise unacceptable behavior may reported community leaders responsible enforcement nhs.rcommunity@nhs.net. complaints reviewed investigated promptly fairly. community leaders obligated respect privacy security reporter incident.","code":""},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/CODE_OF_CONDUCT.html","id":"enforcement-guidelines","dir":"","previous_headings":"","what":"Enforcement Guidelines","title":"Contributor Covenant Code of Conduct","text":"Community leaders follow Community Impact Guidelines determining consequences action deem violation Code Conduct:","code":""},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/CODE_OF_CONDUCT.html","id":"id_1-correction","dir":"","previous_headings":"Enforcement Guidelines","what":"1. Correction","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Use inappropriate language behavior deemed unprofessional unwelcome community. Consequence: private, written warning community leaders, providing clarity around nature violation explanation behavior inappropriate. public apology may requested.","code":""},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/CODE_OF_CONDUCT.html","id":"id_2-warning","dir":"","previous_headings":"Enforcement Guidelines","what":"2. Warning","title":"Contributor Covenant Code of Conduct","text":"Community Impact: violation single incident series actions. Consequence: warning consequences continued behavior. interaction people involved, including unsolicited interaction enforcing Code Conduct, specified period time. includes avoiding interactions community spaces well external channels like social media. Violating terms may lead temporary permanent ban.","code":""},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/CODE_OF_CONDUCT.html","id":"id_3-temporary-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"3. Temporary Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: serious violation community standards, including sustained inappropriate behavior. Consequence: temporary ban sort interaction public communication community specified period time. public private interaction people involved, including unsolicited interaction enforcing Code Conduct, allowed period. Violating terms may lead permanent ban.","code":""},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/CODE_OF_CONDUCT.html","id":"id_4-permanent-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"4. Permanent Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Demonstrating pattern violation community standards, including sustained inappropriate behavior, harassment individual, aggression toward disparagement classes individuals. Consequence: permanent ban sort public interaction within community.","code":""},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/CODE_OF_CONDUCT.html","id":"attribution","dir":"","previous_headings":"","what":"Attribution","title":"Contributor Covenant Code of Conduct","text":"Code Conduct adapted Contributor Covenant, version 2.1, available https://www.contributor-covenant.org/version/2/1/code_of_conduct.html. Community Impact Guidelines inspired [Mozilla’s code conduct enforcement ladder][https://github.com/mozilla/inclusion]. answers common questions code conduct, see FAQ https://www.contributor-covenant.org/faq. Translations available https://www.contributor-covenant.org/translations.","code":""},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"MIT License","title":"MIT License","text":"Copyright (c) 2023 NHSRwaitinglist authors Permission hereby granted, free charge, person obtaining copy software associated documentation files (“Software”), deal Software without restriction, including without limitation rights use, copy, modify, merge, publish, distribute, sublicense, /sell copies Software, permit persons Software furnished , subject following conditions: copyright notice permission notice shall included copies substantial portions Software. SOFTWARE PROVIDED “”, WITHOUT WARRANTY KIND, EXPRESS IMPLIED, INCLUDING LIMITED WARRANTIES MERCHANTABILITY, FITNESS PARTICULAR PURPOSE NONINFRINGEMENT. EVENT SHALL AUTHORS COPYRIGHT HOLDERS LIABLE CLAIM, DAMAGES LIABILITY, WHETHER ACTION CONTRACT, TORT OTHERWISE, ARISING , CONNECTION SOFTWARE USE DEALINGS SOFTWARE.","code":""},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/articles/example_walkthrough.html","id":"setup","dir":"Articles","previous_headings":"","what":"Setup","title":"Walkthrough a real waiting list example","text":"First, ’ll add initial data need, taken white paper.","code":"# Queue size (patients) queue_size <- 1200 # Waiting time target (weeks) waiting_time_target <- 52 # Average waiting time in the queue (weeks) avg_waiting_time <- 63 # Proportion of waiting list who have missed the 52 week target (%) perc_missing_target <- 0.51 # Demand (patients per week) demand <- 30 # Capacity (procedures per week) capacity <- 27 # Standard deviation of number of operations per week std_dev_procedures <- 160"},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/articles/example_walkthrough.html","id":"demand-capacity-and-load","dir":"Articles","previous_headings":"","what":"Demand, capacity, and load","title":"Walkthrough a real waiting list example","text":"Fact 1: Capacity must larger demand, otherwise waiting list size grow indefinitely. see load 1.11, greater 1. queue therefore grow size indefinitely. Fact 2: load greater 1, queue unstable, waiting list grow indefinitely. load less 1, queue stable load proportion time waiting list non-empty.","code":"load <- queue_load(demand, capacity) load #> [1] 1.111111"},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/articles/example_walkthrough.html","id":"waiting-list-targets","dir":"Articles","previous_headings":"","what":"Waiting list targets","title":"Walkthrough a real waiting list example","text":"Fact 3: load queue less 1 chance missing target halves time increase target fixed number days. Fact 4: want chance 1.8%-0.2% achieving waiting time target, average patient waiting time quarter sixth target. case P4 waiting list, target wait 52 weeks. Thus, expect average patient operated waited 9 13 weeks. case P2 customers, target 4 weeks. Thus, mean wait typical patient one week. see average wait 13 weeks.","code":"average_wait <- average_wait(waiting_time_target) average_wait #> [1] 13"},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/articles/example_walkthrough.html","id":"target-queue-length","dir":"Articles","previous_headings":"","what":"Target queue length","title":"Walkthrough a real waiting list example","text":"Fact 5: Little’s Law. Assuming capacity exceeds demand, average queue size demand multiplied average waiting time. , given Fact 4 , want average waiting time quarter target, Little’s Law leads fact 6.","code":""},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/articles/example_walkthrough.html","id":"target-queue-size","dir":"Articles","previous_headings":"","what":"Target queue size","title":"Walkthrough a real waiting list example","text":"Fact 6: Target queue size demand multiplied target wait, divided 4. example, target queue size 390, actual queue 1200. queue ratio 3.1, meaning queue 3.1 times target size. waiting list size twice target queue size, consider special measures needed increase capacity, reduce waiting list size.","code":"target_queue_size <- target_queue_size(demand, waiting_time_target) target_queue_size #> [1] 390 queue_ratio <- queue_size / target_queue_size queue_ratio #> [1] 3.076923"},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/articles/example_walkthrough.html","id":"relief-capacity","dir":"Articles","previous_headings":"","what":"Relief capacity","title":"Walkthrough a real waiting list example","text":"Fact 7: actual queue size double target queue size, decide target date queue brought , apply necessary relief capacity. example, decide target achieved start summer, 26 weeks away. , capacity needed 61.2 procedures per week, compared 27 procedures per week currently performed.","code":"weeks_until_target_acheived <- 26 relief_capacity <- relief_capacity( demand = demand, queue_size = queue_size, target_queue_size = target_queue_size, weeks_to_target = weeks_until_target_acheived ) relief_capacity #> [1] 61.15385"},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/articles/example_walkthrough.html","id":"target-capacity","dir":"Articles","previous_headings":"","what":"Target capacity","title":"Walkthrough a real waiting list example","text":"discussed queue size double target capacity increased temporarily. However, queue size within acceptable range, can maintain waiting time target potentially much smaller capacity allocation waiting list. know waiting time (13 weeks) queue size (390 patients) waiting list operating target equilibrium. Now calculate capacity allocation maintain equilibrium long run. Fact 8: Target capacity formula, based Pollaczek-Khinchine formula. target capacity depends demand, plus additional capacity based serice variability, waiting time target. parameter “F” depends variability service. know F, can assume F = 1. Values less 1 good. Higher values represent variability, turn increase capacity required maintain equilibrium. F 1, can see capacity required 30.19, 0.19 demand. F 6.58, can see capacity required 31.05, 1.05 demand. , decreasing variability service (example stabilising operating theatre schedules day day week week) effect reducing capacity required achieve given service waiting standard.","code":"# set the \"F\" variability parameter f_1 <- 1 target_capacity_1 <- target_capacity( demand = demand, target_wait = waiting_time_target, F = f_1) target_capacity_1 #> [1] 30.19231 f_2 <- 6.58 target_capacity_2 <- target_capacity( demand = demand, target_wait = waiting_time_target, F = f_2) target_capacity_2 #> [1] 31.05077"},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/articles/example_walkthrough.html","id":"waiting-list-pressure","dir":"Articles","previous_headings":"","what":"Waiting list pressure","title":"Walkthrough a real waiting list example","text":"Fact 9: Waiting list pressure. waiting list target waiting time, pressure waiting list twice mean waiting time divided target waiting time. pressure given waiting list less 1. pressure greater 1 waiting list likely going miss target. Measuring waiting list pressure can give comparative measure compare waiting lists, help make resource allocation decisions. P4 ENT example following: queue size large, 1200 patients waiting. waiting time target 52 weeks, average waiting time experienced 63 weeks. gives waiting list pressure 2.42. NOTE numbers slightly different white paper, changes average waiting time 63 weeks 61 weeks example. look P2 ENT example: queue size smaller, 220 patients waiting. waiting time target 4 weeks, average waiting time experienced 24. gives waiting list pressure 12. two examples pressure much shorter P2 waiting list 5 times higher P4 list. Closer attention paid P2 procedures.","code":"waiting_list_pressure_p4 <- waiting_list_pressure(avg_waiting_time, waiting_time_target) waiting_list_pressure_p4 #> [1] 2.423077 queue_size_p2 <- 220 avg_waiting_time_p2 <- 24 waiting_time_target_p2 <- 4 waiting_list_pressure_p2 <- waiting_list_pressure(avg_waiting_time_p2, waiting_time_target_p2) waiting_list_pressure_p2 #> [1] 12"},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/articles/example_walkthrough.html","id":"summary","dir":"Articles","previous_headings":"","what":"Summary","title":"Walkthrough a real waiting list example","text":"worked example aims demonstrate functions available package. chronological order application :","code":""},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/articles/example_walkthrough.html","id":"further-reading","dir":"Articles","previous_headings":"","what":"Further reading","title":"Walkthrough a real waiting list example","text":"examples practical applications, considerations, see helpful “Case Studies” section towards end white paper. END","code":""},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Neil Walton. Maintainer, author. Yasser Mustaq. Author. Jacqueline Grout. Author. Zoë Turner. Author. Marcos Fabietti. Author. Tom Smith. Author. Chris Mainey. Author. NHS-R community. Copyright holder.","code":""},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Walton N, Mustaq Y, Grout J, Turner Z, Fabietti M, Smith T, Mainey C (2023). NHSRwaitinglist: R-package implement waiting list management approach. R package version 0.0.0.9000, https://nhs-r-community.github.io/NHSRwaitinglist/.","code":"@Manual{, title = {NHSRwaitinglist: R-package to implement a waiting list management approach}, author = {Neil Walton and Yasser Mustaq and Jacqueline Grout and Zoë Turner and Marcos Fabietti and Tom Smith and Chris Mainey}, year = {2023}, note = {R package version 0.0.0.9000}, url = {https://nhs-r-community.github.io/NHSRwaitinglist/}, }"},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/index.html","id":"nhsrwaitinglist-","dir":"","previous_headings":"","what":"R-package to implement a waiting list management approach","title":"R-package to implement a waiting list management approach","text":"R-package implement waiting list management approach described paper Fong et al https://www.medrxiv.org/content/10.1101/2022.08.23.22279117v1","code":""},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/index.html","id":"to-install-the-package-run","dir":"","previous_headings":"","what":"To install the package, run:","title":"R-package to implement a waiting list management approach","text":"","code":"remotes::install_github(\"nhs-r-community/NHSRwaitinglist\", build_vignettes = TRUE)"},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/index.html","id":"contribution","dir":"","previous_headings":"","what":"Contribution","title":"R-package to implement a waiting list management approach","text":"NHS-R Community project open anyone contribute way able. Please see NHS-R Way read style guides Code Conduct related activity contribution NHS-R Community well Code Conduct repository generated using usethis::use_code_of_conduct(contact = \"nhs.rcommunity@nhs.net\"). contributing project, agree abide terms. want learn project, please join discussion NHS-R Community Slack group specific channel #managing-waiting-lists. simplest way contribute raise issue detailing feature functionality like see added, unexpected behaviour bugs experienced.","code":""},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/index.html","id":"pull-request-workflow","dir":"","previous_headings":"Contribution","what":"Pull-Request workflow","title":"R-package to implement a waiting list management approach","text":"welcome also submit Pull Requests , main branch protected won’t accept pushes directly even added repository member, workflow (forked repository member, clone repository member): Create new branch descriptive name Commit new branch (add code delete code make changes) Push commits Create pull-request GitHub signal work ready merged Tag one reviewers contribution can reviewed merged main","code":""},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/reference/average_wait.html","id":null,"dir":"Reference","previous_headings":"","what":"Average Waiting Time — average_wait","title":"Average Waiting Time — average_wait","text":"calculates target mean wait given two inputs target_wait numerical value factor average wait actually target mean wait calculated follows: target_wait / factor want chance 1.8%-0.2% making waiting time target, average patient waiting time quarter sixth target. Therefore: mean wait sit somewhere target_wait/factor=6 < Average Waiting Time < target_wait/factor=4","code":""},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/reference/average_wait.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Average Waiting Time — average_wait","text":"","code":"average_wait(target_wait, factor = 4)"},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/reference/average_wait.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Average Waiting Time — average_wait","text":"target_wait Numeric value number weeks set target within patient seen. factor Numeric factor used average wait calculation - get quarter target use factor=4 one sixth target use factor = 6 etc. Defaults 4.","code":""},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/reference/average_wait.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Average Waiting Time — average_wait","text":"Numeric value target mean waiting time achieve given target wait.","code":""},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/reference/average_wait.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Average Waiting Time — average_wait","text":"","code":"# If the target wait is 52 weeks then the target mean wait with a factor of 4 would be 13 # weeks and with a factor of 6 it would be 8.67 weeks. average_wait(52, 4) #> [1] 13"},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/reference/queue_load.html","id":null,"dir":"Reference","previous_headings":"","what":"Queue Load — queue_load","title":"Queue Load — queue_load","text":"Calculates queue load. queue load number arrivals occur every patient leaving queue (given waiting list empty). also described rate service queue. queue load calculated dividing demand capacity: queue_load = demand / capacity","code":""},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/reference/queue_load.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Queue Load — queue_load","text":"","code":"queue_load(demand, capacity)"},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/reference/queue_load.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Queue Load — queue_load","text":"demand Numeric value rate demand units target wait - e.g. target wait weeks, demand units patients/week. capacity Numeric value number patients can served (removals) waiting list week.","code":""},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/reference/queue_load.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Queue Load — queue_load","text":"Numeric value load ratio demand capacity","code":""},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/reference/queue_load.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Queue Load — queue_load","text":"","code":"# If 30 patients are added to the waiting list each week (demand) and 27 removed (capacity) # this results in a queue load of 1.11 (30/27) queue_load(30,27) #> [1] 1.111111"},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/reference/relief_capacity.html","id":null,"dir":"Reference","previous_headings":"","what":"Relief Capacity — relief_capacity","title":"Relief Capacity — relief_capacity","text":"Calculates required relief capacity achieve target queue size given period time function demand, queue size, target queue size time period. Relief Capacity required Queue Size > 2 * Target Queue Size. Relief Capacity = Current Demand + (Queue Size - Target Queue Size)/Time Steps","code":""},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/reference/relief_capacity.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Relief Capacity — relief_capacity","text":"","code":"relief_capacity(demand, queue_size, target_queue_size, weeks_to_target)"},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/reference/relief_capacity.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Relief Capacity — relief_capacity","text":"demand Numeric value rate demand units target wait - e.g. target wait weeks, demand units patients/week. queue_size Numeric value current number patients queue. target_queue_size Numeric value desired number patients queue. weeks_to_target Numeric value desired number time-steps reach target queue size .","code":""},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/reference/relief_capacity.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Relief Capacity — relief_capacity","text":"numeric value required rate capacity achieve target queue size given period time.","code":""},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/reference/relief_capacity.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Relief Capacity — relief_capacity","text":"","code":"# If demand is 30 patients per week, the current queue size is 1200 and the # target is to achieve a queue size of 390 in 26 weeks, then # Relief Capacity = 30 + (1200 - 390)/26 = 61.15 patients per week. relief_capacity(30, 1200, 390, 26) #> [1] 61.15385"},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/reference/target_capacity.html","id":null,"dir":"Reference","previous_headings":"","what":"Target Capacity — target_capacity","title":"Target Capacity — target_capacity","text":"Calculates target capacity achieve given target waiting time function observed demand, target waiting time variability demand parameter F. F defaults 1. Target Capacity = Demand + 2 * ( 1 + 4 * F ) / Target Wait","code":""},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/reference/target_capacity.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Target Capacity — target_capacity","text":"","code":"target_capacity(demand, target_wait, F = 1)"},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/reference/target_capacity.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Target Capacity — target_capacity","text":"demand Numeric value rate demand units target wait - e.g. target wait weeks, demand units patients/week. target_wait Numeric value number weeks set target within patient seen. F Holding value, needs definition F adding.","code":""},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/reference/target_capacity.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Target Capacity — target_capacity","text":"numeric value target capacity required achieve target waiting time.","code":""},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/reference/target_capacity.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Target Capacity — target_capacity","text":"","code":"# If the target wait is 52 weeks, demand is 30 patients per week and F = 3 then # Target capacity = 30 + 2*(1+4*3)/52 = 30.5 patients per week. target_capacity(30,52,3) #> [1] 30.5"},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/reference/target_queue_size.html","id":null,"dir":"Reference","previous_headings":"","what":"Target Queue Size — target_queue_size","title":"Target Queue Size — target_queue_size","text":"Uses Little's Law calculate target queue size achieve target waiting time function observed demand, target wait variability factor used target mean waiting time calculation. Target Queue Size = Demand * Target Wait / 4. average wait sit somewhere target_wait/factor=6 < Average Waiting Time < target_wait/factor=4 factor defaults 4. applicable Capacity > Demand.","code":""},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/reference/target_queue_size.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Target Queue Size — target_queue_size","text":"","code":"target_queue_size(demand, target_wait, factor = 4)"},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/reference/target_queue_size.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Target Queue Size — target_queue_size","text":"demand Numeric value rate demand units target wait - e.g. target wait weeks, demand units patients/week. target_wait Numeric value number weeks set target within patient seen. factor Numeric factor used average wait calculation - get quarter target use factor=4 one sixth target use factor = 6 etc. Defaults 4.","code":""},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/reference/target_queue_size.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Target Queue Size — target_queue_size","text":"Numeric target queue length.","code":""},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/reference/target_queue_size.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Target Queue Size — target_queue_size","text":"","code":"# If demand is 30 patients per week and the target wait is 52 weeks, then the # Target queue size = 30 * 52/4 = 390 patients. target_queue_size(30,52,4) #> [1] 390"},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/reference/waiting_list_pressure.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate the waiting list pressure — waiting_list_pressure","title":"Calculate the waiting list pressure — waiting_list_pressure","text":"waiting list target waiting time, pressure waiting list twice mean delay divided waiting list target. pressure given waiting list less 1. pressure greater 1 waiting list likely going miss target. waiting list pressure calculated follows: pressure = 2 x mean_wait / target_wait","code":""},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/reference/waiting_list_pressure.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate the waiting list pressure — waiting_list_pressure","text":"","code":"waiting_list_pressure(mean_wait, target_wait)"},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/reference/waiting_list_pressure.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate the waiting list pressure — waiting_list_pressure","text":"mean_wait Numeric value target mean waiting time achieve given target wait target_wait Numeric value number weeks set target within patient seen","code":""},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/reference/waiting_list_pressure.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate the waiting list pressure — waiting_list_pressure","text":"Numeric value wait_pressure waiting list pressure","code":""},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/reference/waiting_list_pressure.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Calculate the waiting list pressure — waiting_list_pressure","text":"","code":"waiting_list_pressure(63,52) #> [1] 2.423077"}]
+[{"path":[]},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/CODE_OF_CONDUCT.html","id":"our-pledge","dir":"","previous_headings":"","what":"Our Pledge","title":"Contributor Covenant Code of Conduct","text":"members, contributors, leaders pledge make participation community harassment-free experience everyone, regardless age, body size, visible invisible disability, ethnicity, sex characteristics, gender identity expression, level experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, sexual identity orientation. pledge act interact ways contribute open, welcoming, diverse, inclusive, healthy community.","code":""},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/CODE_OF_CONDUCT.html","id":"our-standards","dir":"","previous_headings":"","what":"Our Standards","title":"Contributor Covenant Code of Conduct","text":"Examples behavior contributes positive environment community include: Demonstrating empathy kindness toward people respectful differing opinions, viewpoints, experiences Giving gracefully accepting constructive feedback Accepting responsibility apologizing affected mistakes, learning experience Focusing best just us individuals, overall community Examples unacceptable behavior include: use sexualized language imagery, sexual attention advances kind Trolling, insulting derogatory comments, personal political attacks Public private harassment Publishing others’ private information, physical email address, without explicit permission conduct reasonably considered inappropriate professional setting","code":""},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/CODE_OF_CONDUCT.html","id":"enforcement-responsibilities","dir":"","previous_headings":"","what":"Enforcement Responsibilities","title":"Contributor Covenant Code of Conduct","text":"Community leaders responsible clarifying enforcing standards acceptable behavior take appropriate fair corrective action response behavior deem inappropriate, threatening, offensive, harmful. Community leaders right responsibility remove, edit, reject comments, commits, code, wiki edits, issues, contributions aligned Code Conduct, communicate reasons moderation decisions appropriate.","code":""},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/CODE_OF_CONDUCT.html","id":"scope","dir":"","previous_headings":"","what":"Scope","title":"Contributor Covenant Code of Conduct","text":"Code Conduct applies within community spaces, also applies individual officially representing community public spaces. Examples representing community include using official e-mail address, posting via official social media account, acting appointed representative online offline event.","code":""},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/CODE_OF_CONDUCT.html","id":"enforcement","dir":"","previous_headings":"","what":"Enforcement","title":"Contributor Covenant Code of Conduct","text":"Instances abusive, harassing, otherwise unacceptable behavior may reported community leaders responsible enforcement nhs.rcommunity@nhs.net. complaints reviewed investigated promptly fairly. community leaders obligated respect privacy security reporter incident.","code":""},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/CODE_OF_CONDUCT.html","id":"enforcement-guidelines","dir":"","previous_headings":"","what":"Enforcement Guidelines","title":"Contributor Covenant Code of Conduct","text":"Community leaders follow Community Impact Guidelines determining consequences action deem violation Code Conduct:","code":""},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/CODE_OF_CONDUCT.html","id":"id_1-correction","dir":"","previous_headings":"Enforcement Guidelines","what":"1. Correction","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Use inappropriate language behavior deemed unprofessional unwelcome community. Consequence: private, written warning community leaders, providing clarity around nature violation explanation behavior inappropriate. public apology may requested.","code":""},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/CODE_OF_CONDUCT.html","id":"id_2-warning","dir":"","previous_headings":"Enforcement Guidelines","what":"2. Warning","title":"Contributor Covenant Code of Conduct","text":"Community Impact: violation single incident series actions. Consequence: warning consequences continued behavior. interaction people involved, including unsolicited interaction enforcing Code Conduct, specified period time. includes avoiding interactions community spaces well external channels like social media. Violating terms may lead temporary permanent ban.","code":""},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/CODE_OF_CONDUCT.html","id":"id_3-temporary-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"3. Temporary Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: serious violation community standards, including sustained inappropriate behavior. Consequence: temporary ban sort interaction public communication community specified period time. public private interaction people involved, including unsolicited interaction enforcing Code Conduct, allowed period. Violating terms may lead permanent ban.","code":""},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/CODE_OF_CONDUCT.html","id":"id_4-permanent-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"4. Permanent Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Demonstrating pattern violation community standards, including sustained inappropriate behavior, harassment individual, aggression toward disparagement classes individuals. Consequence: permanent ban sort public interaction within community.","code":""},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/CODE_OF_CONDUCT.html","id":"attribution","dir":"","previous_headings":"","what":"Attribution","title":"Contributor Covenant Code of Conduct","text":"Code Conduct adapted Contributor Covenant, version 2.1, available https://www.contributor-covenant.org/version/2/1/code_of_conduct.html. Community Impact Guidelines inspired [Mozilla’s code conduct enforcement ladder][https://github.com/mozilla/inclusion]. answers common questions code conduct, see FAQ https://www.contributor-covenant.org/faq. Translations available https://www.contributor-covenant.org/translations.","code":""},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"MIT License","title":"MIT License","text":"Copyright (c) 2023 NHSRwaitinglist authors Permission hereby granted, free charge, person obtaining copy software associated documentation files (“Software”), deal Software without restriction, including without limitation rights use, copy, modify, merge, publish, distribute, sublicense, /sell copies Software, permit persons Software furnished , subject following conditions: copyright notice permission notice shall included copies substantial portions Software. SOFTWARE PROVIDED “”, WITHOUT WARRANTY KIND, EXPRESS IMPLIED, INCLUDING LIMITED WARRANTIES MERCHANTABILITY, FITNESS PARTICULAR PURPOSE NONINFRINGEMENT. EVENT SHALL AUTHORS COPYRIGHT HOLDERS LIABLE CLAIM, DAMAGES LIABILITY, WHETHER ACTION CONTRACT, TORT OTHERWISE, ARISING , CONNECTION SOFTWARE USE DEALINGS SOFTWARE.","code":""},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/articles/example_walkthrough.html","id":"setup","dir":"Articles","previous_headings":"","what":"Setup","title":"Walkthrough a real waiting list example","text":"First, ’ll add initial data need, taken white paper.","code":"# Queue size (patients) queue_size <- 1200 # Waiting time target (weeks) waiting_time_target <- 52 # Average waiting time in the queue (weeks) avg_waiting_time <- 63 # Proportion of waiting list who have missed the 52 week target (%) perc_missing_target <- 0.51 # Demand (patients per week) demand <- 30 # Capacity (procedures per week) capacity <- 27 # Standard deviation of number of operations per week std_dev_procedures <- 160"},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/articles/example_walkthrough.html","id":"demand-capacity-and-load","dir":"Articles","previous_headings":"","what":"Demand, capacity, and load","title":"Walkthrough a real waiting list example","text":"Fact 1: Capacity must larger demand, otherwise waiting list size grow indefinitely. see load 1.11, greater 1. queue therefore grow size indefinitely. Fact 2: load greater 1, queue unstable, waiting list grow indefinitely. load less 1, queue stable load proportion time waiting list non-empty.","code":"load <- queue_load(demand, capacity) load #> [1] 1.111111"},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/articles/example_walkthrough.html","id":"waiting-list-targets","dir":"Articles","previous_headings":"","what":"Waiting list targets","title":"Walkthrough a real waiting list example","text":"Fact 3: load queue less 1 chance missing target halves time increase target fixed number days. Fact 4: want chance 1.8%-0.2% achieving waiting time target, average patient waiting time quarter sixth target. case P4 waiting list, target wait 52 weeks. Thus, expect average patient operated waited 9 13 weeks. case P2 customers, target 4 weeks. Thus, mean wait typical patient one week. see average wait 13 weeks.","code":"average_wait <- average_wait(waiting_time_target) average_wait #> [1] 13"},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/articles/example_walkthrough.html","id":"target-queue-length","dir":"Articles","previous_headings":"","what":"Target queue length","title":"Walkthrough a real waiting list example","text":"Fact 5: Little’s Law. Assuming capacity exceeds demand, average queue size demand multiplied average waiting time. , given Fact 4 , want average waiting time quarter target, Little’s Law leads fact 6.","code":""},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/articles/example_walkthrough.html","id":"target-queue-size","dir":"Articles","previous_headings":"","what":"Target queue size","title":"Walkthrough a real waiting list example","text":"Fact 6: Target queue size demand multiplied target wait, divided 4. example, target queue size 390, actual queue 1200. queue ratio 3.1, meaning queue 3.1 times target size. waiting list size twice target queue size, consider special measures needed increase capacity, reduce waiting list size.","code":"target_queue_size <- target_queue_size(demand, waiting_time_target) target_queue_size #> [1] 390 queue_ratio <- queue_size / target_queue_size queue_ratio #> [1] 3.076923"},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/articles/example_walkthrough.html","id":"relief-capacity","dir":"Articles","previous_headings":"","what":"Relief capacity","title":"Walkthrough a real waiting list example","text":"Fact 7: actual queue size double target queue size, decide target date queue brought , apply necessary relief capacity. example, decide target achieved start summer, 26 weeks away. , capacity needed 61.2 procedures per week, compared 27 procedures per week currently performed.","code":"weeks_until_target_acheived <- 26 relief_capacity <- relief_capacity( demand = demand, queue_size = queue_size, target_queue_size = target_queue_size, weeks_to_target = weeks_until_target_acheived ) relief_capacity #> [1] 61.15385"},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/articles/example_walkthrough.html","id":"target-capacity","dir":"Articles","previous_headings":"","what":"Target capacity","title":"Walkthrough a real waiting list example","text":"discussed queue size double target capacity increased temporarily. However, queue size within acceptable range, can maintain waiting time target potentially much smaller capacity allocation waiting list. know waiting time (13 weeks) queue size (390 patients) waiting list operating target equilibrium. Now calculate capacity allocation maintain equilibrium long run. Fact 8: Target capacity formula, based Pollaczek-Khinchine formula. target capacity depends demand, plus additional capacity based serice variability, waiting time target. parameter “F” depends variability service. know F, can assume F = 1. Values less 1 good. Higher values represent variability, turn increase capacity required maintain equilibrium. F 1, can see capacity required 30.19, 0.19 demand. F 6.58, can see capacity required 31.05, 1.05 demand. , decreasing variability service (example stabilising operating theatre schedules day day week week) effect reducing capacity required achieve given service waiting standard.","code":"# set the \"F\" variability parameter f_1 <- 1 target_capacity_1 <- target_capacity( demand = demand, target_wait = waiting_time_target, F = f_1) target_capacity_1 #> [1] 30.19231 f_2 <- 6.58 target_capacity_2 <- target_capacity( demand = demand, target_wait = waiting_time_target, F = f_2) target_capacity_2 #> [1] 31.05077"},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/articles/example_walkthrough.html","id":"waiting-list-pressure","dir":"Articles","previous_headings":"","what":"Waiting list pressure","title":"Walkthrough a real waiting list example","text":"Fact 9: Waiting list pressure. waiting list target waiting time, pressure waiting list twice mean waiting time divided target waiting time. pressure given waiting list less 1. pressure greater 1 waiting list likely going miss target. Measuring waiting list pressure can give comparative measure compare waiting lists, help make resource allocation decisions. P4 ENT example following: queue size large, 1200 patients waiting. waiting time target 52 weeks, average waiting time experienced 63 weeks. gives waiting list pressure 2.42. NOTE numbers slightly different white paper, changes average waiting time 63 weeks 61 weeks example. look P2 ENT example: queue size smaller, 220 patients waiting. waiting time target 4 weeks, average waiting time experienced 24. gives waiting list pressure 12. two examples pressure much shorter P2 waiting list 5 times higher P4 list. Closer attention paid P2 procedures.","code":"waiting_list_pressure_p4 <- waiting_list_pressure(avg_waiting_time, waiting_time_target) waiting_list_pressure_p4 #> [1] 2.423077 queue_size_p2 <- 220 avg_waiting_time_p2 <- 24 waiting_time_target_p2 <- 4 waiting_list_pressure_p2 <- waiting_list_pressure(avg_waiting_time_p2, waiting_time_target_p2) waiting_list_pressure_p2 #> [1] 12"},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/articles/example_walkthrough.html","id":"summary","dir":"Articles","previous_headings":"","what":"Summary","title":"Walkthrough a real waiting list example","text":"worked example aims demonstrate functions available package. chronological order application :","code":""},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/articles/example_walkthrough.html","id":"further-reading","dir":"Articles","previous_headings":"","what":"Further reading","title":"Walkthrough a real waiting list example","text":"examples practical applications, considerations, see helpful “Case Studies” section towards end white paper. END","code":""},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Neil Walton. Maintainer, author. Yasser Mustaq. Author. Jacqueline Grout. Author. Zoë Turner. Author. Marcos Fabietti. Author. Tom Smith. Author. Chris Mainey. Author. NHS-R community. Copyright holder.","code":""},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Walton N, Mustaq Y, Grout J, Turner Z, Fabietti M, Smith T, Mainey C (2023). NHSRwaitinglist: R-package implement waiting list management approach. R package version 0.0.0.9000, https://nhs-r-community.github.io/NHSRwaitinglist/.","code":"@Manual{, title = {NHSRwaitinglist: R-package to implement a waiting list management approach}, author = {Neil Walton and Yasser Mustaq and Jacqueline Grout and Zoë Turner and Marcos Fabietti and Tom Smith and Chris Mainey}, year = {2023}, note = {R package version 0.0.0.9000}, url = {https://nhs-r-community.github.io/NHSRwaitinglist/}, }"},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/index.html","id":"nhsrwaitinglist-","dir":"","previous_headings":"","what":"R-package to implement a waiting list management approach","title":"R-package to implement a waiting list management approach","text":"R-package implement waiting list management approach described paper Understanding Waiting Lists Pressures Fong et al.","code":""},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/index.html","id":"to-install-the-package-run","dir":"","previous_headings":"","what":"To install the package, run:","title":"R-package to implement a waiting list management approach","text":"","code":"remotes::install_github(\"nhs-r-community/NHSRwaitinglist\", build_vignettes = TRUE)"},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/index.html","id":"contribution","dir":"","previous_headings":"","what":"Contribution","title":"R-package to implement a waiting list management approach","text":"NHS-R Community project open anyone contribute way able. Please see NHS-R Way read style guides Code Conduct related activity contribution NHS-R Community well Code Conduct repository generated using usethis::use_code_of_conduct(contact = \"nhs.rcommunity@nhs.net\"). contributing project, agree abide terms. want learn project, please join discussion NHS-R Community Slack group specific channel #managing-waiting-lists. simplest way contribute raise issue detailing feature functionality like see added, unexpected behaviour bugs experienced.","code":""},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/index.html","id":"pull-request-workflow","dir":"","previous_headings":"Contribution","what":"Pull-Request workflow","title":"R-package to implement a waiting list management approach","text":"welcome also submit Pull Requests , main branch protected won’t accept pushes directly even added repository member, workflow (forked repository member, clone repository member): Create new branch descriptive name Commit new branch (add code delete code make changes) Push commits Create pull-request GitHub signal work ready merged Tag one reviewers contribution can reviewed merged main","code":""},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/reference/average_wait.html","id":null,"dir":"Reference","previous_headings":"","what":"Average Waiting Time — average_wait","title":"Average Waiting Time — average_wait","text":"calculates target mean wait given two inputs target_wait numerical value factor average wait actually target mean wait calculated follows: target_wait / factor want chance 1.8%-0.2% making waiting time target, average patient waiting time quarter sixth target. Therefore: mean wait sit somewhere target_wait/factor=6 < Average Waiting Time < target_wait/factor=4","code":""},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/reference/average_wait.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Average Waiting Time — average_wait","text":"","code":"average_wait(target_wait, factor = 4)"},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/reference/average_wait.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Average Waiting Time — average_wait","text":"target_wait Numeric value number weeks set target within patient seen. factor Numeric factor used average wait calculation - get quarter target use factor=4 one sixth target use factor = 6 etc. Defaults 4.","code":""},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/reference/average_wait.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Average Waiting Time — average_wait","text":"Numeric value target mean waiting time achieve given target wait.","code":""},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/reference/average_wait.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Average Waiting Time — average_wait","text":"","code":"# If the target wait is 52 weeks then the target mean wait with a factor of 4 would be 13 # weeks and with a factor of 6 it would be 8.67 weeks. average_wait(52, 4) #> [1] 13"},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/reference/queue_load.html","id":null,"dir":"Reference","previous_headings":"","what":"Queue Load — queue_load","title":"Queue Load — queue_load","text":"Calculates queue load. queue load number arrivals occur every patient leaving queue (given waiting list empty). also described rate service queue. queue load calculated dividing demand capacity: queue_load = demand / capacity","code":""},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/reference/queue_load.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Queue Load — queue_load","text":"","code":"queue_load(demand, capacity)"},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/reference/queue_load.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Queue Load — queue_load","text":"demand Numeric value rate demand units target wait - e.g. target wait weeks, demand units patients/week. capacity Numeric value number patients can served (removals) waiting list week.","code":""},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/reference/queue_load.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Queue Load — queue_load","text":"Numeric value load ratio demand capacity","code":""},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/reference/queue_load.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Queue Load — queue_load","text":"","code":"# If 30 patients are added to the waiting list each week (demand) and 27 removed (capacity) # this results in a queue load of 1.11 (30/27) queue_load(30,27) #> [1] 1.111111"},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/reference/relief_capacity.html","id":null,"dir":"Reference","previous_headings":"","what":"Relief Capacity — relief_capacity","title":"Relief Capacity — relief_capacity","text":"Calculates required relief capacity achieve target queue size given period time function demand, queue size, target queue size time period. Relief Capacity required Queue Size > 2 * Target Queue Size. Relief Capacity = Current Demand + (Queue Size - Target Queue Size)/Time Steps","code":""},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/reference/relief_capacity.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Relief Capacity — relief_capacity","text":"","code":"relief_capacity(demand, queue_size, target_queue_size, weeks_to_target)"},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/reference/relief_capacity.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Relief Capacity — relief_capacity","text":"demand Numeric value rate demand units target wait - e.g. target wait weeks, demand units patients/week. queue_size Numeric value current number patients queue. target_queue_size Numeric value desired number patients queue. weeks_to_target Numeric value desired number time-steps reach target queue size .","code":""},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/reference/relief_capacity.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Relief Capacity — relief_capacity","text":"numeric value required rate capacity achieve target queue size given period time.","code":""},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/reference/relief_capacity.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Relief Capacity — relief_capacity","text":"","code":"# If demand is 30 patients per week, the current queue size is 1200 and the # target is to achieve a queue size of 390 in 26 weeks, then # Relief Capacity = 30 + (1200 - 390)/26 = 61.15 patients per week. relief_capacity(30, 1200, 390, 26) #> [1] 61.15385"},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/reference/target_capacity.html","id":null,"dir":"Reference","previous_headings":"","what":"Target Capacity — target_capacity","title":"Target Capacity — target_capacity","text":"Calculates target capacity achieve given target waiting time function observed demand, target waiting time variability demand parameter F. F defaults 1. Target Capacity = Demand + 2 * ( 1 + 4 * F ) / Target Wait","code":""},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/reference/target_capacity.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Target Capacity — target_capacity","text":"","code":"target_capacity(demand, target_wait, F = 1)"},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/reference/target_capacity.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Target Capacity — target_capacity","text":"demand Numeric value rate demand units target wait - e.g. target wait weeks, demand units patients/week. target_wait Numeric value number weeks set target within patient seen. F Holding value, needs definition F adding.","code":""},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/reference/target_capacity.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Target Capacity — target_capacity","text":"numeric value target capacity required achieve target waiting time.","code":""},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/reference/target_capacity.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Target Capacity — target_capacity","text":"","code":"# If the target wait is 52 weeks, demand is 30 patients per week and F = 3 then # Target capacity = 30 + 2*(1+4*3)/52 = 30.5 patients per week. target_capacity(30,52,3) #> [1] 30.5"},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/reference/target_queue_size.html","id":null,"dir":"Reference","previous_headings":"","what":"Target Queue Size — target_queue_size","title":"Target Queue Size — target_queue_size","text":"Uses Little's Law calculate target queue size achieve target waiting time function observed demand, target wait variability factor used target mean waiting time calculation. Target Queue Size = Demand * Target Wait / 4. average wait sit somewhere target_wait/factor=6 < Average Waiting Time < target_wait/factor=4 factor defaults 4. applicable Capacity > Demand.","code":""},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/reference/target_queue_size.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Target Queue Size — target_queue_size","text":"","code":"target_queue_size(demand, target_wait, factor = 4)"},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/reference/target_queue_size.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Target Queue Size — target_queue_size","text":"demand Numeric value rate demand units target wait - e.g. target wait weeks, demand units patients/week. target_wait Numeric value number weeks set target within patient seen. factor Numeric factor used average wait calculation - get quarter target use factor=4 one sixth target use factor = 6 etc. Defaults 4.","code":""},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/reference/target_queue_size.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Target Queue Size — target_queue_size","text":"Numeric target queue length.","code":""},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/reference/target_queue_size.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Target Queue Size — target_queue_size","text":"","code":"# If demand is 30 patients per week and the target wait is 52 weeks, then the # Target queue size = 30 * 52/4 = 390 patients. target_queue_size(30,52,4) #> [1] 390"},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/reference/waiting_list_pressure.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate the waiting list pressure — waiting_list_pressure","title":"Calculate the waiting list pressure — waiting_list_pressure","text":"waiting list target waiting time, pressure waiting list twice mean delay divided waiting list target. pressure given waiting list less 1. pressure greater 1 waiting list likely going miss target. waiting list pressure calculated follows: pressure = 2 x mean_wait / target_wait","code":""},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/reference/waiting_list_pressure.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate the waiting list pressure — waiting_list_pressure","text":"","code":"waiting_list_pressure(mean_wait, target_wait)"},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/reference/waiting_list_pressure.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate the waiting list pressure — waiting_list_pressure","text":"mean_wait Numeric value target mean waiting time achieve given target wait target_wait Numeric value number weeks set target within patient seen","code":""},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/reference/waiting_list_pressure.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate the waiting list pressure — waiting_list_pressure","text":"Numeric value wait_pressure waiting list pressure","code":""},{"path":"https://nhs-r-community.github.io/NHSRwaitinglist/reference/waiting_list_pressure.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Calculate the waiting list pressure — waiting_list_pressure","text":"","code":"waiting_list_pressure(63,52) #> [1] 2.423077"}]