We collected International Statistical Classification of Diseases and Related Health Problems, Tenth Revision (ICD-10), diagnoses of OCD (code F42) from the NPR. The NPR covers ICD-10 diagnoses from psychiatric inpatient and outpatient specialist services since 1997 and 2001, respectively. Diagnoses registered before 6 years of age were excluded to avoid diagnostic misclassification. The ICD-10 codes for OCD in the NPR have excellent validity and reliability.36 The date of the first OCD diagnosis was used as a time-varying exposure.