Open kaituna opened 10 months ago
I think this was touched upon at the last Teams meeting, but the function for 'average_wait' is actually the target mean wait required to achieve the specified waitlist performance criteria (is this correct?). Now that I am reading the documentation I think that there is some room for confusion and the code examples will make more sense if the function could be named 'mean_target_wait'.
I tend to agree here. I wonder if there is room for a word like "equilibrium". Some of the functions (including this one) describe an equilibrium (or target) state:
Some describe the system in whatever state it happens to be in:
And one describes the process of getting from an uncontrolled state to an equilibrium state:
I'm also thinking that instead of specifying a factor to achieve your desired performance % it would be better if you could specify the proportion and have the function do the factor calculation. For example if I had a waitlist target of 95% of patients to be seen within 42 days I could call the function thus: mean_target_wait(42,0.95)
This is a really interesting proposal. One that we should put to Neil.
I think the same logic would have to be applied to the other functions so it is all coherent. For example, the target_queue_size() function would also need to accept inputs for demand, target wait, and % compliance:
#Target queue size for a service with weekly demand of 100 patients, waiting target of 6 weeks and 95% compliance
target_queue_size(demand = 100, target = 6, performance = 0.95)
Looking at the paper it seems like we can calculate the factor thus:
Factor = log1/e(1-Target Performance)
Therefore to get the factor necessary to achieve a 95% compliance with the target we would have:
log1/e(1 - 0.95) = log1/e(0.05) = ~2.996
Is this correct??
@kaituna I think we have 2 issues combined into 1 here. It may be worth separating them out.
The compliance target spec questions may be best addressed to @neilwalton.
@ThomUK Agreed, I have changed the title of this issue to focus on the factor calculation and logged a separate issue for the ambiguous function name (#37).
@neilwalton to review. May be sorted already through the evolution of the functions.
I think this was touched upon at the last Teams meeting, but the function for 'average_wait' is actually the target mean wait required to achieve the specified waitlist performance criteria (is this correct?). Now that I am reading the documentation I think that there is some room for confusion and the code examples will make more sense if the function could be named 'mean_target_wait'.
I'm also thinking that instead of specifying a factor to achieve your desired performance % it would be better if you could specify the proportion and have the function do the factor calculation.
For example if I had a waitlist target of 95% of patients to be seen within 42 days I could call the function thus:
mean_target_wait(42,0.95)
This may have consequences for the other functions, but I think end users would assume they can just put their targets directly into the code without having to do some pre-calculations.
Apologies if I have misunderstood anything!