Spencer Johnson, who left behind a medical career to write short books about life and business, including “Who Moved My Cheese?” — a parable about embracing change that has sold 28 million copies worldwide — died on Monday in San Diego. He was 78.

The cause was complications of pancreatic cancer, said Nancy Casey, his executive assistant.

“Who Moved My Cheese?,” which was published in 1998, was the story — in 94 pages of large type — of two mice, Sniff and Scurry, and two tiny people, Hem and Haw, looking for cheese in a maze. When the cheese supply runs out at Cheese Station C, the mice leave without angst to find more.

But Hem and Haw resist, refusing to accept change. Haw overcomes his anxiety and ventures out of his comfort zone — at first timidly, but then, gradually, with more confidence — in search of a new supply of cheese.

“Before long, he knew why he felt good,” Mr. Johnson wrote about Haw. “He stopped to write again on the wall: ‘When you stop being afraid, you feel good!’”