Postoperative pain relief with codeine was evaluated in 11 women undergoing hysterectomy. Patient-controlled analgesia (PCA) was used to administer codeine. After the study the patients were phenotyped with respect to the O-demethylation of dextromethorphan (cytochrome P4502D6 polymorphism). Ten were extensive metabolisers and one a poor metaboliser. There was a nine-fold variation in the minimum plasma concentration of codeine consistent with pain relief (40-350 ng ml-1). Two patients did not experience any effect of codeine, one of whom was a poor metaboliser of dextromethorphan, confirmed by genotyping. In the other nine patients the effective dose of codeine varied from 4.8-25.3 mg h-1.