CVS Health Corp (NYSE:CVSC) says it stands to lose 40 million prescriptions next year thanks to deals signed by rival Walgreens Boots Alliance Inc. (NASDAQ:WBAC) with others in the drug supply chain.Because of this the company lowered its profit outlook for next year and share prices fell almost 12% Tuesday or $9.86. for CVS the move by Walgreens was a matter of giving CVS a taste of its own medicine.Related: HEALTH CARE STOCKS TO OWN DEPENDING ON WHO WINS THE ELECTIONWhat Walgreens DidWalgreens recently struck deals with health plans that excluded CVS. This is the main reason CVS CEO Larry Merlo said the company expected a major decline in filled prescriptions moving forward.Walgreens CEO Stefano Pessina recently struck deals to become the preferred pharmacy for UnitedHealth Group Inc.’s (NYSE:UNHC) OptumRx and for Prime Therapeutics, the company that manages prescriptions for 14 different Blue Cross and Blue Shield health plans.Walgreens has also signed deals with the Defense Department’s Tricare health care network and is set to acquire Rite Aid Corp. (NYSE:RADD), assuming regulatory approval goes through.CVS Started ItIronically, all this was made possible because CVS has built its own pharma empire to include pharmacy benefits managers like Express Scripts Holding Co. (NASDAQ:ESRXC) and CVS Health’s Caremark. These companies operate as middlemen between insurance companies, corporations that pay for health coverage, drugmakers, and pharmacies.Owning Caremark as well as thousands of drugstores has allowed CVS to entice patients to fill their prescriptions within the CVS footprint.An Opening For WalgreensSince CVS can’t have similar relations with competing PBMs, Walgreens has been able to step into the void and strike their own deals.The net result is that those customers are now going into Walgreens stores not only to fill prescriptions but to buy beauty products, snacks and household items.The Cost Of Lost PrescriptionsThose more than 40 million prescriptions that will not be filled will take a toll on the CVS bottom line.The company now says it expects 2016 adjusted EPS of $5.77 to $5.83, down from an earlier range of $5.81 to $5.89. The preliminary outlook for 2017 calls for adjusted EPS of $5.77, well below FactSet’s consensus of $6.48.Related: COMPANIES THAT SAY THE ELECTION IS HURTING BUSINESSPresidential Election Impact The election of Donald Trump throws a whole new set of wrinkles into the mix. Trump has vowed, for example, to repeal Obamacare, theoretically taking healthcare coverage away from more than 20 million people. In theory, those people who no longer be filling prescriptions with CVS or any other drugstore chain.On the other hand, Trump also said Obamacare would be replaced with a plan that would allow people to deduct healthcare premiums bought on the open market. He further promised to allow health insurers to compete across state lines, thereby theoretically increasing competition.The net result, so far, is uncertainty and uncertainty is never good for the stock market – including companies like CVS.