SELECT `diagnosis`.* FROM `diagnosis` WHERE (profile_id = 5042) AND (surgery_id != 0)