A schematic view of the method. Similarities between ICD codes and between hospitalizations are computed (A). A new patient is scored according to the most similar patients with a certain diagnosis (B). A classifier is applied to select the top scoring diagnoses for this patient (C). ICD, International Classification of Diseases.