extract_thresholds_by_id function

Extract risk thresholds by id