
811 P.2d 876 (1991)
248 Kan. 951
Arlan KAUFMAN, Ph.D., Appellant,
v.
STATE OF KANSAS DEPARTMENT OF SOCIAL AND REHABILITATION SERVICES, Appellee.
No. 65607.
Supreme Court of Kansas.
May 24, 1991.
*878 Thomas D. Haney of Porter, Fairchild, Wachter & Haney, P.A., Topeka, argued the cause and was on the briefs, for appellant.
Robert R. Hiller, Jr. of the Dept. of Social and Rehabilitation Services, argued the cause and was on the brief, for appellee.
LOCKETT, Judge:
Arlan Kaufman, Ph.D., appeals the decision of the district court affirming the finding of the Department of Social and Rehabilitation Services (SRS) that two residences owned by Dr. Kaufman and his wife, Linda Kaufman, are residential care facilities and required to be licensed pursuant to K.S.A. 75-3307b(a)(5). Kaufman claims: (1) The premises are not facilities subject to licensing under K.S.A. 75-3307b, and (2) K.S.A. 75-3307b is unconstitutionally vague. Kaufman's appeal was transferred to the Supreme Court pursuant to K.S.A. 20-3018.
Arlan Kaufman and his wife, Linda, are the owners of two houses, collectively known as Kaufman House, in Newton, Kansas. Dr. Kaufman holds a masters degree in social science and a Ph.D. degree in social work. Mrs. Kaufman is a registered nurse licensed by the State of Kansas.
Kaufman House opened in 1976 as housing for college students. The houses were subsequently turned into residential treatment facilities for adults with short-term or chronic mental or emotional problems. Dr. Kaufman maintains that Kaufman House has not been a treatment facility for several years.
On December 4, 1986, SRS informed Dr. Kaufman that K.S.A. 75-3307b required his two houses to be licensed as a residential care facility (RCF). After several contacts, SRS sent Dr. Kaufman a letter, informing him that he needed to file an application for licensing the houses as residential care facilities by April 1, 1987. After receiving the letter, Dr. Kaufman met with Kent Munzer, program specialist with adult services of SRS. At that meeting, Munzer asked Kaufman to allow SRS employees to visit Kaufman House to determine if the houses should be certified as an RCF. During the inspection of the Kaufman Treatment Center, located in one of the houses, SRS employees observed a group therapy session being conducted by a licensed social worker.
Later, to obtain information about Dr. Kaufman and Kaufman House, a representative from SRS talked with Dr. Prost, a psychologist employed by Prairie View, Inc. Dr. Prost described Kaufman House as a residential care facility. In a subsequent letter, Dr. Prost stated she had little personal contact with Dr. Kaufman's program and had made her assumptions based on her knowledge of residents at Kaufman House, who previously had lived at Prairie View, Inc. In the letter, Dr. Prost informed SRS that, when she had earlier referred to Kaufman House as a residential care facility, she had no knowledge of SRS regulations and was not qualified to give an opinion as to whether Kaufman's facility should be licensed as a residential care facility.
SRS determined Kaufman House facilities should be licensed as an RCF. By letter SRS advised Kaufman that based on the following factors the residence required licensing:
"1. You and your wife have taken on the responsibility for assuring the clients' safety in the building.
"2. Your wife, a nurse, has assisted clients with taking of medication in the residences.
"3. You are aware of the clients' functioning and are ready to intervene in a crisis.

*879 "4. You help clients make appointments and help transport them to the appointments.
"5. While you do not prepare meals, you do purchase the foods and are responsible for assuring their nutritional needs are met."
After Kaufman appealed SRS's decision, the matter was assigned to a hearing officer. At the hearing, Dr. Prost testified that she refers Prairie View, Inc., patients to Kaufman House based on Kaufman's ability to deal with chronically mentally ill patients. Dr. Prost acknowledged that due to the Kaufman House program, several of her patients are able to function outside the hospital. Dr. Prost indicated in March of 1988 she was aware of several chronically mentally ill individuals who were residing in Dr. Kaufman's facility. In order to live outside an institutional setting, these individuals require supervision. Dr. Prost testified that Mrs. Kaufman dispensed medication at Kaufman House and accompanied Kaufman House residents to their doctor's office at Prairie View, Inc., to receive their medication.
Dr. Kaufman provided affidavits from residents of Kaufman House which stated that neither staff members nor the Kaufmans prepare, serve, clean up after meals, or are present to supervise or oversee these activities. Dr. Kaufman testified that no staff member spends a majority of the member's time supervising the residents. Dr. Kaufman further testified that residents are free to come and go and an individual may reside in Kaufman House without receiving therapy at the Kaufman Treatment Center. Kaufman admitted that the residents of Kaufman House are provided the services of a registered nurse and a staff Ph.D. clinician.
Mrs. Kaufman testified that she does consider the residents to be her patients. Mrs. Kaufman admitted that she did administer medications to the residents of Kaufman House either by injection or by assisting individuals in taking oral medication. She denied transporting people to their medical appointments. As a courtesy, she had given rides to residents going her way. Mrs. Kaufman stated that the residents do their own grocery shopping and prepare their own meals. The grocery store sends bills for the food purchased by residents to Mrs. Kaufman and she pays the grocery bills. Mrs. Kaufman estimated she works about 20 hours a week as a nurse at Kaufman House.
After hearing the testimony and reviewing literature published by Kaufman and various agencies, the chief hearing officer determined that Kaufman House was required to be licensed as an RCF. The SRS Review Committee reviewed the record, adopted the facts found by the chief hearing officer, and affirmed the hearing officer. Dr. Kaufman petitioned for judicial review pursuant to K.S.A. 77-601 et seq.
Administrative boards and agencies may not rule on constitutional questions; therefore, the issue of the constitutionality of a state statute or an administrative regulation must be raised when the case is appealed to a court of law. In re Residency Application of Bybee, 236 Kan. 443, Syl. ¶ 4, 691 P.2d 37 (1984). In his petition for judicial review, Kaufman claimed: (1) the SRS Review Committee's decision was not supported by substantial evidence; (2) Kaufman House does not provide RCF services; and (3) the statute requiring licensing of a residential care facility, K.S.A. 75-3307b, is unconstitutionally vague. The district court found K.S.A. 75-3307b is not unconstitutionally vague and there was substantial evidence to support SRS's findings that Kaufman House required licensing as a residential care facility.
The deaths of hundreds of elderly and disabled residents of substandard care and boarding homes alerted Congress that piecemeal legislation divided among the various state and local agencies provided little or no regulation of these homes. To establish federal enforcement and regulation of these homes, Congress enacted the Keys Amendment to the Social Security Act in 1977, now codified at 42 U.S.C. § 1382(e) (1988). In 1986, the Kansas Legislature amended K.S.A. 75-3307b to grant SRS authority to license residential care. The legislature's action was predicated *880 upon the need for Kansas to comply with the Keys Amendment. The minutes of the House Committee on Public Health and Welfare, February 12, 1986, contain the following statement from the Secretary of SRS:
"This act is needed in order for the State to monitor the adequacy of the limited assistance these facilities provide and in order for the state to comply with Public Laws 94-566 and 97-35, commonly known as the Keys Amendment.
"The Keys Amendment requires every state to regulate all residential care-providing facilities where SSI recipients reside or are likely to reside. In late 1985, it became apparent that Kansas' current regulatory categories do not adequately cover the type of facility that is the focus of this act. There are estimated 17 such facilities in Kansas which serve from 5 to 39 clients." (Emphasis added.)
The legislature entrusted the Secretary of SRS to enforce the laws relating to the hospitalization of mentally ill persons of this state in psychiatric hospitals and the diagnosis, care, training, or treatment of persons in community mental health centers or facilities. K.S.A. 75-3307b(a). The secretary was given authorization to adopt rules and regulations setting standards and providing for the inspection and licensing of all facilities for the mentally ill, mentally retarded, or other handicapped persons receiving assistance through SRS, which facilities receive any state or federal funds; or all facilities where mentally ill, mentally retarded, or other handicapped persons reside who require supervision or require limited assistance with the taking of medication. 75-3307b(a)(5). No license for a residential facility for eight or more persons may be issued under 75-3307b unless the secretary of health and environment has approved the facility as meeting the licensing standards for a lodging establishment under the food service and lodging act. 75-3307b(b).
Is K.S.A. 75-3307b unconstitutionally vague? Kaufman states that 75-3307b(a)(5) and the regulations adopted by SRS to govern the licensing of residential care facilities in K.A.R. 30-42-6 et seq. are vague. Kaufman argues that 75-3307b and SRS's regulations violate the due process clause because they do not give an adequate warning of what they command or forbid. Diebold, Inc. v. Marshall, 585 F.2d 1327, 1335 (6th Cir.1978).
The constitutionality of a statute is presumed. All doubts must be resolved in favor of its validity, and before the statute may be stricken down it must clearly appear that the statute violates the constitution. In determining constitutionality, it is the court's duty to uphold the statute under attack rather than defeat it. If there is any reasonable way to construe the statute as constitutionally valid, that should be done. A statute should not be stricken down unless the infringement of the superior law is clear beyond substantial doubt.
The test for determining whether a statute is unconstitutionally vague is whether an ordinary person exercising ordinary common sense can understand and comply with the statute. Gumbhir v. Kansas State Board of Pharmacy, 231 Kan. 507, 518, 646 P.2d 1078 (1982), cert. denied 459 U.S. 1103, 103 S.Ct. 724, 74 L.Ed.2d 950 (1983). When determining whether a statute is unconstitutionally vague, greater leeway is to be afforded statutes regulating business than those proscribing criminal conduct. Papachristou v. City of Jacksonville, 405 U.S. 156, 162, 92 S.Ct. 839, 843, 31 L.Ed.2d 110 (1972); In re Brooks, 228 Kan. 541, Syl. ¶ 1, 618 P.2d 814 (1980).
K.S.A. 75-3307b(a)(5) provides:
"(a) The enforcement of the laws relating to . . . the diagnosis, care, training or treatment of persons in . . . facilities for the mentally ill, mentally retarded or other handicapped persons is entrusted to the secretary of social and rehabilitation services. The secretary may adopt rules and regulations on the following matters. . .:
. . . .
"(5) The setting of standards, the inspection and licensing of all facilities for the mentally ill . . . or facilities where *881 mentally ill, mentally retarded or other handicapped persons reside who require supervision or require limited assistance with the taking of medication . . . ."
Legislative authority may be delegated to an administrative body where guidelines are set forth in the statute that establish the manner and circumstances of the exercise of such power. Where the legislature enacts general provisions for regulation and grants a particular state agency the discretion to fill in the details, we will not strike down the legislation as constitutionally impermissible unless such provisions fail to fix reasonable and definite standards to govern the exercise of such authority. U.S.D. No. 279 v. Secretary of Kansas Department of Human Resources, 247 Kan. 519, Syl. ¶ 6, 802 P.2d 516 (1990).
Standards to guide an administrative agency in the application of a statute may be inferred from the statutory purpose. Less detailed standards and guidance to administrative agencies are required in order to facilitate the administration of laws in the areas of complex social and economic problems. Vakas v. Kansas Board of Healing Arts, 248 Kan. 589, Syl. ¶¶ 7, 8, 808 P.2d 1355 (1991).
The pertinent language of K.A.R. 30-42-6 is:
"(a) `Applicant' means any facility which applies for a license issued by the department to provide residential care.
. . . .
"(c) `Facility' means any private person, group, association or corporation, or any community or local government department undertaking to provide residential care within the meaning of these regulations.
"(d) `Handicapped' means a physical, mental, or emotional impairment which limits one or more major life activities.

. . . .
"(g) `Staff' means employees of the facility who spend a majority of their work time in the supervision of residents." (Emphasis added.)
Major life activities, as used in K.A.R. 30-42-6(d), are identified in the Developmental Disability Act of 1984, Pub.L. No. 98-527, § 102, 98 Stat. 2662, 2664 (1984), as follows:
"(7) The term `developmental disability' means a severe, chronic disability of a person which . . . .
"(D) results in substantial functional limitations in three or more of the following areas of major life activity: (i) self-care, (ii) receptive and expressive language, (iii) learning, (iv) mobility, (v) self-direction, (vi) capacity for independent living, and (vii) economic self-sufficiency."
Kaufman points out neither the statute nor the regulations specifically define the terms "reside," "require supervision," or "require limited assistance with the taking of the medication." He argues the statute and the administrative regulations are unconstitutionally vague because they fail to set out the standards required for a licensed facility such that an ordinary person exercising ordinary common sense could understand and comply with the statute and the regulations.
In October 1982, the American Bar Association's Commission on Legal Problems of the Elderly and Commission on the Mentally Disabled were awarded a grant to develop a model act for regulating boarding and care homes to ensure that elderly and disabled residents enjoy a safe and decent living environment. Kaufman argues that the proposed Model Act developed to comply with the Keys Amendment should be used as a standard to determine if the statute and SRS licensing regulations are vague.
The Model Act, entitled A Model Act Regulating Board and Care Homes: Guidelines for States, is contained in 8 Mental and Physical Disability Reporter 150 (March-April 1984) and defines certain terms. The Model Act defines the word "provides" to mean that the home "makes personal assistance available to the residents." Model Act 2.2. The Model Act defines "personal assistance" as assistance by the staff of the home with activities for *882 daily living which include being aware of the residents' general whereabouts and monitoring their activities while on the premises to insure health, safety, and well-being. Model Act 2.3.
Kaufman applies definitions contained in the Model Act to the Kansas statute and SRS's regulations and claims that SRS's authority for licensing facilities is limited to care and boarding homes where mentally ill residents require supervision, limited assistance with taking of medication, continuous protective oversight, and personal assistance by the staff. Therefore, Kaufman argues under the Model Act's definition of "continuous protective oversight," Kaufman House is not subject to SRS's licensing requirement. The district court disagreed, stating:
"The test to be applied is whether an ordinary person exercising ordinary common sense can sufficiently understand and comply with K.S.A. 75-3307b. A statute will not be declared void for vagueness when it employs words commonly used, previously judicially defined, or having a settled meaning in law. Kansas City Millwright Co., Inc. v. Kalb, 221 Kan. 658, 562 P.2d 65 (1977). The words in K.S.A. 75-3307b are commonly used and should be given their ordinary meaning.
"However, the regulations do provide additional guidance in determining whether SRS licensing is necessary by the definitions which are set out. The Secretary is empowered to set licensing standards for `all facilities for the mentally ill . . . or facilities where mentally ill. . . or other handicapped persons reside who require supervision . . . .' K.S.A. 75-3307b(a)(5). `Facilities' are defined in K.A.R. 30-42-6(c) as `any private person, group, association or corporation or any community or local government department undertaking to provide residential care within the meaning of these regulations.'
"A resident of a facility is `handicapped' when there exists a `physical, mental, or emotional impairment which limits one or more major life activities.' K.A.R. 30-42-6(d). Major life activities are set out in Developmental Disabilities Act of 1984, Pub.L. No. 98-527, Section 102, 98 Stat. 2662, 2664 (1984):
'(7) The term "developmental disability" means a severe, chronic disability of a person which . . . .
"(D) results in substantial functional limitations in three or more of the following areas of major life activity: (i) self-care, (ii) receptive and expressive language, (iii) learning, (iv) mobility, (v) self-direction, (vi) capacity for independent living, and (vii) economic self-sufficiency.'
"These regulations are adequate to guide ordinary persons in determining whether SRS licensing statutes apply to their facility. The words in K.S.A. 75-3307b are commonly used and understood. The statute is not vague or ambiguous. It is constitutional."
The language in K.S.A. 75-3307b is commonly used, and an ordinary person exercising common sense can sufficiently understand and comply with this statute. The statute is not a trap for the innocent, as it provides adequate notice of what is an RCF. The statute does not give the SRS an ad hoc subjective basis to arbitrarily discriminate as to what facilities are an RCF.
When read with the Developmental Disability Act of 1984, K.S.A. 75-3307b and K.A.R. 30-42-6 are adequate to guide an ordinary person in determining whether SRS licensing regulations apply to specific facilities. The trial court correctly ruled that neither the statute nor SRS's regulations are unconstitutionally vague.
Kaufman asserts that, if SRS properly construed K.S.A. 75-3307b(a)(b) and its own regulations, SRS would be required to admit that Kaufman House is outside of SRS's licensing authority.
The proper interpretation of a licensing statute is an issue for determination by the court. See Tillotson v. Abbott, 205 Kan. 706, 712, 472 P.2d 240 (1970). The scope of appellate review of an agency's action is to determine if the district court reviewed the action in accordance *883 with the Act for Judicial Review and Civil Enforcement of Agency Actions, K.S.A. 77-601 et seq. The party asserting invalidity of the action has the burden of proving the invalidity. Vakas v. Kansas Board of Healing Arts, 248 Kan. 589, Syl. ¶ 4, 808 P.2d 1355.
Kaufman refers to the federal regulations implementing 42 U.S.C. 1382(e), the codification of the Keys Amendment, which declares that the scope of the Act requires states to create or designate a state or local authority "to establish, maintain, and insure the enforcement of standards for any category of institutions, foster homes, or group living arrangements in which . . . a significant number of recipients of Supplemental Security Income (SSI) benefits reside or are likely to reside." 45 C.F.R. § 1397.1 (1990). Kaufman asserts 45 C.F.R. 1397.5(a) defines what living arrangements are subject to federal law. 45 C.F.R. 1397.5 states in pertinent part:
"For purposes of this part:
"(a) Any category of institutions, foster homes, and group living arrangements means residential facilities which:
"(1) Provide both room and board and continuous protective oversight to the residents; and
"(2) Are non-medical or medical facilities of any size (other than those certified for participation in the Medicaid or Medicare programs) which are publicly or privately operated on a nonprofit or for-profit basis."
Kaufman alleges that the federal regulation clearly states that licensing is not required unless the facility provides room, board, and continuous protective oversight. Kaufman claims the evidence does not constitute personal assistance provided by the Kaufmans at Kaufman House as contemplated by the Keys Amendment. Kaufman reasons that since the agency found that Kaufman House offers only limited personal assistance to its residents and does not provide continuous protective oversight, it is not required to be licensed under K.S.A. 75-3307b(a)(5).
In reviewing questions of law, the trial court may substitute its judgment for that of the administrative agency, although ordinarily the court will give great deference to the interpretation of statutes and regulations of the enforcing agency. Wallis v. Secretary of Kans. Dept. of Human Resources, 236 Kan. 97, 101, 689 P.2d 787 (1984).
Kaufman's argument is flawed. He interprets the licensing statute and regulations to read that if an individual provides certain services to the mentally ill, mentally retarded, or other handicapped persons who reside at a facility, the individual must obtain a license. Kaufman's interpretation of the statute does not take into consideration the full scope of the statute. The licensing statute and regulations also require those who offer residential facilities to the mentally ill, mentally handicapped, or other handicapped persons to provide certain services and supervision to the tenants and to be licensed by SRS as a residential care facility.
The district court correctly determined that Kaufman House is subject to SRS's licensing requirement for a residential care facility under K.S.A. 75-3307b.
Kaufman's final claim is that SRS's findings of facts are not supported by substantial evidence in the record and the agency action should be set aside as arbitrary, oppressive, or capricious. This court may not try a case de novo or substitute its judgment for that of an administrative agency. A rebuttable presumption of validity attaches to all actions of an administrative agency and the burden of proving arbitrary and capricious conduct lies with the party challenging the agency's action. Kansas Racing Management, Inc. v. Kansas Racing Comm'n, 244 Kan. 343, 344, Syl. ¶¶ 8, 9, 770 P.2d 423 (1989).
If the agency action is constitutionally authorized by statute, it is presumed valid on review unless it is not supported by substantial competent evidence and is so wide of its mark as to be outside the realm of fair debate, or is otherwise unreasonable, arbitrary, or capricious and prejudices the parties. Vakas v. Kansas Board of Healing Arts, 248 Kan. 589, Syl. ¶ 5, 808 *884 P.2d 1355. The arbitrary and capricious test relates to whether a particular action should have been taken or is justified, such as the reasonableness of an agency's exercise of discretion in reaching a determination or whether the agency's action is without foundation in fact. Pork Motel, Corp. v. Kansas Dept. of Health & Environment, 234 Kan. 374, 381, 673 P.2d 1126 (1983). Arbitrary or capricious conduct may be shown where an administrative order is not supported by substantial evidence. U.S.D. No. 461 v. Dice, 228 Kan. 40, 50, 612 P.2d 1203 (1980).
In reviewing an agency action, an appellate court is limited to ascertaining from the record whether there is substantial competent evidence to support the findings. Substantial evidence is "such legal and relevant evidence as a reasonable person might accept as being sufficient to support a conclusion." Kansas Dept. of Health & Environment v. Banks, 230 Kan. 169, 172, 630 P.2d 1131 (1981). In the application of the substantial evidence test, the appellate court may not reweigh the facts or substitute its own judgment even if it would have found differently. Barnes v. Employment Security Board of Review, 210 Kan. 664, Syl. ¶ 6, 504 P.2d 591 (1972). The court is not concerned with evidence contrary to the findings but must focus solely on evidence in support of the findings. Further, the evidence must be considered on the record as a whole. See Central Kansas Power Co. v. State Corporation Commission, 221 Kan. 505, 511-12, 561 P.2d 779 (1977).
After reviewing the record, we find that SRS's determination that Kaufman House is required to be licensed as a residential care facility is supported by such legal and relevant evidence as a reasonable person would accept as being sufficient to support the decision.
Affirmed.
