Completed algorithm

It is complete, minus a couple of things: it does not carry on usings a
doctor when a weekend carries over from one month to the next, and it
does not take start date into account for the doctor.

It is ugly and large, but can be modified for efficiency later, for now
John and I were focusing on getting a working algorithm to use