“I don’t think we know how to die,” he said. “We fight tooth and nail to keep that from happening.”

Swangard’s own illness was discovered in early 2013 during a long-overdue check-up. He hadn’t been worried about his health—he was obsessed with fitness, swimming regularly, and seeing a trainer twice a week. But when the doctor pressed on Swangard’s stomach, he felt a mango-sized mass.

He had a visceral feeling, he said, that “something bad was happening.”

Within a week, a surgeon found a neuroendocrine tumor in the pancreas and metastasis in the liver. It was the same cancer that took Steve Jobs’ life—one that doesn’t generally respond to chemotherapy or radiation. “My fears became real,” he said.

The doctors told him they believed they got all the cancerous cells. But Swangard was tormented by questions: Am I going to be alive in a year? Is my cancer going to come back?

“I wasn’t sleeping, I wasn’t exercising, I was marinating in my own sadness and fear of what this all meant,” he said. “I thought, ‘This is going to kill me.’”

Since his diagnosis, Swangard said he has had a greater understanding of his patients’ struggles. Occasionally, he holds their hands and tells them he has been where they are.

Earlier this year, a physician friend asked him if he’d be willing to join the California case. Swangard didn’t hesitate. He didn’t go into medicine to help dying people linger and wants to help change that approach—for his patients and for himself.

When he dies, Swangard said, he wants to be surrounded by people he loves. He doesn’t want to be in a drug-induced haze, nor consumed by worry about what’s next. He wants to be able to say goodbye.

“It is a little bit of a blessing to know how I might die,” he said. “I don’t think a lot of patients have insight into what to expect.”

These days, he wears a Buddhist prayer bracelet, a reminder to focus on the present. He cut his work hours, swims as often as he can and meditates regularly. At home, he stares out at the ocean, often watching dolphins pass by. He makes every effort to stay calm and healthy.

He is in remission but he knows that what happens with the cancer is largely outside his control. An MRI last year showed a small lesion in his liver, which doctors are watching closely.

“It’s this big unknown,” he said.

Robert Liner, a fellow plaintiff who only recently met Swangard, lives with the same uncertainty.

On his 69th birthday in May 2013, the retired obstetrician had a bad cough. He felt tired and short of breath. His wife took him to the hospital, where doctors discovered malignant masses on his kidneys—advanced-stage lymphoma.

After radiation and chemotherapy, the tumors shrank. He also is in remission. But if the cancer comes back, he said, “the prospects are not going to be good.”

He often thinks of a former patient, a 25-year-old woman with metastatic ovarian cancer. She wanted to die while she still was able to communicate. Liner wasn’t able to help ease her death because the law wouldn’t let him. “I felt like I’d failed her,” he said.