C.J., the Mother, appeals the trial court’s order adjudicating her daughter, D.J., dependent. While the Department’s actions in this case clearly violated the spirit, as well as the letter, of the dependency statute, we nevertheless are compelled to affirm the order declaring D.J. dependent because the trial court’s ruling is supported by competent, substantial evidence.
The Mother’s first contact with the Department came about when her own mother beat and abused her. The Mother had also been sexually abused by several men. The Mother was initially placed under the protection and care of the Department as a “child victim,” and she was ultimately placed with her maternal grandmother, apparently as a long-term relative placement. During the two years that she lived with her grandmother before becoming pregnant, the Mother ran away several times and refused to attend the sex abuse counseling recommended for her by the Department. She also engaged in criminal activity, obtaining juvenile convictions for battery and a charge as a principal to armed robbery.
According to the Mother, the armed robbery charge arose when she was riding in a car driven by her then-boyfriend. He stopped at a convenience store where he saw some people he knew, got out of the car, and robbed several individuals with a handgun. He then returned to the car and drove off. The Mother remained in the car the entire time, and she denied knowing that the robbery was going to occur. She was charged as a principal, but the State was offering her a reduced charge and a probationary sentence if she testified against her boyfriend. The Mother testified that after this happened, she “saw the light” and began to change her behavior. She returned to school full time and no *752longer, ran away from home. She did, however, become pregnant. The Mother testified that, due to her new view of life, she was committed to raising her child in a healthy and loving environment.
The Mother and the Department both agree that the Mother’s case worker (assigned to her as a “child victim”) suggested to the Mother while she was pregnant that she take a parenting class. When the Mother was seven months’ pregnant, the case worker arranged for her to take a parenting class through the public school system; however, the Mother had to ride a public school bus full of other children to the school where the class was, and the bus ride took an hour each way. The Mother stopped attending the class because she was physically uncomfortable sitting on the bus for that long a period and because she was concerned about the long ride since she was considered a high-risk pregnancy. She also testified that she did not believe that she needed a class on infant care because she had helped raise her younger siblings and she had done a lot of babysitting. According to the Mother, when she stopped attending the parenting class, her case worker told her that she needed to complete the class or the Department would take her baby away when it was born. The Department does not deny that its case worker made this statement. Immediately after the Mother stopped taking the class, the Department issued a “baby watch” to all the local hospitals so that the Department would be notified when the Mother gave birth.
D.J., a healthy baby girl, was born on October 2, 2006. True to its word, the Department sheltered D.J. on October 4, 2006, and filed a shelter petition on October 5, 2006. In the shelter petition, the Department alleged that D.J. was in “imminent danger of illness or injury as a result of abuse, neglect, or abandonment.” The Department’s affidavit in support of its shelter petition alleged that the Mother had a psychiatric history and that she was noncompliant with her treatment. The Department also alleged that the Mother had a history of running away, some mental retardation, and a possible history of drug use. The Department also cited the pending armed robbery charge. The Department’s shelter petition did not indicate that its sole basis for its claim that the Mother had a “psychiatric .history” was her counsel’s request for a competency evaluation in her pending criminal case. The petition also did not indicate that the Mother’s history of running away had occurred more than two years prior to D.J.’s birth and that the alleged prior drug use was a single positive urine test for marijuana two years earlier. Based on the Department’s allegations, the trial court sheltered D.J.
Shortly after D.J. was born and while she was in foster care, D.J. developed stri-dor, which is an asthma-like disorder that generally results from a weakened trachea and/or esophagus, and gastroesophageal reflux. The combination of the two disorders resulted in D.J. having to be fed via a nasogastric feeding tube, which is a tube that runs up the nose, down the throat, and into the stomach. D.J. also developed a heart arrhythmia and sleep apnea, both of which required her to be hooked to a monitor. D.J. was transferred to a medical foster home in Lake Wales while the Mother remained living in north Tampa.
On October 25, 2006, the Department filed its petition for adjudication of dependency. In count two1, the Department *753alleged that D.J. “is at substantial risk of imminent harm from the mother” because the Mother had refused to attend sex abuse counseling, had engaged in criminal conduct, and had a history of running away and using drugs.
After D.J. was sheltered, the Department obtained repeated continuances of the dependency hearing. This occurred despite the provisions of sections 39.402(13) and 39.402(14)(f), Florida Statutes (2006), which provide that a child may not be held in shelter status under a shelter order for more than 60 days without an adjudication of dependency and that continuances or extensions of time may not exceed a total of 60 days.2 D.J. was ultimately held under a shelter order for more than seven months, rather than the maximum four months provided for by section 39.402.
In addition to these long delays, the record also shows that while D.J. was sheltered, the Department actively worked at cross-purposes with the Mother. For example, many of D.J.’s medical appointments were in Lakeland because the foster parents lived in Lake Wales. The Department was aware that the Mother lived in north Tampa and relied on public transportation. There was also evidence that the Department often failed to tell the Mother about the few medical appointments scheduled in Hillsborough County in time for the Mother to make transportation arrangements. However, the Department repeatedly faulted the Mother for failing to attend D.J.’s medical appointments and refused to consider reunification on the basis of the Mother’s failure to attend these appointments.
Similarly, the Department told the Mother that it could not recommend that she be reunited with D.J. because the Mother’s mother had moved back into the Mother’s grandmother’s home where the Mother was living and the Mother’s mother had a drug problem. However, when the Mother moved out of her grandmother’s home and sought independent living benefits for herself and her child, the Department told the Mother that she had to return to her grandmother’s home because that was her approved placement.
Further, the Department gave the Mother, who lived in north Tampa, a referral to a parenting program in Riverview. When the Mother found an approved parenting program provided by the county school system closer to her home, the Department refused to approve that program for the Mother, contending that it did not focus enough on infant care. It is not clear from the record whether the school system parenting program that the Department refused to approve is the same one that it attempted to require the Mother to attend when she was pregnant.
Finally, when the Mother asked the Department for training on how to deal with D.J.’s medical issues, the Department told her that the foster mother would have to train her. When the Mother asked the foster mother to teach her, the foster mother refused to do so until the Department indicated its intent to reunite D.J. with the Mother. However, the Department refused to consider reunification because the Mother was not trained to deal with D.J.’s medical issues. Each of these actions by the Department, which the De*754partment did not dispute at the hearing, establishes that the Department was in an adversarial relationship with the Mother, in violation of section 39.001(l)(b)(2), which states that the Department “should engage families in constructive, supportive, and nonadversarial relationships.”
In April 2007, after denying the Department’s request for yet another continuance and after considering all of the evidence presented at the adjudicatory hearing, the trial court adjudicated D.J. dependent based on its finding that D.J. was “at substantial risk of imminent medical neglect due to the mother’s lack of current medical training, the mother’s home being inadequately equipt (sic) to meet the needs of the child, and the immaturity in decision making skills that the mother has exhibited in the past.” However, the trial court also ordered the Department to establish “a very aggressive case plan to ... get this child back to this home.” The court specifically noted that it was not concerned about the Mother’s ability to interact appropriately with D.J., but it was concerned with “the medical well-being of the child.” The court told the Department that it wanted to reunite the Mother with D.J. in four to six weeks. The court also ordered the Department to give the Mother whatever referrals were necessary “immediately.” The Mother now seeks review of the order adjudicating D.J. dependent.
Despite the fact that many of the Mother’s problems were the direct result of the Department’s adversarial and obstructionist tactics, we cannot say that the trial court abused its discretion in adjudicating D.J. dependent. See In the Interest of L.C., 947 So.2d 1240, 1243 (Fla. 2d DCA 2007) (noting that an appellate court reviews a dependency adjudication for abuse of discretion). “An adjudication of dependency will be upheld if the court applied the correct law and its factual rulings are supported by competent substantial evidence.” Id. (citing R.F. v. Dep’t of Children & Families (In re M.F.), 770 So.2d 1189, 1192 (Fla.2000)).
In this case, the question for the trial court was whether D.J. was “at substantial risk of imminent abuse, abandonment, or neglect by the parent or parents or legal custodians.” § 39.01 (14)(f) (defining what constitutes a dependent child). “ ‘Neglect’ occurs when a child is deprived of, or is allowed to be deprived of, necessary food, clothing, shelter, or medical treatment....” § 39.01(43). ‘“Necessary medical treatment’ means care which is necessary within a reasonable degree of medical certainty to prevent the deterioration of a child’s condition or to alleviate immediate pain of a child.” § 39.01(42). Here, competent, substantial evidence presented at the adjudicatory hearing established that the Mother did not have, at that time, either the training or equipment needed to provide D.J. with the medical treatment necessary to manage her health issues. Because the purpose of an adjudication of dependency is “the protection of the child and not the punishment of the [parent],” § 39.501(2), the trial court did not abuse its discretion by adjudicating D.J. dependent for her own protection until such time as the Mother could receive the training she needed.
In this appeal, the Mother contends that the dependency adjudication was improper because the Department did not prove that D.J. faced any “imminent” harm. However, given the testimony about D.J.’s feedings through the nasogastric tube, her need for the apnea and cardiac monitors, and the Mother’s undisputed lack of training in addressing these medical needs, the immediate return of D.J. to the Mother would have posed a substantial risk of imminent harm to D.J. Further, the Department did establish a nexus between *755the Mother’s lack of medical training and the prospective harm to D.J. if her medical needs were improperly or inadequately addressed. Therefore, contrary to the Mother’s argument, the trial court’s finding that there was a substantial risk of imminent harm was supported by competent, substantial evidence.
The Mother also contends that the trial court’s reliance on an imminent threat of medical neglect to support the dependency adjudication violated her due process rights because the Department did not allege medical neglect in its petition. On the facts here, we disagree.
Due process requires that the allegations of a dependency petition be adequate to inform the parent of the nature of the Department’s claims so that the parent can prepare a defense. See Brown v. Dep’t of Health & Rehabilitative Sens., 582 So.2d 113, 114 (Fla. 3d DCA 1991). Thus, as a general proposition, it is error for the trial court to declare a child dependent based on grounds not alleged in the Department’s petition. See, e.g., K.S. v. Dep’t of Children & Families, 940 So.2d 577, 578 (Fla. 5th DCA 2006); R.S. v. Dep’t of Children & Families, 872 So.2d 412, 413 (Fla. 4th DCA 2004). However, when the issue is tried by implied consent, these due process concerns are alleviated. See, e.g., W.R. v. Dep’t of Children & Families, 961 So.2d 1131, 1132 (Fla. 4th DCA 2007); K.S., 940 So.2d at 578. Implied consent arises when arguments and evidence are presented on the issue without objection by the opposing party. W.S., 961 So.2d at 1132; K.S., 940 So.2d at 578.
For example, in W.S., the court held that the issue of the father’s breach of his case plan was tried by implied consent when “evidence of compliance with the case plan was the central issue at trial without objection.” 961 So.2d at 1132. Likewise in K.S., the court found that the disputed issue was tried by implied consent when “extensive evidence was introduced during the three-day hearing implicating section 39.806(l)(c), ... the attorneys discussed this ground in closing,” and “KS.’s counsel did not object.” 940 So.2d at 578. In contrast, in R.S., the court held that the disputed issue was not tried by implied consent when the disputed ground for termination was not alleged in the petition, was not mentioned in opening statements, and was not referred to at all until the trial court entered its ruling. 872 So.2d at 413.
Here, the record shows that the Department presented extensive evidence concerning the Mother’s lack of training vis-a-vis D.J.’s medical needs with no objection by the Mother. The Mother also presented evidence on this issue, specifically introducing evidence of her efforts to obtain such training. Contrary to the Mother’s representations on appeal, both the Mother and the Department, in their closing arguments, addressed the issue of whether the Mother could adequately address D.J.’s medical needs if reunification was ordered. Because extensive evidence was presented concerning the Mother’s ability to care for D.J.’s medical needs without objection and because the parties argued this exact issue in closing arguments, the medical neglect issue was tried by implied consent, and the Mother’s due process rights were therefore not violated.
Finally, the Mother points out that the Department did not introduce any evidence that she had previously neglected any of D.J.’s medical needs, nor did the Department present any evidence that the Mother would intentionally neglect D.J.’s medical needs upon reunification. While this is true, the trial court’s finding that the Mother was simply not trained and *756equipped to handle D.J.’s medical needs at the time of the hearing was sufficient to establish prospective medical neglect — not due to any intentionally neglectful conduct on the part of the Mother, but simply due to her lack of training. As justifiably troubled as the trial court was by the Department’s handling of this case, it did not lose track of the paramount goal of chapter 39 proceedings: “[t]o provide for the care, safety, and protection of children.” § 39.001(l)(a). Under these circumstances, the trial court’s decision to adjudicate D.J. dependent while the Mother received the necessary training in how to care for D.J.’s medical needs was not an abuse of discretion.
Sadly, the Department’s handling of this case distorted the manner in which the goals of chapter 39 are to be pursued: through “constructive, supportive, and nonadversarial relationships,” § 39.001(l)(b)(2), that “intrude as little as possible into the life of the family,” § 39.001(l)(b)(3). We are also concerned by the Department’s apparent disregard of the requirement that dependency actions be expedited in all but the most exceptional circumstances. See § 39.0136. The actions and attitudes displayed by the Department in this case are ones we cannot and do not condone. However, when the court finally considered the case at the dependency hearing, it acted properly in protecting D.J. for the brief time necessary to get the Mother the medical training she needed. Therefore, we affirm the adjudication of dependency.
Affirmed.
NORTHCUTT, C.J., and CRENSHAW, J., Concur.. In count one of its petition, the Department alleged prospective neglect based on the Mother’s alleged mental health issues. However, at the close of the Department’s case *753during the dependency hearing, the trial court dismissed this count due to a lack of evidence. Therefore, the issues raised in count one are not at issue in this appeal.
. We note that the trial judge who entered the dependency order in this case was not the judge who allowed these repeated continuances in violation of the statutory requirements.