Almost a third of medicine graduates left Ireland