A well-to-do cancer patient is nearing the end of her treatments. During an office visit, she says to her doctor, “I can’t thank you enough for the care you provided.”

Should the doctor simply accept the patient’s gratitude — or gently suggest a way for her to show it: “Perhaps you might consider making a donation?”

More and more these days, development offices at major cancer centers are teaching doctors to seize such opportunities to raise money for the medical center or for their own research.

In an unprecedented survey of more than 400 oncologists at 40 leading cancer centers, nearly half said they had been taught to identify wealthy patients who might be prospective donors. A third had been asked to directly solicit donations — and half of them refused. Three percent had been promised payments if a patient donated.

The study, which was published online Monday in The Journal of Clinical Oncology, was conducted by Dr. Reshma Jagsi, a radiation oncologist and ethicist at the University of Michigan, who had grown concerned about the practice and wanted to know more.