OBJECTIVE: To improve the work efficiency and service of outpatient pharmacy by implementing automatic dispensing system and optimizing work flow. METHODS: On the basis of problems in the practical work, appeared in the implementation process of automatic dispensing system, such as system identification, hardware problem, arrangement and management of pharmacy were analyzed and summarized and optimized. The optimization effects were evaluated by comparing relative indicators before optimization. RESULTS & CONCLUSIONS: Through implementing a series of measures, such as consolidating similar prescriptions, improving the compatibility between software and hardware, allocating pre-dispensing rationally, adjusting the number of service windows timely and increasing regular employee training and examination, pharmacy service efficiency and the accuracy of drug dispensing have been improved on the whole; compared with before optimization, error rate is decreased by 60% (1.7‰→0.7‰), the time of patient waiting for getting medicines is shortened by 40% (15 min→8.5 min), and pharmacist’s labour intensity is decreased greatly to improve the quality of pharmaceutical care and satisfactory degree of patients.