How do I make automatic time allocation?

We have a customer base and a doctor base. There is a start and end time for admission. But I can’t figure out how to make automatic time allocation? I need to make a dynamic time list from one date to another in an interval of 16 minutes, for example. And we also need to make an automatic distribution on free dates. 1 date - 4 people can be booked. At the same time, time should be distributed according to our dynamic (preferably) interval, who went beyond the time frame - the next day, etc. Can this be implemented? Is there any example?

By that you mean something infinite like:
[0:00,0:16,0:32,0:48,1:04]?

So everytime someone fills out a form, you have to assign them to the right doctor based on the rules above?

Should it look something like this?

2 Likes

Yes, something like that

The doctor will have his own time interval for which he will receive patients. For example, from 12:00 to 15:00. I would like to somehow break this time into intervals of 12:16, 12:32, etc. Because it is not very good to fill in all time intervals manually for the doctor

I don’t have an immediate good way to do that. What I think you can do might look like this:

  • Set the doctor’s ID to a field in User Profiles when a customer clicks on a doctor to view his details.
  • Use a relation + lookup to retrieve the start and end admission times for that doctor.
  • Use JavaScript to generate a comma delimited list of start and end internals for that doctor, based on the lookup above.
  • Use this method to transpose them to a helper table and use that in a choice component.
1 Like