Dr. Joyce Wallace, a Manhattan internist who treated prostitutes for AIDS, occasionally brought streetwalkers home with her when they had nowhere else to go.
Once, when her son, Ari Kahn, was about 12, Dr. Wallace, who had to get to the hospital to see her patients, left him at home with a prostitute who was H.I.V. positive and going through heroin withdrawal. It wasn’t clear who was to take care of whom. Ari ended up making pizza for them both. When Dr. Wallace returned, she took the prostitute to a drug-treatment center; the woman eventually overcame her addiction and got a job at a research foundation that Dr. Wallace had started.
“On one hand, it was grossly irresponsible,” Mr. Kahn said of the incident in an interview. On the other hand, he said, it was typical of his mother’s extraordinary capacity for empathy, and she helped a lot of people.
Dr. Wallace died on Oct. 14 at a hospital in Manhattan. She was 79.
Mr. Kahn said the cause was a heart attack.
Dr. Wallace was not a conventional mother. Nor was she a conventional doctor. Among the first to report the lethal disease that became known as AIDS, she tried to stop its spread among thousands of New York City prostitutes.
The underbelly of the city was her clinic. She drove around in a white Dodge van offering tests for H.I.V., the virus that causes AIDS, and distributing condoms, as well as running a needle-exchange program and trying to coax prostitutes off the streets and into shelters.
“They are our responsibility,” she told The New Yorker in 1993. “These are not throwaway women.”
A writer for The New Yorker, Barbara Goldsmith, followed her for several months and produced a graphic 17-page narrative of Dr. Wallace’s encounters with streetwalkers, many of them homeless and many addicted to drugs. At the time, AIDS was the leading cause of death in the city among women from 20 to 29.
“Joyce Wallace tends to be viewed as an eccentric zealot who deals with an illegal, transient and frequently despised group of women,” Ms. Goldsmith wrote.
“As in the early days of the AIDS crisis, when the establishment failed to respond,” she added, “the burden of activism has fallen not to the most skilled or organized but to those who care.”
After the New Yorker article appeared, the singer and actress Bette Midler bought the rights to Dr. Wallace’s life story, according to Dr. Wallace’s daughter, Julia Query. Ms. Midler wanted to make and star in a movie about Dr. Wallace, Ms. Query said, but the movie was never made.
Dr. Wallace started practicing medicine in the late 1970s in Greenwich Village, where many of her patients were gay men. In the spring of 1981, before AIDS was recognized, she was among a handful of doctors in New York and San Francisco who reported finding Kaposi’s sarcoma, a rare and often rapidly fatal form of cancer, among their patients.
On July 3, 1981, she was among the researchers who published one of the first reports that linked Kaposi’s sarcoma with immunodeficient gay men. The disease would become a telltale sign of H.I.V.
Dr. Wallace was especially interested in how AIDS affected women. Once a test was developed, she started offering prostitutes $20 or a McDonald’s coupon to allow her to draw their blood.
Her studies found high correlations between H.I.V. and intravenous drug use. She planned to start a drop-in center on the Lower East Side to provide streetwalkers with a hot shower, clean clothes, food and, if they were drug-free, transitional housing.
“I want to offer the girls a place where they can start to remake their lives,” she told The New York Times in 1991 as she renovated a former brothel for that purpose.
Local residents rose up in anger and blocked that proposal, just as other residents would block her similar proposals in the West Village and in Washington Heights — even as Dr. Wallace received awards for her work and grants to keep her projects going. In June 1994, Mirabella magazine named Dr. Wallace one of its “100 Fearless Women” for her determination to help prostitutes despite the neighbors’ objections.
Prevented from setting up these homes, Dr. Wallace was left to work out of a mobile van, from which she offered a range of social services. Her goal, she told The Times in 1992, was not to stop transactions between streetwalkers and their clients but to make them safer.
To that end, she also started the Treatment Readiness Program, an alternative sentencing project at Manhattan Criminal Court in which prostitutes were given condoms and literature on AIDS prevention and drug treatment instead of being sent to jail.
Joyce Irene Malakoff was born on Nov. 25, 1940, in Philadelphia but grew up in Queens. Her father, Samuel Malakoff, was a teacher at a vocational high school. Her mother, Henrietta Yetta (Hameroff) Malakoff, was a speech therapist.
Joyce was 12 in 1954 when one of her younger brothers, Lee, who was 8, fell ill with leukemia and died the next year. That trauma helped motivate her to become a doctor.
She graduated from Queens College in 1961 with a degree in history, then studied pre-med at Columbia University’s School of General Studies. She earned her medical degree at the State University of New York Health Science Center in Brooklyn, known as Downstate, in 1968.
A brief first marriage in the 1950s ended in annulment. Her marriage in 1964 to Lance Wallace, a researcher, ended in divorce in 1973. She married Arthur Kahn, a stockbroker, in 1979; they separated in 1983 and later divorced.
In addition to her son and daughter, Dr. Wallace is survived by four grandchildren.
She completed her internship and residencies in New York City and on Long Island. With a fantasy of becoming a country doctor, she set up a private practice in North Conway, N.H., in 1973, but she lasted barely a year before she decided she was not suited to small-town life and moved to Manhattan, where she established her practice in the Village.
She founded the Foundation for Research on Sexually Transmitted Diseases in 1982 and served as its president and then executive and medical director until 2003. She held academic appointments at the Mount Sinai School of Medicine, New York Medical College and the State University of New York at Stony Brook.
Most of the awards Dr. Wallace received recognized her grit and determination against steep odds. One was the Brooke Russell Astor Award, a $10,000 gift given to an unsung hero who is “relentless” in improving the quality of life in New York City.