Iluvatar+ Posted May 25, 2012 Share Posted May 25, 2012 I am at the early stages of developing a booking system (in cakephp) that can be used by both the client and the admins. The process in which a booking will be made is Select a treatment -> Select a therapist (that is linked to the treatment) -> Select a day -> Select a time - > Keep in mind that the day and times will be based on the therapist time sheet which will be inputted by an admin. I have already got a clear idea on the majority of the logic of the application although I am having a trouble thinking of a solid logic in how I can display time availability of the therapist. Has anyone one done anything like this before or anything that could help me. Quote Link to comment https://forums.phpfreaks.com/topic/263132-booking-system/ Share on other sites More sharing options...
Barand Posted May 25, 2012 Share Posted May 25, 2012 Has anyone one done anything like this before Yes. But we are here to help with specific PHP problems, not provide you with free consultancy advice regarding ideas for the design ofyour application. Quote Link to comment https://forums.phpfreaks.com/topic/263132-booking-system/#findComment-1348686 Share on other sites More sharing options...
ignace Posted May 26, 2012 Share Posted May 26, 2012 Is there only one therapist for each treatment? treatment (tmt_id, trp_id, tmt_name, tmt_desc) -- one-to-many/one-to-one: one therapist for one/many treatment(s) therapist (trp_id, trp_name) OR treatment (tmt_id, tmt_name, tmt_desc) therapist (trp_id, trp_name) therapist_does_treatment (trp_id, tmt_id) -- many-to-many one therapist does many treatments, one treatement is done by many therapists If clients have to login, create a table for those: client (clt_id, clt_fname, clt_lname) Now comes the harder part: a therapist can only treat one client at a time and you must reflect this in your DB. What you must do is create a cron that fills a table with possible appointment dates of say one hour (or longer depending on how long it takes a therapist to treat a client) for the entire year. When a client then makes an appointment you create a relationship between the client, the therapist, and the appointment date so that never 2 clients can make an appointment at the same time. Since I am not gonna write out the entire DB schema I'll leave this up to you partly also because I don't have all information to create this schema like: how long does a particular treatment take? Do therapists only do one particular treatment throughout the day or more? Et cetera... Quote Link to comment https://forums.phpfreaks.com/topic/263132-booking-system/#findComment-1348737 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.