  [% META title = 'Admin &raquo; General Practitioners' -%]
<!-- BEGIN admin/config/generalpractitioners/default.tt -->

	[% # PROCESS dumper.tt dump = file_data %]

	[% PROCESS admin/referral_nav.tt page = 'practitioners' %]
	
   <h2 align="center">General Practitioners</h2>
  
	<p class="title">Search for a practitioner:</p>
	<div class="indent">
		[% PROCESS search/referrer_search.tt referrer_type = 'general-practitioners' %]
	</div>  

	<hr />

   <h2 align="center">Regenerate GP List</h2>

	<script type="text/javascript">
		function submitForm(s) {
			s.value = "Re-building, please wait...";
	 		return true;
		}
	</script>

	[% IF file_data;
		age = file_data.age;
	    IF age >= 12; class = 'error';
		ELSIF age >= 6; class = 'warning';
		ELSE; class = 'info';
		END; END;
	%]
	<p>After addition of a new GP practice, it is necessary to re-build the GP's
        database. This process reads 'egpcur.csv' (<span class="[% class %]">last
        updated [% file_data.age %] months ago</span>) to find any GP's which
        are registered at the new practice.	This process may take a while ...
    </p>

    <form method="post" action="[% app_url %]/config/general-practitioners/regenerate"
		onSubmit="return submitForm(this.rebuild)" >
        <p class="indent">
			<b>Regenerate list</b>: <input type="submit" name="rebuild" value="Go" />
			[% site.html.back_button %]
		</p>
    </form>
<!-- END admin/config/generalpractitioners/default.tt -->