PurposeAccess to claims databases provides an opportunity to study medication use and safety during pregnancy. We developed an algorithm to identify pregnancy episodes in the French health care databases and applied it to study antiepileptic drug (AED) use during pregnancy between 2007 and 2014.MethodsThe algorithm searched the French health care databases for discharge diagnoses and medical procedures indicative of completion of a pregnancy. To differentiate claims associated with separate pregnancies, an interval of at least 28 weeks was required between 2 consecutive pregnancies resulting in a birth and 6 weeks for terminations of pregnancy. Pregnancy outcomes were categorized into live births, stillbirths, elective abortions, therapeutic abortions, spontaneous abortions, and ectopic pregnancies. Outcome dates and gestational ages were used to calculate pregnancy start dates.ResultsAccording to our algorithm, live birth was the most common pregnancy outcome (73.9%), followed by elective abortion (17.2%), spontaneous abortion (4.2%), ectopic pregnancy (1.1%), therapeutic abortion (1.0%), and stillbirth (0.4%). These results were globally consistent with French official data. Among 7 559 701 pregnancies starting between 2007 and 2014, corresponding to 4 900 139 women, 6.7 per 1000 pregnancies were exposed to an AED. The number of pregnancies exposed to older AEDs, comprising the most teratogenic AEDs, decreased throughout the study period (−69.4%), while the use of newer AEDs increased (+73.4%).ConclusionsWe have developed an algorithm that allows identification of a large number of pregnancies and all types of pregnancy outcomes. Pregnancy outcome and start dates were accurately identified, and maternal data could be linked to neonatal data.