Yes I'm fairly certain that it is 3 times and then if you fail those 3 times you have to take a refresher and can then test another 3 times. At which point if you fail those 3 you would have to start at the very beginning again.
As for medic I'm not sure never asked, but I assume it would be around the same.