Added Loop Controller for document encounter.