The algorithm can be applied to identify persons with highest risks from data in the electronic health records of general practitioners.