Acquired immune deficiency syndrome (AIDS), which has confounded public health officials as a medical puzzle, has raised an ethical dilemma of equally baffling dimensions.

Government epidemiologists, who study how diseases spread, have been asking AIDS patients about the most intimate details of their private lives: about acts of prostitution, drug abuse and sexual practices.

The more widely they share this and more basic medical data, they said, the faster they may find a way to prevent and cure AIDS. But AIDS patients insist that even their names are extremely sensitive information, and they want a say in how and with whom the information is shared.

Under pressure from AIDS patients and their support groups, officials here and in New York have stopped reporting names and personal identifiers of AIDS patients to the federal Centers for Disease Control in Atlanta. Nearly a dozen other cities with heavy AIDS caseloads appear to be on the verge of following suit.

New York City Health Commissioner David Sencer, representing 11 big-city health departments, is scheduled to meet today with CDC officials in Atlanta to work out a compromise for reporting AIDS cases.

What the issue comes down to, some physicians said, is a trade-off between the privacy of patient information and the efficiency of medical detectives tracking a killer disease.

"The government shows up and asks whether you use drugs, asks whether you've been a prostitute, asks whether you're gay, asks whether you have sex with animals," said Michael Callen, co-founder of Gay Men With AIDS. "We have absolutely no control over the dissemination of this sensitive information."

Some physicians, such as Selma Dritz of the San Francisco public health department, reply, "If we're blinded, more people will die."

Doctors and patients have faced the confidentiality question on such medical problems as venereal disease and abortion, but it is more acute in AIDS research because both doctors and patients stretch its limits.

Researchers say they need unusually detailed patient information because so little is known about the disease's "natural history." AIDS patients--most of whom are male homosexuals, users of street drugs or Haitian immigrants--say that this information is unusually sensitive because it may concern illegal behavior and because known AIDS victims have been shunned and publicly harassed.

Sencer said he expects cities and the CDC to agree on a compromise under which local authorities will share all medical information with the CDC but will identify patients only by initials and birthdates or by a special coding system.

"There's a need for some sort of central, controlled repository for information," Sencer said. "I don't think there's any need for names."

Officials at the CDC, which does nationwide medical surveillance and research, said AIDS patients' fears about confidentiality are groundless but understandable.

"If there were not that fear," Dr. James Allen said, "we would much prefer to get the list [of patient names] ourselves. But there is real concern, and that concern has led to physicians' sometimes being unwilling to report their patients, to the use of pseudonyms, and our feeling is it might be better for us to compromise.

"It clearly is a compromise position, which will make it more difficult to do our work. But if we're not getting reports, we can't do it either."

Allen and Dr. James Curran, who heads the CDC's task force on AIDS, said in a joint interview that the CDC keeps confidential patient records locked up and would not share such records casually.

But they noted that, according to the CDC's notice in the Federal Register, "records may be disclosed to health departments and other public health or cooperative medical authorities in connection with program evaluations and related collaborative efforts to deal more effectively with diseases and conditions of public health significance."

"Obviously," Curran said, "it's a question of trust and judgment."

The problem, both acknowledged, is that CDC does not have the trust of many gay rights groups and some local health officials.

"I wouldn't trust the CDC one moment not to give up information to the FBI, the CIA or the SSA [Social Security Administration]," said Ernest Hardaway, health commissioner for the District of Columbia.

"The CDC is a federal agency," he said. "You and I both know that federal agencies do exchange information, and they will always do that on what they consider to be an appropriate need-to-know basis, and they will not consider that a breach of confidentiality."

His views were echoed by another big-city health commissioner, who asked not to be named and said he has not decided whether to stop sharing patient names.

"There is a basic distrust of the federal government," he said. "I don't blame [AIDS patients]. There was a real question of those patient lists circulating. I think they are absolutely right."

AIDS task forces and patient groups have spent months trying to explain the stakes of confidentiality to federal and local officials.

"You must remember," said Virginia Apuzzo, executive director of the National Gay Task Force, "that in this country we [gays] are illegal in half of the states, we can't serve in the armed forces, we can't raise our own kids in many states and we sure as hell can't teach other people's kids.

"When you tell us you're interested in our Social Security numbers when we know we're not permitted to have security clearances . . . , we would be naive at best not to ask, 'What will you do with that information, can we trust you enough?' "

The trust issue cuts both ways. Physicians and AIDS patients said fears about confidentiality are compromising research data.

"I know a guy," said Callen of Gay Men With AIDS, "who would check into the bathhouses Friday night and not check out until Monday morning. In conversations with us, we found he probably had 5,000 sex partners in his life. He told [government researchers] he'd had only two. He said to us, 'You think I'm going to tell them I was a slut? I'll go to my grave first.' "

"People are lying," Callen said. "There are reports, for instance, of gay men who are celibate who are developing AIDS, which is ludicrous."

Dr. Joseph Sonnabend, co-author of a paper on confidentiality and AIDS, agreed: "They are asking questions that people have every reason to lie about."

In New York City, which has nearly half of all known AIDS cases nationwide, a group of lawyers and researchers has drawn up a confidentiality document that it would like to see signed each time an AIDS patient gives information to the city government.

The agreement guarantees that personal identifying information, such as name, address and Social Security number, will never be released without the patient's written consent, but that anonymous social and medical data may be freely shared for scientific research.

"We're aware of the need for research and tracking AIDS patients," said Tim Sweeney, an attorney with the Lambda Legal Defense and Education Fund, "but we also have to be very, very careful."

Many scientists and public health officials, even those who sympathize with AIDS patients' fears, are reluctant to give them veto power over sharing research data.

"If we at the local level can't get the names, then we are really impeded in our epidemiologic work," said Dr. Mervyn Silverman, San Francisco's health director. "It's basic medical detective work, which gets harder and harder to do when you use codes and numbers and so forth."

What epidemiologists do, Silverman said, "is basically see what is in common in the spread of this disease. If you get enough case histories, something will come out that will help us understand it. We want to know who's getting it, what have been their activities and therefore how is it spread."

Though patient identifiers probably will never be removed from lists used by local health authorities, there is far more agreement that a national list is unnecessary.

"I think maybe the concerns of confidentiality now, given the kinds of hysteria and panic going on among the general public , may outweigh the problem of epidemiology," Curran said. "That's a trade-off we may be able to live with."