Subject to the approval of the State Department of Health Care Services, at the end of the fiscal year, a county may retain unexpended funds allocated to it by the department from funds appropriated to the department, with the exception of block grant funds, exclusive of the amount required to pay for the care of patients in state hospitals, for 12 months for expenditure for mental health services in accordance with this part.