The District of Columbia's medical review group, faced with a complete cutoff of federal funding, has won a six-month reprieve to try to prove it is having an impact on the quality and cost of health care.

The National Capital Medical Foundation received word last week that it had won its appeal to theU.S. Department of Health and Human Services and can remain active at least through June 1982.

The foundation is a federally funded group of doctors and nurses that reviews the way local physicians, hospitals and nursing homes care for patients who are subsidized by the Medicare and Medicaid programs. The foundation has the power to deny funds from these programs to the health care providers if it decides a patient has been given improper treatment or has spent too much time in the hospital.

But the foundation, in receiving its six-month extension, also was told that it must resolve a number of problems if it is to survive another evaluation by HHS next spring.

Medicare is the federal government's health care program for the elderly. Medicaid is a joint federal-state program that subsidizes health care for the poor. The foundation receives its funding of approximately $1 million a year through federal Medicare funds, as well as through District and federal Medicaid funds.

As an example of the types of problems to which HHS has objected, the foundation has paid more than $223,000 in Medicare money--or nearly 10 percent of its budget since 1979--to one D.C. law firm to handle a variety of legal disputes. It has been paying the same law firm $90 an hour to appeal last month's decision by HHS to cut off the foundation's funding.

These legal fees have been devoted in part to a long-running battle with several city hospitals over how much authority they should have to police themselves.

As one of the nation's 187 professional standards review organizations, the foundation has been looking over the shoulder of local health care providers for nine years. But the Reagan administration is trying to abolish the entire program as a needless layer of bureaucracy.

An HHS evaluation earlier this year ranked the National Capital foundation 116th of the 187 organizations, charging that its reviews cost too much and that it only rarely denied Medicare or Medicaid payments to providers or even warned them to eliminate wasteful practices. Members of the foundation disputed the findings, maintaining that theD.C. foundation was one of the first in the country, for example, to develop a list of minor surgical procedures for which the federal health programs will not pay unless the procedures are done on an outpatient basis.

"We spent so much time and effort defending ourselves that we did not do as well as we could in having an impact on the medical community," said Dr. Irving Burka, the foundation's medical director. "The dollars should be directed at the community, rather than spending it on lawyers and volumes of paper."

But John Lewis Smith III, an attorney with Baker and Hostetler who has handled the foundation's legal work since its inception, said he charges his private clients far more than the $90 an hour he charges the foundation.

"I have not the slightest reticence about our fees," he said. "They are modest, and they were approved by the government in advance."

"There were substantial legal bills, but there were substantial legal issues involved," added Smith, who also is counsel to the D.C. Medical Society. "People on both sides were intransigent and relations became totally strained."

The legal problem began in 1979 when eight of the city's 13 hospitals sought permission to review the care of their own Medicare patients. The foundation can delegate that authority to the hospitals while still retaining overall responsibility.

"The real issue is control," said Dr. Robert Hackney, a former foundation president. "The hospitals don't want someone external to come in and tell them what to do."

Some critics say that the hospitals are lenient in reviewing their own performance, since the foundation's power to terminate Medicare and Medicaid payments puts the hospitals' financial health at stake.

Smith said that the cost of these medical reviews is "massively higher" when done by the hospitals, which have greater overhead costs and pay their staff higher salaries. But when HHS refused to pay any more for the reviews, the hospitals called in their own law firms.

"This is an enormously complicated legal area, and you have to be immersed in . . . laws and regulations [governing the organizations] to grasp the nuances," said Dr. Dennis O'Leary, clinical dean at George Washington University Hospital.

The three university hospitals in the District, along with Greater Southeast Community Hospital, argued that the government might require them to do even more work for these medical reviews without paying them more money. They took their concerns to Smith, who helped write a provision in the foundation's contract with the hospitals that if HHS tried to impose new requirements on the hospitals, the foundation would be required to sue the federal government on their behalf.

Some officials say this demand practically guaranteed that there would be a continuing legal controversy. But Smith called it "an attempt at compromise. Many of the hospitals were prepared to take this issue to litigation. They would not accept the agreement without this clause. The goal was not to generate litigation, but to avoid it."

O'Leary said that "the language was admittedly contentious language. But it had to afford mutual protection . . . so a hospital could not be forced to do more than it could afford."

HHS, however, quickly vetoed the idea.

"Our reaction was, 'No, you're not going to sue us,' " said Dillard Mills, an HHS official. But Mills allowed the foundation to charge Medicare for hundreds of hours of legal work by Smith's firm, some of it for a lawsuit by Ralph Nader's Public Citizen to force the organization to make public its medical reviews.

The eight hospitals still refused to sign agreements with the foundation. Matthew F. McNulty, chancellor of Georgetown University Medical Center, insisted that it is quicker and more effective for Georgetown to review its own patients.

"The program has not come close to funding the actual costs of review," said O'Leary. "But the real advantage is motivating your medical staff to take an interest in these problems." Dr. Jim Levy of Greater Southeast Community Hospital added that the foundation "quickly became almost as bureaucratic as the federal government" and would not allow his hospital to focus its reviews on the quality of care.

Last May, HHS said in a warning letter that the foundation no longer was meeting its goals, and that "unreasonable delays" by the hospitals were "probably an important factor in the problems you are having. . . . [You] cannot continue in this impasse."

HHS said that the dispute would have to be resolved in 90 days or the hospitals no longer would be allowed to do their own reviews.

Each of the hospitals quickly signed a revised agreement, except for Greater Southeast, which still is litigating the matter. HHS nevertheless recommended that the foundation be terminated because it had grown too costly and inefficient, a verdict that the foundation now has six months to reverse.