Fixed query to use codeList