<!-- BEGIN hmrn/data/antecedent.tt -->

    [% # PROCESS dumper.tt dump = hmrn_data.maps %]
    [% # PROCESS dumper.tt dump = hmrn_data.antecedent %]
    
    <h3 class="header">Antecedent/concurrent events:</h3>
    
	<script type="text/javascript">
		$(document).ready(function() {
			$("#antecedent").validationEngine()
		})
	</script>

    <form method="get" name="antecedent" id="antecedent"
        action="[% app_url %]/hmrn_data/edit_antecedent/[% data.id %]/[% patient.id %]">
    <table class="indent">
        <tr>
            <td rowspan="2" class="label">Event:</td>
            <td rowspan="2" class="content">
                <select name="event_id" class="validate[required]" id="event_id">
                    <option value=""></option>
                    [% FOREACH key IN hmrn_data.maps.antecedent.keys.sort %]
                    <option value="[% hmrn_data.maps.antecedent.$key %]"
                        [% 'selected' IF hmrn_data.antecedent.event_id
                            == hmrn_data.maps.antecedent.$key %]>
                        [% key %]
                    </option>
                    [% END %]
                </select>
            </td>
            <td class="borderless"></td>
            <td class="label">Previous radiotherapy:</td>
            <td class="content">
                <input type="checkbox" name="radiotherapy" value="1"
                    [% 'checked' IF hmrn_data.antecedent.prior_tx.radiotherapy %] />
            </td>
        </tr>
        <tr>
            <td class="borderless"></td>
            <td class="label">Previous chemotherapy:</td>
            <td class="content">
                <input type="checkbox" name="chemotherapy" value="1"
                    [% 'checked' IF hmrn_data.antecedent.prior_tx.chemotherapy %] />               
            </td>
        </tr>
		[% INCLUDE hmrn_submit %]
    </table>
    </form>
<!-- END hmrn/data/antecedent.tt -->
