Changed add_diagnoses_data: brought back dynamic SQL