Who has done the procedure of making an appointment for a doctor shift? give me some advice.

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.


Reply to discussion (solution)

First, use one ??????? Segment and each ??? Maximum segment ?? ?, Or use ?? Table.
For example ??? Segment only ?? 20? Person.
$ T = array (
Array ('08: 00', '09: 00', 20 ),
....
.....
Array ('17: 00', '18: 00', 20 ),
);

Then, use one? Table ???? Persons ?, The approximate fields are as follows:
Id auto-increment
Mid? Id or what? Unique Identity ?? ? West, or email. Can I use it ?? Check whether it is heavy ??? .
Date
T ?? Segment ??, Use ???? Or
Num ?? Persons?

? Useful? Yes ??, Judge first? Are you allowed ????? Segment ?, If yes, Judge ?,??? Segment? Already ????, If not ?? Add one ???.

For example, there is? Use? At am-am ???? Segment ??, Yes ?? Sentence ?.
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 cancellation ?? Function, or? I? Cancel ?? Deadline, start? Before? Cannot cancel ,??? Okay. What is the general idea ??.



What if Monday and Sunday are acceptable ???? Different, then $ t ????? What more? The key of the week. If yes ?? ? ?? Table to facilitate management.

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

)
);

First, design the database, table doctors, table order, and table work)
Create an appointment number each time you generate an appointment number. retrieve the schedule table first. if the schedule is not created on the current day, create it first.
You can manually modify the settings when creating additional tables for shift.

Although it makes sense to go upstairs, you cannot guarantee that the doctor will go to work at that point of the day. in some cases, he may not go to work or be delayed.
Therefore, it cannot be written to programs.

Save the time period to a database or array as a category. select a category when you make a reservation.

Learn about it ~

First, use one ??????? Segment and each ??? Maximum segment ?? ?, Or use ?? Table.
For example ??? Segment only ?? 20? Person.
$ T = array (
Array ('08: 00', '09: 00', 20 ),
....
.....
Array ('17: 00', '18: 00', 20 ),
);

Then, use one? Table ???? Persons ?, The approximate fields are as follows:
Id auto-increment
Mid? Id or what? Unique Identity ?? ? West, or email. Can I use it ?? Check whether it is heavy ??? .
Date
T ?? Segment ??, Use ???? Or
Num ?? Persons?

? Useful? Yes ??, Judge first? Are you allowed ????? Segment ?, If yes, Judge ?,??? Segment? Already ????, If not ?? Add one ???.

For example, there is? Use? At am-am ???? Segment ??, Yes ?? Sentence ?.
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 cancellation ?? Function, or? I? Cancel ?? Deadline, start? Before? Cannot cancel ,??? Okay. What is the general idea ??.

A little dizzy. I don't quite understand what you mean.

LZ uses the three-floor solution. In fact, your need is nothing more than figuring out which doctors, shift schedules, and appointments are there. Database operations are more flexible.

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
12 2 1
13 2 1
14 2 1


Reservation
The first user useid = 1 needs to make an appointment ~ 12: 00 doctor1
First, check whether the record of doctor_id = 1 date = starttime = endtie = quota> 0 exists in timeline.
If the specified period does not exist, the system returns a message indicating that no reservation is made or that the quota is full.
If yes
1. Add a record to the order table
Order_id userid tid addtime
1 1 4 10:29:29
2. change the timeline tid = 4's quota-1, then the record will become

4 1 11 1

The process is like this. you should understand it.

I can't read everyone. I went on a business trip recently and came back yesterday. I checked the method on the eighth floor. in this way, I need to add a new one each time and input data manually, if the week is used, it will be updated once every week. It seems that time is writing to death.

I can't read everyone. I went on a business trip recently and came back yesterday. I checked the method on the eighth floor. in this way, I need to add a new one each time and input data manually, if the week is used, it will be updated once every week. It seems that time is writing to death.



?? No? Dead. What are you ?? Before you add an entry table, you must wait for a job.

Yes? Set? Shift schedule and question mark ?? Shift table.

For example? Generate A, Every? Monday ~ ~ Work. Yes? More? Table ??? Shift schedule, and then another one? Table ???? Shift table.

For example, today, Monday, normally between and ~ 12: 00? A is born to work, ?? Something to do. you need to change it to PM ~ .?? ~ ? Today ?? Shift table. But sentence? Today ?? Shift table ,? Press ?? Shift table ??. No? Press? Shift schedule ?? You can. What is the general idea ?? .

I can't read everyone. I went on a business trip recently and came back yesterday. I checked the method on the eighth floor. in this way, I need to add a new one each time and input data manually, if the week is used, it will be updated once every week. It seems that time is writing to death.



What exactly do you want to do? Clarify your ideas first!
Aren't you "making an appointment? How can they be the same every week?
If I make an appointment tomorrow, will tomorrow also work? Of course, the date is fixed!

I only need 7 days to make a cycle, and make an appointment for tomorrow on the same day, for example, (Wednesday )? (Tuesday), no matter how the shift schedule is, I will take 7 days. how can this be reflected, as you do, I don't know how to reflect it on pages and programs.


I can't read everyone. I went on a business trip recently and came back yesterday. I checked the method on the eighth floor. in this way, I need to add a new one each time and input data manually, if the week is used, it will be updated once every week. It seems that time is writing to death.



?? No? Dead. What are you ?? Before you add an entry table, you must wait for a job.

Yes? Set? Shift schedule and question mark ?? Shift table.

For example? Generate A, Every? Monday ~ ~ Work. Yes? More? Table ??? Shift schedule, and then another one? Table ???? Shift table.

For example, today, Monday, normally between and ~ 12: 00? A is born to work, ?? Something to do. you need to change it to PM ~ .?? ~ ? Today ?? Shift table. But sentence? Today ?? Shift table ,? Press ?? Shift table ??. No? Press? Shift schedule ?? You can. What is the general idea ?? .

In this way, you can first schedule the task once a day and then change it to a 7-day cycle.

In this way, you can first schedule the task once a day and then change it to a 7-day cycle.

Can I understand your method like this? I made it like this. this is an automatic 7-day cycle. the time period and number of people are customized every day. but how can I write this SQL statement? I am in trouble. The first thought was that the customer was not satisfied.

The field is:
Date, expert, period 1, period 2... period 10
That is, one record per expert per day

The field is:
Date, expert, period 1, period 2... period 10
That is, one record per expert per day

In this case, it is not a shift every day.

Why?
The only difference is that every day in your form (#14) is saved as a record.
If your form is set for a week, save 7 records on a daily basis after submission.

Why?
The only difference is that every day in your form (#14) is saved as a record.
If your form is set for a week, save 7 records on a daily basis after submission.

In this case, the data is inserted (or an array) in the same multi-loop mode. I want to save the time period and the number of people corresponding to each time period.

First thought? Lower? What is the main ,? Some ???? And ??? Segment permission ??? ? Or other information is composed ?? Home? Set? Is it a system ?? Set

If yes? Home? And you ?? Yes ??
First you ?? Yes ??? Segment configuration information table ,???? Such as 8.00, 9.00, or? Half? Small? Such as 8.30, 9.00, 9.30, etc., each ??? Yes ???

Then? Home? Set ?, Put? Some ?? List all ?, By? Decide on your own ??? Segment, such as-, allow? ?? Persons? And other information ,? After setting it up? Inbound ??

Patient view information ?, Put the last seven days? Home? Set ?? Section and phase? Information? Out of use? You can.

First thought? Lower? What is the main ,? Some ???? And ??? Segment permission ??? ? Or other information is composed ?? Home? Set? Is it a system ?? Set

If yes? Home? And you ?? Yes ??
First you ?? Yes ??? Segment configuration information table ,???? Such as 8.00, 9.00, or? Half? Small? Such as 8.30, 9.00, 9.30, etc., each ??? Yes ???

Then? Home? Set ?, Put? Some ?? List all ?, By? Decide on your own ??? Segment, such as-, allow? ?? Persons? And other information ,? After setting it up? Inbound ??

Patient view information ?, Put the last seven days? Home? Set ?? Section and phase? Information? Out of use? You can.

I set this in the system, and there will be doctors who will shift their jobs after they are not properly protected.

If your input box is named as follows:
Period 1
Time range 2
Isn't all corresponding after submission?

If you use mysqli or pdo extension, bind the parameter to insert it cyclically without any overhead.
It is not difficult to assemble command strings with mysql.

For system compatibility, it is best to save the settings to the database separately at each time every day.

If your input box is named as follows:
Period 1
Time range 2
Isn't all corresponding after submission?

If you use mysqli or pdo extension, bind the parameter to insert it cyclically without any overhead.
It is not difficult to assemble command strings with mysql.

I am confused about this method, and I don't know whether it's me or not.

If anyone is really kind, just write the code for me. please, solve the problem and I will add another 50 points.

Which ?, What do you understand ??

If you don't understand? On your behalf ?, Also? Useful.

Nobody wants?

Which ?, What do you understand ??

If you don't understand? On your behalf ?, Also? Useful.



Which ?, What do you understand ??

If you don't understand? On your behalf ?, Also? Useful.


Let's take a look at what's going on here ..

? Are you in the template? Let's go. Http: // localhost/xyjcy_network/templates/default/images/xjweibo.jpg


I can't read everyone. I went on a business trip recently and came back yesterday. I checked the method on the eighth floor. in this way, I need to add a new one each time and input data manually, if the week is used, it will be updated once every week. It seems that time is writing to death.



What exactly do you want to do? Clarify your ideas first!
Aren't you "making an appointment? How can they be the same every week?
If I make an appointment tomorrow, will tomorrow also work? Of course, the date is fixed!


Moderator, please consult
When the doc file on the website is opened, the system does not prompt whether to download or open it. if you open it directly, it is garbled. why?

You have not sent the download header?

You have not sent the download header?


The file is uploaded directly by the editor. it is good in the virtual space and cannot be put on the client server. the opened content is garbled.

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.