JUST IN THE nick of time, a rescue squad from Congress has rushed in with enough financial help to keep St. Elizabeths Hospital going for another year. But the emergency isn't over. The hospital is in the throes of a transfer from the federal government to the District--and so is the responsibility for paying for it. That was the message reaffirmed so dramatically this year when the hospital was suddenly staring at a huge shortfall that neither the administration nor Congress appeared ready to underwrite. Had the worst happened, St. Elizabeths would have been forced into massive staff layoffs, sharp cuts in programs and maybe even loss of accreditation.

That prospect did focus some official minds on ways to ease the transition and to shift some of the hospital's functions to other local facilities. The federal government proposed to save about $14 million of an estimated $25 million shortfall through changes in administrative operations; there would be some layoffs, but most would be avoided by consolidating certain hospital wards that are operating below capacity, changing the phone system and trying to reduce the lengths of patients' stays.

In addition, the city agreed to take 289 patients into District nursing homes and local facilities to save another $5.3 million in the hospital budget. The city also plans by mid-year to take over drug and alcohol programs for 89 patients now in St. Elizabeths.

That would leave $5.7 million to be made up-- the amount that a House-Senate appropriations conference committee has now agreed to provide. Both Sen. Arlen Specter of Pennsylvania and Rep. Julian Dixon of California, who head the subcommittees that oversee the D.C. budget, deserve credit for their response. But as Mr. Dixon warned, this is the last time Congress will "give more money to this program to bail it out." One way or another--and immediately--the administration and the local government must agree on an orderly transfer of financing and functions that will not leave patients in the lurch when the year is up.