The changes come as the wider retail-pharmacy market has been upended in recent years.