Background Hospital pharmacists and pharmacy technicians play a major role in detecting prescribing errors by medication surveillance. At present the frequency of detected and correctly handled prescribing errors is unclear, as are factors associated with correct handling. Objective To examine the frequency of detection of prescribing errors and the frequency of correct handling, as well as factors associated with correct handling of prescribing errors by hospital pharmacists and pharmacy technicians. Setting This study was conducted in 57 Dutch hospital pharmacies. Method Prospective observational study with test patients, using a case-control design to identify factors associated with correct handling. A questionnaire was used to collect the potential factors. Test patients containing prescribing errors were developed by an expert panel of hospital pharmacists (a total of 40 errors in nine medication records divided among three test patients; each test patient was used in 3 rounds; on average 4.5 prescribing error per patient per round). Prescribing errors were defined as dosing errors or therapeutic errors (contra-indication, drug-drug interaction, (pseudo)duplicate medication). The errors were selected on relevance and unequivocalness. The panel also defined how the errors should be handled in practice using national guidelines and this was defined as 'correct handling'. The test patients had to be treated as real patients while conducting medication surveillance. The pharmacists and technicians were asked to report detected errors to the investigator. Main outcome measure The percentages of detected and correctly handled prescribing errors were the main outcome measures. Factors associated with correct handling were determined, using multivariate logistic regression analysis. Results Fifty-nine percent of the total number of intentionally added prescribing errors were detected and 57 % were handled correctly by the hospital pharmacists and technicians. The use of a computer system for medication surveillance compared to no computer system was independently associated with correct handling [odds ratio (OR) 15.39 (95 % confidence interval (CI) 3.62-65.50] for computerized physician order entry system; OR 15.40 (95 % CI 3.61-65.70) for order entry by pharmacy technicians), but because the reference category contained only one hospital these results can't be interpreted. Furthermore, manual screening of dosages in children with or without computerized surveillance compared to no dosage checks for children [OR 2.02 (95 % CI 1.06-3.84)], qualified pharmacy technicians compared to no qualified pharmacy technicians [OR 1.32 (95 % CI 1.03-1.67)] and pharmacy technicians using protocols compared to ones not using protocols [OR 1.30 (95 % CI 1.04-1.61)] were independently associated with correct handling. Conclusion This study showed that the quality of medication surveillance in Dutch hospital pharmacies can be subject to improvement and the identified factors may give direction to such improvements.