Polycystic ovary syndrome is the most common endocrine disorder affecting women of reproductive age. A number of criteria have been developed for clinical diagnosis of polycystic ovary syndrome, with the Rotterdam criteria being the most inclusive. Evidence suggests that polycystic ovary syndrome is significantly heritable, and previous studies have identified genetic variants associated with polycystic ovary syndrome diagnosed using different criteria. The widely adopted electronic health record system provides opportunity to identify patients with polycystic ovary syndrome using the Rotterdam criteria for genetic studies. To identify novel associated genetic variants under the same phenotype definition, we extracted polycystic ovary syndrome cases and unaffected controls based on the Rotterdam criteria from the electronic health records and performed a discovery-validation genome-wide association study. We developed a polycystic ovary syndrome phenotyping algorithm based on the Rotterdam criteria and applied it to three electronic health records-linked biobanks to identify cases and controls for genetic study. In discovery phase, we performed individual genome-wide association study using the Geisinger's MyCode and the eMERGE cohorts, which were then meta-analyzed. We attempted validation of the significant association loci (P<1x10-6) in the BioVU cohort. All association analyses used logistic regression, assuming an additive genetic model, and adjusted for principal components to control for population stratification. An inverse-variance fixed effect model was adopted for meta-analysis. Additionally, we examined the top variants to evaluate their associations with each criterion in the phenotyping algorithm. We used STRING to characterize protein-protein interaction network. Using the same algorithm based on the Rotterdam criteria, we identified 2,995 patients with polycystic ovary syndrome and 53,599 population controls in total (2,742 cases and 51,438 controls from the discovery phase; 253 cases and 2,161 controls in the validation phase). We identified one novel genome-wide significant variant rs17186366 (OR=1.37 [1.23,1.54], P=2.8x10-8) located near SOD2. Additionally, two loci with suggestive association were also identified: rs113168128 (OR=1.72 [1.42,2.10], P=5.2 x10-8), an intronic variant of ERBB4 that is independent from the previously published variants, and rs144248326 (OR=2.13 [1.52,2.86], P=8.45x10-7), a novel intronic variant in WWTR1. In the further association tests of the top 3 SNPs with each criterion in the polycystic ovary syndrome algorithm, we found that rs17186366 (SOD2) was associated with polycystic ovaries and hyperandrogenism, while rs11316812 (ERBB4) and rs144248326 (WWTR1) were mainly associated with oligomenorrhea or infertility. We also validated the previously reported association with DENND1A1. Using STRING to characterize protein-protein interactions, we found both ERBB4 and WWTR1 can interact with YAP1 which has been previously associated with polycystic ovary syndrome. Through a discovery-validation genome-wide association study on polycystic ovary syndrome identified from electronic health records using an algorithm based on Rotterdam criteria, we identified and validated a novel genome-wide significant association with a variant near SOD2. We also identified a novel independent variant within ERBB4, and a suggestive association with WWTR1. With previously identified polycystic ovary syndrome-gene YAP1, the ERBB4-YAP1-WWTR1 network suggests involvement of the epidermal growth factor receptor and the Hippo pathway in the multifactorial etiology of polycystic ovary syndrome.