To reduce this class of errors, perhaps RFID tags could be used? If the medication is prepared in a low-distraction area and tagged there, then the person administering the medicine would scan the tag to make sure it's correct before going through with it. The person tagging the medication could still make a mistake, but it would be harder for everyone else, and perhaps during the tagging process some kind of automatic flagging could be employed if the medication doesn't seem to match the patient's problems.