Added a lot of for the allocation of appointments, it will now pick up which appointments are allocated, However it is needing some sort of date parsing function which i will add to get it to parse the date and be able to query the db for those results corresponding to various dates. There is a lot of duplicate code, but is of a nature which it cannot really be dynamically generated unless we do it a really intricate way. This will do for just now, we may have to refactor it but it is early days yet.