The Missouri Division of Family Services (DFS) appeals from an order entered by the juvenile division of the Circuit Court of Jackson County, requiring that the juvenile, R.M., remain in DFS custody and that he be placed, at DFS expense, at the Dever-eux Foundation in Victoria, Texas. DFS asserts the trial court erred because (1) the order requires that DFS violate the provisions of Chapter 34 RSMo and constitutes an usurpation, by the judicial branch, of powers delegated to the executive branch, and (2) the order is not supported by substantial evidence. Taken with the case is a motion to dismiss DFS’s appeal, because the appeal allegedly was not brought on R.M.’s behalf, as required by § 211.261 RSMo 1978.
Motion denied and judgment affirmed.
R.M. is a minor child who has been in DFS custody since May, 1976, when he was three years old. He has been placed in a series of DFS foster homes, the psychiatric units of two hospitals, and the Spofford Home for Children. The Spofford Home determined R.M. to be a dual diagnosis child and recommended that he be placed in a facility capable of treating him. A dual diagnosis child is one who is suffering from both organic brain dysfunction and some form of emotional disability.
In January, 1984, the juvenile court ordered that the Department of Mental Health and Division of Mental Retardation conduct an in-patient evaluation of R.M. at Western Missouri Mental Health Center (Western Mo.) to determine an appropriate *207placement for R.M., and that DFS explore the Devereux Foundation, Brown School, and other similar facilities for possible placement. Devereux is an institution designed for the treatment of children, adolescents, and young adults with varying degrees of emotional and mental disabilities. At the subsequent review of R.M.’s case, in May, 1984, the juvenile court committed R.M. to the custody of DFS for placement at Western Mo. for “further evaluation and treatment” and ordered that DFS pursue residential placement alternatives. The court again reviewed R.M.’s case on November 15 and December 7, 1984 and, subsequently, ordered that DFS place R.M., who was committed to its custody, in Devereux at DFS expense, this ascertained to be $5,600 per month. It is from this order that DFS appeals.
Taken with the case is a motion to dismiss DFS’s appeal, as not having been brought “on the part of the child”, as required by § 211.261 RSMo 1978. The juvenile officer and guardian ad litem contend that DFS is concerned about its alleged inability to pay for the ordered services and thus, they contend, it has brought the appeal to protect its own pecuniary interests and not the interests of the child. While DFS has raised an issue about its authority to pay for R.M.’s care at Devereux, it has also questioned whether there is substantial evidence to support the court’s order and has briefed the issue in terms of R.M.’s best interests. Thus, DFS has complied with § 211.261 and the motion to dismiss must be denied.
DFS first asserts the court erred in ordering that R.M. be placed at Devereux, at DFS expense, because compliance with the order would require that DFS violate Chapter 34 RSMo, governing state purchases, and because the order constitutes a usurpation, by the judicial branch, of powers delegated to DFS, a constituted portion of the executive branch. State ex rel. Mo. Div of Fam. Ser. v. Moore, 657 S.W.2d 32, 34 (Mo.App.1983).
The principles guiding the resolution of this point are found in the juvenile code, Chapter 211 RSMo. Section 211.011 RSMo 1978 states
The purpose of this chapter is to facilitate the care, protection and discipline of children who come within the jurisdiction of the juvenile court. This chapter shall be liberally construed, therefore, to the end that each child coming within the jurisdiction of the juvenile court shall receive such care, guidance and control, preferably in his own home, as will conduce to the child’s welfare and the best interests of the state and that when such child is removed from the control of his parents the court shall secure for him care as nearly as possible equivalent to that which should have been given him by them.
(Emphasis added). Section 211.031.1 RSMo Supp.1985 further provides that the juvenile court has exclusive original jurisdiction in proceedings involving juveniles such as R.M., and, once determined to be under the court’s jurisdiction, pursuant to § 211.181.1 RSMo 1978, the court may:
(4) Cause the child to be examined and treated by a physician, psychiatrist or psychologist and when the health or condition of the child requires it, cause the child to be placed in a public or private hospital, clinic or institution for treatment and care; except that, nothing contained herein authorizes any form of compulsory medical, surgical, or psychiatric treatment of a child whose parents or guardian in good faith are providing other remedial treatment recognized or permitted under the laws of this state.
(Emphasis added)
Thus, the juvenile court, for which the child’s best interests and welfare are the primary consideration, In Interest of R.L.P., 652 S.W.2d 185, 187 (Mo.App.1983), may order that the child be placed in the institution best suited to his needs, and, if the child is committed to the custody of DFS, pursuant to § 207.020.1(17) RSMo 1978 DFS must pay for that care.
The juvenile code has been held to function as “a complete statutory method for *208the areas specified therein.” In Interest of P.A.M., 606 S.W.2d 449, 452 (Mo.App.1980). The juvenile court’s authority to make orders effectuating the child’s best interests is unquestioned. Nonetheless, DFS asserts the court’s order is essentially a usurpation of executive function. The argument is that Chapter 34 RSMo requires DFS to purchase supplies (a term encompassing contractual services) through the State Office of Administration and that, since there is no contract approved by the State Office of Administration, DFS cannot lawfully obey the court’s order.
In support of that argument, DFS produced evidence regarding the methods used in making purchases. DFS generally presents, on a yearly basis, a list of needed services to the Administrator, who sends out requests for bids and, based on proposals received, selects the “lowest and best bidder.” DFS occasionally receives a waiver from the bidding process, such as that received for the purchase of foster care. It is also possible to periodically return to the Administrator and ask that a new bidding process be instituted for previously unsatisfied needs. DFS contends that, without having gone through the purchasing procedures prescribed by Chapter 34 RSMo, the court’s order that it place R.M. at Dever-eux, which does not have a contract with DFS, interferes with the agency’s discretion to administer its programs and funding and, axiomatically, causes DFS to violate the mandates of Chapter 34 RSMo.
While not directly addressing the Chapter 34 argument, the Eastern District opinion in K.B. v. Mo. Div. of Family Services, 672 S.W.2d 710 (Mo.App.1984) controls the point. In K.B., DFS appealed the court’s denial of its motion to be relieved of legal custody of K.B. and the order that K.B. be placed, at DFS expense, in the Niles Home. The Niles Home had accepted K.B. for placement and, while the space for which DFS had a contract was full, there was uncontracted-for space available. DFS argued that, as it did not have the funds available, the court could not order that K.B. be placed at Niles. The court held that, once the child was in DFS custody, it could not at some future date relieve itself of custody merely because it lacked funding. It further held that
the juvenile court did not exceed its authority in ordering the child placed in the Niles Home. The function or purpose of the court as defined in § 211.011 RSMo (1978) is, “[t]o facilitate the care, protection and discipline of children who come within [its jurisdiction].” Testimony given at the evidentiary hearing established that the Niles Children’s Home was the only available facility capable of providing for K.B.’s special needs. In ordering the juvenile, K. B., placed in the Niles Home, the court was simply fulfilling its duty to facilitate the care, protection and discipline of a child within its jurisdiction.
Id. at 711.
Implicit in the Eastern District’s formulation, is a recognition of the juvenile court’s inherent authority, pursuant to Chapter 211 RSMo, to order that the juveniles within its jurisdiction be placed in appropriate facilities, notwithstanding the internal administrative functions of the agency ordered to pay for the juveniles’ care. DFS’s lack of adequate funding in K.B. is analogous to DFS’s assertion, in the case at bar, that it may purchase residential services for the juveniles in its care only after completing the process set out by Chapter 34 RSMo.
In light of the juvenile court’s intrinsic authority to “facilitate the care, protection and discipline of a child within its jurisdiction”, Id., DFS’s internal mechanism for the payment of residential care is irrelevant.1 The legislature has statutorily mandated that DFS pay for the care of children in its custody, § 207.020.1(17), and the juvenile court’s order that R.M. be placed in Devereux is not in excess of its jurisdiction.
*209DFS also asserts the court’s order “was obviously based on objected-to hearsay evidence given by Dr. Shaw that Devereux could provide one-to-one treatment needed by the minor child, and in that admissible testimony and documentary evidence was presented which indicated that Devereux could not provide such treatment.” At the hearing, Dr. Shaw, R.M.’s primary therapist and treating psychologist, was asked if there existed an appropriate treatment program for R.M. He responded, over objection to hearsay, that, based on his conversations with Dr. Soloman, Devereux could provide such treatment, specifically, a one-to-one therapy program. DFS introduced a letter from the Devereux Admissions Assistant, which stated that Devereux could not establish a one-to-one program for any patient. DFS contends the trial court’s order was necessarily based on Dr. Shaw’s objected-to hearsay statements and thus, the order was not supported by substantial evidence.
The standard of review for juvenile proceedings is as in court-tried cases, as enunciated in Murphy v. Carron, 536 S.W.2d 30 (Mo. banc 1976). The trial court’s judgment will be affirmed unless there is no substantial evidence to support it; it is against the weight of the evidence; or it erroneously declares or applies the law. Id. C.R.K. v. H.J.K., 672 S.W.2d 696, 698 (Mo.App.1984); In Interest of K.P.B., 625 S.W.2d 692, 694 (Mo.App.1981).
A reversal based on the erroneous admission of evidence in a court-tried case requires that the evidence have played a critical role, and there must have been an absence of sufficient competent evidence to support the decree. Steinbruegge v. Steinbruegge, 670 S.W.2d 583, 584 (Mo.App.1984); Juv. Off. of Cape Girardeau Co. v. M.E.J., 666 S.W.2d 957, 960 (Mo.App.1984); In Interest of A.R.S., 609 S.W.2d 490, 491 (Mo.App.1980); In re Adoption of S., 581 S.W.2d 113, 118 (Mo.App.1979). There was substantial competent evidence from which the trial court could determine that R.M.’s placement in Devereux was in the child’s best interest, which is the primary concern of the juvenile court. In Interest of R.L.P., supra, 652 S.W.2d at 187.
At the hearing, Dr. Shaw testified that R.M. suffers from a mixed organic, mental, and psychiatric disorder and, as a result, cannot form normal relationships with either his peers or adults. Dr. Shaw stated that R.M. needs a program specifically geared to help that kind of individual, a program extremely structured and predictable in nature. He then stated that Dever-eux is known in the profession to provide such structured environments for its residents. To his knowledge, however, neither Western Missouri nor any other state institution in Missouri had a program that would be the optimum setting for R.M., nor was any such program being developed. Susan Williams, a DFS social worker assigned to R.M.’s case, stated that there was no program available in Missouri which would be considered appropriate for R.M.’s needs. She also stated that Devereux had accepted R.M., based on all of the information it had received, and had agreed that Devereux was an appropriate placement for R.M. Additionally, the written information about Devereux, which was admitted without objection, stated:
The staff-resident ratio is approximately one-to-one ... Because each person is uniquely individual, each child at Dever-eux is considered on an individual basis, his program tailored to his own needs ... Upon enrollment, the child is assigned to that unit which, in the opinion of the Devereux professional staff, best suits his needs at that time.
In response to questioning about possible detrimental effects of placing R.M. in Texas, Dr. Shaw responded that, while there could be some emotional costs to R.M. due to leaving his family and cutting short relationships with his therapists, there were also great benefits to be had and the time lost in rebuilding relationships in Texas was inconsequential with reference to the long-term prognosis. There was thus ample competent evidence from which the juvenile court could find R.M.’s best interests *210would be served by sending him to the Devereux Foundation in Texas.
During the pendency of this appeal, DFS filed an application for injunctive relief. The basis for the relief requested was the trial court’s request to the guardian ad litem that an order to show cause be issued against the Director of DFS. The request for that relief was sustained by the entry of an order staying any proceedings in the trial court pending the appeal. To eliminate any question concerning the continuing effectiveness of the stay order pending appropriate post-opinion motions, the stay order is specifically extended to the date of the issuance of a mandate in this case.
The motion to dismiss the appeal is denied, and the order of the circuit court, directing the placement of R.M. in the care of the Devereux Foundation in Texas at DFS expense, is affirmed.
All concur.
. The issue of the relevancy of this evidence in any enforcement proceeding is not reached or decided.