Maintenance Notice

Due to necessary scheduled maintenance, the JMIR Publications website will be unavailable from Monday, March 11, 2019 at 4:00 PM to 4:30 PM EST. We apologize in advance for any inconvenience this may cause you.

Who will be affected?


Currently submitted to: Journal of Medical Internet Research

Date Submitted: Aug 13, 2019
Open Peer Review Period: Aug 13, 2019 - Oct 8, 2019
(currently open for review)

Identifying Military Veterans in a Clinical Research Database using Natural Language Processing and Machine Learning

  • Daniel Leightley; 
  • David Pernet; 
  • Sumithra Velupillai; 
  • Katharine M. Mark; 
  • Elena Opie; 
  • Dominic Murphy; 
  • Nicola T. Fear; 
  • Sharon A.M. Stevelink; 



Electronic healthcare records (EHRs) are a rich source of health-related information, with huge potential for secondary research use. In the United Kingdom (UK), there is no national marker for identifying those who have previously served in the Armed Forces, making analysis of the health and well-being of veterans using EHRs difficult.


The aim of this study was to develop a tool to identify veterans from free-text clinical notes recorded in a psychiatric EHR database.


Veterans were manually identified using the South London and Maudsley Biomedical Research Centre Clinical Record Interactive Search – a database holding secondary mental health care electronic records for the South London and Maudsley National Health Service Trust. An iteratively developed Natural Language Processing and machine learning approach called the Veteran Detection Tool (VDT) was created to identify if a patient was a civilian or veteran.


To develop the VDT, an iterative two-stage approach was undertaken. In the first stage, a Structured Query Language approach was developed to identify veterans using a keyword rule-based approach. This scoping approach obtained a precision of 0.81, and a recall of 0.75. This approach informed the second stage, which was the development of the VDT using machine learning. In total, 6672 gold standard free-text clinical notes were manually annotated by human coders, 66% were retained for training, and 34% for testing.


The VDT has the potential to be used in identifying veterans in the UK from free-text clinical notes, providing new and unique insights into the health and well-being of this population and their use of mental healthcare services.


Please cite as:

Leightley D, Pernet D, Velupillai S, Mark KM, Opie E, Murphy D, Fear NT, Stevelink SA

Identifying Military Veterans in a Clinical Research Database using Natural Language Processing and Machine Learning

JMIR Preprints. 13/08/2019:15852

DOI: 10.2196/preprints.15852


Request queued. Please wait while the file is being generated. It may take some time.

© The authors. All rights reserved. This is a privileged document currently under peer-review/community review (or an accepted/rejected manuscript). Authors have provided JMIR Publications with an exclusive license to publish this preprint on it's website for review and ahead-of-print citation purposes only. While the final peer-reviewed paper may be licensed under a cc-by license on publication, at this stage authors and publisher expressively prohibit redistribution of this draft paper other than for review purposes.