BackgroundPregnant women are significantly underrepresented in clinical trials, yet most of them take medication during pregnancy despite the limited safety data. The objective of this study was to characterize medication use during pregnancy and apply propensity score matching method at scale on patient records to accelerate and prioritize the drug effect signal detection associated with the risk of preterm birth and other adverse pregnancy outcomes.MethodsThis was a retrospective study on continuously enrolled women who delivered live births between 2013/01/01 and 2022/12/31 (n = 365,075) at Providence St. Joseph Health. Our exposures of interest were all outpatient medications prescribed during pregnancy. We limited our analyses to medication that met the minimal sample size (n = 600). The primary outcome of interest was preterm birth. Secondary outcomes of interest were small for gestational age and low birth weight. We used propensity score matching at scale to evaluate the risk of these adverse pregnancy outcomes associated with drug exposure after adjusting for demographics, pregnancy characteristics, and comorbidities.ResultsThe total medication prescription rate increased from 58.5 to 75.3% (P < 0.0001) from 2013 to 2022. The prevalence rate of preterm birth was 7.7%. One hundred seventy-five out of 1329 prenatally prescribed outpatient medications met the minimum sample size. We identified 58 medications statistically significantly associated with the risk of preterm birth (P ≤ 0.1; decreased: 12, increased: 46).ConclusionsMost pregnant women are prescribed medication during pregnancy. This highlights the need to utilize existing real-world data to enhance our knowledge of the safety of medications in pregnancy. We narrowed down from 1329 to 58 medications that showed statistically significant association with the risk of preterm birth even after addressing numerous covariates through propensity score matching. This data-driven approach demonstrated that multiple testable hypotheses in pregnancy pharmacology can be prioritized at scale and lays the foundation for application in other pregnancy outcomes.