| Automated pharmacy system is a set of perfect drug circulation device, which can dispense medicine automatically instead of manually. It improves dispensing efficiency and reduces artificial error. The project combines the automation technology, computer science and information technology, which will provide important references for the research and development of three-dimensional garage, internet of things as well as cloud medical service.The design of automated pharmacy includes mechanical design, electronic circuit design, software design and information system design. This paper focuses on the design of software algorithm and information system. The specific research contents can be summarized as follows.Firstly, the research status of automatic pharmacy at home and abroad was introduced. This paper compared the performance of a variety of existing design patterns and determined a suitable design pattern. The mechanical structure and performance index of medicine cabinet were analyzed. The mechanical structure and system architecture of rapid dispensing machine were introduced.Secondly, medicine storage algorithm was studied. Based on the original program, we analyzed the TSP problem and optimized the route of the mechanical arm. The greedy algorithm and minimum spanning tree DFS algorithm were used. Using Java and Matlab languages, optimizing performance and time complexity were analyzed. Aiming at actual problems, some kinds of medicine dispensing modes were given. Focusing on the least layer strategy and the shortest platform distance strategy, we proposed the set covering problem and solved it by state matrix compression algorithm, greedy algorithm as well as branch and bound method. We obtained the optimal minimum layers solution. The shortest platform distance problem was analyzed and solving algorithm was proposed. Using Java and Matlab languages, the performance of different algorithms were simulated and compared. For the intelligent storage system, we proved several theorems, reached the best layer-choosing strategy.Thirdly, the design of information management system of automated pharmacy was introduced. The system structure and database architecture was described. The key technologies used in the database system, such as transaction, trigger, cursor were discussed. From two connection modes with HIS system, a suitable mode was selected.Lastly, the module design of software system was summarized. The network structure and the three layer C/S architecture were introduced. The key technologies used in the software system such as ADO.NET, regular expressions and delegate function were described. Data structures of optimization algorithm were studied.The achievement of this project has been used in the No.4Hospital of Shijiazhuang City, performing well. Finally, experiences during the process of the research were summarized and further research direction was proposed. |