Rami 'passes Milan medical'