RSS Git Download  Clone
Raw Blame History
    [% META title="Edit Request Error" %]
<!-- BEGIN [% template.name %] -->
    [% # PROCESS dumper.tt dump = error.as_tree %]
    [% # PROCESS dumper.tt dump = codes_in_use %]
    [% # PROCESS dumper.tt dump = error_codes %]

    [% INCLUDE record/patient_summary.tt %]

    [% request_error_dfv_js %]
    
    <h3 class="header">Edit Request Error</h3>

    [% IF dfv_errors %]
    <dl>
        <dt class="error">[% c.cfg('msg').dfv_errors %]</dt>
        [% IF error_error_group %]
            <dd>Error or LIC [% error_error_group %]</dd>[% END %]
    </dl>
    [% END %]

    <table class="indent">
        <tr>
            <th>Day</th>
            <th>Date</th>
            <th>Time</th>
            <th>UserID</th>
            <th>Code</th>
            <th>Description</th>
            <td class="borderless"></td>
        </tr>
        <tr>
            <td>[% error.time.strftime('%a') %]</td>
            <td>[% error.time.strftime('%d.%b.%Y') %]</td>
            <td>[% error.time.strftime('%T') %]</td>
            <td>[% error.user.username | upper %]</td>
            <td align="center">
                [% error.error_code.code | upper %]
            </td>
            <td>[% error.error_code.description | html %]</td>
            <td>
                <a href=[% app_url %]/error/delete/[% error.id %]>DELETE</a>
            </td>
        </tr>
    </table>
		
    <form action="[% app_url %]/error/do_edit/[% error.request_id %]/[% error.id %]"
        method="post" [% request_error_onsubmit %] name="error" id="error">
        <p class="title">Update:
            <select name="error_code_id">
                <option value=""></option>
            [%
                FOREACH item IN error_codes;
                    NEXT IF item.code == error.error_code.code; # skip self
                    NEXT IF codes_in_use.item(item.id) # skip any unique codes in use
                        AND item.is_unique.match('yes');
            %]
                <option value="[% item.id %]">
                    [[% item.code | upper %]]
                    [% item.description | html %]                        
                </option>
            [% END %]
            </select>
            [% site.html.submit %]
        </p>
    </form>
<!-- END [% template.name %]  -->