Managing blood inventory is challenging due to the perishable and unstable nature of the product needed for transfusions in healthcare facilities. In this paper, we consider a periodic review blood inventory model with two priority demand classes, namely emergency and regular patients. We propose a dynamic programming model for determining the optimal ordering policy at the hospital given the uncertainty regarding received donated blood units. The optimal policy deals with placing orders for blood units that will expire within a fixed period. The objective is to minimize total expected costs within a planning horizon while maintaining a specified expected service level. Our model considers uncertain demands and donated blood units with discrete probability following known distributions. A tabu search algorithm is developed for large-scale problems. The performance of these ordering policies is compared against the optimal fixed order quantity and the order up-to-level policies using real-life data. The numerical results show the benefit of our model over the optimal fixed order quantity and the order up-to-level policies. We measure the total expected cost and the expected service level obtained from the optimal and near-optimal policies and provide a sensitivity analysis on parameters of interest.