Thomas Patrick Storey, 62, the doctor for thousands of Philadelphians over the years in the city’s neighborhood health centers, died Thursday, Dec. 31, from complications of cancer at the Hospital of the University of Pennsylvania.

Dr. Storey, an internist, spent his career working in primary medical care for the Philadelphia Department of Public Health and was director of ambulatory health services. He was passionate about equity in access to health care, his family said.

In the summer, he was diagnosed with an aggressive form of cancer that did not respond to treatment, but he continued to serve in his role at work. He became acutely ill just before Christmas.

“It happened so fast. The children and I never got a chance to say goodbye until he needed machines to keep him alive,” said his wife, Joanne Connaughton Storey, who also is a physician. Her husband hadn’t yet told many colleagues of his diagnosis because he did not want to be a distraction during the COVID-19 crisis, she said.

Philadelphia Health Commissioner Thomas Farley praised Dr. Storey’s commitment to serving those in need. “Many thousands of people in Philadelphia — even those who may not have known his name — received first-class medical care because of his efforts,” Farley said in a New Year’s email to employees.

At the health department, Dr. Storey directed a division with more than 500 employees and made it a point to learn the names of the staff. Under his leadership, ambulatory health expanded the primary care services it offered and neighborhood centers were renovated. said Cheryl L. Kramer, an administrator who worked closely with him.

In addition to being a skilled clinician, Dr. Storey was adept at navigating the business side of health care, she said. “What I will miss most is his genuine honesty and willingness to help others,” Kramer said. “I am sad we lost such a good man but am grateful for all he taught me and how he touched us all.”

Dr. Storey was born in 1958 in Baltimore to Patrick and Mary Storey. His father was also a physician.

He earned a bachelor’s degree from Harvard College in 1980 and graduated from the University of Pennsylvania School of Medicine in 1985, his family said. He trained in internal medicine at the University of Rochester, where he met his future wife, who was starting the same residency on the same day.

She remembers him joking around in the elevator about getting off on the wrong floor and running away to do something fun. “He was funny, with a real Irish sense of humor. Very dry, ironic,” she said.

Dr. Storey was passionate about Philadelphia — he graduated from Conestoga High School in Berwyn — and made it plain that they should move to the city after the residency ended. It was not a hard sell.

While working for the city, Dr. Storey earned a master’s degree in public health from Johns Hopkins University in 1993. He never entertained leaving the public health field, his wife said.

“He had a strong inner compass,” she said.

He also loved all Philadelphia sports teams, especially the Phillies, and was thrilled to see them win the World Series when he was a young man and then enjoy another Series victory with his children. Dr. Storey loved gardening and the weather and was a music lover who compiled playlists for every mood, season and occasion.

He had at least 5,000 songs on his smartphone. Collections of songs archived over the years amounted to a kind of autobiography, as did the sequential volumes of photo albums he curated.

“He documented his life through time, chapter by chapter,” Joanne Storey said.

In addition to his wife, Dr. Storey is survived by his children, Kathleen (Katie) Marie Storey, Eileen Patricia Storey, and Patrick Connaughton Storey, and three sisters.

His family said Dr. Storey loved to share his enthusiasms — Philadelphia, baseball, music, coffee, snow, holidays — with them, the people he loved most in this world. His home decorations for the holidays and occasions such as birthdays were epic, they said.

“He, together with our mom, taught us to cherish each other, to bond over how we are similar and to celebrate how we are different. That deep connectedness and love gives us strength now when we need it most,” Katie, Eileen, and Patrick said in a joint statement.

Donations to benefit the city’s health centers may be made in his honor to the Dr. Thomas Storey Memorial Fund at the Mayor’s Fund for Philadelphia. Checks can be mailed to the Mayor’s Fund for Philadelphia, attention Dr. Thomas Storey Memorial Fund, City Hall 267, Philadelphia, Pa. 19107.

The family plans to hold a memorial service for Dr. Storey at a later date.