The nation's hospital and medical leaders claimed credit yesterday for drastically cooling off hospital cost inflation by a nationwide voluntary effort, despite growing inflation in the general economy.

They said new data show hospital costs rose by 11.8 percent per year in April, the lowest such increase, tabulated monthly, in this almost runaway field in four years.

For the first four months of 1978, they said, the annual increase was 12.7 percent - three percentage points lower than the 15.8 annual increase for the first four months of 1977.

If the nation could reduce general inflation as much, they said, neither hospitals nor the country would have an inflation problem. Also, they claimed, these results of their so-called "Voluntary Cost Containment Program" show that mandatory federal controls on hospitals costs are not needed.

These claims were made at a press conference by the heads of the three groups that began the joint effort last November - Alex McMahon, president of the American Hospital Association; Dr. James Sammons, executive vice president of the American Medical Association and Michael Bromberg, executive director of the Federation of American Hospitals.

Their members have held down cost increases, they said, by persuading hospitals and the doctors who staff them to think hard about every expense - and, thereby, order fewer tests, admit fewer patients, and send patients home faster and reduce spending for new equipment and buildings.

As a result, the Carter administration's hospital cost control effort in Congress is "dead," said Bromberg. A statement by the three men called the moderation in costs "dramatic" and "encouraging."

Administration spokesmen disagree with almost all these claims. On Thursday, Health. Education and Welfare Secretary Joseph A. Califano Jr, said health costs are still running "wild," and that federal controls on hospital costs are "urgently" needed.

He said there is a good chance that House and Senate health leaders will get together to pass at least a compromise version of an administration hospital cost control bill that has been bogged down.

But Irving Wolkstein - a former deputy director of HEW's Medicare program who is now a highly regarded consulate to HEW, among other clients - told the Maine Hospital Association on June 19 that odds are "against" passage of any such bill this year.

Wolkstein said yesterday that hospitals and doctors deserve "some" credit for cooling hospital cost increases.

"But it's hard to tell how much," he said. "There was a big increase in hospital costs," he said, as a result of catch-ups in salaries and other costs after the Nixon wage-price controls ended, "and a downward trend now was to be expected."

Also, he said, much of the cool-off is due to strong efforts recently by several state hospital rate-setting agencies - efforts that went unmentioned in the AHA-AMA-FAH press release.

A spokesman for HEW's Health Care Financing Administration said hospital cost inflation is still running "almost double" the recent 61/2 to 7 percent increases in all items in the consumer price index.

The hospital and medical officials conceded this, but argued, as they have for years, that hospitals are a peculiar part of the economy in which patients are treated with costlier drugs, machines and expertise every year, taking more and more highly skilled people to save more and more lives.

Sammons maintained that the government has hampered the voluntary program and may be frightening some state hospital and medical societies from stepping up efforts. He cited a recent Justice Department refusal to issue an opinion that the voluntary effort does not violate antitrust law.

He said Califano promised him he would try to get Justice to endorse the voluntary effort, then, "helped persuade the department to withhold its blessing.

McMahon said "our goal" is to reduce hospital cost increase further to "no more than the annual increase in the gross national product, which has been running 10 to 111/2 percent in the last few years." He conceded that "we may have a harder time" in coming months because general inflation is heating up.