“I advised him to stop smoking,” Dr. Frankland told the medical journal The BMJ. “Three and a half months later he was dramatically better, and because he was so grateful, I was invited back to Baghdad with my family to have lunch with him.”

Dr. Frankland’s research included rare cases. One involved a patient who suspected that she was allergic to her partner’s semen. She reported, however, that she had no allergic reaction from sexual encounters with other men, in effect providing Dr. Frankland with data from a control group, as is often done in scientific experiments. But she advised him, “Those controls were not done for your benefit, only mine.”

Alfred William Frankland was born in Sussex, England, on March 19, 1912, one of twin boys of Henry and Alice Rose (West) Frankland. His mother was a musician. His father, a vicar in the Church of England, moved the family to Britain’s Lake District, where the boys grew up surrounded by farms. It was there that William discovered that he suffered from hay fever.

He attended St. Bees School in West Cumberland before studying medicine at Queen’s College, Oxford, and St. Mary’s Hospital Medical School, now part of Imperial College London. After finishing his studies, he enlisted in the Royal Army Medical Corps three days before the outbreak of World War II, anticipating that doctors would be needed. He was later sent to Singapore, where he arrived just days before the Japanese attack on Pearl Harbor.

By chance Dr. Frankland was sent to work in Tanglin Military Hospital in Singapore rather than the newly opened Alexandra Military Hospital there — thus eluding almost certain death. The Alexandra hospital was soon overrun by Japanese troops, who massacred the doctors, nurses and patients there. It was one of several times that luck kept him alive.

Dr. Frankland was taken prisoner on Feb. 15, 1942, and spent the remainder of the war in Japanese prison camps, underfed and overworked, treating the other men.

On his return to Britain, he took a post at St. Mary’s, where he worked with Alexander Fleming, who won the 1945 Nobel Prize in Physiology or Medicine for the discovery of penicillin.