Hey ix_touring,
definitely get your medical out the way first first.
Imagine if you did the assessments first and passed, but then failed your medical, you'll have blown all the cash on the assessments for nothing.
If you do the medical first and then (touch wood) fail the assessments for whatever reason, then you still have plenty of options and could still go the modular way.
The initial class 1 is pricey but definitely getting it out the way before spending anymore money on flying!
Good luck
C