I want idea about creating of system

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
miki_ir
Forum Newbie
Posts: 3
Joined: Tue Sep 13, 2011 5:31 am

I want idea about creating of system

Post by miki_ir »

hi
what table i should create in MySQL for this system:
patient select one doctor from doctor list and see all vacant visit time and then patient select one time to get appointment to visit doctor.
how i should consider time and day of appointment . should i create table for appointment ? how i recognize vacant time of doctor?
i haven't any idea . help me
what i should consider to create system that let patient to see vacant time of doctor and let he to select time for visit of doctor
how i should consider vacant time of any doctor?
assume that doctors in any 30 minute visit one patient
thank alot
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: I want idea about creating of system

Post by Christopher »

You need at least two tables from your description: doctors and appointments. The appointments table should have a indexed field to hold the ID of the doctor (foreign key). The appointment table also would have the start and end times of the appointment. You can then search to see of there is a scheduled appointment for a given doctor ID. If not then schedule the appointment.
(#10850)
miki_ir
Forum Newbie
Posts: 3
Joined: Tue Sep 13, 2011 5:31 am

Re: I want idea about creating of system

Post by miki_ir »

thank you
this is good idea but .how i determine the vacant time of doctor ? i should use what function ?

Code: Select all

doctor: id,name,family , timeOfStartToWork , TimeOfEndWork
appointment:  doctor_id,patient_id,timeOfStartVisit,TimeOfEndOfVisit
then how I should recognize vacant time? how should work with this table to to recognize vacant time of any doctor?
with assumption that doctors in any 30 minute visit one patient
best regard thanks
Post Reply