The government indicated yesterday for the first time that some medical procedures may be so costly -- and their benefits so limited -- that it will not pay for them.

Until now, the decision to pay for a new treatment has been based solely on medical effectiveness. But yesterday, as she announced a shift in the way her department will deal with heart transplants under the Medicare program, Health and Human Services Secretary Patricia Roberts Harris said that a variety of "medical, social, economic and ethical consequences" will be taken into account.

And she predicted that this new policy would be applied in the 1980s to many new medical procedures, including transplantation of lungs and livers and implantation of artificial hearts.

"I don't like the idea of assessing the value of a human life. I don't think that can be done," the secretary said in an interview.

"At the same time we have to find out what the costs are. We have to ask, 'Will we buy this or will we buy something else?'"

Heart transplants present just such a question. They cost $100,000 apiece, and are performed in this country at the rate of about 50 a year. But the number of potential patients is believed to be sufficient to push the annual number of transplants to 2,000, a levle that would cost $200 million annually.

The department's immediate decisions yesterday, announced at a news conference, were to:

Begin "as soon as possible," probably in September, a two-year, $2 million study of the value of heart transplants for Medicare beneficiaries at some test institutions, almost certainly including Stanford University, the field's acknowledged leader.

Withdraw, at least temporarily last November's "tentative authorization," by which Medicare began covering heart ransplants done at Stanford, and pay only for those eligible for Medicare who already have been accepted for treatment at Stanford or the University of Arizona (where a federal administrative law judge ordered Medicare reimbursement for one patient).

Develop by September, through HHS' Health Care Financing Administration, a proposed definition of all "reasonable and necessary" services Medicare should pay for, and seek public comment.

Then -- after a few years, when such a definition has been formally promulgated and the heart transplant study has been finished -- apply the definition to make a final decision on heart transplant financing.

The Medicare law, Harris explained, requires payment for all services deemed "reasonable and necessary," in the past this definition has simply meant deciding whether the services is medically safe and effective.

Pursuing that kind of thinking, Congress in 1972 ordered Medicare to start paying for machine dialysis (blood-cleansing) and kidney transplants to keep kidney disease patients alive. The cost, it was said, would amount to about $250 million a year. But the cost in fiscal 1981 will be $1.5 billion and is expected to reach $2.7 billion by 1984.

"Heart transplantation," Harris said, "illustrates the complex policy issues" presented by many rapidly advancing medical techniques, and "it is incumbent on all of us -- government, medical profession and the public -- to assess" them fully before financing them.

She said she expected that the heart transplant study and ultimate decision will be the first of many that "become increasingly necessary."

The first heart transplant was done in 1967. For five years or so there was huge excitement over the idea of giving a human being a new heart, and the operation was tried at many centers. But most of the patients soon died and the number of operations dwindled.

But a tenacious Stanford surgeon, Dr. Norman Shumway, persisted. Today his institution does about 25 heart transplants a year, and half of the patients now are surviving five years or longer.

The cost of the operation at Stanford is from $35,000 to $200,000 a patient, for an average of perhaps $100,000. This has been paid by Medicare in some cases, by the government's National Institutes of Health as valuable research in some and by insurance firms in others.

Officials of Boston's Massachusetts General Hospital, among the nation's leading hospitals, decided in February not to start doing heart transplants. The reasons given were the high cost and the fact that the operations would drain resources -- doctors, nurses, technicians and laboratory facilities -- from other patients, who might be helped more with the same money.

However, the famed Mayo Clinic in Rochester, Minn., announced recently that it will start a heart transplant program.