BEFORE Congress adjourned this year, lawmakers enacted a statute designed to provide guidelines in a difficult area: the rights of handicapped newborn infants to medical treatment. Two years ago, a Downs syndrome child born with a defective esophogus was allowed to starve to death in a Bloomington, Ind., hospital. The case provoked a public debate and caused the Reagan administration to issue first one, then another set of regulations governing treatment for handicapped children in hospitals receiving federal funds. The courts, however, struck down the regulations holding that only Congress could impose such conditions and restrictions.

It was not an easy job for legislators. They had to devise a set of rules that would protect the rights of these infants without mandating treatment that only prolonged hopelessness. Doctors, lawyers, hospitals, lobbyists for the handicapped, budget makers and students of ethics all had views on how the subject, and parents with firsthand knowledge of such tragedy were also heard from. Consensus was difficult to achieve, but a workable compromise was finally reached.

The new statute relies on states, not the federal government, to respond to reports of medical neglect and provides funds for state programs and for parent assistance. Infants disabled with life-threatening conditions must be given nourishment and hydration. Other medically indicated treatment is to be provided unless the infant is chronically and irreversibly comatose, or the treatment would simply prolong dying, or the procedure would be "virtually futile" and inhumane. The law also encourages the establishment of hospital review boards and requires the secretary of health and human services to publish model guidelines for that purpose.

Almost all the groups who participated in devising the final compromise supported it. That includes the American Academy of Pediatrics and the American College of Obstetricians and Gynecologists. The American Medical Association, however, was an important, if solitary opponent. These doctors believe that greater leeway should be given to physicians and parents in making decisions about the life of the child. But the absence of other decision-makers representing both the child and society at large is what has caused trouble in the past. The guidelines just enacted will be reviewed continuously, and the Department of Health and Human Services is required, by October 1987, to report to Congress on their operation. Perhaps, in time, it will be determined that hospital review boards are better final arbiters of these questions than state agencies. But some objective guidance must be provided, for just as we do not leave other life-and-death decisions to families and physicians alone, the society has a responsibility to the child concerned and a communal obligation to provide an orderly mechanism for the protection of his life and rights.