CJBIRKIN
Drink!
- Local time
- Today, 17:18
- Joined
- May 10, 2002
- Messages
- 255
Hi
My brain is being reduced to the consistency of cream cheese today (way to hot
and tired
).
I'm trying to develop a Rota system for a hospital department and i've got to the point of trying to store the actual data that makes the Rota.
My intention was to create a table of Units/theatres.
Note: Each unit will be used every weekday and some may be used on weekends.
Then a link table containing the date and the unit id as a foreign key with a PK(DateID).
This would be a 1 unit to many dates
Then a Rota table containing the date_id as a foreign key and because the days are split into 2 shifts am and pm 2 fields which will contain the staff_id from the staff table as foreign keys + its own unique key
See pic
My idea was to have three forms. The main form containing the unit.
A subform for the date linked to the mainform.
And a second subform for the rota staff linked to the date.
Something just doesn't feel right though.
With this setup the user will have to enter the date for each unit. There are 29 units and the rota is produced for 7 days. So each time the user selects say Theatre 1 they will have to create 7 days of dates and then Theatre 2 the same 7 days of dates and so on.
I could code something to get round this but that makes me think that i have done something wrong with the structure.
Someone please put me out of my misery! (I don't need the loan of a gun thanks all the same!) Is this right?
Cheers
Chris
My brain is being reduced to the consistency of cream cheese today (way to hot
I'm trying to develop a Rota system for a hospital department and i've got to the point of trying to store the actual data that makes the Rota.
My intention was to create a table of Units/theatres.
Note: Each unit will be used every weekday and some may be used on weekends.
Then a link table containing the date and the unit id as a foreign key with a PK(DateID).
This would be a 1 unit to many dates
Then a Rota table containing the date_id as a foreign key and because the days are split into 2 shifts am and pm 2 fields which will contain the staff_id from the staff table as foreign keys + its own unique key
See pic
My idea was to have three forms. The main form containing the unit.
A subform for the date linked to the mainform.
And a second subform for the rota staff linked to the date.
Something just doesn't feel right though.
With this setup the user will have to enter the date for each unit. There are 29 units and the rota is produced for 7 days. So each time the user selects say Theatre 1 they will have to create 7 days of dates and then Theatre 2 the same 7 days of dates and so on.
I could code something to get round this but that makes me think that i have done something wrong with the structure.
Someone please put me out of my misery! (I don't need the loan of a gun thanks all the same!) Is this right?
Cheers
Chris