The urine samples were to determine if people were abusing street or prescription drugs.
Patrick O'Byrne of the Saskatchewan Disease Control Laboratory said it is a serious situation, but the lab doesn't believe patient care has been compromised.
"We have a process in place that will overcome this error," he said, adding that it involves a check afterwards to ensure the samples are matched correctly.
"We're very confident it will not happen again."
O'Byrne said a programming problem with automated equipment caused the error.
He added that the lab apologizes for any anxiety or concern the mix-up caused.
"Errors like this are just really unacceptable and we know that," he said. "We have a duty to tell the public when we've made an error."
Health Minister Dustin Duncan said the tests focused on people who were being monitored for opiate use through a program run by the College of Physicians and Surgeons of Saskatchewan.
He said the lab has contacted people caring for the patients involved.
"It's something that fortunately the lab was able to catch in a fairly short order."
Duncan added the equipment had been in place for 18 months but there were no other concerns.
NDP health critic Danielle Chartier said people in Saskatchewan need to be reassured a similar error doesn't happen again.
"We know that waiting for (results) can be anxiety-producing," she said. "It gets worse when you can't be assured that the results you will receive back are correct."Suggest a correction