Or, if you told him about your hormones... he could do things like, ohh, i dunno, switching your method of delivery to something else that is easier on the liver? (are you on pills now?)
Why hide stuff from your doctor? They can't go around telling everyone (there are plenty of laws to protect against that)... the only thing it does is keep them from being able to treat you.
If you are afraid the doctor won't be accepting of trans people, go and find one that will.