
787 So.2d 22 (2001)
NATIONAL HEALTHCORP LIMITED PARTNERSHIP, authorized to operate National Healthcare Center of Hudson, Appellant,
v.
Judith Ann CLOSE, as Personal Representative of the Estate of John F. Cascio, Appellee.
No. 2D00-415.
District Court of Appeal of Florida, Second District.
January 17, 2001.
Rehearing Denied April 27, 2001.
*23 George N. Meros, Jr., and Chanta G. Hundley of Rumberger, Kirk & Caldwell, Tallahassee, and J. Richard Caldwell and Robert L. Blank of Rumberger, Kirk & Caldwell, Tampa, for Appellant.
James L. Wilkes, II, Mary J. Perry, and Allison M. Perry of Wilkes & McHugh, P.A., Tampa, for Appellee.
SCHEB, JOHN M., (Senior), Judge.
Defendant, National Healthcorp Limited Partnership (National), appeals the trial court's order granting the plaintiff, Estate of John F. Cascio, a new trial and the court's denial of National's motion for attorney's fees. We reverse on both points.
In May 1994, John F. Cascio and his wife filed suit against National in Hillsborough County. They sought damages for *24 National's alleged negligence and its alleged violations of statutory protections afforded nursing home residents, which they claimed resulted in injuries to Mr. Cascio. Mrs. Cascio was voluntarily dismissed and the case continued with Mr. Cascio as sole plaintiff.[1]
Initially the case was assigned to Judge Daniel E. Gallagher. After making several rulings on discovery matters, in October 1995, Judge Gallagher transferred venue to Pasco County where the case was assigned to Judge Marsha Glisson. National served an offer of judgment for $40,000; however, it was rejected. After several days of trial and seven hours of deliberations, on September 27, 1996, a jury returned a verdict in favor of National. National then filed a motion for attorney's fees under section 768.79, Florida Statutes (1995).
The plaintiff moved for a new trial on several grounds, including that the verdict was against the manifest weight of the evidence. Unfortunately, Judge Glisson died before ruling on the motion. The case was next assigned to Judge W. Lowell Bray, Jr. As successor judge, Judge Bray concluded that not having heard the evidence presented at trial, it was not appropriate for him to determine whether the verdict was against the manifest weight of the evidence. He therefore granted the plaintiff a new trial. National appealed, and we reversed and remanded with directions for the successor judge to rule on the motion. See National Healthcorp Ltd. Partnership v. Cascio, 725 So.2d 1190 (Fla. 2d DCA 1998).
On remand, Judge Bray ruled the verdict was not against the manifest weight of the evidence and denied the motion for new trial on several other grounds; however, he concluded the plaintiff was unfairly prejudiced at trial as a result of pretrial rulings involving discovery, and on that basis, he granted the plaintiff a new trial. He also denied National's motion for attorney's fees on the ground that "the legislature intended to exclude a defendant's entitlement to attorney's fees under section 400.023, Florida Statutes." This appeal by National ensued.
National argues that the trial court (1) abused its discretion in awarding a new trial on the ground that the plaintiff was prejudiced by the trial court's pretrial discovery rulings and (2) erred in denying National's motion for attorney's fees under section 768.79.

Pretrial Discovery Proceedings
The plaintiff proceeded on the theory that National did not properly care for Mr. Cascio during his residence at National's facility from July 8 to July 15, 1992. The plaintiff's case focused primarily on alleged violations of the protections afforded patients under section 400.022, Florida Statutes (1991).
After initial written discovery, the plaintiff sought to take the depositions of twenty of National's present and former employees. National moved for a protective order and the trial judge, on September 29, 1994, limited the plaintiff to deposing National's director of nursing, nursing home administrator, and eight other current or former employees. The plaintiff was required to obtain leave of court before deposing any additional current or former employees of National. The plaintiff deposed National's director of nursing about each of the names that appear in the clinical records and the functions that were performed by each during Mr. Cascio's *25 stay at National's facility. Before completing the depositions allowed, the plaintiff sought leave to depose five additional employees. The trial judge expressed concern that the plaintiff may be abusing the discovery process, at one point commenting, "How can you [depose the Director of Nursing for] nine hours for God's sakes?" Despite these reservations the trial court allowed the plaintiff leave to depose five more of National's employees.
For over nine months after filing his complaint, the plaintiff was free to communicate with National's former employees. Then, on February 2, 1995, in accordance with Barfuss v. Diversicare Corp. of America, 656 So.2d 486 (Fla. 2d DCA 1995), disapproved of by H.B.A, Management, Inc. v. Estate of Schwartz, 693 So.2d 541 (Fla.1997), National requested the court to prohibit the plaintiff from making ex parte contact with its former employees. The trial court entered a Barfuss order which prohibited ex parte contact by the plaintiff with ten former employees of National. Actually, the plaintiff had deposed three of these former employees, so the Barfuss order effectively prohibited ex parte contact with seven of National's former employees. The plaintiff next moved to depose the former employees but failed to satisfy the court as to the necessity for taking their depositions. Hence the trial court denied the plaintiff's request. In sum, the trial court granted the plaintiff the right to depose fifteen current and former employees. The plaintiff deposed thirteen employees, each of whom played a role in Mr. Cascio's care during his residency at National's facility.
Upon transfer of venue to Pasco County, the plaintiff again moved to depose additional current and former employees of National. In affirming Judge Gallagher's prior orders, Judge Glisson ruled that the plaintiff could not take additional depositions without leave of court. At the pretrial conference, the plaintiff moved in limine to prohibit National from introducing evidence to which the plaintiff had been denied access during discovery. The trial court ruled:
[National's counsel] absolutely cannot use something that I wouldn't let you have. Absolutely ... I don't see howI can't imagine that they would think otherwise. But if they desire to call a witness or put on or present documentation that may have been discoverable if you had taken action to get it or sought leave of Court after the orders were entered, then I don't feel that needs to be precluded.
The record reveals the trial was competently handled. At trial the evidence produced by National involved its clinical records or came from witnesses previously deposed by the plaintiff. Expert witnesses testified for each side, and while there was conflicting evidence, there is substantial competent evidence to sustain the verdict.
The rules of discovery are designed to eliminate, as far as possible, concealment and surprise in the trial of a lawsuit, to the end that judgments be rested on the real merits of causes. See Zuberbuhler v. Division of Admin., 344 So.2d 1304 (Fla. 2d DCA 1977). Nevertheless, a trial judge who is in a position to have first-hand knowledge of pending litigation and the conduct of counsel possesses broad discretion in discovery matters. A trial court's ruling on procedural matters will be reversed only upon a showing of abuse of discretion. See Mercer v. Raine, 443 So.2d 944 (Fla.1983). The regulation by the court of depositions is largely a matter of discretion. See City of Miami Beach v. Wolfe, 83 So.2d 774 (Fla.1955). In measuring the reasonableness of a trial judge's discretion, appellate courts must recognize the superior vantage point of the trial *26 judge. See Canakaris v. Canakaris, 382 So.2d 1197 (Fla.1980). Here the trial court's granting the protective order was consistent with the exercise of reasonable restrictions on depositions and did not constitute an abuse of discretion. Although this court's 1995 decision in Barfuss v. Diversicare Corp. of America was disapproved in 1997, the trial court was correct in issuing it when it was entered. All the plaintiff had to do to depose more of National's employees was to demonstrate reasonable necessity. Having failed to do so, the plaintiff cannot complain.
In granting the motion for new trial, Judge Bray concluded that "the error caused by the order prohibiting ex parte communication with former employees of [the defendant] caused harmful error which requires a new trial," an error Judge Bray found compounded by the failure of the former trial judge to allow those witnesses to be deposed.
Before a trial court grants a new trial based on pretrial discovery orders, such orders must have substantially prejudiced the movant and the error complained of must have resulted in a miscarriage of justice. See, e.g., City of Hollywood v. Jarkesy, 343 So.2d 886 (Fla. 4th DCA 1977). Here, the trial court found that the plaintiff was substantially prejudiced by discovery rulings of two prior judges. Because the order awarding a new trial was entered by a successor judge on the basis of a study of the record, the discretion of the trial court to set aside the jury's verdict is significantly diminished in this case. See Tri-Pak Mach., Inc. v. Hartshorn, 644 So.2d 118 (Fla. 2d DCA 1994). The plaintiff has not shown that it was prejudiced by that order, and we conclude that, in light of the circumstances of this case, entry of the Barfuss order and the orders restricting discovery was harmless. See § 59.041, Fla. Stat. (1995). Accordingly, we hold it was an abuse of discretion to grant the plaintiff a new trial.

National's Motion for Attorney's Fees
In accordance with section 768.79, National timely served an offer of judgment in the amount of $40,000 that was rejected. When National received a verdict in its favor, it immediately filed a motion for attorney's fees. The trial court denied National's motion and limited defendant's entitlement to attorney's fees to section 400.023, Florida Statutes (1995).
Section 768.79(1), Florida Statutes (1995), provides, in pertinent part:
In any civil action for damages filed in the courts of this state, if a defendant files an offer of judgment, which is not accepted by the plaintiff within 30 days, the defendant shall be entitled to recover reasonable costs and attorney's fees incurred by him or on his behalf....
Section 400.023 provides that "[p]revailing defendant may be entitled to recover reasonable attorney's fee pursuant to s. 57.105." Section 57.105, Florida Statutes (1995), permits recovery of attorney's fees only when the opposing party files a suit that is without justiciable issues of fact or law. The legislative purpose of section 768.79 is to encourage the early settlement and termination of litigation in civil cases generally. See McMullen Oil Co. v. ISS Int'l Serv. Sys., Inc., 698 So.2d 372 (Fla. 2d DCA 1997). As the Florida Supreme Court pointed out in Unicare Health Facilities, Inc. v. Mort, 553 So.2d 159, 161 (Fla.1989), "The clear intent of the underlying policy of the rule was to terminate all claims, end disputes, and obviate the need for further intervention of the judicial process." The plaintiff now argues that the form of the offer of judgment was not proper; however, such claim is not cognizable because it was not raised in the trial court. See Laursen v. Filardo, 468 So.2d *27 251 (Fla. 2d DCA 1985). By ruling that the legislature intended to exclude a defendant's entitlement to attorney's fees under section 400.023, the trial court improperly eliminated the role of the offer of judgment statute and rules of procedure appertaining. On remand the trial court shall award the defendant's attorneys a reasonable fee.
Reversed and remanded.
THREADGILL, A.C.J., and STRINGER, J., concur.
NOTES
[1]  Upon Mr. Cascio's death, the trial court granted the motion of Judith Ann Close, the personal representative of John F. Cascio, to substitute the Estate of John F. Cascio as the plaintiff in this case.
