To facilitate the investigation of comorbidity patterns across the medical phenome, we mapped International Classification of Diseases, ninth edition (ICD-9) billing codes in the EHR to phecodes, which are the higher-order representations of disease categories. ICD-9 codes were mapped to 1814 phecode categories according to the Phecode Map v1.2 (https://phewascatalog.org/phecodes), as implemented in the PheWAS R package v0.12 [27]. Patients were assigned to the case group for a given phecode if they had at least two different ICD-9 codes that mapped to a given phecode, or if they had at least two separate occurrences (i.e., on different days) of a single ICD-9 code that mapped to the given phecode, both of which are validated strategies to improve the positive predictive value of phecodes [28]. The control group excluded patients with only one component ICD-9 code, or with one or more ICD-9 codes that mapped to related phecodes (as defined by the Phecode Map v1.2).