select all diagnoses for the patients
adjusted select-2.py