OxyContin pills are arranged for a photo at a pharmacy in Montpelier, Vt., in 2013. (Toby Talbot/Associated Press)

The writer is a family physician and an executive producer of “Dr. Feelgood,” a documentary film about opioid prescribing that premiered this month at the L.A. Film Festival.

Once a month, she waits patiently in my exam room, despite the fact that I’m almost always running an hour late in my hectic community health center practice. She is 86 and suffers from mild dementia, diabetes, arthritis and an arrhythmia for which she takes warfarin, a powerful blood thinner. At every visit, she comes to me with some sort of homemade gift — a scarf, a tin of cookies, a beaded keychain — and also with a request for a refill of her opioid painkiller prescription.

My patient’s request makes me enormously uncomfortable. She is old and frail, and if she were to stumble and fall from the sedating effects of her painkillers, her blood thinners could cause a catastrophic brain bleed. Prescribing her chronic opiates for her arthritic knees is not something I want to do.

But when she came to me a year ago, she was already on this regimen, and she and her daughter tell me at every visit that it is the only way she can function. Without the medications, she sits in her rocking chair and cries all day. With the pills, she can cook, garden and play with her grandchildren.

Over the past 20 years, the United States has seen an unprecedented rise in opioid painkiller prescriptions. In the mid-1990s, pharmaceutical companies and a few pain specialists co-opted a small scientific study that purportedly demonstrated the safety of long-term opioid therapy, claiming a low risk of addiction. Drug companies such as Purdue Pharma, which introduced OxyContin in 1996, began an aggressive marketing campaign to promote opioid painkillers throughout the country. By 2012, doctors were writing 259 million opiate prescriptions a year, enough for every adult in the United States to have an entire bottle of pills.

The result has been an astronomical rise in prescription overdose deaths, with opioid painkillers killing more Americans each year than HIV or homicide. Medical societies and popular media are recognizing this catastrophe, and so the pendulum is swinging rapidly in the opposite direction. Most doctors are frustrated by their experiences dealing with patients on opiates, and many are afraid to prescribe opioid medications at all.

In the world of opiate prescribing, some cases are black and white. On the one hand, I have patients who clearly require and benefit from narcotic painkillers: patients with newly fractured bones, recent surgeries or metastatic cancer. On the other side of the spectrum are those to whom almost nobody with a medical license would prescribe opiates: individuals with long records of doctor shopping, positive urine toxicology screens for illicit substances, persistent requests for inappropriate and early refills, drug addiction and no objective documentation of physical pain conditions.

But just as in much of medicine, the vast majority of patients do not align into black-and-white categories but instead fall squarely within the gray. Some have been on steady doses of chronic opiates for years, sometimes decades. They ask for refills month after month, and I grant or deny these wishes based on the unscientific combination of incomplete data and intuition.

We know from years of research that, on a population level, opioid painkillers are not an appropriate choice for chronic pain. They come with a host of side effects ranging from constipation to depression to respiratory suppression and death. And, perhaps most important, in large trials, they have not been shown to decrease chronic pain or improve people’s ability to function with that pain. Meanwhile, patients often need escalating doses, putting them at ever-greater risk of overdose.

As a physician, however, I find it hard to argue with what my patient tells me just because it is in conflict with the evidence. When patients plead with me that their narcotic painkillers allow them to function, that they couldn’t survive or handle the pain without them, that they’ve been at the same stable dose for a decade and it’s the only thing that treats their pain — how can I turn them away? I took an oath to help alleviate suffering.

But I also took an oath to do no harm and, as doctors, we know all too well that we are the drivers of the prescription drug overdose epidemic, which now claims 46 lives a day in the United States. Every time I write a prescription for a narcotic painkiller, I am filled with inner conflict and self-doubt. I want to help the person in front of me — the patient who is suffering — but there is a sizable chance that the bottle of pills I prescribe will be responsible for landing that patient in the emergency room or the morgue.

The reason this problem continues to grow is that we simply do not have a good answer for chronic pain. Every day I try to persuade my chronic pain patients to use a combination of alternative treatments — non-narcotic painkillers such as Tylenol and Advil, physical therapy, acupuncture, massage and more. These modalities can offer enormous benefits, but despite them, 1 in 3 Americans still suffers from chronic pain, and we don’t have any safe, effective way to treat them. While opioid painkillers are a terrible option, many patients see them as their only option.

What’s the solution? Unfortunately, I don’t have one. The popular media and even the medical profession would love to uncover a clear villain in this story. But like most of medicine, there aren’t any easy answers, because human experience isn’t black and white, it’s gray. My 86-year-old patient and I will just need to keep figuring this out together, one visit at a time.