A drugs company is facing an unlimited fine for making and selling dangerously weak medicine to a Milton Keynes pharmacy - resulting in a young child becoming seriously ill in hospital.
A judge heard that Middlesex-based drug company Syri Ltd supplied medicine which was under-strength for almost five years.
Aylesbury Crown Court court was told that a two-year-old girl - known only as "MK" as she cannot be named for legal reasons - had been relying on the bottles of magnesium supplement made by Syri to make her better. Without it she suffered multiple seizures.
The toddler's prescription for her medicine was sent to Hilltops Pharmacy in Great Holm, and the pharmacy sent the order to a large conglomerate of companies, headed by Syri Limited, which would manufacture it specially, Judge Catherine Tulk was told,.
"In 2016, MK's father filed an online request to Hilltops Pharmacy in Milton Keynes, for a prescription for oral magnesium glycerophosphate. He filed for another prescription two days later," said prosecution counsel Paul Ozin QC.
Judge Tulk was told that the pharmacy sent the order to a large conglomerate of companies, headed by Syri Limited, which manufactured the special prescription.
Mr Ozin said: "The medicine was administered orally. Within three weeks of taking the medicine MK started becoming unstable, she was crying constantly and could not sleep.
"Her mother took her to the GP who could find nothing obviously wrong. She was still very sick so she was taken to Milton Keynes University Hospital but doctors there found nothing wrong.
"During the course of that night MK suffered from seven seizures each lasting between 30 and 90 seconds."
In a harrowing victim impact statement, the child's father said: "As I look back on the night that she spent in hospital I remember the numerous blood tests causing pain.
"They had to try 10 to 15 times to find a vein because she was so small and they had to carry out repeated tests to check her magnesium levels. I had to watch her crying and screaming.
"I thought that she was going to die. That night she had 10 fits and the nurses had to hold her down."
The court was told that blood tests revealed MK was suffering from severe magnesium deficiency, despite the fact that she had been taking her medicine as prescribed.
After being given new medication made up by the hospital, MK quickly recovered and was allowed home.
Judge Tulk heard that medicines regulator, the Medicines and Healthcare products Regulatory Authority (MHRA) swiftly swung into action to try to get to the bottom of what had gone wrong.
Mr Ozin said: "They attempted to find out what had gone wrong. They asked for the medication to be checked and the hospital was provided with two bottles of solution.
"One of the bottles provided was a part used bottle. It was instantly apparent that the first batch was seriously under strength."
The court heard that the first batch had only 12 per cent of the required strength, meaning that it it did not provide MK with the nutrients she needed to overcome her condition.
Mr Ozin also revealed that Syri changed the formula of the medicine between the production of the two prescriptions to increase the concentration of magnesium, claiming that they wanted to increase the shelf life and improve the taste.
He revealed that the firm made up the two bottles of medicine but, they were each made up to different specifications. The the first bottle was made to a formula used since 2011 while the second bottle was made to a new recipe.
However, he said: "Neither of those two aims is the rationale behind the changes to the formulation from a medically useless 12 per cent to a 100 per cent useful medicine."
Mr Ozin added that a search of the company's records could not reveal a specific reason for the increased quantity of magnesium in the medicine.
Defence counsel Ben Crane explained that despite 268 doses of the medicine being produced to the wrong formulation since 2011, there were no other known incidents of anyone coming to harm.
He added that Syri accepted their procedures had been lax but they have since been reformed to make sure this error could not happen again.
The incident happened in 2016 and Syri Ltd is now facing a charge of supplying a medical product which did not meet with the standards demanded by the prescription under the Medicines Act 1968.
They have admitted the offence and are facing prosecution costs of more than £100,000 and an unlimited fine.
The child's father said: "I wish that the drugs company had been at the hospital to watch her suffering. I hope that no other family has to go through what my wife and I went through that night."
Judge Tulk adjourned the hearing for sentencing, which is expected to be delivered in October.