Despite being part of the original Hippocratic oath, doctor-patient confidentiality is a relatively new addition to Anglo-American law. The relevant part of the traditional text reads:

Whatever, in the course of my practice, I may see or hear (even when not invited), whatever I may happen to obtain knowledge of, if it be not proper to repeat it, I will keep sacred and secret within my own breast.

It seems that the legal privilege to keep a patient’s secrets was granted under Roman law and, in turn, in French civil law (in fact, it seems to have been a duty) — but never made it into Anglo-American common law as created by the judiciary. It took state legislatures, beginning with New York in 1828, to add new statutory protection granting the privilege and putting physicians on a similar footing to attorneys. (See John Frelinghuysen Hageman’s 1889 treatise, Privileged Communications as a Branch of Legal Evidence 114-15; 2 Int. L. J. 114 1892-1893; and 10 Alb. L. Rev. 60 1940-1941.)

Despite the slow legal uptake of this form of privacy, public sentiment clearly expected doctors to keep secrets:

The physician who has taken the usual oath of Hippocrates has sworn to keep such secrets inviolate, and that physician in an American State, where the privilege has not been extended by statute, who should disclose the secrets of his patient would encounter public odium and social ostracism, so universal is the public sentiment against any disclosures by a physician or surgeon of the professional secrets of his patients.  (Clark Bell, “Privileged Communications,” 2 Int. L. J. 114 1892-1893)

By 1889, 18 states and territories had conferred this privilege on the medical profession.