I am by no means an expert (you should call and discuss this with your doctor if you are concerned), but I think I've been to enough doctors to answer your question. Assuming you are in the US, HIPAA protects your privacy. You can give the doctor permission to discuss your case or certain aspects of your case with whomever you choose (spouse, landlord, friend). Other than this, they cannot disclose anything about you or your case.
There are exceptions, however. If you are suspected of wanting to cause harm to yourself or others, the doctor can discuss it with your family, police, social worders, or anyone s/he thinks would be able to help you and prevent you from doing harm. Also, the doctor may "hypothetically" discuss your case. Meaning, provided s/he does not mention your name or any other identifying factors, s/he may consult with colleages or studies. I believe in some cases you can "mark a box" that will tell you docotr you do not want to participate in any sutdies even annonymously.
Other than that, if you want more information, your docotr's office should have the HIPAA laws on file, or you could check out the government's webpage for it.
I hope that helps.