[ORB-534] fixed comorbidities sql query bug