Virginia hasn’t done a good job of managing a program designed to help the mentally ill return to their communities, making it harder to free up much-needed beds for psychiatric emergencies, according to a report released last week by the Office of the State Inspector General.

Ensuring the availability of emergency psychiatric beds has become a top priority this year in Richmond, as lawmakers respond to the death in November of Austin “Gus” Deeds.

Though he required hospitalization, the 24-year-old son of state Sen. R. Creigh Deeds (D-Bath) was released because local mental health workers were unable to find a bed for him.

Deeds then attacked his father with a knife and killed himself with a shotgun.

Several reform packages, including some introduced by Creigh Deeds, have won preliminary approval in both chambers. They include a proposal to extend the amount of time mental health workers have to find a bed for someone in crisis.

Another would establish an online registry of available beds. And if a bed couldn’t be found before the legally mandated deadline, a third proposal would require state facilities to provide a “bed of last resort.”

Legislators have shown far less interest in broader reforms, such as increasing the number of beds in state psychiatric hospitals or setting up more secure sites where people can be evaluated.

But the inspector general’s report, first reported in the Richmond Times-Dispatch, underscored the interdependent nature of the mental health system and how a lack of resources when people are ready to leave hospitals can contribute to problems when other people are in crisis.

The report looked at one community-based support program, the Discharge Assistance Program, which provides those released from state hospitals with financial help as they resume life outside.

It was created in response to a 1999 Justice Department finding that people ready for discharge were being kept longer than necessary in state psychiatric facilities because of a shortage of community-based services.

State Inspector General Michael F.A. Morehart found fault with the Department of Behavioral Health and Developmental Services’ management of the Discharge Assistance Program. Morehart criticized the state agency for inadequate audits and a lack of documentation to support the way it distributes money to community service boards, the regional agencies that provide publicly funded mental health services.

In fiscal 2012, the state distributed $18.9 million in Discharge Assistance Program money. The program served 854 people, the report found, and at the end of the year, it had $1.65 million in unspent money.

The program has had more than $1 million in unspent funds in prior years as well, the inspector general learned.

The inspector general made a number of recommendations to improve the program’s efficiency and effectiveness.

One of them is to assemble a quarterly report that tracks how many patients ready to be discharged are stuck at state psychiatric facilities, the barriers to discharge and the cost of providing services in the community.

Getting people out of state facilities faster could produce huge savings for taxpayers, besides freeing up beds for psychiatric emergencies. Housing a patient in a state facility costs $231,000 annually, compared with the $27,000 cost of serving someone in a community setting, state data show.

Rachel Weiner contributed to this report.