You should contact an attorney who practices in your jurisdiction for specifics. If the police seized your medication, and no charges are going to be filed, assuming you have valid prescription for the medication, you may be able to have it returned immediately without the consent of the prosecutor. If the charges are filed, depending on what you are charged with, your attorney, if appropriate, can file a motion to return property.
In California, misdemeanor charges must be filed within one year of the arrest. Again, your local attorney should be able to make phone calls for you and assist in the return of your medication