I would just say from a drafting perspective that we would probably say that “immediately before” is quite clear and not open to being interpreted as anything other than in the moments immediately before. The concern with “at the time of” might be that medical assistance in dying is actually the administration of the lethal substance. So if it's at the time of the administration, that might be a moment too late.
On May 10th, 2016. See this statement in context.