Edinburgh's new children's hospital due to open in 2017
A public inquiry will be conducted to examine safety and welfare issues at the new Children's Hospital in Edinburgh and at Queen Elizabeth University Hospital in Glasgow.
Research will determine how vital problems related to ventilation and other essential building systems occurred.
It will also analyze how to avoid errors in future projects.
Edinburgh Royal Hospital for Children and Youth should open in 2017.
The facility, which has the same contractor as the Glasgow super-hospital, will not be ready until next fall.
& # 39; High Priority & # 39;
Health Secretary Jeane Freeman said: "The safety and well-being of all patients and their families is my top priority and should be a primary consideration in all NHS construction projects.
"I want to make sure that this is the case for all future projects. So, after calls from affected parents, I am announcing a public inquiry to examine the new Royal Hospital for Children and Youth and the locations of Queen Elizabeth University Hospital."
£ 824 million Queen Elizabeth University Hospital in Glasgow opened in 2015
She added: "Recent reports from KPMG and NSS at the new Edinburgh Children's Hospital will provide a significant amount of evidence underlying the survey, along with the ongoing independent review of QEUH delivery and maintenance.
"The current situation is not what anyone would choose – but I am determined to resolve it."
In January, it was confirmed that two patients had died after contracting a fungal infection caused by pigeon droppings at Queen Elizabeth University Hospital.
The health secretary later ordered a review of the building design and said there was "an absolute focus on patient safety."
& # 39; deeply regrets & # 39;
Meanwhile, the new £ 150 million Royal Children's Hospital in Edinburgh has been affected by delays due to ill health.
The hospital was due to open in 2017 – but will not be ready until next fall, at least – after problems with the ventilation system specification.
Prime Minister Nicola Sturgeon previously said she "deeply regrets" the assault, with opposition parties calling for "heads to roll".
The opening date was postponed when last minute inspections encountered serious problems with the ventilation system in the intensive care unit of the unit.
A report published earlier this month said 16 million pounds of repairs were needed to correct ventilation and other problems that had been identified, with work expected to take at least a year.
The corridors of the new Edinburgh hospital will remain empty for some time.
Scottish conservatives said the public inquiry was "very late" and insisted that this was only because "the SNP hierarchy was filled with negative headlines."
Party health spokesman Miles Briggs said: "The ongoing problems at both hospitals are a consequence of the NHS's neglect of the NHS, which has been going on for over a decade.
"It is now vital that the public inquiry report as soon as possible and consider the decisions made around these projects by the four SNP health secretaries."
Monica Lennon of Scottish Labor said the inquiry is "the only way to get to the bottom of this outrageous series of errors."
"Not fit for purpose"
She added: "Children in Scotland are being disappointed because hospitals that have been promised are not fit for purpose.
"We have two hospitals built by the same contractor that are mired in controversy and all the time patients suffer.
"The public needs to know the truth of what went so wrong in these two vital hospitals."
The Scottish Dems Lib said public trust in projects needs to be "urgently restored."
Spokesman Alex Cole-Hamilton MSP said: "We simply cannot have young patients being treated in facilities that are not appropriate.
"It is vital that this public inquiry proceeds in a way that complements and does not further delay the opening of the Sick Kids hospital."
Alison Johnstone, for the Scottish Greens, welcomed the announcement, but said the secretary of health should not use the inquiry as "an excuse to avoid legitimate parliamentary scrutiny".
She added: "The Scottish government must ensure that the health and well-being of patients and staff are critical in the future, and provide adequate support to all those affected in both places.
"There are also significant issues surrounding the private finance schemes used to fund these projects and I hope it is an area that the survey can look into."