Medical drug shortages are an important issue in health care, since they can significantly affect patients' health. Thus, selecting the appropriate distribution and inventory policies plays an important role in decreasing drug shortages. In this context, inventory routing models can be used to determine optimal policies in the context of medical drug distribution. However, in real-world conditions, some parameters in these models are subject to uncertainty. This paper examines the effects of uncertainty in the demand by relying on a two-stage stochastic programming approach to incorporate it into the optimization model. A two-stage model is then proposed and two different approaches based on chance constraints are used to assess the validity of the proposed model. In the first model, a scenario-based two-stage stochastic programming model without probabilistic constraint is proposed, while in the other two models, proposed for validation of the first model, probabilistic constraints are considered. A mathematical-programming based algorithm (a matheuristic) is proposed for solving the models. Moreover, the Latin hypercube sampling method is employed to generate scenarios for the scenario-based models. Numerical examples show the necessity of considering the stochastic nature of the problem and the accuracy of the proposed models and solution method.