Introduction

Pregnant women are typically excluded from randomized clinical trials due to concerns about fetal safety. However, with increasing maternal age and rising obesity rates, a growing proportion of pregnant individuals require medications for pre-existing conditions and pregnancy-related complications1,2,3,4. Despite the widespread use of prescription medications in pregnancy, clinical guidance remains limited, making it difficult for healthcare providers to assess potential risks and benefits.

Observational cohort data offer an alternative approach to randomized trials, providing large-scale, real-world evidence to support clinical decision-making. Preterm birth, defined as delivery before 37 weeks of gestation, affects approximately 10%5 of pregnancies worldwide and is a leading cause of neonatal morbidity and mortality5,6,7. It is associated with significant long-term health and economic consequences, including increased disability-adjusted life-years (DALYs)8, higher risks of neurodevelopmental impairments9, respiratory complications10, and future cardiovascular diseases11. These impacts highlight the critical need for predictive tools to guide medication decisions during pregnancy.

To address this knowledge gap, we developed an interactive web-based tool that provides clinicians with population-level data on prescription drug use during pregnancy and its association with preterm birth.

This tool was built using data from the Alberta Pregnancy Cohort, a longitudinal dataset containing information on 238,676 mothers and 328,834 singleton live births in Alberta, Canada, between 2009 and 2018. The dataset includes pharmaceutical claims, gestational age, birth outcomes, and maternal demographic data. By integrating these data into an interactive dashboard, we provide clinicians with an accessible platform to assess medication-related risks in real time.

Users can start by selecting a medication of interest from a drop-down menu (Supplementary Fig. 1), which generates graphical summaries of four key types of findings:

  1. 1.

    Preterm birth incidence by medication use: This shows four findings: the incidence of term versus preterm births among women who did (versus did not) have a prescription for the medication during pregnancy (Supplementary Fig. 2).

  2. 2.

    Maternal age and medication use: The incidence of term versus preterm births among women who did (versus did not have) a prescription for the medication, stratified by maternal age categories (Supplementary Fig. 3).

  3. 3.

    Timing of first prescription: The incidence of term versus preterm births according to the trimester (one, two, or three) in which women first received a prescription for the medication (Supplementary Fig. 4).

  4. 4.

    Primary indications for medication use: The 10 most frequent medical reasons for which women who received the medication visited their physician during pregnancy (Supplementary Fig. 5).

This tool provides an evidence-based approach to prescribing decisions by summarizing trends from a large observational dataset. However, the tool’s reliance on observational data may lead to selection bias; therefore, future enhancements will incorporate adjusted statistical models to control for potential confounding factors (e.g., maternal age, comorbidities, and socioeconomic factors). We also acknowledge the possibility of confounding by indication, where the underlying condition for which a medication is prescribed may itself influence the risk of preterm birth. While not addressed in the current version, stratifying outcomes by primary clinical indications is an important direction for future work to support more clinically meaningful interpretation. Expanding the dataset to include real-time updates from other provinces will further enhance its utility12.

Methods

Study design

This study used a retrospective cohort design, analyzing all singleton births in Alberta between 2009 and 2018. Inclusion criteria required maternal residency in Alberta for at least one year before and throughout pregnancy. Records with missing gestational age or birth weight were excluded.

Medication classification

Medication exposure was identified through pharmaceutical claims data and categorized using the first three levels of the Anatomical Therapeutic Chemical (ATC) classification system. To ensure compliance with privacy regulations, we restricted the display of results to ATC codes with at least 20 exposed pregnant individuals, in line with widely accepted disclosure control practices13.

Dashboard development

The web-based dashboard was developed using Streamlit and Python, enabling interactive visualization of preterm birth incidence, maternal age distributions, timing of prescription initiation, and common indications for medication use.