%0 Journal Article %A Harshana Liyanage %A John Williams %A Rachel Byford %A Simon de Lusignan %T Ontology to identify pregnant women in electronic health records: primary care sentinel network database study %D 2019 %R 10.1136/bmjhci-2019-100013 %J BMJ Health & Care Informatics %P e100013 %V 26 %N 1 %X Objective To develop an ontology to identify pregnant women from computerised medical record systems with dissimilar coding systems in a primary care sentinel network.Materials and methods We used a three-step approach to develop our pregnancy ontology in two different coding schemata, one hierarchical and the other polyhierarchical. We developed a coding system–independent pregnancy case identification algorithm using the Royal College of General Practitioners Research and Surveillance Centre sentinel network database which held 1.8 million patients’ data drawn from 150 primary care providers. We tested the algorithm by examining individual patient records in a 10% random sample of all women aged 29 in each year from 2004 to 2016. We did an external comparison with national pregnancy data. We used χ2 test to compare results obtained for the two different coding schemata.Results 243 005 women (median age 29 years at start of pregnancy) had 405 591 pregnancies from 2004 to 2016 of which 333 689 went to term. We found no significant difference between results obtained for two populations using different coding schemata. Pregnancy mean ages did not differ significantly from national data.Discussion This ontologically driven algorithm enables consistent analysis across data drawn from populations using different coding schemata. It could be applied to other hierarchical coding systems (eg, International Classification of Disease) or polyhierarchical systems (eg, SNOMED CT to which our health system is currently migrating).Conclusion This ontological approach will improve our surveillance in particular of influenza vaccine exposure in pregnancy. %U https://informatics.bmj.com/content/bmjhci/26/1/e100013.full.pdf