The case against two hospital nurses accused of wilfully neglecting vulnerable patients has collapsed.
Clare Cahill, 42, of Coytrahen, Bridgend, and Jade Pugh, 30, of North Cornelly, denied charges relating to alleged falsification of patient notes.
Both worked at Bridgend's Princess of Wales Hospital.
At Cardiff Crown Court on Wednesday, not guilty verdicts were given on 10 counts after a computer log of patient records was deemed unreliable.
Both women worked on the stroke ward and denied failing to carry out routine blood glucose checks on patients and fabricating their medical records.
On the day jurors were set to hear the case open, the prosecution offered no evidence and the judge ordered them to give the verdicts.
Ms Cahill was cleared of six counts of causing wilful neglect between April and December 2012 and Ms Pugh was found not guilty of four counts of the same charge between June and October 2012.
Judge Tom Crowther QC criticised the hospital's failure to have a dependable computer system in place.
He added: "Enormous expense has been incurred with trial preparation - hundreds of hours of time has been spent by experts... which has had a knock on effect of other cases waiting to be tried.
"It matters because two women have been facing a trial which should have been ready earlier. It matters because the families of the patients involved will have had their upset prolonged."
Three other nurses, who worked on the same hospital ward, have entered guilty pleas to similar charges.
After the case, a spokeswoman for Abertawe Bro Morgannwg health board said: "Our thoughts are with the families of patients involved in these cases, as this must be a difficult time for them."
She said when issues surrounding blood glucometry tests arose, the health board informed and cooperated with police.
"We have not been able to complete our internal disciplinary proceedings until the criminal proceedings concluded. We are now in a position to move urgently with this," she added.
"We remain determined to do more, to continually improve, and continue to have a commitment to dealing with issues as they arise in an open and transparent way.
"The blood glucometry test and recording system we use is designed to facilitate good patient care. It is widely used by many other hospitals and internationally recognised. It is continually being improved and updated.
"We are not in a position to comment on how information generated for clinical purposes has been used to support a criminal prosecution, as this is not our area of expertise."