Some of the modern versions of the oath don't say that.
http://guides.library.jhu.edu/c.php?g=202502&p=1335759
I will respect the privacy of my patients, for their problems are not disclosed to me that the world may know. Most especially must I tread with care in matters of life and death. If it is given me to save a life, all thanks. But it may also be within my power to take a life; this awesome responsibility must be faced with great humbleness and awareness of my own frailty.
The way it was phrased to my by a doctor who spent many years caring for people with terminal illnesses:(from memory)
"Drugs have side effects, some of them have serious side effects. This is acceptable. When someone is dying you treat the pain with whatever dose is needed to treat the pain. Many drugs and painkillers can cause side effects such as damage to the patients internal organs and even death but death can be an acceptable side effect of a treatment for extreme pain. When there is no hope of recovery you treat the pain, you don't refuse to treat extreme pain for fear of side effects."
I'd recommend the The Richard Dimbleby Lecture by Terry Pratchett "Shaking Hands with Death"
Terry Pratchett wanted to die because he had Alzheimer's. As far as I know, Alzheimer's doesn't cause physical pain, so this dodge would not work in euthanasia for Alzheimer's.
Over at Scott Adams' Blog you can find a very fine example of using the 'Rationality Engine' to solve the social problem of assisted dying.