You are legally entitled to request your medical records at any time. However, state laws usually do not require medical offices to hold your records for more than about 10 years, so you may have to do a bit of persistent searching if a lot of time has passed.
The first step might be calling the doctor's office, if they are still open, and simply asking for a copy of your records. You may have to fill out a form or provide your own written request before copies of the medical records will be released to you. If you need to provide your own written request, the Rocket Lawyer Medical Records Request document can help you do just that.
You may want to include your legal name at the time of your last visit, the date of your last visit, and the duration of your stay (in the case of a hospital admission or surgery). In some cases, you may be lucky to have a doctor that holds onto all of their patients' records for an indefinite amount of time, in which case the process may be very straightforward.
If your doctor's office is no longer open, or they cannot locate your records, you may want to look into contacting your local health department. Doctors occasionally transfer files into a state storage facility when they retire. You might be charged a small fee to produce your records. You might even be charged a fee just to have someone look for them.
In the case of older records, you may have to provide additional information, such as your social security number or answers to questions that only you would know.