		[% # get original search params from session:
			search_params = c.session.param('_patient_merge_data');
			fv = []; # create field-value pairs from original search params
            
			FOREACH item IN search_params.pairs;
                NEXT IF skip_sort_by AND item.key == 'sort_by'; # or get array of 'em
				fv.push(item.key _ '=' _ item.value);
			END;
            
            search_link = app_url _ '/admin/patient_merge/search?' _ fv.join(';');
		%]
