The aim of the present study was to investigate a possible association of the COMT and OPRM1 genotypes with pain perception in patients undergoing total hip replacement (THR) and total knee replacement (TKR), taking into account aspects such as age, sex and diabetes. This evidence concerns the gene COMT and diabetes mellitus.