
148 Cal.App.3d 849 (1983)
CALIFORNIA STATE PSYCHOLOGICAL ASSOCIATION et al., Plaintiffs and Appellants,
v.
COUNTY OF SAN DIEGO et al., Defendants and Respondents.
Docket No. 28003.
Court of Appeals of California, Fourth District, Division One.
October 21, 1983.
*851 COUNSEL
Frank L. Asaro and Asaro & Keagy for Plaintiffs and Appellants.
Joseph Kase, Jr., Acting County Counsel, Lloyd M. Harmon, Jr., Chief Deputy County Counsel, and Arlene Prater, Deputy County Counsel, for Defendants and Respondents.
OPINION
STANIFORTH, J.
Petitioner California State Psychological Association (CSPA) appeals a judgment of dismissal entered upon an order sustaining without leave to amend the general demurrer of respondent County of San Diego (County) to CSPA's first amended petition. The pleadings allege:
CSPA is a nonprofit corporation whose members include psychologists qualified under California law to provide psychological services within the San Diego County Mental Health Services (MHS) program. Coplaintiff Thomas E. Overbaugh is a psychologist practicing in the County of San Diego and a member of CSPA. Respondents are the County, its board of supervisors and the deputy director of mental health services.
*852 The County is required to provide a local mental health program under the Short-Doyle Act (Short-Doyle). (Welf. & Inst. Code, § 5600 et seq.) Short-Doyle mandates, in the organization and implementation of a local health program, the County shall include the fullest possible, most appropriate participation of all mental health disciplines including psychology. Under Short-Doyle no regulations shall be adopted nor any procedures implemented which prohibit a psychologist from employment at any local mental health program in any technical or administrative position in mental health services.
The complaint alleges the County has adopted a plan which does not comply with Short-Doyle particularly because: (a) the County patient referral procedure is discriminatory resulting in only a limited number of referrals to psychologists; and (b) the County has adopted procedures and practices which preclude psychologists from performing certain functions which psychologists are legally authorized to perform, specifically to hold the position of (1) team leader with overall supervision and clinical responsibility for the evaluation and treatment of adult inpatients and outpatients, (2) clinical coordinator with overall supervision and clinical responsibility for evaluation and treatment of adult outpatients, (3) primary therapist with overall supervision and clinical responsibility for adult patients, and have authority to (4) authorize 72-hour detention or to evaluate and treat an adult so detained, (5) certify an adult for 14 days' intensive treatment and certify an additional 14-day intensive treatment, (6) deny patient rights pursuant to Welfare and Institutions Code section 5326.
The petition further alleges the County's practices exclude psychologists from overall review and supervision of patients and the entire evaluation of nonpatients, areas in which psychologists are qualified to practice. These rules, procedures and practices, it is charged, violate the mandatory provisions of Short-Doyle as well as the Lanterman-Petris-Short Act (LPS). CSPA asserts Short-Doyle and LPS present a comprehensive scheme for mental health services in California and local governments are required to organize local mental health services in compliance with these laws; local governments are preempted and precluded from employing or imposing conflicting requirements.
It is further alleged the CSPA organization and its members are healing arts practitioners regulated by Business and Professions Code sections 500-4905. Psychologists are required to be licensed. (Bus. & Prof., §§ 2900-2918.) *853 The practice of psychology is particularly defined.[1] Psychologists are authorized to use certain biofeedback instruments (Bus. & Prof. Code, § 2903.1) but the practice of psychology does not include prescribing drugs, performing surgery or administering electroconvulsive therapy. (Bus. & Prof. Code, § 2904.) Psychologists should be distinguished from psychiatrists or physicians who specialize in psychiatry. A physician is licensed under the State Medical Practices Act which is also contained in the healing arts division of the Business and Professions Code. (§ 2000 et seq.)
The County filed a general demurrer to this first amended petition for writ of mandate. After a hearing the trial court sustained the demurrer without leave to amend upon the grounds the petition failed to state facts sufficient to issue the writs; and, as the acts sought to be compelled are discretionary, there was no allegation of facts sufficient to show an arbitrary abuse of discretion by the County.
In sum, CSPA alleges it is entitled relief in three general areas: (1) the practice of alleged discriminatory referrals to the private sector,[2] (2) duties, practices, procedures and guidelines which exclude psychologists from holding three specified positions, and (3) all the counties' practices, procedures and guidelines but without specific allegations.
In short CSPA claims the County does not properly employ and utilize psychologists, thwarting the legislative intent of Short-Doyle and LPS.

DISCUSSION
In assessing the sufficiency of the petition against a general demurrer, certain basic rules must be observed. (1) We treat the demurrer as admitting all facts properly pleaded (Scott v. City of Indian Wells (1972) 6 Cal.3d 541, 549 [99 Cal. Rptr. 745, 492 P.2d 1137]) and in reviewing an order sustaining a demurrer without leave to amend, the allegations of the petition must be liberally construed. (Youngman v. Nevada Irrigation Dist. *854 (1969) 70 Cal.2d 240, 244-245 [74 Cal. Rptr. 398, 449 P.2d 462].) Taking the facts as pleaded, we then look to the statutes to test their sufficiency.

I

STATUTORY SCHEME
A review of the provisions of both Short-Doyle and LPS (Welf. & Inst. Code, §§ 5000-5466) demonstrates the fundamental goal of these acts is to provide satisfactory service to mentally disabled persons. The State Department of Mental Health is the state's mental health authority and administers both acts as well as other applicable state and federal statutes.
The State Department of Mental Health in consultation with the California Conference of Local Mental Health Directors and the Citizen Advisory Counsel also sets broad policy for the delivery of mental health services statewide. It establishes priorities, standards and procedures within which mental health services operate. It monitors, reviews and evaluates the actual operation of the services.
The Short-Doyle Act (Welf. & Inst. Code, §§ 5600-5803) was first enacted in 1957. The goal of Short-Doyle is to promote, develop and reimburse costs for an array of support services for persons who are mentally disordered. The services include prevention and control of mental illness through community education, consultation, crisis intervention and emergency care, 24-hour care, outpatient care and long term episode management. (Welf. & Inst. Code, § 5600.) The act recognizes new emphasis upon deinstitutionalization, development of mental health services at the local level and helping persons to remain at least partially self-supportive.
Under Short-Doyle counties are responsible for providing mental health services to their residents. Services are provided through a system of local programs and state-operated hospital programs with costs shared by the state and the county through a specified formula method. Annually each county must develop and adopt a mental health program specifiying the services to be provided in county facilities, state hospitals and through private agencies.
In 1968 the Legislature passed the Lanterman-Petris-Short Act (Welf. & Inst. Code, §§ 5000-5466) dealing with the civil commitment process for mentally disordered persons and linking voluntary treatment of such persons to community mental health systems. LPS sought to remove financial disincentives for using community rather than state hospital services. LPS protects the rights of civilly committed mentally disordered persons, developmentally *855 disabled persons and persons impaired by chronic alcholism. The act provides for prompt evaluation and treatment while protecting public safety and safeguarding individual rights through judicial review.
LPS provides for individualized treatment, supervision and placement through a conservatorship program. The act encourages full use of all existing agencies, professional personnel and public funds to accomplish these objectives, to prevent duplication of service and unnecessary expenditures. The legislative intent of LPS is set forth in Welfare and Institutions Code section 5001; for Short-Doyle in Welfare and Institutions Code section 5600. The primary concern of the code is the satisfactory treatment of the mentally disordered. To meet these legislative goals the County's mental health program must have discretion and flexibility. Neither act interferes with the county's discretion to staff the most satisfactory, efficient mental health service so long as that discretion is not arbitrarily exercised.

II

LEGISLATIVE INTENT
(2) Legislative intent should be gathered from the whole statute or act rather than from isolated parts or words. (Mazza v. Austin (1938) 25 Cal. App.2d 85, 87 [76 P.2d 533].) To find legislative intent, statutes and acts relating to the same subject matter must be read together and harmonized whenever possible, giving effect to each part. (Kalina v. San Mateo Community College Dist. (1982) 132 Cal. App.3d, 48, 53 [183 Cal. Rptr. 12].) Thus the emphasized provisions of Short-Doyle and LPS must be examined in detail as well as in the context of the whole set of complex laws governing county mental health programs.
Plaintiffs rely upon section 5751 of the Welfare and Institutions Code but omit certain important provisions: "[P]rovided that any service delivery functions shall be performed within the scope of his or her license. No person shall be considered for a position which is outside his or her scope or licensure.
"This section shall not require the hiring of any person. The administrators of the Short-Doyle program shall be responsible for determining who is hired.
"Appointments of directors, program chiefs and comparable positions, and unit or treatment team leaders shall be made on the basis of professional competence. No local program or its contractors may restrict such appointments *856 to one discipline. Each local program and its contractors shall consider applications from, and make appointments equally open to, all professions that are eligible pursuant to this section." (Italics added.) Welfare and Institutions Code section 5751.3 also was not cited in full by the plaintiffs. An omitted provision markedly limits the scope of the professionals generally authorized to be used. "[P]rovided that any service delivery functions shall be performed within the scope of his or her license." (§ 5751.3; italics added.)
There is no doubt under the provisions of Short-Doyle and LPS a psychologist is eligible for appointment as director of local mental health services. (Cal. Admin. Code, tit. 9, § 620, subd. (b).) And a psychologist who fulfills the criterion set forth in section 624 is eligible to serve as director of inpatient services (§ 663), director of outpatient services (§ 680, subd. (a)), director of partial hospitalization services (§ 690), director of rehabilitative services (§ 740, subd. (a)) and director of consultation, education and information services (§ 716). Psychologists are also eligible to be members of the professional staff in each of these services.
The statutes, however, do not mandate or guarantee psychologists must be employed or utilized in any particular positions. For example, marriage, family and child counselors are named in those claimed-to-be "mandatory" hiring provisions of Welfare and Institutions Code sections 5751 and 5751.3, yet, it would strain interpretation of legislative intent beyond the breaking point to say the Legislature intended a child counselor be the director of an acute inpatient hospital facility or the County's adult psychiatric program. The intent of the statute is to encourage full utilization of four specified categories of professionals as appropriate within their particular specialization.

III

STATE STATUTES
The whole legislative scheme (Cal. Admin. Code, tit. 9, subch. 3 and the Short-Doyle Act) concerns authorized psychologist activities. However there are requirements certain functions be performed only by a particular profession such as a physician. For example, title 9, California Administrative Code, section 522, provides: "Medical Responsibility. A physician meeting the qualifications of Section 620(a) shall assume responsibility for all those acts of diagnosis, treatment, or prescribing or ordering of drugs which may be performed by a licensed physician."
*857 While title 9, California Administrative Code, section 663, provides the minimum staff for inpatient services (a psychiatrist, psychologist, social worker and nursing staff), this section requires the psychiatrist be available "at all times" and responsible for assuming medical responsibility as defined in section 522. On the other hand the psychologist may be present on a "time-limited basis."
Title 9, California Administrative Code, section 680, which provides for minimum staff requirements for outpatient services likewise provides for various health care professionals. However, it is the psychiatrist who must assume medical responsibility as defined in section 522 and be present at least half-time when services are provided.
Title 22, division 5 of the California Administrative Code contains regulations for licensing and certification of health facilities. Chapter 2 section 71000 et seq. regulates acute psychiatric hospitals. These hospitals, again, provide services by various categories of professionals, yet there are special requirements calling for psychiatrists. Section 71203 provides:
"Medical Service General Requirements. (a) The medical service shall consist of the following organized and staff elements:
"(1) Psychiatric component.
"(A) A psychiatrist shall be responsible for the diagnostic formulation for each patient and the development and implementation of the individual patient's treatment plan.
"(B) A psychiatrist shall be available at all times for psychiatric emergencies.
".... .... .... .... .... .... .
"(3) Psychological component.
"(A) Psychological service shall be provided by psychologists under the direction of the medical staff." And section 71205 provides in part:
"Medical Service Staff. (a) A physician shall have overall responsibility for the medical service.
"(b) Psychiatric component.
*858 "(1) A psychiatrist shall coordinate the psychiatric services provided.
"(2) There shall be sufficient psychiatrists on the staff to meet the needs of the patients.
".... .... .... .... .... .... .
"(d) Psychological component.
"(1) One or more psychologists shall be employed on a full-time, regular part-time or consulting basis."

IV

FEDERAL LAW
(3) The provisions of LPS and Short-Doyle are but part of a total constellation of laws controlling county mental health programs. A complex range of related requirements, imposed at both state and federal levels, enter into the County's determinations criticized by the petition. (See Admin. Code, tit. 9; tit. 22, div. 5.) Federal as well as state requirements must be met for patients receiving aid when Medi-Cal or Medicare funds are involved.
The state acts must be read in light of the requirements of federal statutes, which set forth conditions for hospitals participating in Medicaid and Medicare programs. Every patient must be under the care of a physician. (42 U.S.C. § 1395x(e)(4).) Responsibility for the organization and conduct of the medical staff rests with a physician. (42 C.F.R. § 405.1023.) The director of inpatient services must be a psychiatrist. (42 C.F.R. § 405.1038.) State Medi-Cal services also have certain similar requirements for a physician and psychiatrist who assume medical responsibilities.

V

THE PETITION
(4a) The first amended petition fails to set out facts or law establishing a mandatory duty upon the County to hire a psychologist for any particular position or any of the services required under Short-Doyle or LPS. Nor does the petition allege any facts showing discrimination or arbitrariness by the County in its present hiring practices. The petition contains only conclusory allegations. It does not allege facts to show there has ever been an *859 abuse of discretion nor offer any specifics for how or in what detail the referral system is discriminatory.
Plaintiffs emphasize the word "shall" is used throughout the cited provisions and contend this makes their employment mandatory. (5) Whether the term "shall" is directory or mandatory is determined by an examination in its statutory context in light of the legislative intent. Hogya v. Superior Court (1977) 75 Cal. App.3d 122 [142 Cal. Rptr. 325], recited the cardinal rule of statutory construction which requires the court ascertain the intent of the Legislature so as to effectuate the purpose of the law. As to the interpretation of the word "shall" the court said: "[J]ustice is not the slave of grammar, and `shall' has sometimes been judicially construed as directory or permissive [citation]. The pertinent principles of construction in this regard were summarized in People v. Municipal Court, 145 Cal. App.2d 767 ...: `"It is true that `shall,' used in a statute, does not always import that its provisions are mandatory, although in most cases it does. ..." [Citation.] The test is this: "If to construe it as directory would render it ineffective and meaningless it should not receive that construction." [Citations.] Thus, a statute was held to be mandatory where "to construe this provision of the section as directory merely would be to defeat the very purpose of its enactment." [Citation.] "... [I]t appears that if public policy is in favor of the imperative meaning, the words referred to will be held mandatory." [Citation.] "In construing a statute matters of substance are to be construed as mandatory." [Citation.]' (Id., at p. 775.)" (Hogya, at p. 134.) Thus in the final analysis it is the intent of the Legislature that determines the meaning to be given. (Marrujo v. Hunt (1977) 71 Cal. App.3d 972 [138 Cal. Rptr. 220]; Estate of Mitchell (1977) 20 Cal.2d 48 [138 Cal. Rptr. 220].)
Considering the goals of the acts to provide an effective and efficient mental health program, various other federal and state statutes and regulations controlling county mental health services, and the nature of patients served by the County's adult services, it cannot be said (assuming the allegations to be true for purposes of the demurrer) the County has abused its discretion by declining to assign psychologists to the particular functions specified in the amended petition.
(6) Mandamus issues only to compel the performance of an act which the law specifically enjoins (Code Civ. Proc., § 1085) and will not lie to control discretion within an area lawfully entrusted to the administrative agency. (Faulkner v. Cal. Toll Bridge Authority (1953) 40 Cal.2d 317 [253 P.2d 659].) Courts, as a general principle, will not substitute their judgment *860 or notions of expediency, reasonableness or wisdom for those which have guided the agency.
CSPA points to the requirement placed on the county board of supervisors to adopt an annual Short-Doyle plan which "shall provide for the most appropriate and economical use of all existing public and private agencies, licensed private institutions and personnel [and] ... shall include the fullest possible and most appropriate participation by existing city Short-Doyle programs, ... psychologists, social workers, public health nurses, psychiatrict technicians, and all such other public and private agencies...." (Welf. & Inst. Code, § 5650; italics added.) Welfare and Institutions Code section 5653 reiterates the same basic approach. The County Short-Doyle plan shall make optimum use of appropriate local public and private organizations. CSPA also cites the provisions of LPS: "To encourage the full use of all existing agencies professional personnel...." (Welf. & Inst. Code, § 5001, subd. (f).)
CSPA emphasizes Welfare and Institutions Code section 5751.3 expresses the legislative intent that "No regulations shall be adopted by the Director of Mental Health which prohibit a psychiatrist, psychologist, [or] clinical social worker ... from employment in a local mental health program...." And section 5751 directs local authorities as to the eligibility requirements for certain executive and administrative positions, stating "Appointments of directors, program chiefs and comparable positions and unit or treatment team leaders shall be made on the basis of professional competence. No local program or its contractors may restrict such appointments to one discipline...."
CSPA argues the County has only a ministerial duty in following these statutory objectives. A decree treating these choices as "ministerial" in nature would be a disastrous interference with the day-to-day operations of the MHS program. Clearly, neither hiring nor referral practices are mandated under Welfare and Institutions Code sections 5751 or 5751.3. The code does not interfere with the County's discretion to provide mental health services so long as that discretion is not arbitrarily abused.

VI

CONCLUSIONS
Plaintiffs have cited permissive statutes and regulations which authorize a psychologist to perform certain functions but follow the statutory recitation with only general allegations of discrimination in the hiring and assignment *861 practices of the County. (7) In order to state a cause of action warranting judicial interference with the official acts of the administrative body the plaintiff must allege more than mere conclusions of law; it must allege specific facts from which the conclusions entitling it to relief follow. (Faulkner v. Cal. Toll Bridge Authority, supra, 40 Cal.2d at pp. 329-330.) Plaintiffs have not done so.
(4b) After examining this whole complex of laws we reach the unqualified conclusion there is no basis for issuance of a writ of mandate. The provisions relied upon by CSPA must be interpreted to conform to the entire scheme of laws regulating MHS. A pari materia view of this legal framework teaches that full utilization is encouraged, as appropriate, of all mental health professionals, not just psychologists, but also psychiatrists, clinical social workers, and marriage, family and child counselors. Although the California acts provide a multidisciplinary approach to the rendition of medical health services, the law specifically states only certain professionals such as psychiatrists and medical doctors are authorized to fill some positions or perform some duties.
No language in any of the acts cited mandates the job assignments sought by CSPA. No statutory provision directs or guarantees that psychologists shall be employed or utilized in particular positions. The County must have discretion and flexibility to provide the most satisfactory services.
The request for reasonable attorney fees pursuant to Government Code section 800 and Code of Civil Procedure section 1021.5 is denied.
Judgment of dismissal is affirmed.
Cologne, Acting P.J., and Wiener, J., concurred.
NOTES
[1]  The statutory definition is rendering and offering to render any psychological service involving the application of psychological methods and procedures of understanding, predicting and influencing behavior; interviewing, counseling, psychotherapy, behavior modification and hypnosis; constructing, administering and interpreting tests of mental abilities, aptitude, interests, attitudes, personal characteristics, emotions and motivations; and the application of such principles in the diagnosis, prevention, treatment and amelioration of psychological problems and emotional and mental disorders. (Bus. & Prof. Code, § 2903.)
[2]  CSPA admits the current referral procedure (adopted Dec. 31, 1981) is adequate and nondiscriminatory but alleges as of January 15, 1982, in practice referrals were made on a "discriminatory basis."
