Get out what you put in: optimising electronic medical record data