Existing data is often used for reproductive research and quality improvement. Electronic health records (EHRs) with a single data field for sex and gender conflate sex assigned at birth, genotype, gender identity, and the presence of anatomic tissue and organs. This is problematic for inclusion of transgender and gender-diverse populations in research. This article discusses considerations with a single-item sex and gender variable drawn from EHR records and describes an audit to determine variable validity as a criterion for inclusion or exclusion in perinatal research. Individuals with a live birth at a large academic medical center from 2010 to 2022 were identified via electronic query, and records with male demographic information were reviewed to validate (1) the patient's date of birth and delivery date in the EHR matched the medical record number, (2) male sex and gender demographic information, and (3) male gender terms in EHR notes. All health records of male birthing individuals (n = 8) had EHR evidence of giving birth within the health system during the timeframe, and the date of birth matched the medical record number of the EHR. All had male gender in the EHR demographic information. Six patients did not have any male gender terms in available EHR notes, only female gender terms. Two records had recent notes using male gender terms. Current EHRs may not have reliable data on the gender and sex of gender-diverse individuals. A single sex and gender variable drawn from EHRs should not be used as inclusion or exclusion criteria for health research or quality improvement without additional record review. EHRs can be updated to collect more data on sex, gender identity, and other relevant variables to improve research and quality improvement.