Technically neither
It is always advisable to get your ARN first though... it is a simple form and CASA will get it back to you generally within a week or two..
If you complete your medical without an ARN the DAME will hold it until you receive it. Once received from casa just inform the DAME and they will forward the paperwork on.