A DANGEROUS race is being run between medical testing and civil liberties in the United States.

So far, civil liberties thinking has lagged behind, unable to resolve the questions that scientists pose as they brandish techniques that threaten to invade the privacy not just of our lives but of our bodies -- and turn some healthy, moral and intelligent people into pariahs in the American workplace.

Already, we are familiar with tests that purport to determine such things as our truthfulness and our use of drugs. We have yet to resolve rights problems in those areas, even as we move into a future in which we will have to deal with dilemmas such as:

Should you be denied a job because you'll probably get cancer in 20 years?

Should you be passed over for a key promotion because you smoke?

Is it anybody's business but your own how many hamburgers you eat in a week?

Medical testing for the benefit of someone besides ourselves has become a norm in this country. The only question is how far the government and employers will be allowed to go.

Already:

Twenty million Americans have been urged by the U.S. Public Health Service to have their blood tested for the AIDS virus.

All 2.8 million federal employees and millions more federal contract workers should be required to have their urine tested for drug use, according to the President's Commission on Organized Crime.

All 182,000 Americans with security clearances should be subject to mandatory lie-detector test, according to a White House national security directive last November that was modified only after Secretary of State George Shultz threatened to resign over the issue.

Within 10 years, between 2,000 and 3,000 genetic markers will be identified that could lead to predictive tests for thousands of illnesses, from stroke to heart attack to cancer to Alzheimer's disease.

The problem is that serious people seem to have a remarkable ability to ignore civil liberties questions when it comes to medical problems.

"Everyone detected with AIDS should be tattooed in the upper forearm, to protect common-needle users, and on the buttocks, to prevent the victimization of other homosexuals," William F. Buckley Jr., editor of the National Review, has written in The New York Times. "The AIDS tattoo is designed for private protection. And the whole point of this is that we are not talking about a kidding matter."

The use of medical tests for social purposes is nothing new in this country. Their first massive use was in 1892 when tuberculin tests were widely administered to stop a Philadelphia epidemic.

They become a civil-liberties issue when they are forced on us, or when they cause us to incriminate ourselves, lose our privacy or change our behavior.

In America, government can exert considerable pressure on individuals to take medical tests. It can test you for something as personal as syphilis before allowing you to marry, for example. It tests your eyes before it grants the privilege of a driver's license. Infants are required to be tested for the readily treated genetic disorder phenylketonuria (PKU). Children are required to be tested for everything from intelligence to achievement to communicable diseases in order to be allowed to go to school at the same time that their parents are required by law to have them in school. Of course, if medical data are used to invoke quarantine laws, then kids have to stay home, like some children with AIDS.

But it's private employers seeking to maximize profits by minimizing personnel problems who worry the growing number of scientists and ethicists who have studied the social impact of the technology.

"Draconian measures" that would force employes to "undergo invasions of privacy which are almost unheard of in a free society" is what a federal judge has labeled a proposed Potomac Electric Power Co. drug-testing plan, in temporarily barring it from being implemented. Under the plan, employes would have been fired for refusing to submit to a search of themselves or their possessions or to provide urine or blood samples, or if they reacted positively to a single, unconfirmed test. (The Centers for Disease control found laboratory accuracy rates as low as 33 percent in a 1985 study.)

An unlikely example of the discomfort caused by such tests involves Rodney Smith, deputy executive director of the presidential commission that recommended drug testing for all federal employes. He reacted with outrage when he was confronted at a subcommittee hearing several months ago with a small plastic jar.

"I think a specimen is worth 1,000 oaths," admonished Rep. Gary L. Ackerman (D-N.Y.), chairman of the Post Office and Civil Service human resources subcommittee. He then asked Smith to "go into the men's room" to produce a urine sample "under the direct supervision" of a staff member, saying that a lab was waiting to test the sample for signs of drug use.

The fact that individuals react passionately to such invasions of privacy does not mean that society has no business addressing social problems with medical tests, observes Victor Schachter, the senior partner of a San Francisco law firm that specializes in representing management in such employment law disputes.

"People who are sufficiently impaired by drugs that it impairs the performance of their job and the safety of others -- these are legitimate employer interests," says Schachter. And bioethicists acknowledge that society has a serious stake in insuring that the likes of nuclear-reactor operators, airline pilots and school-bus drivers are drug-free, because they have the lives of third parties in their hands.

The problem, Schachter acknowledges, is that almost all drug tests on Monday morning can pick up drug-taking that occured in the privacy of one's own home on Saturday night. "I can hear a lot of Texans who are staunchly antidrug getting pretty irate about the idea of somebody intruding into their personal lives," says Thomas H. Murray, a bioethicist at the University of Texas medical branch in Galveston. "If every citizen is under suspicion and you do all sorts of intrusive things into their private lives, you instill a police state mentality," Levine adds.

And if job performance and safety are the rational for testing for illegal substances, why not test for legal ones? "How can you possibly justify going after marijuana, but not alcohol?" asks Gilbert Omenn, dean of the school of public health at the University of Washington, and a former deputy science advisor to President Carter. "Alcohol is a much more prevalent problem. The accident rate is higher both on the job and off."

Indeed. And if you have drug testing, says Robert F. Murray Jr., chief of medical genetics at Howard University, "then genetic testing is the next step."

It is genetic testing that so unnerves the legal and ethical scholars.

"There is no doubt that we will be able to mark the carriers of most genetic disorders in the next five or 10 years," says James E. Bowman, a geneticist and pathologist at the University of Chicago. "The average person is a carrier of six to eight genetic diseases but doesn't know it. I hate to be futuristic. I don't want to make a sensation. But with the mapping of the human genome the complete set of human chromosomes , the possibilities are almost unlimited. When these tests are developed I think they will be used."

Geneticists are confident tests soon will be able to reveal that a person is on the road to a full-scale case of multiple sclerosis, manic depression, Alzheimer's disease or schizophrenia. Someday, they think, they will be able to tell a patient that because of his genetic makeup, he has a very high probability of developing cancer or a heart condition in a certain amount of time.

"A heart attack is not a simple genetic disease. But within this generation, we will have a genetic test for many of the causes," says Haig H. Kazazian Jr., who, at Johns Hopkins, heads what is probably the largest center in the country for diagnosis of human genetic disease through DNA studies.

Experts in genetics strongly caution against hyperventilated conclusions concerning the technology. Nonetheless: "Since genetic screening enables us to differentiate among and possibly discriminate against individuals, its potential for abuse is great ," wrote University of Texas bioethicist Murray in MIT's Technology Review last year. "The results of genetic screening could conceivably be used to justify denial of employment, job transfers, or even dismissal."

But return to the person whose hypothetical genetic test indicates he has a high probability of cancer in 20 years:

"State and federal laws place few restrictions on how medical exams or testing procedures may be conducted in the workplace and what the employer does with the resulting information," reports the 1983 U.S. Office of Technology Assessment report on genetic testing in the workplace. For discrimination-against-the-handicapped laws to be applicable, it concludes, two legal questions must be settled: Whether a particular genetic makeup is a handicap, and if it is, whether it is unreasonable to discriminate against it.

The heavy smoker denied a promotion because of a high genetic probability for lung cancer has little recourse, some legal scholars feel. The employe could mitigate the danger to his health, so this thinking goes, and an employer has a legitimate interest in the health of top-level executives.

So then, ethicists ask, what about the cholesterol-laden executive who is genetically prone to a heart? That is when the question becomes whether it is anybody's business but your own how many hamburgers you eat in a week

"The better the information that is available about a person's risk of disease and death, the better it is for the insurance business," says Rob Bier, Washington spokesman for the two major trade associations of the health and life insurance industries.

Nothing reflects the clash between the society's rights and those of the individual more than ELIZA -- the test for the AIDS antibody.

"The humanitarian response to AIDS is exactly the opposite of a humanitarian response to sexism or racism . . . . The benefit of the doubt should not be given to the victims of AIDS," wrote Richard Restak, author of "The Brain," in The Washington Post last fall. "This is not a civil rights issue, this is a medical issue. The AIDS virus has no 'civil rights.'"

"The real problem with the traditional quarantine is that the statutes were written before we had a full-blown constitution," says Thomas B. Stoddard, executive director of Lambda Legal Defense and Education Fund, Inc., a gay and lesbian group. "Most constitutional law is very young; it's 20, 30 years old at most -- the Warren Court. See, that's what's interesting. AIDS -- this is the first time when we really look at these laws that have been in place, some, from the turn of the century."

The penalties that have been suggested for those who test positive are so extreme that the overriding civil-liberties issue surrounding the AIDS test is confidentiality. The test itself has been shown to produce numerous false positives -- saying the individual has been exposed to the virus when he has not. It also is not a clear predictor that the individual who has been exposed will get the disease. And the New England Journal of Medicine has editorialized: "The disease has remained confined largely to the high-risk groups. . . . There is no evidence that the disease is spreading to other populations."

Nonetheless, there have been serious proposals that those who test positive to the HTLV-III antibody should not only be tattooed but should be denied the right to marry and have children, indefinitely incarcerated to prevent sexual dissemination and even perpetually quarantined.

Mervyn F. Silverman, former director of health for the city of San Francisco, and Deborah B. Silverman, a psychotherapist, recently listed some of the unanswered rights questions that AIDS testing raises:

"Do insurance companies have rights to the results of routine blood tests and can they require antibody testing on applicants for insurance?

"Does the government have the right of access to the lists of blood donors who test positive for AIDS antibody?

"More specifically, does the military have the right, as claimed, to require blood banks to provide the names of those who donated blood on military bases and tested positive? Already, some individuals diagnosed as having AIDS while in the service are being discharged -- ostensibly not because of their disease but because of the sexual preference that it reveals. . . ."

For all the fears scientists and ethicists express, it is striking how often they volunteer their optimism that the philosophy of civil liberties will keep pace with the technology of testing.

"I don't think society will stand for that," insurance spokesman Bier responds to the suggestion that his industry could misuse genetic tests.

"Fortunately," says geneticist Bowman, "there will be right-to-life people who will fight genetic screening . Without them we might get to the point of a mandated society for the testing of everybody. I think that people have a right to be tested, and a right to an abortion. But if everybody believed that, we might try starting to force people. I think it's good that we're maintaining democratic pluralism."

"It's not just money, but a sense of justice, of a decent community," says bioethicist Murray. " Medical testing is a social call. We should be arguing about it."

Joel Garreau is an editor of Outlook.