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
https://forums.phpfreaks.com/topic/263132-booking-system/
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
https://forums.phpfreaks.com/topic/263132-booking-system/#findComment-1348737
Share on other sites

Archived

This topic is now archived and is closed to further replies.

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