A Miami judge’s order directing Walgreens and CVS to cover the cost of reviewing pharmacists’ records in a wrongful death case against them did not cause irreparable harm to the companies, a Florida appellate court ruled Wednesday.

The Third District Court of Appeal tossed the companies’ petition for writ of certiorari on jurisdictional grounds, finding undue discovery expenses are rarely destructive enough to result in a miscarriage of justice.

“The usual remedy available to a party that has incurred burdensome discovery costs is to recoup them through taxation of costs, not via certiorari,” wrote Third DCA Judge Barbara Lagoa, with Judges Edwin Scales and Robert Luck concurring.

Walgreens and CVS, which were accused of serving as pill mills, initially asked the trial court to put the financial burden on Jonathan Rubin. His lawsuit alleged his daughter died of multiple-drug toxicity after the drugstore chains’ pharmacists filled more than 350 prescriptions for her in three years. The court said many of the drugs appeared to be narcotics.

Rubin’s counsel requested personnel files for all the pharmacists working at the stores where the prescriptions were filled. Walgreens argued Rubin should pay the estimated $21,000 needed to review and redact the documents. CVS didn’t provide a cost breakdown.

Miami-Dade Circuit Judge Antonio Arzola directed the multibillion-dollar corporations to produce the documents and declined to shift the financial burden to Rubin at that time.

“Judge Arzola, hands-down, made the right decision,” said Rubin’s lawyer, Brett Rosen of Goldberg & Rosen in Miami. “It was supported by all the case law, and essentially the Third DCA has recognized and has now leveled the playing field against big pharmacy companies and the little guy, the plaintiff. …  If you look deep into how these pharmacists were handling the situation, they were just robo-filling.”

Rubin is represented by Brett Rosen and Mustafa Dandashly of Goldberg & Rosen in Miami. Rosen was in court when contacted and had no immediate comment.

Walgreen Co. is represented by James Wyman of Hinshaw & Culbertson in Coral Gables, who had no comment.

Holiday CVS LLC is represented by Marc Schleier and Christopher Knight of Fowler White Burnett in Miami. Schleier said he had no comment because he hadn’t discussed the decision with his client yet.