Hi Kalew,
Ideally, the medical should be done prior to submitting your application. In the Region Specific section of the guide, there is a form you fill out to bring to the "DMP" along with 4 photos. The doctor's office will then provide you with another form, proving the medical has been done (original copy 2 of form IMM 1017 signed by the examining doctor). This is item #27 on the IMM 5491 - Document Checklist.
I have read that some people send their application in first and then do the medical. This may or may not slow down the process though as it is one of the items required on the checklist.
Bostongirl is right, the medical is only good for one year so it should not be done too soon before you are ready to submit your application, but, the way I look at it, the less back and forth between myself and either CPC-M or Buffalo, the better. Hope this helps.