Smart drug management purchase