Which of the following experts has made an appointment to schedule doctors?

Source: Internet
Author: User
Who has done the procedure of making an appointment for a doctor shift? give me some advice. You can customize the number of people who can make appointments in each time period during the doctor's shift schedule. of course, the time period can also be customized. here, the time period is one hour, for example, am-am ....... -, 8 hours a day is divided into eight time periods. The shift schedule is from Monday to Sunday. Which of the following gives me a specific idea? thank you. ------ Solution -------------- who has done the procedure of booking the registration doctor shift, give a thought.
You can customize the number of people who can make appointments in each time period during the doctor's shift schedule. of course, the time period can also be customized. here, the time period is one hour, for example, am-am ....... -, 8 hours a day is divided into eight time periods. The shift schedule is from Monday to Sunday. Which of the following gives me a specific idea? thank you.
------ Solution --------------------
First, you can use a data organization time segment and the maximum number of people that can be associated with each time segment, or use a data table.
For example, each time segment can only contain about 20 people.
$ T = array (
Array ('08: 00', '09: 00', 20 ),
....
.....
Array ('17: 00', '18: 00', 20 ),
);

Then, use the one-member table to record the number of connected persons. the approximate fields are as follows:
Id auto-increment
Mid can also use the upload id or unique identification card, or email, to check whether or not to re-renew the contract.
Date
T-period standards can also be known using digital standards
Num Users

When a useful contract is required, determine whether the contract is in the allowed period. If yes, then determine whether the contract has been completed within the period, add a record if not specified.

For example, if you have an appointment between-, you can determine the period accordingly.
Select num from table where date = '2014-06-10 'and t = 0;

If the returned num is smaller than 20, insert.

If you want to add the cancel contract function, you can also set a cancel contract deadline. From onwards, the period cannot be canceled for the first 10 minutes. The general idea is this.




------ Solution --------------------
If the values of Monday and Sunday are different, the $ t data set is used as the key of the week. This makes it easy to manage data tables.

$ T = array (
'Mon' => array (
Array ('08: 00', '09: 00', 20 ),
....
.....
Array ('17: 00', '18: 00', 20 ),
),
'Tue '=> array (

)
);
------ Solution --------------------
Data tables are used for management in case of complexity.

The data table structure is as follows:

Doctor table, which records doctor information
Doctor_id doctor id PK
Name doctor's name

The timeline table records the information that each doctor can make appointments for each period of time every day. this table needs to be added and deleted at intervals of time, add new date reservation times, and delete expired ones. the week is useless, because it is better to set the date directly.
Tid timeline id PK
Doctor_id doctor id FK
Date
Number of users allowed to make an appointment on quota
Starttime period start
Endtime period ended
Status: whether to allow the reservation for this time period 0 No 1

Order reservation table, which records user reservation information
Order_id reservation id PK
Userid user ID-> membership system, which you want to FK
The specified time period id FK
Addtime reservation time

Process:
First, enter the doctor and timeline data, as shown below:

Two doctors in total
Doctor_id name
1 d1
2 d2

In the shift table on February 11, doctor1 has eight full periods, and doctor2 only has six periods to work.
Tid doctor_id date quota starttime endtime status
1 1 10 1
2 1 1
3 1 10 1
4 1 1
5 1 1
6 1 1
7 1 1
8 1 5 1
9 2 10 1
10 2 1
11 2 10 1

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.