My current Formula
@Hours
IF {Data.ApptKind} = 1 AND {Data.Column} = '1' THEN
{Data.ApptTime} / 60;
My issue has to do with the {Data.Column} = '1'.
This formula deals with a Doctors schedule. In the schedule, most of the time, an appointment is booked and is by default placed into Column 1. If the provider elects to double book their time, the second appointment hits the column 2. It is possible to have up to 4 appointments in one slot. This is why we wait forever at the Doctors office - appointments get overbooked because patients cancel or no show frequently and the provider would rather have the patient wait then risk no appointment at all.
My issue is this ....
If I have 2 patients scheduled from 8:30 am - 9:00 am and I cancel the patient in column 1, the system forces the patient out of Column 1. This is so another patient can be scheduled into this slot if needed. What I was intending to do with my formula was only count the time in this time slot one time not twice. I am looking to get a summary of time the provider was scheduled to see patients. So if the Provider was scheduled to see patients from 8 am to noon and had patients doublebooked for every time slot, I only want to overall time he saw patients regardless of the doublebooking, triplebooking or quadruplebooking. So the total time for my example should be 4 hours not 8 hours.
The issue has to do with the canceled appointments. If you recall, when that appointment is canceled, the appointment is removed from column 1. If the office cannot replace it with another patient, it is empty. This is messing my formula up. The provider still saw a patient, but that visit was sitting in column 2. What I would like to see is have it evaluate column 1 and if NULL, check the subsequent columns and if it finds a patient count that one ... if all are NULL then dont count. I hope ive explained my issue ok. If not, please dont hesitate to get more clarity. Thanks in advance!