In the past three years, 27 percent of physicians reported being sexually harassed by their patients and 7 percent have been sexually harassed by medical personnel or administrators, according to a report by Medscape, the medical information website for clinicians.

"You have to be tactful in not offending your patient but quickly get out of the situation and get rid of that patient, because they could accuse you of harassment," said a male physician who responded to the online survey.

According to the survey, 17 percent of physicians had encountered a patient acting in what they considered to be an overtly sexual manner, 9 percent had been asked out on a date by a patient, and 7 percent said a patient tried to touch, grope, or rub against them.

"A patient made a comment that he was going to grab my breasts if I caused pain to him while removing his nasal packing," a female physician said in the survey.

Cases of clinicians sexually harassing or even molesting patients are more likely to make headlines — consider the case of Larry Nassar, the physician convicted of abusing young gymnasts whom he treated. The Medscape survey found far less serious behavior — after all, physicians rarely are as vulnerable as patients may be — but does shine a light on a difficult workplace situation, especially for women clinicians.

Female physicians are more likely to be sexually harassed than male physicians — 32 percent of women responding to the survey, compared to 23 percent of their male counterparts.

"I had a patient who continually had the need to expose his genitalia to myself and female staff members," said one female physician. "He tried to be intimidating in that he would attempt to link the exposure to a medical problem, when there never was one."

Female physicians are also more likely to tell the patient to stop when behaving inappropriately — 62 percent said they called a halt to the behavior, compared to 39 percent of males. Male physicians were more likely to make sure that they were no longer alone with the patient.

"A patient took off her shirt without being instructed to do so," said a male physician. "I told her that was inappropriate and then had a female staff member come into the room with the patient."

The specialties most likely to experience harassment include dermatology (46 percent), emergency medicine (43 percent), and plastic surgery (41 percent).

Obstetricians, gynecologists, pediatricians, pathologists, and radiologists are the least likely to experience sexual harassment.

The report included 6,235 respondents across more than 29 specialties. Among those surveyed, 3,711 were physicians, and the rest were residents, nurses, nurse practitioners and physician assistants.