James H. Gallagher, 43, of Havertown, a physician assistant who traded a high-paying computer-consultant career for one helping other victims of malignant brain tumors, died Monday at his home of the cancer.

The Bethlehem, Pa., native earned a bachelor's degree in electrical engineering in 1986 from Cornell University, where he was a member of Sigma Nu fraternity.

In 1988, he moved to Manhattan and took a job as a computer manager with Arthur Andersen L.L.P.

In 1995, Mr. Gallagher was jogging in Avalon, N.J., when he collapsed. "Somebody found me there on the sidewalk," he said in a 2003 Inquirer story. "The next thing I knew, I was being loaded into an ambulance."

Gallagher, then 30, was diagnosed with a brain tumor half the size of a lemon. After surgery, he reassessed his life. He formed a support group for others, and realized he had much to offer newly diagnosed patients.

Mr. Gallagher decided to leave the business world to pursue a career in medicine. Seeking a more peaceful life, he moved to Narberth, where he met his future wife, Lisa Cosentino, and enrolled in the physician-assistant program at Drexel University.

He earned a master of health science certification in 2005 - the year in which he was diagnosed with an aggressive recurrence of his tumor and he married Cosentino.

He continued undaunted. "Jim never gave up," his wife said. "Each time his doctor asked him to rate his quality of life on a scale of one to 10, he always said, '10.' "

Mr. Gallagher worked at St. Catherine Leboure Medical Clinic in Germantown, a hospital for uninsured adults. The patients benefited from his sense of humor, knowledge, personal experience and compassion.

He moved to Havertown two years ago. "He was determined to keep our home happy," his wife said. "I am still finding little rubber pigs, which he believed brought good luck, that he hid all over our house."

In his final hours, friends and family gathered and sang Mr. Gallagher's favorite songs, including "Sweet Caroline" and Irish tunes by the Pogues. "He was comforted by music and the stories we told him," his wife said.

In addition to his wife, Mr. Gallagher is survived by his mother, Anne Marie Gallagher; brothers Edward and Michael; and a sister, Susan Neill.

A Funeral Mass will be said at 10:30 a.m. today at St. Monica Church, 63 Main Ave., Berwyn, where friends may visit after 9:15. Burial will be in SS Peter and Paul Cemetery, Springfield.

Donations may be made to St. Catherine Laboure Medical Clinic, 5838 Germantown Ave., Philadelphia 19144.

Contact staff writer Gayle Ronan Sims at 215-854-4185 or gsims@phillynews.com.