I am trying to figure out how a complex scenario with Appointments, would appreciate your help.
This project is for a health clinic, that has rooms shared by doctors.
The front-end appointment is done by the secretary or by patients themselves.
How to design this cross-avaiablitity DOCTORS X ROOMS is the main issue to me.
1. Working hours: Clinic has it main working hours schedule - it means rooms have their fixed schedule. Doctors have their own, that are flexible and in constant change – they ajust their shedule by themselves.
2. Doctors and rooms can be combined, but never be assingned 2 appointments at the same time slot (always one room with one doctor per appointment).
3. Doctors assing themselves to rooms (for their specific procedures, they can block the rooms on the fly, based on needs and avaiability) and this combination – doctors + rooms is accessed by secretary / patients.
For them (secretary / pacients) the room doesn´t matter, it is important just for the doctors (because of specific procedures).
In Appointments I found as variables : Client (who books the time), Service and Provider. Also shared resources, locations and dummy user/dummy provider.
My first trial was treating rooms as locations and doctors as providers, then assigning a provider to multiple locations. But that didnt work, I was only able to assing a specific provider to ONE location (and doctors can use more than one room, at different times).
I tried other several combinations but so far have not been satisfied.
It seems to me much more like a car rental service or any model that depends on a finite and not simultaneous number of resources COMBINED (eg. rooms and doctors).
Rooms would be the cars, avaiable to any driver/doctor, that as a combo can be booked by a client. Both doctors and rooms can not be booked at the same time by 2 final client (the patient).
Besides that, Doctors should be able to block some cars/rooms for periods of time, as their avaiable time slots.
And secretary or even the doctors could assign this combo “specific doctor + specific car/room” to a pacient.
I will be grateful for any thoughts.
Thanks in advance.