You probably didn't know it, but robots already work in pharmacies. Many hospitals have been using ROBOT-Rx to dispense medication doses.
With near-perfect accuracy, this robo-pharmacist stores, counts, dispenses, and keeps records. All the humans have to do is prescribe the medication.