The laws of which diseases and STDs are reportable will vary from country to country and from state to state. In the states and cities I know of syphilis is a reportable disease that must be reports to public health. This information is strictly confidential. A medical provider might be legally required to report a case of syphilis to the health department within 24 hours. This is done so certain diseases can be monitored. It's suppose to reduce the chance of a disease spreading, and the data is used to service the general public.
If a person has syphilis the health department or medical clinic often have a certificated Health Educator or Counselor available. The Counselor or Health Educator may ask questions about your sexual health. If needed the clinic may provide the option of them contacting a partner of yours. Of course this is an anonymous call.