
518 N.W.2d 776 (1994)
Terri MUZINGO, Appellant,
v.
ST. LUKE'S HOSPITAL and Alan C. Whitters, Appellees.
No. 93-724.
Supreme Court of Iowa.
June 22, 1994.
John Riccolo and David L. Baker of Riccolo & Baker, P.C., Cedar Rapids, for appellant.
James A. Gerk and Webb L. Wassmer of Simmons, Perrine, Albright & Ellwood, Cedar Rapids, for appellee Whitters.
Kevin H. Collins and Mark L. Zaiger of Shuttleworth & Ingersoll, P.C., Cedar Rapids, for appellee St. Luke's Hosp.
Considered by HARRIS, P.J., and LARSON, NEUMAN, SNELL, and ANDREASEN, JJ.
PER CURIAM.
The plaintiff, Terri Muzingo, appeals from a judgment of the district court dismissing her petition against defendants, Dr. Allen Whitters and St. Luke's Hospital, for damages sustained after her husband, Glenn Muzingo, put a bomb in her vehicle that exploded while she was in it. At issue is whether court-appointed psychiatrists and hospitals, requested by the district court to render an opinion regarding a patient's mental health, are entitled to absolute quasi-judicial immunity from suit. We believe that they are, and we affirm the judgment of the district court.
On May 1, 1990, Whitters, a psychiatrist practicing in Cedar Rapids, was appointed by the district court pursuant to Iowa Code chapter 229 (1989) to examine Glenn Muzingo for purposes of an evaluation for an involuntary commitment to St. Luke's Hospital. Muzingo was released one day later upon the recommendation of Whitters and the chief medical officer of St. Luke's Hospital.
On September 15, 1990, Muzingo's wife, Terri, was seriously injured when a bomb placed in her car by Muzingo exploded. On September 15, 1992, Terri filed the present action against Dr. Whitters and St. Luke's Hospital, alleging that Whitters and the hospital were negligent in their treatment and discharge of her husband and that such negligence was the proximate cause of her injuries. Terri additionally asserted that Whitters and the hospital should have taken steps to protect the Muzingo family knowing Glenn had contemplated murder.
*777 Whitters and the hospital filed motions to dismiss, claiming that Terri had failed to state a claim upon which relief could be granted. Both also maintained that a court-appointed psychiatrist, acting in furtherance of judicial action, is entitled to absolute quasi-judicial immunity. The district court ruled that both Whitters and the hospital were acting pursuant to court appointment and were thus acting in a quasi-judicial capacity. The district court concluded that Whitters and the hospital were entitled to quasi-judicial immunity and dismissed the petition.
"Dismissal under a motion to dismiss is proper only if no state of facts is conceivable under which the plaintiff might show a right of recovery." Renander v. Inc., Ltd., 500 N.W.2d 39, 40 (Iowa 1993). A motion to dismiss admits the allegations in the petition, and they are to be construed in a light most favorable to the pleader, with doubts resolved in the pleader's favor. Id. If the viability of a claim is at all debatable, courts should not sustain a motion to dismiss. Cutler v. Klass, Whicher & Mishne, 473 N.W.2d 178, 181 (Iowa 1991).
Dr. Whitters and St. Luke's Hospital were appointed by the district court, pursuant to section 229.8(3)(b) to submit a written report regarding Glenn Muzingo's mental condition prior to his involuntary commitment hearing. Under section 229.10(3) if the court-appointed psychiatrist or other designated physician determines that a patient is not mentally ill, the district court may dismiss the application for involuntary committal on its own motion and without notice. However, if the psychiatrist finds that a patient is mentally ill, the district court must schedule a hearing. Iowa Code § 229.10(4).
Iowa law has long recognized that judges have absolute immunity from damages for acts committed within their judicial jurisdiction. Blanton v. Barrick, 258 N.W.2d 306, 308 (Iowa 1977). This immunity has been applied even when the judge is accused of acting maliciously and corruptly because as a matter of policy it is in the public's best interest that judges should exercise their function without fear of consequences and with independence. Id. Iowa courts, however, have traditionally declined to extend judicial immunity to nonjudicial officers where malice was alleged. Vander Linden v. Crews, 205 N.W.2d 686, 689 (Iowa 1973).
Although this case marks the court's first opportunity to address the issue of whether court-appointed psychiatrists and hospitals are included within the penumbra of quasi-judicial immunity, we have extended quasi-judicial immunity to nonjudicial officers when their actions were integral to the judicial process. Most recently, this court extended quasi-judicial immunity to court-appointed guardians ad litem. Babbe v. Peterson, 514 N.W.2d 726 (Iowa 1994). Absolute immunity was also extended to prosecuting attorneys because harassment by unfounded litigation would cause prosecutors to be distracted from their duties and might cause them to color their decisions instead of exercising independent judgment. Blanton, 258 N.W.2d at 310. From these cases it is clear that, in determining whether absolute immunity applies, the focus is on the nature of the function performed, not on the identity or title of the particular actor. The key question in the present case is whether a court-appointed psychiatrist's and hospital's activities are an integral part of the judicial process so that to deny immunity would disserve the broader public interest that nonjudicial officers act without fear of liability.
In Myers v. Morris, 810 F.2d 1437, 1466-67 (8th Cir.1987), the court recognized that nonjudicial persons who fulfill quasi-judicial functions intimately related to the judicial process have absolute immunity from damage claims arising from their performance of delegated functions. The Myers court opined that a court-appointed psychologist, when requested to provide a report on an individual, acts as an arm of the judge and is protected by absolute quasi-judicial immunity. Id. at 1467. Other jurisdictions that have considered this issue have unanimously ruled that court-appointed psychiatrists or mental health providers perform quasi-judicial functions and for that reason are granted judicial immunity. See, e.g., Snyder v. Faget, 295 Ala. 197, 326 So.2d 113 (1976); Lavit v. Superior Court, 173 Ariz. 96, 839 P.2d 1141 (Ariz.App.1992); Howard v. Drapkin, 222 Cal.App.3d 843, 271 Cal.Rptr. 893 (2d Dist. *778 1990); Montoya v. Bebensee, 761 P.2d 285 (Colo.App.1988); Cunningham v. District of Columbia, 584 A.2d 573 (D.C.1990); Cawthon v. Coffer, 264 So.2d 873 (Fla.Dist.Ct.App. 1972); Seibel v. Kimble, 63 Haw. 516, 631 P.2d 173 (1981); Bader v. State, 43 Wash. App. 223, 716 P.2d 925 (1986).
We believe that, when psychiatrists and other mental health providers are appointed by the court and render an advisory opinion regarding an individual's mental condition, they are acting as an arm of the court and should be protected from suit by absolute quasi-judicial immunity. Psychiatry is not an exact science and professional opinion in that field cannot be expected to be 100% accurate. Without this immunity, mental health professionals would continually be subject to vexatious lawsuits any time a disenchanted citizen did not like the recommendation made regarding an individual's mental health. The threat of liability could undermine objectivity and independence and the professionals' willingness to accept court appointments.
We affirm the judgment of the district court.
AFFIRMED.
