The two-echelon supply chain model consists of two separate components that have diverse objectives. In this study, a supply chain (SC) is modeled as a two-echelon supply chain consisting of one supplier, one retailer, and one product at a pharmaceutical supply chain (P-SC). The purpose of optimization is to maximize the total profit generated during sales and distribution of the product. Sales take place at the pharmaceutical retailer, and the demand encountered is stochastic, and order periods are determined by the frequency of visits by the drug supplier. Considering this visit frequency, the pharmaceutical retailer follows a periodic review inventory model. For the retailer, the decision variable is the safety factor determined according to the stated order level. It determines the pharmaceutical supplier's profitableness by influencing the sales volume of the P-SC. The problems were optimized with two different scenarios and two different models: the traditional SC model and the two-echelon supply chain model. The heuristic model of these problems provides more profitability for both echelons.