move dynamic item mapping functionality to base.sql; it's not ILS specific