It can be done with blister packs if specific requirements are met. That way rather than go through a bunch of bottles, the patient opens one blister in the morning, they take the 6 pills in it, they open another blister at bedtime, take those 5 pills, etc.
No way I would do it with a vial though, you have to hope they fish the right pill out of the mixture at the right time.