Antibiotic Use for Cystitis and Risk of Treatment Failure in Pregnancy Following Gastric Bypass: A Cohort Study Authors: Mette Østergaard Thunbo, Line Kolding, Samuel Azuz, Terese Matthesen Kamronn, Lene Høimark, Lars Henning Pedersen Published: 2026 ABSTRACT ABSTRACTCystitis is common during pregnancy and requires effective antibiotic treatment to prevent complications. Gastric bypass surgery alters gastrointestinal anatomy and may impair oral drug absorption, raising concerns about antibiotic effectiveness. We therefore aimed to examine antibiotic use for cystitis and the risk of treatment failure in pregnant women with prior gastric bypass. In this nationwide Danish register‐based study, we compared 1985 pregnancies among women with prior gastric bypass with 1 400 174 pregnancies among women without bariatric surgery. We assessed redeemed prescriptions for cystitis‐related antibiotics and potential treatment failure defined as repeated antibiotic prescriptions within 14 days, hospital‐recorded cystitis or severe urinary tract complications (pyelonephritis or urosepsis). Pregnant women with prior gastric bypass more frequently redeemed cystitis‐related antibiotics than those without bariatric surgery (22.6% vs. 12.7%). Among antibiotic‐exposed pregnancies, prior gastric bypass was associated with an increased risk of potential treatment failure, including repeated antibiotic prescriptions (adjusted odds ratio [aOR] 1.69, 95% confidence interval [CI] 1.22–2.30) and hospital‐recorded cystitis (aOR 2.22, 95% CI 1.24–3.67), while severe complications were rare. These findings suggest that antibiotic treatment may be less effective or that the clinical course is more complicated in this group, highlighting a need for closer monitoring and tailored treatment strategies.Keywords: anti‐bacterial agents, gastric bypass, pregnancy, treatment failure, urinary tract infections Introduction Cystitis is among the most common infections during pregnancy, and antibiotics are widely used to treat it [1, 2, 3]. Effective treatment is essential, as untreated cystitis may progress to pyelonephritis and increase the risk of adverse maternal and neonatal outcomes [3]. At the same time, risk factors such as high body mass index (BMI) and gestational diabetes are becoming more prevalent in the pregnant population, contributing to a higher risk of cystitis [4, 5, 6]. However, effectiveness of orally administered antibiotics may be impaired by bariatric surgical procedures, like Roux‐en‐Y gastric bypass, which alters gastrointestinal anatomy and thereby potentially impairs drug absorption [7, 8]. Reduced absorption could lead to subtherapeutic drug levels and treatment failure, which is particularly critical during pregnancy [3, 9]. Given these considerations, we investigated antibiotic use for cystitis during pregnancy among women with prior gastric bypass and assessed the risk of treatment failure as a potential indicator of reduced treatment effectiveness. Material and Methods This study was reported in accordance with the Strengthening the Reporting of Observational Studies in Epidemiology (STROBE) guideline [10] and was conducted in accordance with the Basic & Clinical Pharmacology & Toxicology policy for experimental and clinical studies [11]. Study Design and Setting We conducted a nationwide cohort study using data from the Danish National Patient Registry and the Danish Medical Birth Register covering 1998 to 2018, as previously described [1]. We included all singleton pregnancies reaching at least 10 completed gestational weeks and ending within the study period as a birth or abortion. Pregnancies in women without sufficient residency history were excluded to ensure complete exposure information (Figure 1). For women with multiple bariatric procedures, the surgery registered closest to, but not after, the conception date was selected. Gestational age (GA) was obtained from the national registry records (primarily ultrasound‐based, otherwise last menstrual period), and conception was estimated by subtracting GA (in days) from the pregnancy end data and adding 14 days. Characteristics of included pregnancies. ATC: anatomical therapeutic chemical; GA: gestational age; ICD‐10: International Classification of Diseases 10th revision; NCSP: NOMESCO Classification of Surgical Procedures. Study Population, Exposure and Outcomes We defined two populations: first, all identified pregnancies; and second, pregnancies exposed to cystitis‐related antibiotics. Cystitis‐related antibiotics (Anatomical Therapeutic Chemical [ATC] code) included oral formulations of first‐line antibiotics recommended in Danish clinical guidelines for the treatment of asymptomatic bacteriuria and cystitis during pregnancy [12, 13]: pivmecillinam (J01CA08), nitrofurantoin (J01XE01) and sulfamethizole (J01EB02). Information on these antibiotics was obtained from the Danish National Prescription Registry, which contains nationwide records of all redeemed prescriptions, including the dispensing date and the corresponding ATC codes [14]. Antibiotic use was assumed if there was redemption of at least one prescription during pregnancy. Exposure was defined as a history of gastric bypass surgery prior to the index pregnancy, identified in the Danish National Patient Registry (Figure 1). Pregnancies without any of these codes constituted the unexposed group. In the descriptive part, which included all identified pregnancies, the outcome was the use of cystitis‐related antibiotics during pregnancy. This was defined as redemption of at least one prescription and presented as the number and proportion of treated pregnancies, further summarized by antibiotic subgroup. In the analytical part, which included pregnancies exposed to cystitis‐related antibiotics, the outcome was potential treatment failure, defined as cystitis‐related complications during pregnancy. Proxies included redemption of an additional cystitis‐related antibiotic within 14 days of initial treatment, consistent with the use of repeat antibiotic prescriptions as a proxy for treatment failure done in previous studies [15, 16], and hospital‐recorded diagnoses of cystitis, pyelonephritis or urosepsis. As uncomplicated cystitis in Denmark is typically managed in primary care, hospital‐recorded cystitis was considered a marker of more severe disease and potential treatment failure. Diagnoses were only counted if they occurred after the first antibiotic prescription. Covariates included maternal age at conception, calculated using the maternal birth date from the Danish Civil Registration System [17], while pre‐gestational BMI, smoking during pregnancy and parity were derived from the Danish Medical Birth Register [18]. Diabetes was defined as a specified diagnosis recorded before or during pregnancy captured in the Danish National Patient Registry (Figure 1). Statistical Methods Descriptive analyses were conducted to summarize the use of cystitis‐related antibiotics during pregnancy and to characterize the study population. For the analytical evaluation, binomial logistic regression was used to estimate crude and adjusted odds ratios (OR) with 95% confidence intervals (CI) for the association between previous gastric bypass, compared with no bariatric surgery, and potential treatment failure among pregnancies exposed to cystitis‐related antibiotics. Adjusted models included key maternal characteristics considered potential confounders, including maternal age at conception, pre‐pregnancy BMI, parity, smoking during pregnancy and diabetes during pregnancy. Smoking was included as a potential confounder as there has been reported a potential association between maternal smoking and urinary tract infections during pregnancy [19]. Adjusted analyses were performed as complete case analyses using R version 4.5.1 (R Foundation for Statistical Computing, Vienna, Austria) and RStudio version 2025.5.1.513 (RStudio: Integrated Development Environment for R, Boston, MA). We conducted several sensitivity analyses to assess the robustness of the findings. First, we broadened the exposure definition to include additional oral antibiotics that may be used for cystitis, including second‐line treatments and antibiotics relevant to group B streptococcal infection. These antibiotics (ATC code) were phenoxymethylpenicillin (J01CE02), erythromycin (J01FA01), other macrolides including clarithromycin (J01FA09), roxithromycin (J01FA06) and azithromycin (J01FA10), pivampicillin (J01CA02), amoxicillin (J01CA01), cefuroxime (J01DC02), amoxicillin and beta‐lactamase inhibitor (J01CR02), sulfamethoxazole and trimethoprim (J01EE01) and fosfomycin (J01XX01). Second, to account for potential correlation between repeated pregnancies in the same woman, we repeated the logistic regression analyses using cluster‐robust standard errors clustered by maternal ID. Corresponding 95% CIs were calculated using the cluster‐robust standard error. Third, we varied the definition of potential treatment failure by redefining repeated antibiotic redemption within 7 and 21 days after the initial treatment. Fourth, we restricted the analysis to pregnancies in women with prior gastric bypass and compared the risk of potential treatment failure—defined as hospital‐recorded cystitis, pyelonephritis or urosepsis—between those with and without antibiotic treatment, as a consistency check. Finally, we stratified the analysis by time since gastric bypass (< 2 years vs. ≥ 2 years before pregnancy). Results Out of 1 402 159 pregnancies (among 757 009 women) with a GA of ≥ 10 weeks, 1985 pregnancies (0.1%) occurred in women with a history of gastric bypass surgery (Table 1). Compared with pregnancies without prior bariatric surgery, pregnancies in women with a history of gastric bypass were characterized by a higher mean maternal age at conception, a higher prevalence of BMI ≥ 35 kg/m2 (corresponding to the indication for gastric bypass surgery in the absence of obesity‐related comorbidities [20]), more frequent active smoking during pregnancy and a higher proportion of multiparous women. Notably, diabetes during pregnancy was substantially more common among women with prior gastric bypass than among those without previous bariatric surgery (23% vs. 3.2%). TABLE 1Characteristics of included pregnancies. Pregnancies among women with prior gastric bypass (N (%)) N = 1985 Pregnancies among women without prior bariatric surgery (N (%)) N = 1 400 174 Years since gastric bypass operation• < 2 years• 1288 (64.9%)• —• ≥ 2 years• 697 (35.1%)• —Pregnancy outcome• Abortion (GA at end of pregnancy < 22 weeks)• 142 (7.2%)• 135 813 (9.7%)• Births (GA at end of pregnancy ≥ 22 weeks)• 1843 (92.8%)• 1 264 361 (90.3%)Gestational age at end of pregnancy• < 22 weeks• 142 (7.2%)• 135 813 (9.7%)• 22–< 32 weeks• 54 (2.7%)• 14 161 (1.0%)• 32–< 37 weeks• 170 (8.6%)• 63 591 (4.5%)• ≥ 37 weeks• 1619 (81.6%)• 1 186 609 (84.7%)• Maternal age at conception• < 25 years• 85 (4.3%)• 233 605 (16.7%)• 25–29 years• 502 (25.3%)• 487 324 (34.8%)• 30–34 years• 749 (37.7%)• 453 535 (32.4%)• ≥ 35 years• 649 (32.7%)• 225 710 (16.1%)• Maternal pre‐gestational BMI• < 18.5 kg/m2 • 4 (0.2%)• 36 669 (4.3%)• 18.5–< 25 kg/m2 • 298 (16.5%)• 528 025 (62.0%)• 25–< 30 kg/m2 • 669 (37.0%)• 180 877 (21.2%)• ≥ 30 kg/m2 • 836 (46.3%)• 106 435 (12.5%)• Missing• 178• 548 168Smoking status during pregnancy• Smoking during pregnancy• 255 (14.5%)• 53 450 (9.3%)• Former smoker• 29 (1.6%)• 9455 (1.6%)• No smoking• 1477 (83.9%)• 512 711 (89.1%)• Missing• 244• 824 588Parity• Nullipara• 691 (37.7%)• 560 701 (44.9%)• Multipara• 1143 (62.3%)• 687 011 (55.1%)• Missing• 151• 152 462Diabetes during pregnancy a 449 (22.6%)45 212 (3.2%)Pregnancies pr women (in the study period)•1 pregnancy•461 (23.2%)•309 755 (22.1%)•≥ 2 pregnancies•1524 (76.8%)•1 090 419 (77.9%) a Gestational diabetes, type 1 diabetes, type 2 diabetes or unspecified diabetes. Characteristics of included pregnancies. Pregnancies among women with prior gastric bypass (N (%)) N = 1985 Pregnancies among women without prior bariatric surgery (N (%)) N = 1 400 174 Gestational diabetes, type 1 diabetes, type 2 diabetes or unspecified diabetes. Exposure to cystitis‐related antibiotics during pregnancy was more common among women with a history of gastric bypass than among women without prior bariatric surgery (22.6% vs. 12.7%, respectively) (Table 2). Among antibiotics used for cystitis, pivmecillinam was the most prescribed agent among women with prior gastric bypass (20.1%), whereas sulfamethizole and nitrofurantoin were used infrequently (3.2% and 1.4%, respectively). A similar prescription pattern was observed among women without prior bariatric surgery. When considering all antibiotics potentially used to treat cystitis—including agents used for cystitis caused by group B streptococcal infection and antibiotics prescribed in case of suboptimal response to first‐line therapy—antibiotic exposure during pregnancy was more common among women with prior gastric bypass than among women without prior bariatric surgery (34.2% vs. 22.9%, respectively) (Table S1). After pivmecillinam, phenoxymethylpenicillin was the second most frequently prescribed antibiotic, and prescription patterns were similar across the two groups. TABLE 2Use of cystitis‐related antibiotics in pregnancy. Pregnancies among women with prior gastric bypass (N (%)) N = 1985 Pregnancies among women without prior bariatric surgery (N (%)) N = 1 400 174 Antibiotics indicated for cystitisUse of antibiotics for cystitis in pregnancy448 (22.6%)177 413 (12.7%)• Pivmecillinam (ATC code J01CA08)• 399 (20.1%)• 135 440 (9.7%)• Nitrofurantoin (ATC code J01XE01)• 27 (1.4%)• 11 543 (0.8%)• Sulfamethizole (ATC code J01EB02)• 64 (3.2%)• 44 867 (3.2%) Use of cystitis‐related antibiotics in pregnancy. Pregnancies among women with prior gastric bypass (N (%)) N = 1985 Pregnancies among women without prior bariatric surgery (N (%)) N = 1 400 174 Repeated prescriptions within 14 days during pregnancy were more common among pregnancies in women with a history of gastric bypass than among pregnancies without prior bariatric surgery (10.7% vs. 6.0%; Table 3). Among pregnancies treated with cystitis‐related antibiotics, a history of gastric bypass was associated with an increased risk of repeated antibiotic prescriptions during pregnancy compared with pregnancies in women without prior bariatric surgery (adjusted OR (95% CI), 1.69 (1.22–2.30)). In sensitivity analyses in which the time window for defining repeated prescriptions was modified, the association disappeared when a 7‐day interval was used. In contrast, it remained statistically significant—although attenuated, with a lower adjusted OR—when a 21‐day interval was used (Table 3). In sensitivity analyses accounting for repeated pregnancies within women using cluster‐robust standard errors, the effect estimates remained unchanged, and the corresponding 95% CIs did not alter the interpretation of the results (Table S2). TABLE 3Risk of potential treatment failure. Pregnancies among women with prior gastric bypass treated with cystitis‐related antibiotics (N (%)) N = 448 Pregnancies among women without prior bariatric surgery treated with cystitis‐related antibiotics (N (%)) (ref) N = 177 413 Crude OR (95% CI)Adjusted a OR (95% CI)Repeating antibiotic prescriptions (< 7 days between prescriptions) for cystitis during pregnancy18 (4.0%)4566 (2.6%)1.58 (0.95–2.46)1.56 (0.93–2.44)Repeating antibiotic prescriptions (< 14 days between prescriptions) for cystitis during pregnancy48 (10.7%)10 723 (6.0%)1.87 (1.36–2.49)1.69 (1.22–2.30)Repeating antibiotic prescriptions (< 21 days between prescriptions) for cystitis during pregnancy59 (13.2%)15 193 (8.6%)1.62 (1.22–2.11)1.44 (1.07–1.91)Hospital‐recorded cystitis during pregnancy15 (3.3%)2689 (1.5%)2.25 (1.28–3.63)2.22 (1.24–3.67)Pyelonephritis during pregnancy< 594 (< 0.1%)——Urosepsis during pregnancy0 (0.0%)36 (< 0.1%)—— a Adjusted for maternal age at conception, pre‐gestational BMI, parity, smoking status in pregnancy, and diabetes during pregnancy. Risk of potential treatment failure. Pregnancies among women with prior gastric bypass treated with cystitis‐related antibiotics (N (%)) N = 448 Pregnancies among women without prior bariatric surgery treated with cystitis‐related antibiotics (N (%)) (ref) N = 177 413 Adjusted for maternal age at conception, pre‐gestational BMI, parity, smoking status in pregnancy, and diabetes during pregnancy. Hospital‐recorded cystitis during pregnancy was also more frequent among pregnancies in women with a history of gastric bypass than among pregnancies in women without prior bariatric surgery. Among pregnancies treated with cystitis‐related antibiotics, hospital‐recorded cystitis occurred in 3.3% of pregnancies in women with prior gastric bypass compared with 1.5% among pregnancies without prior bariatric surgery, corresponding to an adjusted OR (95% CI) of 2.22 (1.24–3.67) (Table 3). Similarly, findings were observed for hospital‐recorded cystitis when accounting for repeated pregnancies within women (Table S2). When comparing with pregnancies in women with prior gastric bypass but no redemption of cystitis‐related antibiotics in pregnancy, no hospital‐recorded cystitis events were observed in the latter group, indicating that all hospital‐recorded cystitis cases among pregnancies with gastric bypass occurred in pregnancies treated with cystitis‐related antibiotics, supporting the internal consistency of the exposure and outcome definitions (Table S3). When restricting the exposed group according to time since surgery, the increased risk was observed among pregnancies occurring within 2 years after gastric bypass (adjusted OR (95% CI): 2.21 (1.05–4.07), Table S4), but not among pregnancies occurring more than 2 years after surgery (adjusted OR (95% CI): 2.25 (0.80–4.97), Table S5). When using pyelonephritis or urosepsis as alternative proxy measures of antibiotic treatment failure for cystitis, both outcomes were rare among pregnancies in women with a history of gastric bypass treated with cystitis‐related antibiotics (< 5 events) and similarly uncommon among pregnancies in women without prior bariatric surgery (< 0.1%). No events were observed when comparing with pregnancies in women with prior gastric bypass but no redemption of cystitis‐related antibiotics during pregnancy (Table S3). Discussion Main Results In this nationwide cohort of over 1.4 million pregnancies, pregnancies among women with prior gastric bypass were characterized by a higher‐risk maternal profile and more frequent exposure to antibiotics for cystitis. Women with prior gastric bypass used antibiotics for cystitis more often and had an increased risk of repeated antibiotic treatment and hospital‐recorded cystitis. Severe infectious complications such as pyelonephritis and urosepsis were rare in both groups. Potential Mechanisms Underlying Reduced Antibiotic Treatment Effectiveness After Gastric Bypass Gastric bypass induces substantial anatomical and physiological changes, which may unpredictably affect the absorption of orally administered antibiotics [9]. Evidence from non‐pregnant populations suggests an increased risk of oral antibiotic treatment failure following gastric bypass [21], whereas data in pregnancy are extremely sparse. To our knowledge, only a single case report has described a pregnant woman with previous gastric bypass who experienced treatment failure of oral antibiotics for a complicated urinary tract infection, progressing to pyelonephritis, potentially due to impaired drug absorption [8]. This highlights a clinically relevant knowledge gap in a population already at increased risk of urinary tract infections during pregnancy. The pharmacokinetics of pivmecillinam following gastric bypass have not been characterized. Evidence from oral beta‐lactam antibiotics suggests reduced or highly variable absorption following malabsorptive bariatric procedures [9]. Single‐dose pharmacokinetic studies of amoxicillin, ampicillin and phenoxymethylpenicillin in post‐bariatric surgery patients report decreased Cmax and AUC, formulation‐dependent differences and substantial interindividual variability. Although pharmacodynamic targets may still be reached for some pathogens, markedly reduced bioavailability has also been described, and the clinical implications remain unclear. No studies have assessed the impact of dose adjustments on treatment effectiveness; thus, treatment failure cannot be excluded. Optimal dosing after gastric bypass is uncertain, though upper‐range standard doses have been suggested, and close monitoring for treatment failure is recommended [9, 22]. No pharmacokinetic studies have evaluated nitrofurantoin after gastric bypass surgery. However, based on its pharmacokinetic properties—good oral absorption and lack of prodrug activation—nitrofurantoin may be less susceptible to malabsorption than oral beta‐lactams [23]. Nevertheless, the clinical effectiveness and need for dose adjustment after gastric bypass remain unknown. Data on sulfamethizole use after gastric bypass are also sparse. To our knowledge, no pharmacokinetic studies have specifically evaluated sulfamethizole absorption following gastric bypass surgery. However, a retrospective cohort study assessing clinical outcomes of oral antibiotics after gastric bypass found that patients treated with sulfamethoxazole/trimethoprim had a significantly increased risk of therapeutic failure compared with non‐surgical controls [21]. Although sulfonamides were analysed as a class and individual agents were not examined separately, these findings suggest that clinical effectiveness of sulfonamides, including sulfamethizole, may be reduced after gastric bypass. The potential need for dose adjustment also remains unknown here. Obesity may confound the interpretation of altered antibiotic pharmacokinetics, as it is itself associated with pharmacokinetic changes. Increased amoxicillin exposure has been observed in obese individuals following gastric bypass, although levels remained lower than in non‐obese controls [24]. Weight typically stabilizes 1–2 years after surgery, during which intestinal adaptation may partially compensate for altered nutrient absorption [25, 26]. Whether this also affects the absorption of drugs remains unknown. However, in our study, we observed an increased risk of repeated prescriptions and hospital‐recorded cystitis among pregnancies with gastric bypass performed less than 2 years prior to pregnancy, but not among those with surgery performed earlier. Although this temporal pattern is consistent with physiological adaptation after gastric bypass, our data cannot determine whether altered drug absorption or other time‐dependent factors account for this finding. Pregnancy itself may also act as a confounder. It is associated with reduced intestinal motility, potentially delaying drug absorption, as well as hormonal changes involving progesterone, oestrogens and cortisol, which may influence drug‐metabolizing enzymes and transporters [27]. Gastrointestinal metabolism during pregnancy may further contribute to interindividual variability in drug exposure after bariatric surgery [28]. Strengths and Limitations This study has several strengths. It is based on a large, nationwide cohort from Danish health registers, within a universal healthcare system, ensuring near‐complete population coverage and minimizing selection bias. Individual‐level linkage enabled detailed follow‐up of antibiotic use, pregnancy outcomes and severe infections. The robustness of our findings was supported by alternative definitions of potential treatment failure and multiple sensitivity analyses. The use of pharmacy redemption data reduced recall bias, although redeemed prescriptions do not guarantee actual intake. Antibiotics in Denmark are prescription‐only, which strengthens the validity of the estimates, but treatments administered exclusively during hospital admissions or obtained abroad were not captured. Several limitations should be considered. The register‐based design lacks clinical detail, preventing distinction between potential treatment failure and recurrent cystitis. We had no information on symptoms, microbiology or treatment response, and could not distinguish symptomatic cystitis from asymptomatic bacteriuria. Repeated prescriptions may therefore reflect persistent infection, recurrence or clinical caution. In addition, some prescriptions may have been issued for other indications. Although the analyses were adjusted for several potential confounders, information on previous urinary tract infections, renal function, infection severity, bacterial susceptibility, healthcare utilization, healthcare‐seeking behaviour and GA at antibiotic treatment was unavailable or not included, and these factors may have influenced both repeated antibiotic treatment and hospital contact. Furthermore, hospital‐recorded diagnoses of cystitis and other infectious complications were based on ICD‐10 codes and were not validated against clinical or microbiological data. Previous Danish validation studies have demonstrated limitations in the accuracy and completeness of ICD‐10 codes for serious infections [29, 30]. Outcome misclassification is therefore possible, although this would be expected to affect both comparison groups. Exposure classification may introduce immortal time bias, although this likely affected comparison groups similarly. Misclassification of bariatric surgery is also possible, particularly for procedures performed outside Denmark or when relying on diagnosis codes, likely biasing results toward the null. Finally, the underlying mechanism cannot be determined. Reduced drug absorption after gastric bypass is a plausible explanation, but other factors—such as antibiotic choice, pathogen distribution, reinfection risk or metabolic changes—may contribute. We also did not assess other clinically relevant outcomes, such as preterm birth, nor distinguish between antibiotic formulations, which may differ in bioavailability after gastric bypass [31]. Conclusions In this nationwide register‐based study, pregnancies in women with a history of gastric bypass were associated with a higher likelihood of repeated antibiotic prescription redemptions for cystitis and of having a hospital record of cystitis compared with women without bariatric surgery. This pattern may reflect a more complicated clinical course or increased clinical surveillance, or it could potentially be related to altered or variable antibiotic absorption following gastric bypass surgery. Given the limitations of register‐based research, the results underscore the need for future studies integrating clinical, microbiological and pharmacokinetic data to optimize antibiotic treatment in this patient population. Author Contributions MØT initiated the study, performed the data management and statistical analyses, interpreted the data, and wrote the first draft of the manuscript. All authors contributed to the study design conceptualisation and interpretation of data, critically revised the manuscript, and thereby made substantial contributions to the work. MØT managed the submission and publication process. All authors read and approved the final manuscript and agree to be accountable for all aspects of the work. Funding MØT was funded by a grant from Independent Research Fund Denmark (4308‐00095B) granted to LHP. Ethics Statement This study was recorded in the Aarhus University research repository (journal number 2016‐051‐000001, serial number 2227). Under Danish law, register‐based studies do not require approval from an ethics committee or patient consent. Conflicts of Interest The authors declare no conflicts of interest. Supporting information Table S1: Sensitivity analysis—Use of antibiotics used potentially for cystitis in pregnancy. Table S2: Sensitivity analysis—Risk of potential treatment failure when adjusted for repeating pregnancies within women. Table S3: Sensitivity analysis—Risk of treatment failure among pregnancies with prior gastric bypass. Table S4: Sensitivity analysis—Risk of treatment failure including pregnancies with prior gastric bypass performed less than 2 years before pregnancy. Table S5: Sensitivity analysis—Risk of treatment failure including pregnancies with prior gastric bypass performed for two years or more before pregnancy. Acknowledgements The authors used generative artificial intelligence (AI) to assist with language editing and improvement of grammar. No AI tools were used to generate scientific content, interpret results, or draw conclusions. All content has been critically reviewed and verified by authors, who take full responsibility for the accuracy and integrity of the work. Data Availability Statement The data are not publicly available due to Danish data protection regulations, as they are stored on secure servers at Statistics Denmark and can only be accessed following relevant approvals. The code of this study is available from the corresponding author upon reasonable request. References Associated Data Supplementary Materials Table S1: Sensitivity analysis—Use of antibiotics used potentially for cystitis in pregnancy. Table S2: Sensitivity analysis—Risk of potential treatment failure when adjusted for repeating pregnancies within women. Table S3: Sensitivity analysis—Risk of treatment failure among pregnancies with prior gastric bypass. Table S4: Sensitivity analysis—Risk of treatment failure including pregnancies with prior gastric bypass performed less than 2 years before pregnancy. Table S5: Sensitivity analysis—Risk of treatment failure including pregnancies with prior gastric bypass performed for two years or more before pregnancy. Data Availability Statement The data are not publicly available due to Danish data protection regulations, as they are stored on secure servers at Statistics Denmark and can only be accessed following relevant approvals. The code of this study is available from the corresponding author upon reasonable request.