Automated pill dispenser for patient