SAN DIEGO -- A surgical technician accused of switching out drugs at a Denver hospital, putting thousands of patients at risk in the process, was fired from Scripps Green Hospital in La Jolla in 2013 over similar allegations.

Twenty-eight-year-old Rocky Allen worked at Scripps Green as a surgical trainee for 20 days between May 9 and June 7 of 2013. His employment was terminated after staff discovered that he tried to switch out a syringe of fentanyl citrate with saline, according to a news release from Scripps Health.

At the time, Scripps notified the Drug Enforcement Agency. Scripps says that because Allen was under close supervision, they do not believe that he was successful at switching out any patient medications.

Scripps has notified 518 patients who had surgical procedures during the shifts that Allen worked. Those patients have been given the option of getting free, confidential testing.

Allen worked as a surgical technician at Swedish Medical Center in Englewood, Colo, between August 2015 and January of this year, when his surgical technologist license was suspended after authorities found evidence he was stealing a powerful narcotic from the surgery room and using it, KMGH-TV in Denver reports.

Nearly 3,000 surgical patients who were treated at Swedish Medical Center during that time may have been exposed to HIV, hepatitis B, or hepatitis C, according to the Colorado Department of Public Health & Environment.

On Jan. 22 during the beginning stages of a surgical procedure at Swedish Medical Center, Allen allegedly removed a labeled fentanyl syringe from the anesthesia work space and replaced it with another labeled syringe. Allen later tested positive for fentanyl and marijuana, according to the license suspension by the Colorado Department of Regulatory Agencies.

Allen worked at the John C. Lincoln Medical Center in Phoenix between July and September of 2014. He also worked at the Banner Thunderbird Medical Center in Glendale at some point in 2014. HonorHealth, which runs both hospitals, fired Allen in September 2014 after he tested positive for use of a controlled substance.

Allen was taken into federal custody earlier this month. He remains out on bond.