@Tbeginner,
Yes, if he pricked himself with the syringe that he used to take the sample, that would be a problem. I find it a little hard to believe that a medical professional would do that.
To spread HIV, you need to come into contact with an infected persons blood. If you didn't come into contact with his blood, then there is no risk. I also am pretty sure that medical professional are tested themselves... the chance that he was infected is pretty low.
I would be troubled if a medical professional didn't follow safety protocol. I still think the risk of you contracting HIV from this is very low.