BELLEFONTE, Pa. (AP) — A central Pennsylvania doctor who improperly prescribed medication to a woman he was having an affair with has been sentenced to 18 months of probation.

Dr. Kenneth Cherry Jr. was sentenced Thursday after pleading guilty to six charges of failure to keep records of a distributed controlled substance.

Cherry worked as an orthopedic surgeon at University Orthopedics Center in State College. Earlier this month Cherry had his license suspended for 30 months retroactive to July.

Prosecutors say Cherry wrote dozens of prescriptions on UOC and Mount Nittany Medical Center prescription papers for Mary Amendola between Nov. 2014 and May 2016. The prescriptions included Oxycodone, Percocet, Xanax, Adderall, Ativan and fentanyl.

Cherry has also been ordered to pay $750 in fines and complete a day of community service.