filter query output for UI

interim modifications to filter sql query output to support required OOI UI specifications for input.