The templates are just a starting point for your schedule each day.

We load up the therapists in the order on your templates and block off any time you have blocked off on the templates.  

Then we read through the appointments, overwriting any template blocked reasons with appointments you may have added.

An appointment could be an actual patient scheduled, a "Held" appointment, a blocked reason entered on the schedule by the user (not loaded by the template), or an Unblocked reason.

If we come across a record in the appointments table and the therapist is not on the schedule for that day from the templates,

we add that therapist to the schedule for you so that you can still see them and the possible appointments they have for that day.