Walgreens to buy assets of 18 ApothecaryRx pharmacies