The Child and Family Agency, Tusla, has obtained an interim care order for the baby girl abandoned in Rathcoole, Co Dublin last Friday.
The Family Court in Dublin yesterday heard the baby needs ongoing treatment in both the Coombe hospital and Our Lady's Children's Hospital Crumlin.
A consultant neonatologist's report said he anticipated a good outcome but an interim care order was needed so that treatment could be given.
The court was also told doctors wanted to carry out a brain scan, a neurological examination of the baby and also they wanted permission to carry out a DNA test.
Solicitor for Tusla Patrick McClean said the DNA test would assist in establishing parentage and gardaí could compare this with the database to ensure the mother is actually the biological parent if and when she comes forward.
He said Tusla will continue trying to find the mother and said they had carried out checks with other hospitals.
Gardaí referred to the baby in their press conference yesterday as 'Maria' however, she was referred to in court as 'Jane Doe'.
Judge Brendan Toale said he was satisfied that 'Jane Doe' was found by the roadside and there had been no contact by the parents.
He said the child had suffered some adverse effects by being left in the open and she required care and attention.
He said provision now had to be made for the child's medical needs and granted the interim care order for the next 28 days.
There will then be another hearing to extend the order, and he said if the parents become known in the meantime they are to be notified of the order, and they are entitled to apply for an order to vary that.
Mother has nothing to fear by coming forward - gardaí
Meanwhile, gardaí say they are are still trying to contact the parents of the baby girl.
An incident room at Clondalkin Garda Station has received a number of calls, which have been followed up, but detectives say the information has not enabled them to identify the infant's mother.
They say the appeal for information remains in place and they are working closely with Tusla to ensure the best possible outcome for all concerned.
Gardaí have reiterated that their primary concern is the welfare of the mother and baby.
They also said that the mother or anyone close to her has nothing to fear by coming forward.