Judge William Froeberg reviewed the records and sealed them, said Orange County Senior Deputy District Attorney John Christl, who is prosecuting the case.
The alleged mistress, whose name is being withheld because she's a possible rape victim, told police that she didn't come forward about the accusations earlier because Roberts threatened to tell her devout Catholic parents about the abortion.
Barnett told Froeberg that the dates the alleged mistress allegedly aborted the child don't add up and that his client is entitled to know if in fact she had an abortion.
Christl argued that the medical records were not relevant because Roberts allegedly threatened her anyway, not knowing himself whether she had or didn't have an abortion.
Froeberg's decision to allow the medical records to be subpoenaed was unprecedented but said it was necessary in this case.
During the July hearing, Froeberg said he would make a decision about submitting the medical records in for evidence after reviewing them.
Now that he has sealed them, it's not clear whether the medical records will be used during the trial or how they might influence the charges against Roberts, who was fired after an internal investigation into his conduct.
The next court hearing is Dec. 9.