Genome sequencing is set to revolutionise the diagnosis of rare childhood conditions, according to researchers in Cambridge.
All seriously ill children in England with an unexplained disorder will be eligible for genome analysis, which involves mapping a person's entire genetic code, from next year.
It follows a project at Addenbrooke's Hospital and Cambridge university.
One in four children in intensive care had a genetic disorder, it found.
Researchers were able to give a diagnosis within two to three weeks, which sometimes led to a change in treatment or spared children further invasive tests.
In each case, the whole genome of the child and both their parents were sequenced, which showed whether a gene fault had been passed on.
'Fast meaningful result'
So far, about 350 babies and children in intensive care at Addenbrooke's Hospital have had their genome, made up of billions of letters of DNA code, analysed as part of the Next Generation Children research project.
In two-thirds of cases, the gene error had occurred spontaneously at conception rather than being inherited.
The children had a range of conditions - including birth abnormalities, neurological symptoms including epilepsy, metabolic diseases or reduced growth.
Lucy Raymond, professor of medical genetics and neurodevelopment at the University of Cambridge, who led the project, said: "It is astonishing to be able to give a meaningful result from whole genome sequencing analysis in just a couple of weeks, compared to earlier in my career, when we spent years simply trying to locate a single gene."
One surprising finding was that a child's appearance and clinical symptoms alone were rarely a good predictor of whether they had a genetic condition.
Prof Raymond said the project would be used as a template by the NHS Genomic Medicine Service and rolled out across England in 2020.
This will mean that any baby or child in England admitted to intensive care with an unexplained condition will be eligible, together with their parents, for whole genome sequencing - the first national health service in the world to offer this.
So what will it mean for families?
First, a more rapid diagnosis. That was the case for Claire Cole and Kris Daly, parents of Millie-Mae, aged two, who has a rare form of epilepsy.
They were offered whole genome sequencing last year, after Millie-Mae had been repeatedly admitted to hospital with uncontrolled seizures.
Claire told BBC News: "We were given the result when she was in intensive care, and they immediately changed one of her medications which was aggravating for her type of epilepsy.
"We saw a big difference as soon as that change was made," she said.
Kris added: "The test result came amazingly quickly and was priceless, because it allowed us to put all the correct people in place and do the best for her."
Claire and Kris, from Suffolk, who have three other older children, were told that Millie-Mae's condition was the result of a spontaneous mutation rather than being passed on from them.
Claire said: "Millie-Mae has Dravet syndrome, which is a serious condition, so it was a difficult thing to be told, but I'm glad we have a diagnosis now, as not knowing would be very hard."
Millie-Mae has a mutation in the SCN1A gene and routine genetic testing would have eventually revealed this.
But Prof Raymond said this would have taken many more months, and with other conditions it could take years for families to get a diagnosis.
She said: "Parents will no longer have to suffer an agonising diagnostic odyssey of going to different specialists repeating their story and we can use that time focused on the care of the child."
The move to whole genome analysis has become possible because of the dramatic increase in the speed of sequencing, and the fall in price.
It costs less than £1,000 to sequence a genome but Prof Raymond said this could eventually save the NHS money through avoiding repeated diagnostic tests when trying to find the cause of a rare disorder, which could previously take many years.
How else could whole genome sequencing help families?
In the case of Katie and Ian Picken, from Essex, it explained why their baby daughter, Seren, died, and gave them certainty that their son, Rhys, was unaffected.
Seren was born in September 2017, apparently healthy, but within a few weeks she began to have seizures and was admitted to intensive care. Her condition deteriorated and she died at 13 weeks.
Seren and her parents had had blood samples taken, which were sent for whole genome sequencing. The samples confirmed that she had a fatal mitochondrial disorder, but its cause could not be pinpointed because no variants were found in any genes known to cause disease.
Prof Raymond and her team had found two variants in a previously unreported gene, NDUFA6, and that Seren had inherited one from each parent, but the role of the gene was unclear.
In May 2018, Katie and Ian contacted Addenbrooke's to tell them that she was pregnant, and this prompted an urgent reanalysis of their genomes to establish whether the couple were at risk of passing on a fatal disorder.
Using GeneMatcher, Prof Raymond uploaded the gene variants on to a global database and found three other children with the same incredibly rare condition, which affects mitochondrial function.
A research paper was published within weeks, recording the first cases of the disorder - which was essential because the NHS can only offer prenatal testing for a gene if it has been published in medical literature.
Katie had chorionic villus sampling at 15 weeks, where a small sample of cells is removed from the placenta.
Both parents had passed on a faulty copy of the NDUFA6 gene to Seren, so it meant there was a one in four chance they would pass on the fatal disorder to their unborn son.
There then followed an anxious few days waiting for the results before they got a call from Prof Raymond saying the pregnancy was unaffected.
Ian said: "It was a hugely emotional moment; we sat and cried with happiness, and with sadness because of what we had gone through with Seren."
The couple's son, Rhys, was born in December 2018, a year after the death of his sister, and is completely healthy.
"Genomics has the potential to transform the delivery of care for patients which is why the NHS has prioritised it in its Long Term Plan," said Prof Dame Sue Hill, chief scientific officer of NHS England.
"This Cambridge trial is important because not only does it show the potential benefits of whole genome sequencing to significantly improve care for seriously ill children, but it also demonstrates this technology can be delivered as part of a mainstream NHS service."
Follow Fergus on Twitter.