Building medical knowledge from real world registries: The case of heart failure