
1 Cal.App.3d 683 (1969)
82 Cal. Rptr. 129
In re RAYMOND VEGA LOPEZ on Habeas Corpus.
Docket No. 8174.
Court of Appeals of California, First District, Division One.
November 13, 1969.
*684 COUNSEL
Gary M. Merritt, under appointment by the Court of Appeal, for Petitioner.
Thomas C. Lynch, Attorney General, Derald E. Granberg and Charles R.B. Kirk, Deputy Attorneys General, for Respondent.
*685 OPINION
THE COURT.
On June 17, 1969, while his appeal (1 Crim. 7501) was pending in this court, petitioner filed a petition for a writ of habeas corpus with the Supreme Court of this state. Petitioner, who alleged that he was legally a patient of and under the jurisdiction of the California Department of Mental Hygiene as an adjudicated sexual psychopath,[1] complained of his detention in the segregation unit at San Quentin Prison without any care or treatment. In his prayer he sought an order to show cause, directed to the Director of the Department of Corrections and the warden of the prison, "as to why said detention is believed to be valid and applying to Petitioner, when in fact he is a ward of the Department of Mental Hygiene, and to further show, if possible, why Petitioner should not be placed at the California Medical Facility, at Vacaville, to secure the Care and Treatment that is guaranteed to him by the Welfare and Institutions Code, and as required by a Court of law, to further show why he, the Warden, should not be injoined from further inflicting more of the herein complained of unusual punishments upon the person of your Petitioner."
An order to show cause why the relief prayed for in the petition should not be granted was issued by the Chief Justice on August 13, 1969, with a return day of August 29th. On August 27th, the proceeding was transferred to this court. On application of the Attorney General the time within which to serve and file a return was extended; counsel who had been appointed to represent petitioner in his pending appeal was appointed to represent him in these proceedings; and the matter was placed on calendar to be heard with the appeal.
In the return filed by the Attorney General on behalf of the respondent and the state, he points out that the provisions of section 6326 (formerly § 5518) of the Welfare and Institutions Code provide that institutional units established for the custodial care and treatment of mentally disordered sex offenders "shall be administered in the manner provided by law for the government of the institution in which such unit is established." He contends that under the law the Director of Corrections "shall have full administrative authority and responsibility for operation of the [psychotic and diagnostic] clinics" which are provided at "state prisons or institutions under the jurisdiction of the Department of Corrections." (See, Pen. Code, § 5079; and People v. Horton (1968) 264 Cal. App.2d 192, 196 [70 Cal. Rptr. 186].) The return also sets forth declarations of facts in support of the proposition that petitioner's aggressive behavior precludes psychiatric *686 treatment at either San Quentin or the California Medical Facility at Vacaville.
In support of the writ, petitioner's counsel attacks the petitioner's commitment on the ground that the court had no power to make it because the sole method of confinement in a penal institution was through administrative agreement pursuant to section 6700.5 (now § 7301) of the Welfare and Institutions Code. The nature and propriety of the proceedings leading to petitioner's commitment, as revealed by the records before this court, are fully reviewed in the opinion filed this day in the appeal.
(1) The right of a patient of the Department of Mental Hygiene who is confined under the jurisdiction of the Department of Corrections (see In re Bunker (1967) 252 Cal. App.2d 297, 310 [60 Cal. Rptr. 344]) to test the terms and conditions of his confinment by petition for writ of habeas corpus was recognized by In re Cathey (1961) 55 Cal.2d 679 [12 Cal. Rptr. 762, 361 P.2d 426]. There the court observed, "Petitioner contends, however, that in fact the care and treatment which he receives is that accorded convicted felons and not, as the doctors in charge of the Medical Facility certify, `the type of care and treatment available also in the Department of Mental Hygiene plus the safety precautions for which the California Medical Facility is equipped.' Petitioner is correct in his insistence that he is not serving a sentence as a convicted felon, but he is mistaken in his assumption that he is entitled to be treated exactly as he was at Atascadero. He has no right to be confined under circumstances which will give him the opportunity to kill or maim his custodians, his fellow inmates or himself, or to destroy the property of the institution where he is detained. He does have a right to care and treatment, within the limits permitted by the nature of the security risk which he presents, looking toward his restoration to sanity so that he can be tried on the pending criminal charges." (55 Cal.2d at pp. 693-694. See also, In re Olden (1968) 69 Cal.2d 845, 846-848 [73 Cal. Rptr. 229, 447 P.2d 341]; and In re Riddle (1962) 57 Cal.2d 848, 851-852 [22 Cal. Rptr. 472, 372 P.2d 304]; and note In re Bevill (1968) 68 Cal.2d 854, 858 [69 Cal. Rptr. 599, 442 P.2d 679].)
It is also observed that petitioner had not exhausted his legal remedies by moving for a hearing to review his status under the provisions of section 6327 (formerly § 5519) of the Welfare and Institutions Code. (See People v. Bennett (1966) 245 Cal. App.2d 10, 19-28 [53 Cal. Rptr. 579].)
(2) Further investigation of the facts bearing on the nature of the case and treatment to which petitioner was entitled and on the care he was actually receiving, and of the adequacy of his remedies under the statute is rendered unnecessary by two matters which render petitioner's contentions *687 moot. The affirmance of the judgment of conviction in People v. Lopez, ante, p. 672 [82 Cal. Rptr. 121], leaves the petitioner confined under that judgment. That commitment displaces any separate rights he might otherwise have as a patient of the Department of Mental Hygiene. (See People v. Redford (1961) 194 Cal. App.2d 200, 205-206 [14 Cal. Rptr. 866].)
It was stipulated at the oral hearing that the petitioner had been transferred to the California Medical Facility at Vacaville. He is no longer imprisoned under the conditions he alleged existed when the Supreme Court issued the order to show cause. (See In re Olden, supra, 69 Cal.2d at p. 848.)
The order to show cause is discharged, and the petition for habeas corpus is denied.
NOTES
[1]  See Welfare and Institutions Code former sections 5500 et seq. (since July 1, 1969, § 6300 et seq.) and opinion filed this day in People v. Lopez, ante, p. 672 [82 Cal. Rptr. 121].
