Predicting incident delirium diagnoses using data from primary-care electronic health records