Automated drug dispensing systems (ADDSs) are increasingly in demand in today's pharmacies due to the growing aging population. Recognizing the practical needs faced by hospitals utilizing ADDSs, this study focuses on optimizing the physical design of ADDSs in a human-machine interaction environment. Specifically, we investigate the retrieval sequencing of drugs among successive prescription orders. To compare the efficiency of ADDSs with the different number of input/output designs, we formulate dual command retrieval sequencing models that optimize the retrieval sequence of drugs in adjacent prescription orders. In particular, we consider the stochastic service time of pharmacists in the 0-1 integer programming models to analyze the impact on humans. Through experimental comparisons of average picking times for prescription orders under different layout designs, the system layout with two input/output points significantly enhances the efficiency of prescription order fulfillment within a human-machine interaction environment. Furthermore, the proposed retrieval sequence method outperforms dynamic programming, greedy, and random strategies in improving prescription order-picking efficiency.