
172 Cal.App.2d 60 (1959)
LLOYD RUSSELL, Petitioner,
v.
SUPERIOR COURT OF ALAMEDA COUNTY et al., Respondents.
Civ. No. 18780. 
California Court of Appeals. First Dist., Div. Two.  
July 15, 1959.
 Edward J. Rice for Petitioner.
 J. F. Coakley, District Attorney, R. Robert Hunter, Chief Assistant District Attorney, and John C. Baldwin, Deputy District Attorney, for Respondents. *62
 DRAPER, J.
 This proceeding requires construction of code sections concerning sexual psychopaths. In October, 1956, petitioner pleaded guilty to loitering about a school where children attend, a misdemeanor (Pen. Code,  647a, subd. (2)). The municipal court, finding probable cause to believe petitioner to be a sexual psychopath, certified him to the superior court. After proper proceedings, including placement in Atascadero State Hospital for observation, that court committed him for an indefinite period to the Department of Mental Hygiene for placement in a state institution (Welf. & Inst. Code,  5512). In 1959, he was returned from California Men's Colony to Atascadero. On April 15, 1959, the superintendent of that hospital certified to the superior court that petitioner "has been treated to such an extent that he will not benefit by further care and treatment in the hospital and is not a menace to the health and safety of others." This certification specifies that it is made under section 5517, subdivision (b) of Welfare and Institutions Code, and is in the precise language of that subdivision. This certification was filed with the court April 30 and the court promptly ordered return of petitioner. On May 14, the court on its own motion "institute(d) proceedings for redetermination of the defendant's condition in regard to sex psychopathy," purporting to act under section 5519, Welfare and Institutions Code. Psychiatrists were appointed to examine petitioner and a date set for hearing. Before hearing, petitioner applied to this court for writ of mandate requiring respondent court to return petitioner to the municipal court to await further action with reference to the criminal charge, and for writ of prohibition restraining respondent from further proceedings under the sexual psychopathy provisions of the code. Alternative writs were issued.
 [1] Section 5517 is mandatory when the opinion certified by the superintendent, in proceedings instituted under that section, is under subdivision (b). In such case, the committing court shall forthwith order return of the person to that court, "and shall thereafter cause the person to be returned to the court in which the criminal charge was tried to await further action with reference to such criminal charge." The next paragraph provides that "Such court shall resume the proceedings ..." This language appears to leave no discretion in the committing court.
 [2] This view is strengthened by the construction given to almost identical language contained in section 5512. "When such a report is made, the sexual psychopathy proceedings *63 are at an end and the specific direction of the code is that the person is returned to the court in which he was convicted, ... to await further action, not with reference to psychopathy, but with reference to the criminal charge of which he was convicted. The plain purport of the statute in this respect is that the court may not disregard the report of the superintendent ... but must abide by the same, treat the psychopathy proceedings as at an end and proceed in the criminal case." (People v. Bachman, 130 Cal.App.2d 445, 449-450 [279 P.2d 77].) This holding is fully applicable to the portion of section 5517 before us.
 Respondent relies upon People v. Thurmond, 154 Cal.App.2d 797 [316 P.2d 721]. But that decision is not helpful here. It holds only that the provisions of section 5517 which we have quoted do not govern a proceeding under section 5519. Thurmond appealed only from orders entered under the latter section. The only Thurmond proceeding which could possibly have been under either section 5517 or 5512 was had in 1952, and the decision emphasizes that no appeal was taken from the 1952 orders.
 [3] Respondent finds anomaly in the fact that a broad discretion is vested in the committing court in a proceeding under section 5519, while no such discretion is allowed in a 5517 proceeding if the superintendent's opinion is under subdivision (a) or (b). But that question is one for the Legislature, which has resolved it by the clear language used in section 5517. It is apparent that the Legislature anticipated situations where, as here, the hospital staff feels that no further treatment is warranted and the court believes that additional treatment under supervision of the Director of Mental Hygiene is indicated, and has chosen to give the hospital superintendent the right to terminate such care when he feels sure enough of the patient's improvement to certify that he is no longer a menace to the health and safety of others. Obviously, if such a conflict is not resolved, the defendant would be consigned to an interminable shuttle between hospital and courthouse, a process which would be expensive but hardly of therapeutic or penal value. The Legislature has avoided such a stalemate by authorizing conclusive determination by the superintendent in (a) and (b) situations, if he initiates proceedings under section 5517. We appreciate that where two court-appointed psychiatrists believe defendant still to be a menace, the committing court is reluctant to accept the opinion of the superintendent. But *64 the statute vests the power of final decision in him. It would defeat the legislative intent to permit the court to circumvent that determination by instituting proceedings under section 5519 after the superintendent has commenced a 5517 proceeding.
 [4] It appears that much of the problem here arose from the fact that the 1959 report of the superintendent refers to the 1957 examination of defendant, says that he "was processed again" and "restaffed," and states that "The same diagnosis as before was made." Upon the assumption that "diagnosis" includes "opinion" and "recommendation," the trial court considered that the 1959 report is contradictory. However, the statute ( 5517) requires the superintendent to certify his "opinion," and to include a "report, diagnosis and recommendation." This separate treatment of the several items of the certification appears also in other section ( 5512, 5519). It seems clear that "diagnosis" is, for purposes of the sexual psychopathy statutes, distinct from "opinion" and "recommendation." Detailed review of the communication of the superintendent somewhat hampered by its admixture of professional language and official jargon, shows it to state that defendant still suffers from the same condition originally diagnosed, but has ceased to be a menace. In any event, it is the "opinion" which is controlling under section 5517.
 Peremptory writs of mandate and prohibition ordered issued.
 Kaufman, P, J., and Dooling, J., concurred.
