A medication dispensing system is disclosed, having an interactive vial having a controllable lock for containing medications prescribed for a patient a processor contained in the vial a computer program stored in a computer readable medium the computer program comprising instructions for execution by the processor, the computer program comprising: instructions to read patient data for the patient from a data base stored in the computer readable medium instructions to authorized dispensing of the medication from the vial and instructions to upon reading an authorization value of “YES”, unlock the vial to allow access to the medication from the vial. A method for using the system is disclosed.