Walgreens blamed the primary health care clinics for its multibillion-dollar quarterly loss.