A significant feature of our study is the clinical phenotype extractions based on electronic health records. This presents both advantages and disadvantages. On one hand, it allowed us to study a reasonably sized sample, with over 1,000 cases of OUD, enabling us to detect one previously unreported genome-wide significant locus. On the other hand, it introduces misclassification in the diagnosis and is particularly apt to miss early cases and diagnoses (like nicotine use disorder) that may be associated with billing restrictions. Nonetheless, our case series represents exactly the types of patients currently being seen for actual clinical care, and a validation study suggested that our claims-based diagnosis had reasonable positive predictive and exceptional negative predictive values.