Petitioner is the claimant in an action filed under our workmen’s compensation act for the recovery of benefits provided therein. Respondent is the Judge before whom the cause is pending.
After issue was joined in the compensation case, the petitioner’s deposition was taken at which time counsel for the employer was refused permission to talk to one Dr. Coffey, a physician who had treated petitioner, and petitioner, through his counsel, stated he would refuse to sign a medical authorization permitting such interview.
It appears that petitioner had been seen by three doctors in addition to Dr. Coffey, and that these three doctors had been paid by the employer. However, not being satisfied, petitioner had gone to Dr. Coffey for treatment, and Dr. Coffey had not been paid by the employer although payment of his charges were sought in the compensation case pending. Neither had any compensation been paid by the employer to petitioner. A motion was filed in the compensation case asking that the court require petitioner to give an authorization to the defendants to talk to petitioner’s doctors and to obtain copies of any medical records concerning petitioner’s alleged injuries. After a hearing before respondent, petitioner was ordered to sign a medical authorization in the form attached to the order, and which read as follows:
“I do hereby authorize any doctor that has ever treated or examined me, as well as any hospital in which I have ever been a patient, to release any information they may have concerning my physical condition and treatment to Modrall, Seymour, Sperling, Roehl & Harris, Attorneys at Law, Simms Building, Albuquerque, New Mexico ■including medical reports, records, x-rays, test results and findings in general relating to my physical or mental condition.
“I hereby expressly waive any laws, regulations and rules of ethics which might prevent any hospital, doctor or other person who has treated or examined me in a professional capacity or otherwise from disclosing such information.
“I shall appreciate your cooperation with these attorneys and request that *320you freely communicate with them, provided of course the same is without expense to me.”
Petitioner promptly sought relief from this court to prevent respondent from taking further action in connection with the order to furnish the medical authorization. We issued our alternative writ of prohibition to which respondent has filed his response.
By his response respondent raises three ■questions, viz., (1) is the case a proper one for prohibition, (2) is it a proper case for the exercise of superintending control, and (3) did respondent have discretionary power which he exercised in directing'petitioner to sign the authorization ?
Concerning the last question raised, we need only call attention to § 20-1-12 (d) and (f), N.M.S.A.1953, which read as follows :
“(d) A person duly authorized to practice physic or surgery, or a professional or registered nurse, cannot be examined without the consent of his patient as to any communication made by his patient with reference to any real or supposed venereal or loathsome disease or any knowledge concerning such disease obtained by personal examination of such patient; nor shall any doctor or nurse employed by a workmen’s compensation claimant be examined relating to a workmen’s compensation claim without the consent of his patient as to any communication made by his patient •with reference to any physical or supposed physical disease or injury or any knowledge obtained by personal examination of such patient except in instances where the doctor has examined or treated the patient at the expense of the employer, and such payment is consented to by the patient. (Emphasis supplied). * * *
“(f) If a person offer himself as a witness and voluntarily testify with reference to the communications specified in this act (section), that is to be deemed a consent to the examination of the person to whom the communications were made as above provided.”
The parties agree that the language of the statute is clear and unambiguous. However, respondent points out that in the compensation case, payment of Dr. Coffey’s bill is being sought, and asserts that this removes the privilege. However, the clear language of the statute is to the effect that the examination or treatment of the patient must have been “at the expense” of the employer. That it isn’t at his expense, at least until the court has determined that it should be would seem to be apparent. See Pate v. Makin Drilling Co., 66 N.M. 402, 349 P.2d 121 and *321State ex rel. J. P. (Bum) Gibbins, Inc. v. District Court of Fifth Judicial District, 65 N.M. 1, 330 P.2d 964. Where payment of the doctor is sought, as in the case before us, we assume that the employer could have agreed thereto in the case seeking the same, and upon making payment it would have become his expense, and he would have been entitled to the information which he sought. However, as we understand it, he denies liability for workmen’s compensation and has not paid Dr. Coffey.
Respondent also ' asserts that by virtue of Rule 35(a) and (b), § 21-1-1(35) (a) and (b), N.M.S.A.1953, the petitioner should be held to have waived the privilege accorded by § 20-1-12, supra. He agrees that Rule 35 applies only in situations where persons are examined pursuant to order of court, but argues that since the employer paid three doctors and the reports made by these doctors were requested by and supplied to petitioner Rule 35(b) should be construed to the effect that petitioner has waived the privilege here asserted. Suffice it to say concerning this argument that the rule referred to applies only where an examination has been ordered by the court pursuant to the rule and the person examined has requested delivery of a copy of the report of the examination made. There is nothing in the language of the rule that even remotely suggests the interpretation contended for by respondent. Rule 35(b) (2), so far as material reads, “By requesting and obtaining a report of the examination so ordered * * *, the party éxamined waives any privilege * * From the language quoted there can be no room for question that the report which the person examined must request in order for a waiver to result is the report made following the examination ordered by the court, upon good cause shown and upon motion and notice as provided in Rule 35(a). The argument is without merit.
Respondent states that by filing suit the privilege was waived. He cites no authority, and such assertion cannot be reconciled with the language of § 20-1-12, N.M.S.A. 1953, quoted above.
No serious contention is made that petitioner has voluntarily testified so as to have been deemed to have consented under the provisions of § 20-1-12, N.M.S.A.1953, supra.
Accordingly, we are faced with a situation where the Judge before whom the workmen’s compensation case is pending has ordered the claimant therein to .do something which he is clearly not required to do under the statute which the legislature passed for his protection, and something which the court was not authorized to do.
It is respondent’s position that since he had jurisdiction of the parties and of the subject matter of the workmen’s compensa*322tion case, prohibition would not be entertained by us, citing numerous decisions of this court. It is true that the court has so stated the rule in several decisions, one of which is Gilmore v. District Court of Fifth Judicial District, 35 N.M. 157, 291 P. 295. However, there is a corollary to this rule that prohibition will lie where the court is exceeding its jurisdiction, even though it had jurisdiction of the parties and generally of the subject matter. State ex rel. Lynch v. District Court of McKinley County, 41 N.M. 658, 73 P.2d 333, 113 A.L.R. 746; Hammond v. District Court of Eighth Judicial District, 30 N.M. 130, 138, 228 P. 758, 39 A.L.R. 1490; and State ex rel. Harvey v. Medler, 19 N.M. 252, 142 P. 376.
“Counsel argue as though cases in which the writ is issued to restrain the trial court from exceeding its jurisdiction, as in State ex rel. Lynch v. District Court, supra, represent a modification of the unbending character of the rule that prohibition will not lie if the trial court has jurisdiction of both the parties and the subject matter. But such is not the case. In no sense do these cases represent a modification or liberalization of this cardinal rule, since to the extent the court proposes to exceed its jurisdiction, there is a want of jurisdiction, both over the parties and the subject matter. To such extent any judgment rendered by it would be a complete nullity and subject to collateral attack. For instance, absent prohibition in State ex rel. Lynch v. District Court, supra, any order of the district court authorizing the receiver to levy and collect the special tax involved would have been absolutely void. Cf. Walls v. Erupcion Mining Co., 36 N.M. 15, 6 P.2d 1021, and State ex rel. Davie v. Bolton, 53 N.M. 308, 206 P.2d 258.”
We have recently recognized the rule in State ex rel. Davis et al. v. District Court of Fifth Judicial District, 67 N.M. 215, 354 P.2d 145, and in State ex rel. J. P. (Bum) Gibbins, Inc. v. District Court of Fifth Judicial District, supra. In this latter case the lower court was prohibited from proceeding with a hearing on an application for additional medical and surgical treatment prior to a determination by a jury of liability of the employer for compensation. The court there concluded “that prior to the acknowledgment of liability by the employer or the determination thereof in a court proceeding the district court is without power to compel the employer to furnish medical, surgical and hospital serv*323ices to his employees.” [65 N.M. 1, 330 P.2d 965],
Whereas in State ex rel. Transcontinental Bus Service, Inc. v. Carmody, supra, it was concluded that the court was acting within its jurisdiction and that prohibition would accordingly not lie, the court proceeded to issue the writ under its powers of superintending control.
The instant case, we feel, comes within the rule of State ex rel. Lynch v. District Court of McKinley County, and the other cases cited, supra, which clearly provide that an act in excess of jurisdiction may be prohibited by this court. In State ex rel. Lynch v. District Court of McKinley County, supra, this court made permanent the writ of prohibition which prevented the district court from proceeding further with a suit insofar as a receivership was concerned. There was no question that the court had jurisdiction of the type of action there involved. However, it was concluded that it was not simply error, but in excess of jurisdiction for the court to appoint a receiver under the circumstances of that case.
Similarly, here, where the statute specifically grants the privilege it is beyond the powers of the court to direct petitioner to waive the same. The situation differs from that which is present where the court is given power and authority to do certain acts upon proof of good cause or other proper showing provided for in the statute. If there is a question as to whether good cause has been established, or proper showing made, prohibition is not the proper mode for raising the issue, since the court having the power to make the order was acting within its jurisdiction, and errors or mistakes made by it are reviewable only on appeal or by writ of error. That is not the instant situation. Here, the act of the court was clearly beyond its powers and the order was void. For other examples of types of orders which are in excess of a court’s jurisdiction, although prohibition was not invoked, see Heath v. Gray, 58 N.M. 665, 274 P.2d 620; Lucus v. Ruckman, 59 N.M. 504, 287 P.2d 68; Lloyd v. Lloyd, 60 N.M. 441, 292 P.2d 121.
We would also direct attention to State ex rel. Davie v. Bolton, 53 N.M. 256, 206 P.2d 258, being a case where we reversed a district court which had refused to prohibit a Justice of the Peace who was acting in excess of his jurisdiction.
We feel it not inappropriate at this point to quote from Hammond v. District Court, supra, the following language which is just as pertinent today as the day it was set down by Justice Bratton speaking for the full court [30 N.M. 130, 228 P. 758, 761]:
*324“We recognize the oft-repeated rule that a writ of prohibition is not a writ of right, but instead, is one of sound judicial discretion that is issued or withheld according to the circumstances of each particular case, and which is used with great caution in the furtherance of justice, where it is plain that the court, officer, or person against whom it is sought is about to exercise some judicial or quasi judicial power; the exercise of which is clearly unauthorized by law and will result in injury for which no other adequate remedy exists.”
Where the order issued is patently beyond the court’s power, we do not think that petitioner should be put to the risk of being held in contempt of court for violating it even though the right to appeal from a judgment of contempt would be present. Hammond v. District Court, supra; State ex rel. Prince v. Coors, 52 N.M. 189, 194 P.2d 678. Also, see note in 136 A.L.R. at page 698.
In view of our disposition of the case it is not necessary for us to discuss our power of superintending control.
For the reasons stated the writ heretofore issued is made absolute.
It is so ordered.
COMPTON, C. J., and CARMODY, CHAVEZ and NOBLE, JJ., concur.