Refactored the irms_helper to use AR, fixed outdated query to match current data structure.