I dont think there is any requirement that your medical checks have to be done in your home country. All that is required is that it is done by an approved panel physician which CIC lists a directory.
As for timing, the recommended timeline is that you go get the checks when the CIC requests them. However, now that the applications are promised to be completed within 12 months, some people have submitted them upfront. Since the medical checks are good for one year, they theoretically will still be valid by the time they get to reviewing your file. Under the old system, there were many stories of applicants having to redo medical checks since they had expired while in process.
As for timing, the recommended timeline is that you go get the checks when the CIC requests them. However, now that the applications are promised to be completed within 12 months, some people have submitted them upfront. Since the medical checks are good for one year, they theoretically will still be valid by the time they get to reviewing your file. Under the old system, there were many stories of applicants having to redo medical checks since they had expired while in process.