Judge Noel Hyde granted the dismissal of criminal charges last Thursday.
Hartman was initially accused of allowing staff members to order and dispense controlled substances from his office, including for personal use. According to court records, among those who received prescriptions were Layton Mayor Stephen Curtis, whose wife worked at Hartman's office.
But according to the diversion agreement, prosecutors with the Utah Attorney General's Office found that while records were kept regarding the controlled substances in question, they were not properly maintained.
Prosecutors said the failure to maintain proper records ceased in May 2012, and were a result of "inadequate supervision of staff."
The case began in September, when the Drug Enforcement Administration received a letter from a medical supply company indicating it had refused to ship a suspicious order of controlled substances to Hartman, who is an obstetrician and gynecologist at McKay Dee Hospital Center. A month later, DEA investigators found that the doctor's staff had been ordering controlled substances with his permission.
According to court documents, a staff member told investigators that Hartman allowed office staff to order drugs if staff members already had prescriptions from their physicians for the medications.
The staff later surrendered hundreds of tablets of Lorazepam, which treats anxiety, and Phentermine, which is used for weight loss, to the investigators, according to court documents.