AN ADMINISTRATIVE law judge ruled last week that the American Medical Association and other medical societies cannot use their codes of ethics to prevent doctors from advertising, soliciting business or signing particular kinds of agreements to provide health-care services. If his ruling is sustained on appeal, as seems likely, the doctors will join the nation's lawyers in the arena called competition. That is as it should be. The time has come to end the era in which organizations of professionals used their power to restrict the economic freedom of their members.

This decision won't produce an immediate outburst of medical advertising. The judge's decision can be appealed -- and the AMA says it will be -- to the Federal Trade Commission and, thereafter, to the courts. If its appeals are denied, the AMA says it may seek legislation from Congress to alter the decision. It is particularly angry about the provision requiring it to get advance approval from the FTC for any revised code of ethics.

Except for that provision, it is difficult to comprehend the dismay the AMA, and doctors in general, have expressed at the judge's ruling. Every professional code of ethics that has anti-competitive aspects has been suspect since the Supreme Court struck down the legal profession's prohibitions against advertising and fixed fees. The bans on advertising by dentists, for example, fell some time ago. The judge in this case devoted scores of pages to documentation of his finding that the medical code of ethics has been used to restrict competition and injure the public by fixing fees and limiting the kinds of health care delivery systems that can be in use.

If what has happened to the lawyers and dentists is any guide to what will happen to the doctors, the special beneficiary of this decision will be the young or innovative physician. Such a physician will be free to build a practice simply by soliciting patients, or by offering a "package" of medical services at some fixed fee and using advertising to sell the public on the merits of what is offered.

In the legal profession, for example, clinics specializing in routine services have blossomed since the Supreme Court cleared the way for them to advertise. And the prices of routine legal services, such as drawing a simple will, closing a real-estate deal or handling an uncontested divorce, have been reduced sharply. Something comparable could happen with such routine medical procedures as shots and vaccinations.

More likely, however, most of the medical profession will follow the path of most of the lawyers who don't advertise because they don't need or don't want the kind of business that advertising and price cutting attract. Since most doctors, around here at least, seem to have about as many patients as they can handle, they may have little use for devices to attract new patients. In addition, few patients are interested in price-shopping for a doctor; insurance covers much of the fee, anyway. That's not true of lawyers, whose clients are quite aware of and often distressed by their fees.

In all of these professions, organizations like the AMA should concern themselves primarily with eliminating misleading or deceptive advertising and maintaining high standards. There is sufficient leeway, in the judge's ruling in this case (just as there was in the Supreme Court's decision concerning lawyers), to permit professional organizations to do both. It simply means doctors will have to find ways to distinguish between legitimate and deceptive advertising and will have to maintain standards without automatically barring financial practices they think might lead to lower quality care. That's what they should have been doing all along, instead of using codes of ethics to discourage innovative doctors from trying new economic arrangements.