Best time to tell employer about ivf?

I will be open with my boss about going thru

IVF (he knew when i was doing

IUI also, as i had many appointments)

Just wondering if it is better to tell work a couple weeks prior to starting- so they have a heads up

Or to wait until right before?