
133 Cal.Rptr.2d 735 (2003)
108 Cal.App.4th 588
INLAND EMPIRE HEALTH PLAN, Petitioner,
v.
The SUPERIOR COURT of the County of Riverside, Respondent;
Ann Marie Santana, Real Party in Interest.
Vantage Medical Group, Inc., Petitioner,
v.
The Superior Court of Riverside County, Respondent;
Ann Marie Santana, Real Party in Interest.
Nos. E031104, E031134.
Court of Appeal, Fourth District, Division Two.
April 11, 2003.
*736 Ryan, Datomi & Flores, Richard J. Ryan, Roseville, Nancy L. Flores; Greines, Martin, Stein & Richland, Robert A. Olson, and Peter O. Israel, Los Angeles, for Petitioner Inland Empire Health Plan.
Sedgwick, Detert, Moran & Arnold, David M. Humiston, Douglas J. Collodel, and Robert C. Bohner, Los Angeles, for Petitioner Vantage Medical Group, Inc.
No appearance for Respondent.
Schuler & Kessel, Jack M. Schuler and Sam Ekizian for Real Party in Interest.
Certified for Partial Publication.[*]


*737 OPINION
HOLLENHORST, J.
This case concerns the tort liability of a public entity Medi-Cal health maintenance organization (HMO) and a private independent practice association (IPA) for injuries negligently inflicted on a plan member by contracting physicians. The causes of action are: (1) negligent credentialing; and (2) medical malpractice, alleging that (a) the physicians who caused the injury were ostensible agents of the defendants, and (b) the defendants were vicariously liable for the referring physician's negligent referral to the physicians who caused the injury.
Petitioners, defendants in the underlying action, petitioned this court for a writ of mandate directing the trial court to vacate its orders denying defendants' motions for summary judgment and enter new orders granting defendants' motions for summary judgment. As explained below, we conclude that the trial court erred when it denied the motions and therefore grant the writ of mandate as to both petitioners.

THE FACTS
Inland Empire Health Plan (IEHP) is a public entity HMO. It operates under a joint powers agreement between Riverside and San Bernardino Counties to provide health coverage for Medi-Cal participants. IEHP arranges and pays for medical services to plan members by contracting with IPA's and others for the delivery of those services.
Vantage Medical Group, Inc. (Vantage) is a private entity IPA. As described in Chase v. Independent Practice Association, Inc. (1991) 31 Mass.App.Ct. 661, 583 N.E.2d 251, an IPA is an association of physicians that contracts to provide medical care to HMO members in the physicians' own offices. The IPA in turn contracts with each of its independent practitioner members regarding the terms of participation in the IPA, including payment. The physicians also maintain their own practices outside the HMO. IPA's also contract with nonmember physicians to perform services, in this case abortions, that member physicians do not provide.
Real party in interest Ann Marie Santana (Santana) sought a referral for an abortion from her primary care physician, Dr. Bonafacio Regis, who is a member of Vantage. Dr. Regis referred Santana to A Lady's Choice Clinic, which had a contractual relationship with Vantage to perform this service. The referral did not specify a particular doctor. Dr. Joseph Durante owned and operated the clinic. Dr. John Allen worked at the clinic.
Santana's complaint for damages alleges the following facts. Dr. Allen performed the abortion, during which he perforated Santana's uterus and bowel. Dr. Allen told Dr. Durante that he suspected he had perforated Santana's uterus. The record conflicts as to whether Dr. Allen told Santana of this possibility.[1] Dr. Durante provided follow-up care over the next three days. He repeatedly advised Santana not to seek emergency care, despite her complaints of extreme pain, nausea, weakness and inability to eat. Santana eventually sought emergency treatment on her own and, after undergoing emergency surgery, *738 was hospitalized for 18 days with life-threatening intestinal injuries, including peritonitis.
The first amended complaint sought tort damages against IEHP, Vantage, and Drs. Regis, Durante and Allen. The causes of action against IEHP and Vantage are: (1) negligent credentialing, in that they negligently approved, or "credentialed" Dr. Durante to receive reimbursements for providing abortion services to Medi-Cal patients, and negligently allowed Santana to be treated by Dr. Allen, who had not been credentialed at all; and (2) medical malpractice based on the vicarious liability theories that Drs. Durante and Allen were ostensible agents of IEHP and Vantage, and that Dr. Regis, acting on behalf of both IEHP and Vantage, had negligently referred Santana to A Lady's Choice Clinic.
The trial court granted Dr. Regis's unopposed motion for summary judgment. The trial court denied IEHP's motion for summary judgment, along with Vantage's motion for summary adjudication and Vantage's joinder of IEHP's motion for summary judgment. The court likewise denied the joinders in those motions of Drs. Durante and Allen. IEHP then filed a petition for writ of mandate in this court. Vantage filed a petition joining in IEHP's arguments. This court ordered the two actions to be consolidated.

DISCUSSION
"The purpose of the law of summary judgment is to provide courts with a mechanism to cut through the parties' pleadings in order to determine whether, despite their allegations, trial is in fact necessary to resolve their dispute. [Citation.]" (Aguilar v. Atlantic Richfield Co. (2001) 25 Cal.4th 826, 843, 107 Cal.Rptr.2d 841, 24 P.3d 493.) "The court must `grant[ ]' the `motion' `if all the papers submitted show' that `there is no triable issue as to any material fact' [citation]that is, there is no issue requiring a trial as to any fact that is necessary under the pleadings and, ultimately, the law [citations]and that the `moving party is entitled to a judgment as a matter of law.'" (Ibid., citing Code Civ. Proc., § 437c.) As set forth in more detail below, there is no triable issue as to any material fact, and IEHP and Vantage are entitled to judgment as a matter of law.

A. IEHPPublic Entity Immunity

In its petition, IEHP raises for the first time the defense of governmental immunity. IEHP argues that, as a governmental entity it is immune from the negligent credentialing claim for its discretionary decision to approve Dr. Durante to receive Medi-Cal reimbursements. Santana asserts that we may not consider this defense at all, given that IEHP did not raise it in its motion for summary judgment.
Generally, appellate courts do not consider defenses that could have been asserted in the lower court but were not. (In re Aaron B. (1996) 46 Cal.App.4th 843, 846, 54 Cal.Rptr.2d 27.) However, governmental immunity from liability is a jurisdictional matter that can be raised for the first time on appellate review. (Kemmerer v. County of Fresno (1988) 200 Cal.App.3d 1426, 1435, 246 Cal.Rptr. 609.) Thus, we may consider whether IEHP is immune from the negligent credentialing claim.
Under the Government Tort Claims Act (Gov.Code, §§ 810 et seq.), "public entities" are liable in tort only as specifically provided by statute. (Gov.Code, § 815, subd. (a).) IEHP is a public entity. It was formed by a joint powers agreement between Riverside and San Bernardino Counties. That agreement specifically *739 identifies IEHP as a "public entity." Government Code section 6500 defines the entity created by counties under a joint powers agreement as a "public agency." Finally, Government Code section 6507 states that a public "agency" created by a joint powers agreement "is a public entity."
IEHP argues that it is immune from the negligent credentialing claim under Government Code sections 818.4 and 820.2. Government Code section 818.4 states that "A public entity is not liable for an injury caused by the issuance ... or by the failure or refusal to ... suspend or revoke, any ... license ... approval ... or similar authorization where the public entity ... is authorized by enactment to determine whether or not such authorization should be issued, denied, suspended or revoked." This immunity applies when the decision is a discretionary one, as when the entity is authorized to decide whether to issue a permit or approval (Elson v. Public Utilities Commission (1975) 51 Cal. App.3d 577, 124 Cal.Rptr. 305) or determine whether a construction project has complied with all requirements (Thompson v. City of Lake Elsinore (1993) 18 Cal. App.4th 49, 22 Cal.Rptr.2d 344; see also Gov.Code, § 820.2 ["Except as otherwise provided by statute, a public employee is not liable for an injury resulting from his act or omission where the act or omission was the result of the exercise of the discretion vested in him, whether or not such discretion be abused."].) The entity is not immune from liability, however, when it is under a statutory obligation to grant or withhold a permit or approval or when the decision is a nondiscretionary, ministerial act. For example, a county must deny a building permit when the contractor lacks the proper insurance[2] (Morris v. County of Marin (1977) 18 Cal.3d 901, 136 Cal. Rptr. 251, 559 P.2d 606), and a city has a mandatory duty to issue a certificate of occupancy once it has found that a construction project has complied with all requirements (Thompson v. City of Lake Elsinore, supra, 18 Cal.App.4th 49, 22 Cal. Rptr.2d 344). This difference is also articulated as between planning and basic policy decisions on one hand and operational decisions that implement the basic policy decisions on the other. (Johnson v. State of California (1968) 69 Cal.2d 782, 73 Cal. Rptr. 240, 447 P.2d 352.)
IEHP argues that the decision to credential Dr. Durante involved the issuance of a discretionary approval or authorization and that IEHP's decision was authorized by Department of Health Services regulations. Santana counters that, while the formulation of IEHP's policy for credentialing physicians involved the use of discretion, the implementation of that policy to credential Dr. Durante was an operational decision not requiring the use of discretion. Santana also argues generally that IEHP is not in the business of licensing physicians and so Government Code section 818.4 does not apply.
We agree with Santana that IEHP is not in the business of licensing physicians because, of course, no enactment authorizes IEHP to grant physicians a license to practice medicine. However, IEHP is authorized by enactment to determine which physicians are eligible to receive Medi-Cal reimbursements. For example, the standards IEHP uses to determine *740 what doctors can receive Medi-Cal reimbursements must "ensure the opportunity for substantial participation" of traditional Medi-Cal providers, but IEHP may establish its own policies and standards for the credentialing of such providers, as long as they are consistent with federal standards. (Cal.Code Regs., tit. 22, § 53800, subd. (b)(2)(C)(2); Cal.Code Regs., tit. 22, § 53810, subd. (jj).) IEHP's decision to credential Dr. Durante was a discretionary one because, among other things, IEHP was called upon to determine whether Dr. Durante met the requirements for Medi-Cal reimbursements, just as a building official is called upon to determine whether a renovation project meets the requirements of the local building code. (See Thompson v. City of Lake Elsinore, supra, 18 Cal.App.4th 49, 22 Cal. Rptr.2d 344.) As a matter of law, then, IEHP cannot be liable to Santana for negligent credentialing.
Santana argues, and IEHP agrees, that governmental immunity does not apply to the causes of action grounded in vicarious liability. These causes of action are for medical malpractice based on Dr. Regis's negligent referral and for medical malpractice by Drs. Durante and Allen based on ostensible agency.
B.-D.[**]

DISPOSITION
The petition for writ of mandate is granted. Let a peremptory writ of mandate issue directing the Superior Court of Riverside County to vacate its orders denying petitioners' motions for summary judgment and to enter new orders granting those motions. Petitioners are awarded their costs of suit.
Petitioners are directed to prepare and have the peremptory writ of mandate issued, copies served, and the original filed with the clerk of this court, together with proof of service on all parties.
We concur: RAMIREZ, P.J., and WARD, J.
NOTES
[*]   Pursuant to California Rules of Court, rules 976(b) and 976.1, this opinion is certified for partial publication publishing the entire opinion with the exception of sections B, C and D of the Discussion.
[1]  Santana states in her declaration that "Dr. Allen did not tell me he may have perforated my uterus. ..." The May 5, 2000, petition to the State Medical Board seeking to revoke Dr. Durante's probation states that "Dr. John A. advised [Santana] and her boyfriend of the possibility of a uterine perforation and the need to call [Dr. Durante] if she was having any unusual symptoms."
[2]  Santana asserted at oral argument that Drs. Durante and Allen did not have malpractice insurance at the time IEHP and Vantage credentialed them to receive Medi-Cal reimbursements. However, there is no indication in the record that the physicians did not have malpractice insurance at that time, and Santana points to no state requirement that Medi-Cal HMO's confirm such insurance coverage when credentialing physicians.
[**]   See footnote *, ante.
