When any individual is discharged from a state facility and he or the person liable for his care and treatment is financially unable to pay for or otherwise access drugs or medicines that are prescribed for him by a member of the medical staff of the state facility in order to mitigate or prevent a recurrence of the condition for which he has received care and treatment in the state facility, the Department or the community services board or behavioral health authority serving the individual's county or city of residence may, from funds appropriated to the Department for that purpose, provide the individual with such drugs and medicines, which shall be dispensed only in accordance with law.
Va. Code § 37.2-843