Without a more detailed description of the problem you are trying to solve, my first guess is that this is a problem within "queueing theory", and I would consider solving it by simulations. Have a look at the first link for some examples on how to do that in R.
But let me ask: is there a non-zero "optimal waiting time" in the ER? I was under the impression that the optimal waiting time for an emergency would be zero!! [In which case, I would not try to divide by it, obviously...]
My goal is estimate the number of doctors who must be in the emergency room per medical specialty, per hour.
I believe that the only measure likely to see if the number of doctors is sufficient or not (with Manchester Triage implemented) is the quotient between the actual waiting time of the user and the theoretical waiting time (depending on the color of triage) , which must not exceed 1.
My question is related to the following: the user actual waiting time depends on the number of users (and thus the air temperature, day of week, month, year , time of day , social events [football, academic parties and so on] and .....) and the characteristics of urgency episodes admitted in the hours before (of which I can know the characteristics of people, number of prescribed exams (and which) and so on....
A question like this is best done with simulation. Each procedure is going to take a different amount of time. For example, my father went in for cataract surgery. He took about an hour from walking into the back room to walk out the front door. Another person took 3 hours before they could go under the knife.
There will also be times when you need more doctors on hand because demand is up and less doctors on hand when demand is down.
There are also "freak" accidents where large numbers of people flood the waiting room at the hospital.
You'll also need to consider human factors and cost in your calculation.