In this paper, a simulation-optimization approach based on the stochastic counterpart or sample path method is used for optimizing tactical and operative decisions in the pharmaceutical supply chain. This approach focuses on the pharmacy-hospital echelon, and it takes into account random elements related to demand, costs and the lead times of medicines. Based on this approach, two mixed integer programming (MIP) models are formulated, these models correspond to the stochastic counterpart approximating problems. The first model considers expiration dates, the service level required, perishability, aged-based inventory levels and emergency purchases; the optimal policy support decisions related to the replenishment, supplier selection and the inventory management of medicines. The results of this model have been evaluated over real data and simulated scenarios. The findings show that the optimal policy can reduce the current hospital supply and managing costs in medicine planning by 16% considering 22 types of medicines. The second model is a bi-objective optimization model solved with the epsilon-constraint method. This model determines the maximum acceptable expiration date, thereby minimizing the total amount of expired medicines.