
230 Kan. 610 (1982)
640 P.2d 1202
BOSWELL, INC., d/b/a RENO COUNTY ADULT CARE HOME, Appellant,
v.
JOSEPH F. HARKINS, SECRETARY, KANSAS DEPARTMENT OF HEALTH AND ENVIRONMENT, Appellee.
No. 52,737
Supreme Court of Kansas.
Opinion filed February 27, 1982.
Robert L. Taylor, of Hutchinson, argued the cause and was on the brief for the appellant.
Emily E. Cameron, of Kansas Department of Health and Environment, argued the cause and was on the brief for the appellee.
The opinion of the court was delivered by
SCHROEDER, C.J.:
Boswell, Inc., d/b/a Reno County Adult Care Home, appeals from the district court decision which affirmed the order of the Secretary of the Kansas Department of Health & Environment (KDHE) denying the facility a license to operate an intermediate nursing care home and denying certification to receive payments under the federal medicaid program. Boswell, Inc., also runs a second adult care facility named Broadacres which is located adjacent to the Reno County Adult Care Home but which operates under a separate license and certification. The licensure and certification of Broadacres is also the subject of *611 appeal before this court. Boswell, Inc. d/b/a Broadacres v. Harkins, 230 Kan. 738, 640 P.2d 1208 (1982).
The KDHE conducts inspections or field surveys of adult care homes for purposes of state licensure pursuant to authority granted in K.S.A. 39-923 et seq. (All statutory references are to the Ensley editions of the Kansas Statutes Annotated.) The department also conducts field surveys under contract with the Kansas Department of Social & Rehabilitation Services for purposes of certifying that federal requirements for participation in the medicaid program, 42 U.S.C.A. § 1396 et seq., have been met. Thus, KDHE field surveys often serve a dual purpose, depending on whether the nursing home has chosen to participate in the federal medicaid program. In the case at bar, the nursing home had chosen to participate in the federal program, and the two surveys were conducted simultaneously.
Although this appeal involves only the October 24, 1979, application for license and certification by the Reno County Adult Care Home, it is helpful to an understanding of the administrative agency and district court decisions in this case to begin our review of the facts at an earlier point in time. While it is not necessary to this appeal to detail the history of the facility since its inception in 1970, it is important to note that the facility was granted a provisional rather than a full license in November 1978 because of numerous deficiencies. That provisional license expired in March 1979 at which time surveyors from the KDHE made a re-inspection. On the basis of their report, the Secretary denied a license application and stated no new provisional license would be issued. Appeal was taken within the administrative agency, but no appeal was taken to the district court from the adverse agency rulings. Instead, on October 24, 1979, the facility submitted a new application for license and certification. On November 15, 1979, the surveyors returned to the facility and filed a re-inspection report with the Secretary, citing a number of deficiencies which are set out in greater detail later in this opinion. Based on this report, the Secretary issued an order on January 15, 1980, denying licensure and certification. The facility appealed and extensive testimony was heard by a hearing officer who subsequently filed findings of fact and conclusions of law and recommended the application for license and certification be *612 denied. On May 19, 1980, the Secretary entered an order approving the hearing officer's report and affirming his previous order denying licensure and certification. On May 28, 1980, the facility appealed to the district court pursuant to K.S.A. 39-931 for determination whether the order was arbitrary, unlawful, or unreasonable. The district court found the Secretary's recommendation of denial of certification to the Department of Social & Rehabilitation Services was not unlawful and further found the order issued (1) was not fraudulent, arbitrary, or capricious, (2) was substantially supported by the evidence, and (3) was within the scope of the Secretary's authority. The district court affirmed the order denying both licensure and certification.
The facility duly filed its notice of appeal in the Court of Appeals, and the case was transferred to the Supreme Court on the court's own motion pursuant to K.S.A. 20-3018(c).
The appellant first argues that because the district court received no additional evidence the appellate court occupies the same position as the district court and can evaluate and weigh evidence in deciding the issues presented. We think the appellant has misconstrued the function of this court as well as that of the district court on review of an order by an administrative agency. Neither court has the liberty to reweigh the evidence and substitute its judgment for that of the administrative agency. Kansas Dept. of Health & Environment v. Banks, 230 Kan. 169, 171, 630 P.2d 1131 (1981); Park South Apts. v. Dibbern, 228 Kan. 784, 789, 620 P.2d 827 (1980); Kansas State Board of Healing Arts v. Acker, 228 Kan. 145, 153, 612 P.2d 610 (1980); Neeley v. Board of Trustees, Policemen's & Firemen's Retirement System, 205 Kan. 780, 783, 473 P.2d 72 (1970); Kansas State Board of Healing Arts v. Foote, 200 Kan. 447, 450, 436 P.2d 828 (1968). Hearings on appeal are "not the equivalent of the initial hearing before the licensing agency which has the responsibility of weighing controverted evidence and arriving at an independent judgment, on the merits, as to entitlement to a license." Rydd v. State Board of Health, 202 Kan. 721, 729, 451 P.2d 239 (1969).
In the case at bar, K.S.A. 39-931 specifically limits the district court's authority to a determination whether the order entered was arbitrary, unlawful, or unreasonable. The appellate court then, to determine whether the district court properly limited its scope of review, makes the same review of the administrative *613 agency's action. Kansas Dept. of Health & Environment v. Banks, 230 Kan. at 172; Park South Apts. v. Dibbern, 228 Kan. at 789; U.S.D. No. 461 v. Dice, 228 Kan. 40, 49, 612 P.2d 1203 (1980); Gillett v. U.S.D. No. 276, 227 Kan. 71, 79, 605 P.2d 105 (1980); Kansas State Board of Healing Arts v. Foote, 200 Kan. at 451. To this limited extent, it may be said the appellate court occupies the same position as the district court; however, the review by each is limited in the statutorily prescribed manner.
Two considerations, one constitutional and the other a matter of conservation of resources, underlie endorsement of this limited scope of review. On a constitutional level, a broader scope of review would result in judicial usurpation of power delegated by the legislature to the administrative agency and contravention of the separation of powers doctrine. See Neeley v. Board of Trustees, Policemen's & Firemen's Retirement System, 205 Kan. at 783; Kansas State Board of Healing Arts v. Foote, 200 Kan. at 450. Beyond the constitutional consideration, broader review would dilute the advantage of fact-finding by a specialized agency and cast the burden on a district judge who may have no expertise in the particular area. See Foote, 200 Kan. at 450-51, 459.
The appellant next raises issues of (1) unlawful delegation of legislative power by both the state legislature and the United States Congress and (2) denial of due process because duties imposed both as to licensure and certification are not set forth in terms definite enough to serve as a guide to those who have the duty imposed on them. An examination of the petition and brief submitted to the district court reveals these issues were not raised before the district court and consequently are not properly before this court. Ordinarily, an issue cannot be raised for the first time on appeal. See, e.g., City of Salina v. Jaggers, 228 Kan. 155, 170, 612 P.2d 618 (1980); Fleming v. Etherington, 227 Kan. 795, 802, 610 P.2d 592 (1980); Malone v. University of Kansas Medical Center, 220 Kan. 371, 373-74, 552 P.2d 885 (1976); State v. Estes, 216 Kan. 382, 385, 532 P.2d 1283 (1975); Pierce v. Board of County Commissioners, 200 Kan. 74, 434 P.2d 858 (1967).
As its fourth point, the appellant contends the denial of licensure and certification to the Reno County Adult Care Home was arbitrary, unlawful, and/or unreasonable. Several arguments are advanced to support that contention.
A continuing theme in the transcripts and briefs is that the state *614 has shown no incidents of actual harm to residents. Nowhere in the act do we find a requirement of actual harm. On the contrary, special provision is made for the prevention of harm to residents. After detailing an orderly process for administrative review of a license denial, suspension, or revocation, K.S.A. 39-931 provides:
"Nothing herein shall be construed to prevent the licensing agency from commencing immediately an action for injunction or other process to restrain or prevent the operation of any licensed home which the licensing agency, upon investigation, shall have found to be operated or maintained in such a manner as to constitute a clear and immediate threat to the lives or health of its residents."
We find it neither arbitrary nor unreasonable to deny or revoke a license before actual harm to the residents of a home is demonstrated.
Appellant next argues that it is customary to have some deficiencies and that other facilities have been granted successive provisional licenses in violation of K.S.A. 39-929, which provides in part:
"A provisional license may be issued to any adult care home, the facilities of which are temporarily unable to conform to all the standards, requirements, rules and regulations established under the provisions of this act ... A provisional license may be issued to provide time to make necessary corrections for not more than six (6) months. One additional successive six-month provisional license may be granted at the discretion of the licensing agency." (Emphasis added.)
The act recognizes that deficiencies may occur but contemplates that a facility will not operate on a provisional license for more than one year at a time. The provisions of the act apply equally to all nursing home facilities in the state. Assuming, for purposes of this argument only, that the KDHE has erroneously granted provisional licenses in the past, such erroneous action would not prevent enforcement of the statute in this action, Warburton v. Warkentin, 185 Kan. 468, 477, 345 P.2d 992 (1959), and would not constitute a denial of equal protection of the law. Past agency error does not abrogate enforcement of the law.
The facility next argues it has corrected deficiencies in the past. The implication seems to be that greater opportunity should be afforded to correct the deficiencies in this instance. We note that, for the six months preceding the application made in October 1979, the facility was operating on a provisional license the purpose of which was to provide a grace period in which to correct deficiencies. Yet, the hearing officer who filed his report May 7, 1980, found evidence to support numerous violations *615 reported in the November 15, 1979, field survey and found repeated violations of five regulations. K.S.A. 39-931a(b) provides in pertinent part:
"Pursuant to K.S.A. 39-931, the licensing agency may deny a license to any person and may suspend or revoke the license of any person who: (1) Has willfully or repeatedly violated any provision of law or rules and regulations adopted pursuant to article 9 of chapter 39 of the Kansas Statutes Annotated."
The act clearly does not countenance violations nor envision perpetual grace periods in which to correct them.
Finally, appellant argues the action of the agency was arbitrary, essentially because the denial has no reasonable relation to the lawful purpose of the act. An examination of the purpose statement of the act as well as those violations upheld by the hearing officer and the district court should determine the question. On appeal, the facility does not raise an issue challenging the existence of substantial evidence to support the violations.
K.S.A. 39-924 states the purpose of the act as follows:
"The purpose of this act is the development, establishment, and enforcement of standards (1) for the care, treatment, health, safety, welfare and comfort of individuals in adult care homes licensed by the secretary of health and environment and (2) for the construction, general hygiene, maintenance and operation of said adult care homes, which, in the light of advancing knowledge, will promote safe and adequate accommodation, care and treatment of such individuals in adult care homes."
The hearing officer found and the district court affirmed as substantially supported by the evidence the following violations of K.A.R. 28-39-30 through 28-39-50 adopted pursuant to authority granted in K.S.A. 39-932:
K.A.R. 28-39-33(A) Policies and procedures need to be revised to fit this facility, and procedures are needed to govern all areas and functions.
K.A.R. 28-39-33(A) Administrator needs to maintain communication with nursing staff and other departments in regard to new admissions so person is on duty to process admission material when new residents are admitted.
K.A.R. 28-39-33(J) Policies state that a resident can be discharged for complaining in the facility.
K.A.R. 28-39-33(K) Committee has reviewed but has not revised policies to fit this facility.
K.A.R. 28-39-34(B) The total care plan is not a useful tool in management of care. All goals need to be measurable.

*616 K.A.R. 28-39-36(A) No rehabilitation plan of care is available.
K.A.R. 28-39-38(A) The activity program needs to be expanded to meet the needs of independent and group activities for each resident.
K.A.R. 28-39-38(C) Recreation equipment appropriate for residents needs to be obtained.
K.A.R. 28-39-40(D) Documentation of nurse aide certification is not kept on file for each employee.
K.A.R. 28-39-41(D) (8) and (19) Hot food (eggs) was served at 112 degrees Farenheit rather than 140 degrees. Tray identification system was inadequate.
K.A.R. 28-39-41(F) Final rinse temperature on dishwashing machine is 160 degrees Farenheit rather than 170 degrees as specified by the manufacturer.
K.A.R. 28-39-42(B) All legend drugs need to be under prescription.
K.A.R. 28-39-42(E) Drug room needs to be kept free of all personal care items as well as items, clean and soiled, that need to be stored in the utility room. Emergency kit needs to be sealed and dated. Policies and procedures for emergency drugs need to be followed. Policies on self-administration of drugs need to be clarified.
K.A.R. 28-39-43(A) Closed records need to be organized according to policies and procedures.
K.A.R. 28-39-43(B) Two of records checked lacked past medical history.
K.A.R. 28-39-43(D) There is no full-time employee responsible for medical records.
K.A.R. 28-39-44(A) Policies and procedures for investigating, controlling, and preventing infections are not appropriate for this facility.
K.A.R. 28-39-45(B) Although an effort was made by the facility to conduct more fire drills after the November 15, 1979, survey, at the time of the survey there was a deficiency.
K.A.R. 28-39-46(L) The laundry facility does not provide functional separation of clean and soiled linens.
K.A.R. 28-39-48(I) There was no sign on the toilets for the handicapped.
The violations cited reasonably relate to purposes stated in the *617 act, and denial of a license for these violations could not be termed arbitrary. It would serve no useful purpose to set out in detail the specific violations of 42 C.F.R. § 442.250 et seq., as they relate to certification under the medicaid program. Suffice it to say, they are detailed and keyed to the appropriate sections of the federal regulations.
Review of the record as a whole supports the district court's determination that the order of the Secretary was neither arbitrary, unlawful, nor unreasonable.
Appellant's fifth point on appeal is that, under any reasonable interpretation of K.S.A. 39-931, the facility has "substantially complied" with the requirements, standards, rules, and regulations. Whether there has been substantial compliance depends on whether the purposes of the statute have been met. Although some of the violations set out above could never support a denial of licensure standing on their own, taken as a whole the violations do establish a substantial failure to comply with the regulations requiring policies and procedures to prepare the staff for untoward events, such as disasters or infections, and to plan for the care and activities of the residents.
Finally, appellant contends the procedures followed by the KDHE in determining certification usurp federal law and defeat congressional intent concerning certification under the medicaid program. The record in this case reveals KDHE surveys for licensure and certification may be conducted simultaneously, but separate state and federal regulations are followed in citing violations. The contention is without merit.
The decision of the lower court is affirmed.
