Pharmacy problems, including lack of medication availability and transcription problems, were the principal contributors to medication errors in this Brazilian study.