A Doctor of Medicine (MD) was a medical degree and a title awarded to a student at a medical school. An individual who earned an MD could be a physician, a surgeon, or both. Originally from pre-Federation Earth, this degree was assimilated into the Federation educational system in the 22nd century.
Dr. Leonard McCoy found nurses easier to work with than other doctors, remarking that another doctor would "argue every little diagnosis with me." (Star Trek: The Motion Picture)
In the mystery novel Dangerous Ground, the protagonist, Doctor John Rawley, earned his MD upon graduation from Johns Hopkins in the mid-20th century. (TNG: "The Big Goodbye")
The pages seen in the episode were from the mystery novel,
Dangerous Ground, by author Frances Sil Wickware. This novel was published in 1946. Information on MD was from page 12.
Leonard McCoy became an MD by the time he was assigned to the USS Enterprise in 2266. (TOS: "The Man Trap"; Star Trek II: The Wrath of Khan)
In the mid-2270s, Christine Chapel was an MD, a fact noted by Leonard McCoy when he returned to the Enterprise during the V'ger incident. (Star Trek: The Motion Picture)
In 2350, Beverly Crusher graduated from Starfleet Academy with an MD. (TNG: "Conundrum")
In 2365, according to a directory on Starbase 515, several doctors had earned this title and were posted to this base. They were Brian Faul, Sam Freedle, Les Landau, Scott Luhrsen, Robert McCullough, Robert Metoyer, and Adele Simmons. (TNG: "Samaritan Snare")
In 2368, according to files from Melina II, Doctors David Takemura and Rich Thorne had earned this title by this year. (TNG: "Violations")
It was an academic degree, as well, in the 29th century. Some of the bearers of this degree worked at the Temporal Integrity Commission. On the dedication plaque of the USS Relativity, Professor R. Picardo was listed with this degree. (VOY: "Relativity", dedication plaque)