So the thing is that your medicals are valid for one year from the date of exam. There is number that the IOM center provides and it's known as the UMI number. You can also go to your local IOM center and get a copy of your E Medical records and also attach that in your application. You should apply for study permit extension as soon as you get your new passport as it can take several months (2-3 almost). Then after your study permit has been extended then you will need to apply for a TRV as well but all this will be issued so don't worry about that. Last but not the least, even though your study permit expires in Jan 2020, and suppose your study permit application is still in process and get no response before that, you don't need to worry since your application is bridged in.
Hopefully this helps....