I'm not entirely sure, because medicine is a different kind of undergrad course than anything else, it's not like a JYA. You would need to ask your school directly, because sometimes certain med schools will have exchanges and only recognize credits from only certain universities. Your school will also tell you exactly when you can take the erasmus year. For instance, at Trinity (Ireland) you can do an erasmus year for your 4th year (3rd year for north american students) and only with a specific French university. They might have an exchange with another country, but if so, I can't remember what it is. Erasmus for health science students is a lot more restricted than erasmus for everyone else.