A local pediatrician is headed to trial on drug charges. On Wednesday, a district justice found enough evidence to send the case against 46-year-old Dr. Rebecca Delbaggio to court.

Delbaggio, who formerly practiced at UPMC’s Children’s Community Pediatrics faces 33 counts, including 15 felonies, related to the illegal prescription of controlled substances. She’s accused of prescribing  oxycodone and xanax  for   26-year-old Andrew Smithmyer, a man she was having an affair with.

According to testimony at the preliminary hearing, Delbaggio, as a pediatrician, who treated patients 18 and under, never saw Smithmyer as a patient.  She also didn’t keep medical records on him, and failed to record the prescriptions she wrote for him, in the state’s Prescription Drug Monitoring Program, as required by law.

A narcotics agent with the State Attorney General’s office testified that Delbaggio told him she wrote the oxycodone prescriptions because Smithmyer, a former professional baseball player, complained of pain from an injury. He added that Delbaggio wrote the prescriptions when she and Smithmyer met at hotel rooms.

Investigators say Delbaggio also gave Smithmyer $50,000 in cash and bought him a car.  Smithmyer also faces 15 felony charges related to the case,  but waived his preliminary hearing on Wednesday,  and is  expected to testify against Delbaggio.