You were probably involved in an auto accident or a workmen's comp claim. You need to get to the insurance company that run Medicare in your state (it is very hard to get through to them) and tell them the claim that is getting rejected is not related to the other thing. Often it takes a Congressperson's staff to straighten this out, sad to say.
Who do they say is the primary insurer, and do you have both parts of medicare? Many smart people get overwhelmed by the thousands of pages of Medicare gobbledygook.
Call the Medicare Benefits Coordination Review Center 1-855-798-2627. That office should be able to help you or explain to you why Medicare is showing as secondary.
Take your Explanation of Benefits (EOB), and return it to Medicare with the dispute part filled out. Equivalent to filing an appeal. Wish I had the exact words they use, but its on the reverse side of your EOB.
Note: "Medicare" doesn't think, it is not a thinking machine. However, the persons paid to process the claims do not think either, except about which letter corresponds to the most creative and fantabulous reasons they can use to deny your claim. I think they get tokens and crowns to play online Game of Thrones or Games of War, or is it Farmville as a reward for their denial of claims. (expletives would have been best used here.)
Many smart people get overwhelmed by the thousands of pages of Medicare gobbledygook.