You shouldn't do the medical too early, since it only has a 12 month validity date and you don't want it to expire during PR processing. Considering it may take a while to prepare the app after your marriage, the medical should be done as close as possible to when you will actually submit the application.