Resolving a simmering dispute, ousted Medicare plan agrees to pay