Calculate End Date for Treatment Plan (weekdays only)

This is one of those questions asked on the forum that you think, that should be easy enough to figure out, but when it comes down to it, there was a fair bit of thinking involved. The developer wanted to set a start date for a treatment plan (which had to be a weekday), then enter the number of days required for the treatment, and to then work out the end date for the treatment, which could only take place on weekdays…

Turned out that it was easier to use the Maths blocks and use remainder and quotient to work things out, once we had figured out the first week.



AIA file to follow