As many as 12 percent of the drug prescriptions sent electronically to pharmacies contain errors, a rate that matches handwritten orders for medicine from physicians, researchers said. An analysis of 3,850 computer-generated prescriptions written over a four-week period found 452 contained errors, including 163 that could harm the patient, according to a report published today in the Journal of the American Medical Informatics Association. The rate was consistent with past studies reviewing the risk of errors when a doctor writes a prescription and hands it to the patient, the researchers said. The results undermine the expected safety benefits from computer-generated prescriptions, said the study authors led by Karen Nanji of Massachusetts General Hospital's anesthesia, critical care and pain department. The U.S. paid more than $158.3 million to doctors and hospitals in the first half of 2011 to encourage adoption of electronic health records, which President Barack Obama has advocated as a way to lower health- care costs and reduce medical errors.