I am posting this message to see if any of you have solved this issue already. @adunsulag I am including you because you are overhauling the calendar to use twig.
The practice has several providers and they all have different durations of visit. There are only 4 visit types in the system.
They want to be able to set the appointment duration based on the provider schedule and not by the visit type. The way the system currently now works to achieve what they want from the calendar. They would have to create a lot of different visit types for 15, 30, and 1hr increments. The calendar is set for 15 minute intervals. This is a good starting point so that each duration can be displayed properly.
My thoughts are adding a global to check of whether duration will be set by the provider schedule or visit type. Next, create a class to handle this function of collecting the provider specific duration. We have tested setting the duration in the provider tab of the calendar but it returns an odd number value and not 15, 30, or 90. Also there are some other factors that make using that structure to retrieve a stable value.
I was looking at creating a twig form to manage the data input. Once a schedule has been set for the provider, the provider would show on this form so the duration of their appointments can be set. I was thinking of storing this information in the first “In Office” entry. This entry will never change is the reason that I am selecting this spot. The rest is substituting the destination in the add edit event.
Share your thoughts, insights, and things I may not have considered.