Automated system of packaging and distribution of medicines