
634 So.2d 250 (1994)
LEE COUNTY, a political subdivision of the State of Florida, Appellant,
v.
STATE FARM MUTUAL AUTOMOBILE INSURANCE COMPANY, Appellee.
No. 93-03111.
District Court of Appeal of Florida, Second District.
March 25, 1994.
James G. Yaeger, Lee County Atty., and Thomas L. Wright, Asst. County Atty., Fort Myers, for appellant.
Penny W. Schmidt, Fuller & Minor, Fort Myers, for appellee.
BLUE, Judge.
Lee County appeals the issuance of a peremptory writ of mandamus that requires it to release emergency medical services records in a particular manner. We agree with the County that the writ was improperly issued and, accordingly, quash the writ of mandamus.
The Lee County Tax Collector's Office is the custodian of records prepared by Lee County Medical Services. Pursuant to section 401.30(3), Florida Statutes (1991), "[r]ecords of emergency calls that contain patient examination or treatment information are confidential and exempt from the provisions of s. 119.07(1) [public records act] and shall not be disclosed without the consent of the person to whom they pertain." The clear purpose of the statute is to maintain the confidentiality of the medical records.
In order to fulfill its responsibilities under this section, the County implemented a procedure to ensure that these confidential records were not improperly released. The County's policy requires the patient's notarized signature on all release forms. State Farm objected to the requirement of a notarized signature and sought a writ of mandamus. State Farm argued a notarized consent form was not required because it was not dictated by section 401.30. The trial court agreed and issued the writ requiring the County to release emergency medical records upon receipt of a signed, not notarized, *251 release by the patient and the payment of a reasonable photocopying fee.
A writ of mandamus is used to enforce an established legal right by compelling a public officer or agency to perform a duty required by law. Before the court may issue a writ of mandamus, it must be shown that there is a clear legal right on the part of the petitioner and that there is an indisputable legal duty on the part of the respondent. See Fraternal Order of Police v. Odio, 491 So.2d 339 (Fla. 3d DCA), rev. denied, 500 So.2d 544 (Fla. 1986). It is fundamental to the writ that the legal duty of the public agency must be ministerial in nature and not discretionary. Holland v. Wainwright, 499 So.2d 21 (Fla. 1st DCA 1986).
Mandamus was inappropriately issued in this case because the act involved requires discretion. The County is statutorily required to protect the confidentiality of the records. We conclude it is reasonable for the County to ensure proper consent before the records are released. This necessarily involves more than a mere ministerial function. The County's requirement is not unreasonable or onerous. The County is merely protecting the confidentiality that has been entrusted to it by the public.
Accordingly, having determined the writ of mandamus was wrongly issued, we quash the writ.
SCHOONOVER, A.C.J., and QUINCE, J., concur.
