Diploma is a different level of academic achievement. You are talking about the testamur.
The testamur is conferred upon graduation from the course, and so once you finish medicine you will receive it (your "diploma"). However, you will not be a fully functional practitioner (ie registrable with the state medical board) until you have succesfully completed one year of work in a qualified teaching hospital - your Post-Graduate Year 1 (PGY1).