Added progress bar dialog for rebuilding patients