Objective Complicated ectopic pregnancies with severe bleeding (CEPSB) are life-threatening situations and should be considered maternal near-miss cases. Previous studies have found an association between severe maternal morbidity secondary to CEPSB and substandard care. Almost all women with CEPSB are hospitalized, generating administrative and medical records. The objective of this study was to propose a method to measure the validity of the hospital discharge database (HDD) to detect CEPSB among hospital stays in two gynecological units. Methods We included all hospital stays of women who were 18-45 years old and hospitalized for acute pelvic pain or/and metrorrhagia in the two hospitals. The HDD was compared to medical data (gold standard). Two algorithms constructed from the International Classification of Disease (ICD-10) and Common Classification of Medical Procedures (CCAM), were applied to the HDD: a "predefined algorithm" according to coding guidelines and a "pragmatic algorithm" based on coding practices. Sensitivity, specificity and positive likelihood-ratios were calculated. False negatives and positives were analyzed to describe coding practices. Results Among 370 hospital stays included, 52 were classified as CEPSB cases. The "predefined algorithm" gave a sensitivity of 23.1% (95% CI: 11.6-34.5) and a specificity of 99.1% (95% CI: 98.0-100.0) to identify CEPSB. The "pragmatic algorithm" gave a sensitivity of 63.5% (95% CI: 50.4-76.5) and a specificity of 94.7% (95% CI: 92.2-97.5) to identify CEPSB. Coding errors (77.6%) were due to misuse of diagnosis codes and because complications were not coded. Conclusion HDD is not reliable enough to detect CEPSB due to incorrect coding practices. However, it could be an ideal tool to monitor quality of care if a culture in data quality assessment is developed to improve quality of medical information.