Jump to content

Booking system


Iluvatar+

Recommended Posts

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.

 

Link to comment
Share on other sites

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...

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.