
150 Cal.App.3d 975 (1984)
198 Cal. Rptr. 263
ALLAN TREWIN et al., Plaintiffs and Appellants,
v.
THE STATE OF CALIFORNIA et al., Defendants and Respondents.
Docket No. 68966.
Court of Appeals of California, Second District, Division Five.
January 17, 1984.
*976 COUNSEL
Karl Seuthe and Joseph N. Kornowski for Plaintiffs and Appellants.
John K. Van de Kamp, Attorney General, Nelson Kempsky, Chief Deputy Attorney General, Richard D. Martland, Chief Assistant Attorney General, Marvin Goldsmith, Assistant Attorney General, Robert H. Francis and Vera Fisch, Deputy Attorneys General, for Defendants and Respondents.
OPINION
HASTINGS, J.
Allan and Patricia Trewin, appellants, were seriously injured when an automobile driven by Harvey Foster Wood, age 87, crossed *977 the center divider of a highway and collided with their automobile. Appellants sued the State of California, respondent, which issued a driver's license through the Department of Motor Vehicles (DMV) to Wood before the accident. Their complaint alleged that DMV knew Wood was unable to safely operate a motor vehicle upon the streets and highways. The trial court entered a judgment on the pleadings in favor of respondent State of California and this appeal followed.
The judgment on the pleadings was granted to appellants' first amended complaint. On the day of trial, appellants made a motion for leave to amend the first amended complaint to insert additional allegations. The motion was granted.
The DMV issued the driver's license to Wood on November 24, 1976. On January 9, 1977, less than two months later, at or near Imperial Highway, near the intersection of Meyer in La Mirada, or Santa Fe Springs, California, Wood was operating his motor vehicle on the wrong side of the road after jumping a divider. It collided with appellants' vehicle which was traveling westbound on Imperial Highway. The collision caused appellant Patricia Trewin to be projected through the windshield of their automobile and resulted in both of the appellants suffering skull fractures and multiple fractures, including fracture of Allan Trewin's ribs, right foot and right ankle.
The first amended complaint with interlineated amendments in summary alleged the following: Respondent negligently, tortiously, unlawfully, et al., issued a California driver's license to Wood (1) after ascertaining that Wood was a person of advanced years and diminished physical and mental agility to the point of senility and knowing that issuance of driving privileges to him would endanger the lives of other persons lawfully upon the streets and highways, (2) performed their ministerial duties mandated by section 12805 of the Vehicle Code and section 815.6 of the Government Code by (a) issuing and renewing a driver's license to Wood after being informed and determining that he was unable to safely operate a motor vehicle upon the streets and highways, and (b) failing to revoke Wood's driver's license after being informed and having notice that he was unable to safely operate a motor vehicle on the streets and highways.[1] The conduct of respondent proximately caused and contributed to plaintiffs' injuries.
Section 815.6 of the Government Code provides: "Where a public entity is under a mandatory duty imposed by an enactment that is designed to *978 protect against the risk of a particular kind of injury, that public entity is liable for an injury of that kind proximately caused by its failure to discharge the duty unless the public entity establishes that it exercised reasonable diligence to discharge the duty."
Section 12805, subdivision (e) of the Vehicle Code provides in relevant part: "The department shall not issue a driver's license to, or renew a driver's license of any person:
".... .... .... .... ...
"(e) When it is determined, by examination or other evidence, that the person is unable to safely operate a motor vehicle upon a highway (1) because of experiencing, within the last three years, either a lapse of consciousness or an episode of marked confusion caused by any condition which may bring about recurrent lapses or (2) because of any other disability, disease, or disorder or (3) because of lack of skill."
In the hearing on the motion for judgment on the pleadings, the court listened to appellants' counsel's statement concerning the evidence to support the allegations of the first amended complaint, including deposition testimony from a DMV driver's license examiner that he noted on Wood's driver's license application in November of 1976 that Mr. Wood was suffering from "general debilities." After counsel's statements, the court made the following comments:
"It seems to me that what you are asking me to do is to say that the words `general debilities,' as you have suggested were noted by the examiner on whatever document he uses to report his decision on the driving ability of the individual, come within these terms, `any disability, disease, or disorder.'
".... .... .... .... ...
"So, even though I am going to take judicial notice of the fact of this document, and your statement that you will, of course, on trial be able to establish that these words, `general debilities,' were noted, I don't see how I can get the extra inch that is necessary to say that those words, by themselves, mean that there has been a decision which takes this out of discretion and says that a determination having been made, then the mandatory portion, quote, not to issue, close quote, applies. I don't see how I can do that....
*979 "[I]t is as easy to say that he made a determination that there was nothing that was the matter with this man. And that is easier for me to stomach ..."
Appellants contend that the first amended complaint pleaded a cause of action, and therefore the court erred in granting a motion for judgment on the pleadings. Appellants also contend that in granting the motion, the court heard evidence and decided issues of fact which in turn persuaded the court to improperly grant the motion.
Respondent counters that the facts pleaded in the amended complaint were similar to those set forth in Papelian v. State of California (1976) 65 Cal. App.3d 958 [135 Cal. Rptr. 665], where the court ruled in favor of the State of California. Papelian held that determination by the DMV to issue or not to issue a driver's license pursuant to Vehicle Code section 12805 was a discretionary act, and therefore the State of California was immune from liability for any damages resulting from issuance of the license under the provisions of Government Code section 818.4.[2]

DISCUSSION
(1) Appellants argue that the facts pleaded in their first amended complaint sufficiently allege that respondent had a mandatory duty to refrain from issuing or renewing Wood's license, whereas in Papelian the duty was discretionary. The distinction is outlined by appellants as follows:
Citing Van Alstyne, California Government Tort Liability Practice (Cont.Ed.Bar 1980) section 2.41, appellants argue that Government Code section 815.6 makes a public entity liable for its failure to discharge "`a mandatory duty imposed by an enactment that is designed to protect against the risk of a particular kind of injury,' unless the entity establishes that `it exercised reasonable diligence to discharge the duty.'" The term "enactment" means a constitutional provision, statute, charter provision, ordinance or authorized rule or regulation having the force of law. (Gov. Code, §§ 810.6, 811.6.)
Vehicle Code section 12805 is an enactment that imposes a "mandatory duty" upon the State of California, Department of Motor Vehicles within *980 the meaning of Government Code section 815.6. This section provides that DMV shall not issue to, or renew a driver's license of, any person when it is determined by examination or other evidence that such person is unable to safely operate a motor vehicle upon a street or highway.
Appellants argued to the trial court that they had evidence including but not limited to the observations of the DMV examiner that would establish that Wood was not qualified for a driver's license and this was known to respondent. The trial court, however, made the following observation: "So, even though I am going to take judicial notice of the fact of this document, and your statement that you will, of course, on trial be able to establish that these words, `general debilities,' were noted, I don't see how I can get the extra inch that is necessary to say that those words, by themselves, mean that there has been a decision which takes this out of discretion and says that a determination having been made, then the mandatory portion, `not to issue,' applies. I don't see how I can do that."
This statement by the court reveals it acted outside the scope of the motion before it by receiving evidence and interpreting "general debilities" as a condition suffered by Wood that was less severe than those stated in Vehicle Code section 12805, subdivision (e). Webster's Third New International Dictionary Unabridged defines debility as "[t]he quality or state of being weak, feeble, or infirm; esp. physical weakness." Whether the examiner was using the term "general debilities" as analogous to the requirements of section 12805, subdivision (e) is a question of fact that could only be determined from all of the evidence produced by appellants at time of trial.
As stated earlier, respondent contends the court was required as a matter of law to dismiss the action because the facts of this case are so similar to the facts in Papelian. In Papelian the complaint had alleged that the DMV issued a driver's license to a Mrs. Lang, an 81-year-old woman, who the department negligently failed to ascertain was too old and senile to operate a motor vehicle safely. Mrs. Lang while driving in a wrong direction, struck and killed the driver of another automobile. The opinion states, "Under section 12800 et seq. of the Vehicle Code, supra, the Department shall not issue a driver's license to any person who is unable as shown by examination to understand traffic signs (etc.) and shall not issue a driver's license when it appears by examination or other evidence that such person is unable to operate a motor vehicle upon a highway safely because of physical or mental defect or lack of skill. It is to be presumed that the defendant department followed its official duties as required by the Vehicle Code for issuing the driver's license. Appellants do not indicate what facts, if any, they might allege that the driver's license was issued in a manner other than *981 is authorized by the Vehicle Code." (65 Cal. App.3d at p. 963; italics added.)
In the context of our present case the Papelian opinion is something less than desired. We agree with appellants that DMV has a mandatory duty to refuse to issue or renew a license if it has determined beforehand that the person is unable to safely operate a motor vehicle upon a highway as defined in Vehicle Code section 12805, subdivision (e). An argument can be made that Papelian does not disagree with this conclusion. The Papelian complaint did not specifically allege that the DMV had examined and determined beforehand that it was unsafe to issue a license to Mrs. Lang, as the amended pleadings do in the case at bar. The complaint had merely alleged that DMV was negligent because it failed to ascertain that Mrs. Lang was too elderly and senile to be capable of safely driving a motor vehicle. While it might be contended that the distinction is mere form over substance, some meaning must be given to the opinion's concluding language emphasized above which indicates the result would have been different had the complaint alleged facts that the license was issued "in a manner other than as authorized by the Vehicle Code." We choose to interpret this to mean that the complaint might have stated a cause of action if DMV had known of Mrs. Lang's physical handicaps before issuing the license.
If, however, Papelian intended to hold that a cause of action could not be pleaded against the DMV in a fact situation similar to our present case because the issuance of a driver's license is a discretionary act and the DMV is immune from liability under section 818.4, supra, we respectfully disagree.
Having properly pleaded a cause of action for the reasons stated in this opinion, appellants' complaint should not have been dismissed upon a motion for judgment on the pleadings. (2) The court's task in ruling on such a motion is set forth in California Judges Benchbook: Civil Trials (1981) section 9.37, page 295 (Cal. Center for Jud. Education and Research): "In ruling on a defendant's motion for judgment on the pleadings, the court cannot consider any matter outside the complaint (or cross-complaint) or any defensive matters in the answer, except as noted below. The motion is determined on the same principles as a demurrer to the complaint on the same ground. All the facts alleged in the complaint are admitted for the purposes of the motion, and the court determines whether these facts constitute a cause of action. If the necessary facts are contained in the complaint, the objection that they are defectively set forth, or are in an ambiguous or uncertain form, is unavailing. Some fact essential to the cause of action must be entirely absent. Hibernia Sav. & Loan Soc'y v. Thornton (1897) 117 C. 481, 482, 49 P. 573, 574. See also Welshans v. Santa Barbara *982 (1962) 205 CA2d 304, 305, 23 CR 108, 109; Builders' Control Serv., Inc. v. North Am. Title Guar. Co. (1962) 205 CA2d 68, 73, 22 CR 712, 715."
The judgment on the pleadings is reversed.
Stephens, Acting P.J., and Ashby, J., concurred.
NOTES
[1]  On April 4, 1977, DMV revoked Wood's driver's license giving as the reason, "This action is required for the safety of yourself and other persons upon the highways because the records of this Department show that your ability to operate a motor vehicle safely can be affected because you have a physical condition."
[2]  Section 818.4 provides: "A public entity is not liable for an injury caused by the issuance, denial, suspension or revocation of, or by the failure or refusal to issue, deny, suspend or revoke, any permit, license, certificate, approval, order, or similar authorization where the public entity or an employee of the public entity is authorized by enactment to determine whether or not such authorization should be issued, denied, suspended or revoked."
