Changed method add_diagnoses_data to improve speed