The Supreme Court yesterday reversed rulings that would have extended all federal social welfare programs to residents of Puerto Rico at an estimated annual cost of at least $300 million.

A key issue in the case was whether Congress intended the 1972 Supplemental Security Income (SSI) benefits for aged, blind and disabled persons to be payable to residents of the commonwealth.

By a vote of 7 to 2, the justices, in an unsigned opinion, held that an intent to exclude Puerto Rico is apparent in congressional language defining "the United States" as "the fifty states and the District of Columbia.

In enacting the SSI program, in the form of amemdments to the Social Security Act, Congress repealed existing federal-local plans for the aged, blind and disabled in the United States, but left the federal-local program for Puerto Rico in place.

One of two lawsuits before the court was brought by Cesar G. Torres, who became eligible for SSI disability benefits of $157.70 a month while living in Hartford, Conn. After drawing the benefits for three months, he moved to San Juan, where the Social Security Administration ruled him ineligible for SSI.

In a brief for the government, Solicitor General Wade H. McCree said that Congress had "a rational basis" for distinguishing between the United States and Puerto Rico. He noted that in 1975, annual per capita income in the United States was $5,834, compared with $2,328 in the commonwealth. Under SSI, Torres would have drawn $1,892. And in 1976, a government advisory group warned that the SSI program might seriously disrupt the economy of Puerto Rico, where 1 in 10 residents would be eligible.

A panel of three federal judges in San Juan ruled that the geographic restrictions in the 1972 amendments interfered with the constitutional right of residents of the 50 states and the District to travel. The panel also held that the right could be outweighed by a compelling governmental interest, but it found none.

Yesterday, without hearing argument, the Supreme Court rejected the ruling. The Constitution does not require "that a person who travels to Puerto Rico must be given benefits superior to those enjoyed by other residents of Puerto Rico if the new-comer enjoyed those benefits in the state from which he came," the majority held.

The dissenters were Justice William J. Brennan Jr., who said he would affirm the ruling, and Justice Thurgood Marshall, who wanted to hear argument.

The court took other actions: DRUG REIMBURSEMENT

Across the country, Blue Shield and Blue Cross plans have more than 7 million subscribers who pay a "deductible" fee of $2 or so for each drug prescription, with their insurance reimbursing the pharmacist for the balance of his bill. In 1976, more than 30 million prescriptions valued at more than $165 million were filled under such cost-plus arrangements.

In August, however, the 5th U.S. Circuit Court of Appeals struck down the Blue Shield of Texas deductible system, under which a subscriber pays $2 to a "participating" pharmacist. If he goes to a non-participating pharmacist it can cost him much more, because he must pay one-fourth of the normal price, which easily can exceed $8.

The court agreed with druggists who complained that holding down the price of medicines for subscribers with a cost-plus plan is not part of the "business of insurance" that, under the McCarran-Fergusion Act, the states regulate. Instead, the court said, it is "price-fixing" and coercion that violates the antitrust laws.

Yesterday, the Supreme Court agreed to review the decision. SOCIAL SECURITY HEARINGS

The Social Security Act gives a person the right to request an administrative hearing when the Social Security Administration (SSA) denies his application for disability benefits. As of Sept. 30, however, there was a backlog of 91,143 cases, and an average elapsed time of 195.2 days between a request for a hearing and a final decision.

In October, 1976, Chief Federal Judge T. Emmet Clarie in Hartford, Conn., ordered the SSA to reduce the elapsed time to 130 days starting July 1, 1977, to 150 days starting Jan. 1, and to 120 days starting next July 1. Claimants forced to wait longer would automatically get benefits until a decision was rendered.

The 2nd U.S. Circuit Court of Appeals affirmed the decision, which involved George White, who had to wait 366 days for a decision restoring benefits for total disability that SSA, apparently erronoeously, had cut off.

The government asked the Supreme Court to overturn the ruling, saying it would make "an undeniably difficult situation far worse," disrupt "even-handed and orderly" administration, and intrude "into the administrative province."

Yesterday the court let the decision stand. BUSING

The court declined to review a decision upholding the constitutionality of laws prohibiting outlays of federal aid-to-education funds for busing designed to help desegregate public schools in Jefferson County (Louisville), Ky.