RSS Git Download  Clone
Raw Blame History
[% META
    title  = 'Haematological Malignancy Research Network » Edit Imaging Data'    
%]

<!-- BEGIN [% template.name %]  -->
    [%  # PROCESS dumper.tt dump = data;
        # PROCESS dumper.tt dump = imaging_opts;
        # PROCESS dumper.tt dump = c.stash.errs;
        
        scan_type = c.query.param('scan_type');
        dataset = c.query.param('dataset');
    %]

    [% BLOCK build_checkbox;
        # PROCESS dumper.tt dump = dataset; # 'dataset' defined locally in calling block
        IF cols; # have left & right nodal sites:
            IdL = imaging_opts.item(field _ '_left');  # table id for left-hand site
            IdR = imaging_opts.item(field _ '_right'); # table id for right-hand site
        ELSE; # single site:
            IdX = imaging_opts.item(field);
        END; %]

        <tr>
            <td class="label" align="right">
                <span title="[% span %]" class="[% span ? 'acronym' : 'normal' %]">
                    [% IF NOT label; field | ucfirst; ELSE; label; END %]</span>:
            </td>
            <td align="center">
				[% IF cols %]
    				<input type="checkbox" name="option_id" value="[% IdL %]"
                        [% 'checked' IF data.options_map.${IdL} %] />
    				<input type="checkbox" name="option_id" value="[% IdR %]"
                        [% 'checked' IF data.options_map.${IdR} %] />
                [% ELSE %]
					<input type="checkbox" name="option_id" value="[% IdX %]"
                        [% 'checked' IF data.options_map.${IdX} %]  />
                [% END %]
            </td>
        </tr>
    [% END %]    

    <h3>Edit [% scan_type | upper %] scan dataset #[% dataset %]:</h3>    

    [% IF dfv_errors %]
        <p class="error">[% c.cfg('msg').dfv_errors %]</p>
    [% END %]

    <div class="indent">
        <form method="post" name="scan" id="scan"
                action="[% app_url %]/hmrn_data/do_edit_imaging/[% data.request_id
                %]/[% data.patient_id %]">
            <input type="hidden" name="dataset" value="[% dataset %]" />
            <input type="hidden" name="scan_type" value="[% scan_type %]" />

            <p class="bold indent">Scan:			
                <select name="scan_sequence">
                    <option value="">-- select --</option>
                    <option value="initial" [% 'selected=1' IF foo %]>initial scan</option>
                    <option value="followup" [% 'selected=1' IF bar %]>follow-up</option>
                </select>[% error_scan_sequence %]
                date:
                <input type="text" size="5" name="scan_date" value="" />
                [% error_scan_date %]
            </p>
    
            <table class="indent">
                <tr>
                    [% INCLUDE hmrn/data/nodal_sites.tt data_entry = 1 %]
                    [% INCLUDE hmrn/data/extranodal_sites.tt data_entry = 1 %]
                </tr>
                
                <tr class="borderless" align="center">
                    <td colspan="2">[% site.html.submit %] [% site.html.reset %]</td>
                </tr>
            </table>        
        </form>
    </div>
<!-- END [% template.name %]  -->