IT WAS AN ENORMOUS, old Victorian-style house in the Cardozo section of the city, and the woman who came to the door was about 40 years old, loud and overweight, and she led us into the kitchen where she sat with relatives drinking beer. They wanted to tell the newspaper about a neighborhood fight the night before, a fight they said police brutally broke up. The trouble was that as they talked it became clear that everyone had been drunk or thereabouts when the incident occurred, and they couldn't really remember who did what.

Before we left, the woman said she had a friend she wanted us to meet, and she took us upstairs into a beautiful, sunny room. There by the window sat a man in his bathrobe, so old he looked like a withered eagle. He was unable to speak anymore, and, stared vacantly at the street below, his long bony fingers interlaced in his lap. He was in his 90s. The woman decided she wanted him to sing, and she stood in front of him singing a tune, over and over, and after a few moments a flicker of recognition came into his eyes, and ever so softly he began to hum with her. She clapped her hands, applauding him, and he smiled even more.

The man was one of thousands of people living here in foster homes for the elderly and the mentally ill-homes that have sprung up in the past decade with little regulation or training for the operators as public policy has shifted from warehousing these people in institutions of putting them in community-based homes.

With the advent of thorazine and other medications that could keep the mentally ill from going mad, insitutions have systematically and rapidly been emptied. In 1965, there were 600,000 people in mental institutions across the country, by 1977 there were only 190,000. At St. Elizabeths-the federal facility that serves Washington residents primarily-the inpatient population has dropped from more than 5,000 to just over 2,000, with over 3,000 patients being cared for in the community.

The whole revolution in mental care has hardly been a total triumph. By 1977, the National Institutes of Health reported that thousands of patients were now living "isolated, marginal lives, wandering city streets and languishing" in boarding homes, rundown welfare homes and nursing homes.In Washington, we began hearing more and more stories of patients being turned out of foster homes that couldn't care for them, of the mentally ill wandering the streets, incoherent and incontinent with no place to go.

"It was done very hastily," says a top mental health official in Washington. "It was a mess in the early '70s. The typical community attitude has been to keep people in institutions. That's why we have them. You don't like crazy people that's why you put them out of sight." A community that endorsed the principle of community-based care as an enlightened approach to the mentally ill didn't have any homes to put the patients in.

Former mental patients as well as the elderly ended up being placed in drab, old, privately owned houses clustered in low-income areas of town where owners need the money they could earn as foster home operators. Efforts to put foster homes in better neighborhoods repeatedly failed. Neighbors repeatedly organized against them.

And the homes into which these people were placed were neither licensed nor rigorously inspected. Finally in October 1977, the City Council passed an enormously detailed piece of legislation that sought to coordinate all of the licensing and inspection of these homes within an agency of the Department of Human Resources. Teams were to go out and inspect each home to ensure that it met fire safety regulations, health and environmental requirements, and to confirm that the home provided the care individual patients needed. There are provisions in the law for training people who operate these homes.

The law was passed but nothing happened. DHR said it didn't have the money or staff to set up the program. Congress didn't appropriate necessary funds. Noting got under way until this week-18 months after the law was passed-the week nine women died in a fire at a foster care home on Lamont Street NW that city officials said should not have been allowed to operate because of an array of fire safety and licensing violations.

It is very easy to blame DHR for what happened. For years now, this has been a city agency that has operated outside the law, ignoring both the City Council's regulations and court orders that attempted to improve the lot of some of the city's neediest people. For years now, it has seemed that the only way to insist that human resources employes do right by the city's needy has been to haul the department's top officials into court and threaten to jail them for contempt. Right now, the city's programs for the retarded and its efforts for the mentally ill are being run by court order.

Given this history, it is not all surprising to find DHR ignoring a City Council law to rationalize the licensing and inspecting process of homes in which thousands of helpless people are living.And it is not surprising that the department has literally no idea how many people are living in these homes, how many homes there are or what kind of condition they are in. Top officials in the department say they fear many of the homes won't meet the standards.

"The whole licensing and inspection thing has been a bloody mess for a long time," says City Council member Polly Shackleton. "Everybody passed the buck to everybody else and no one has the final responsibility.It's a tragedy. It's just awful."

Yes, it is. And DHR isn't the only party to blame in all of this. The same community that was happy to dump the old and the mentally ill into St. Elizabeths for decades has been happy to dump these people into unlicensed, uninspected, old houses in rundown, out of sight neighborhoods in the city for the past 10 or 15 years. We haven't insisted on proper housing, proper training for the foster home operators, and we haven't insisted that they be reimbursed enough to provide their patients with a decent way of life. We've been doing the whole thing on the cheap because we simply haven't cared.

It is refreshing to hear Mayor Barry get angry about the Lamont Street Tragedy and vow to find out who is responsible for what happened. It is good finally to hear a mayor demand personal accountability from public people who work for the city governmnet, but we are in danger of making a few city officials who may have neglected their duties scapegoats for many others. There is little question that some city officials who were paid to ensure a better quality of life for these people in these homes haven't done right by them. But blaming them for conditions in the Lamont Street house and for conditions in the other community-based homes in which we've stuck the mentally ill and the elderly is the easy way out.

The rest of us haven't done right by them either.