Updating how we iterate through the provider identifiers

This is to help the CDW exporter. Functionally, the code is the same,
however, the way the code was previously written, Mongoid will go to
the database to determine TIN or NPIs. Doing it this way, you can
still export a record that has not been saved to the database.