You did not state which country you’re in.
Make an appointment with an AME but NOT a for a medical.
Go there first, explain everything and ask if you would eventually qualify after a lot of medical record review.
Then make another appointment for the medical.
This way you can get your case properly prepared without having been denied a medical.