
25 Cal.App.4th 1113 (1994)
31 Cal. Rptr. 8
THOMAS WOOD, Plaintiff and Appellant,
v.
RIVERSIDE GENERAL HOSPITAL et al., Defendants and Respondents.
Docket No. G013623.
Court of Appeals of California, Fourth District, Division Three.
May 11, 1994.
*1115 COUNSEL
Pancer & Nachlis, Marvin B. Nachlis and Richard P. Langevin for Plaintiff and Appellant.
Patterson, Ritner, Lockwood, Zanghi & Gartner, John Zanghi, Karen N. Brueckner, Greines, Martin, Stein & Richland, Timothy T. Coates and Carolyn Oill for Defendants and Respondents.
*1116 OPINION
RYLAARSDAM, J.[*]
Thomas Wood commenced this action on May 10, 1989. Respondent Riverside County answered and eventually was granted summary judgment predicated upon the failure of Wood to present a claim for damages before filing the action as required by Government Code section 911.2.[1] Wood argues that a "Patient Problem/Complaint Form" submitted to the hospital's quality assurance department on June 20, 1988, together with a "Supplemental Note" dated June 29, both complaining about the quality of his care constituted substantial compliance with the claims statute. We disagree.
Following an automobile accident on May 11, 1988, plaintiff was confined to Riverside General Hospital. His complaint alleges medical malpractice and related causes of action. It is undisputed that Riverside General Hospital was owned and operated by the County of Riverside and is entitled to the benefits of the claims provisions of the Tort Claims Act (Gov. Code,[2] § 900 et seq.).
While Wood was still hospitalized, his mother submitted a written communication to the hospital on his behalf, reciting in great detail numerous items of mistreatment. The first two pages of this document, dated June 20, 1988, consist of handwriting on a "Patient Problem/Complaint Form." The next four pages are typewritten and indicate neither the author nor the addressee. The final page is dated June 29, is typewritten, and bears the signature of Wood's mother. The parties apparently agree that this material was supplied to the hospital administration during June 1988. On July 19, the hospital's chief of staff acknowledged receipt of the "letter of June 29, 1988," and stated the matter "has been referred the appropriate people and committees to try to rectify problems so that they do not occur in the future."
No other communication constituting a "claim" was submitted by plaintiff to the County of Riverside.

I
(1a) The primary issue may be simply stated. Is there a triable issue of fact whether plaintiff's letters to the hospital constituted substantial compliance with the claims statute or did the court properly conclude, as a matter of law, that the letters did not constitute substantial compliance?
*1117 The Tort Claims Act provides that, with certain exceptions not relevant hereto, "... no suit for money or damages may be brought against a public entity on a cause of action for which a claim is required to be presented ... until a written claim therefor has been presented to the public entity...." (§ 945.4.) Section 915 specifies that the claim must either be delivered or mailed "to the clerk, secretary, or auditor" of the local public entity. No contention is made that this was done. Section 910.2 requires that the claim "be signed by the claimant or by some person on his behalf." The basic document, presumably transmitted on June 20, 1988, bears no signature; the "supplemental note" of June 29, bears the signature of Miriam Thomas, plaintiff's mother.
Finally, section 910 specifies the required contents of the claim. Some of these requirements are met; significantly, however, the letters completely fail to satisfy the requirements of section 910, subdivision (f) that the claim show the amount claimed or (for claims over $10,000), "whether jurisdiction over the claim would rest in municipal or superior court."
The letters certainly indicate that plaintiff was unhappy with the care received at the hospital. They complain of neglect, unsanitary conditions, failure of the hospital staff to be sensitive to and attend to plaintiff's pain, failure to call in required specialists, and failure to promptly treat some of plaintiff's conditions. However, even the most liberal reading of the letters does not permit an inference that plaintiff intended them to be the assertion of a claim for money damages.
Testing the contents of the letters against the requirements of the Tort Claim Act, we agree with the trial court's conclusion that, as a matter of law, they fail to constitute substantial compliance with the requirements of that act. (2) "The principle [sic] purposes of the claims statute are to give notice to the municipality in order that it be afforded a timely opportunity to investigate the claim and determine the facts; and to avoid unnecessary lawsuits by giving the municipality the opportunity to settle meritorious claims without going through an avoidable trial." (Lacy v. City of Monrovia (1974) 44 Cal. App.3d 152, 155 [118 Cal. Rptr. 277]; accord, San Diego Unified Port Dist. v. Superior Court (1988) 197 Cal. App.3d 843, 847 [243 Cal. Rptr. 163].) (1b) Plaintiff's letters failed to serve either of these purposes. There was a failure to direct the letters to one of the persons specified in section 915; it may be inferred from the acknowledgment by the hospital's chief of staff, that the matter was interpreted as raising concern with respect to internal hospital management and that it was dealt with in that fashion; there is no indication that the letters were forwarded to any county department responsible for the handling of claims against the county *1118 and the content of the letters is not such as to put a recipient on notice that a claim is in fact intended.
When analyzed in the light of the content requirements of section 910, subdivision (f) which requires notice of the amount of the claim, the letters again fail. Had there been any indication that plaintiff intended his letters to constitute a claim against the hospital, the recipient might well have forwarded them to the appropriate county department responsible for the handling of such claims. However, absent such indication, and in view of the failure to address the letters to one of the persons specified in the statute, the letters were inadequate to serve the statutory purposes.
(3a) "Where there has been an attempt to comply [with the claims statute] but the compliance is defective, the test of substantial compliance controls. Under this test, the court must ask whether sufficient information is disclosed on the face of the filed claim `to reasonably enable the public entity to make an adequate investigation of the merits of the claim and settle it without the expense of a lawsuit.'" (Pacific Tel. & Tel. Co. v. County of Riverside (1980) 106 Cal. App.3d 183, 188 [165 Cal. Rptr. 29].) (1c) Arguably, had plaintiff's letters been sent to the appropriate agency for the handling of claims (and, had they been transmitted to the persons designated by the statute, they presumably would have been) the information supplied would have enabled the agency to make an adequate investigation. However, absent such transmission and absent any indication that the correspondence was intended as a claim for money damages, no opportunity to investigate or settle was provided.
(3b) City of San Jose v. Superior Court (1974) 12 Cal.3d 447, 456-457 [115 Cal. Rptr. 797, 525 P.2d 701, 76 A.L.R.3d 1223] notes a twofold test for substantial compliance: "to gauge the sufficiency of a particular claim, two tests shall be applied: Is there some compliance with all of the statutory requirements; and, if so, is this compliance sufficient to constitute substantial compliance?" (Italics in original.). (1d) Here there was a total failure to comply with at least two of the statutory requirements: failure to transmit the documents to the statutorily designated agent and failure to indicate that a monetary claim was being asserted. In the face of this, we conclude that, as a matter of law, there was no substantial compliance with the claims statute.
Appellant's reliance on Phillips v. Desert Hospital Dist. (1989) 49 Cal.3d 699 [263 Cal. Rptr. 119, 780 P.2d 349] is misplaced. There, a medical malpractice plaintiff mailed a notice pursuant to Code of Civil Procedure section 364, subdivision (a) to the hospital. Section 364, subdivision (a) requires potential medical malpractice plaintiffs to notify health care providers of their intent to sue 90 days prior to filing a complaint. The court held *1119 that the notice, which was clearly designated "Intention to Commence Action," was sufficient to trigger an obligation on the part of the agency to give written notice to the claimant of insufficiency of the claim (§ 910.8) or waive any defense based on such insufficiency (§ 911). The character of the notice sent in Phillips differs markedly from plaintiff's letters. No reader of that notice could doubt that Ms. Phillips intended to pursue a medical malpractice claim against the hospital; no such inference must necessarily be drawn from plaintiff's letters. The recipient of the section 364 notice in Phillips, realizing that a claim was being asserted would, in the normal course of business, forward that claim to the persons responsible for investigating and settling such claims. The letters sent on plaintiff's behalf are not designed to be so received.

II
Appellant argues that respondent failed to plead the noncompliance with the claim requirement and that as a result (1) respondent waived the claim requirement and (2) the court erred in ruling on an issue not raised by the pleadings. Both arguments must fail.
(4) Appellants err in assuming that failure to file a claim under the Tort Claims Act constitutes an affirmative defense. The timely filing of a claim is an essential element of a cause of action against a public entity and failure to allege compliance with the claims statute renders the complaint subject to general demurrer. (Briggs v. Lawrence (1991) 230 Cal. App.3d 605, 613 [281 Cal. Rptr. 578].) Since compliance with the claims statute is an element of plaintiff's cause of action, failure to comply is not an affirmative defense. Therefore, a defendant need not plead lack of compliance with the claims statute. Hence a failure to plead such lack of compliance does not constitute a waiver of the defense.
(5a) Appellant correctly notes, however, that it is error to grant summary judgment on the basis of an issue not raised by the pleadings. (Dorado v. Knudsen Corp. (1980) 103 Cal. App.3d 605, 611 [163 Cal. Rptr. 477].) The complaint fails to allege compliance with the claims statute. As noted, the timely filing of a claim is an essential element of a cause of action against a public entity and failure to allege compliance with the claims statute renders the complaint subject to a general demurrer or to a motion for judgment on the pleadings. A motion for summary judgment may effectively operate as a motion for judgment on the pleadings. (Koehrer v. Superior Court (1986) 181 Cal. App.3d 1155, 1171 [226 Cal. Rptr. 820].) Had such a motion been made or had the court treated the summary judgment motion as a motion for judgment on the pleadings, it should have been granted with leave to amend. *1120 Since it is undisputed that the only "claim" submitted by plaintiff consisted of the letters discussed herein, a subsequent motion for summary judgment would have had the same result as that obtained in the court below.
(6) When a motion for summary judgment is in effect a motion for judgment on the pleadings, it is better practice to grant the motion with leave to amend and, after the issues have been properly plead, to renew the motion for summary judgment. As noted in Hejmadi v. AMFAC, Inc. (1988) 202 Cal. App.3d 525, 536 [249 Cal. Rptr. 5]: "... in preparing and ruling upon motions for summary adjudication ... the parties and the court should take care to distinguish between the sufficiency of the pleadings and the sufficiency of the evidence. On summary judgment motions, the pleadings always define the issues. [Citations.] ... If the pleadings are not defective, the court may then determine from the evidence in support of and in opposition to the motion `whether the triable issues apparently raised by them are real or merely the product of adept pleading.' [Citations.] [¶] If the court finds that the pleading is insufficient, it has discretion, ... to grant the opposing party leave to amend. [Citations.] However, a court granting plaintiff leave to amend a cause of action should not at the same time attempt to summarily adjudicate material issues which underlie that same cause of action." (Italics in original.)
(5b) Although such a two-step procedure would have been preferable, here, the result would nevertheless have been the same. In the light of this, no purpose would be served in returning the case to the court below only to have the pleadings amended and, thereafter to have a renewed motion for summary judgment granted.
The judgment is affirmed.
Wallin, Acting P.J., and Sonenshine, J., concurred.
NOTES
[*]   Judge of the Orange Superior Court sitting under assignment by the Chairperson of the Judicial Council.
[1]  Although the appeal purports to be from an order granting summary judgment and such orders are nonappealable, judgment was in fact entered. Therefore we consider the merits. (Modica v. Merin (1991) 234 Cal.App3d 1072 [285 Cal. Rptr. 673].)
[2]  Unless otherwise indicated, all code sections refer to the Government Code.
