form.html 2.45 KB
Newer Older
Ryan Herbert's avatar
Ryan Herbert committed
1 2 3
<fieldset name="patient{{=i}}">
    <legend>Patient {{=i+1}}</legend>
    <input type="hidden" id="patient_id_{{=i}}" name="patient[{{=i}}][id]" value="{{if set is not None:}}{{=set['id']}}{{pass}}">
4
    {{ if set is not None and 'error' in set and len(set['error']) > 0: }}
Ryan Herbert's avatar
Ryan Herbert committed
5 6
        <div class="error">error: {{=", ".join(set['error'])}}</div>
    {{ pass }}
Ryan Herbert's avatar
Ryan Herbert committed
7
    <div class="field_div">
8
        <label for="patient_id_label_{{=i}}" id="patient_id_label__label_{{=i}}">Patient ID:</label>
Ryan Herbert's avatar
Ryan Herbert committed
9 10
        <input class="date form-control" id="patient_id_label_{{=i}}" name="patient[{{=i}}][id_label]" type="text"
            value="{{if set is not None and set['id_label'] is not None:}}{{=set['id_label']}}{{pass}}">
Ryan Herbert's avatar
Ryan Herbert committed
11
    </div>
Ryan Herbert's avatar
Ryan Herbert committed
12
    <div class="field_div">
13
        <label for="patient_first_name_{{=i}}" id="patient_first_name__label_{{=i}}">First Name:</label>
Ryan Herbert's avatar
Ryan Herbert committed
14
        <input class="string form-control" id="patient_first_name_{{=i}}" name="patient[{{=i}}][first_name]" type="text"
Ryan Herbert's avatar
Ryan Herbert committed
15
            value="{{if set is not None:}}{{=set['first_name']}}{{pass}}" required>
Ryan Herbert's avatar
Ryan Herbert committed
16
    </div>
Ryan Herbert's avatar
Ryan Herbert committed
17
    <div class="field_div">
18
        <label for="patient_last_name_{{=i}}" id="patient_last_name__label_{{=i}}">Last Name:</label>
Ryan Herbert's avatar
Ryan Herbert committed
19
        <input class="string form-control" id="patient_last_name_{{=i}}" name="patient[{{=i}}][last_name]" type="text"
Ryan Herbert's avatar
Ryan Herbert committed
20
            value="{{if set is not None:}}{{=set['last_name']}}{{pass}}" required>
Ryan Herbert's avatar
Ryan Herbert committed
21
    </div>
Ryan Herbert's avatar
Ryan Herbert committed
22
    <div class="field_div">
23
        <label for="patient_birth_{{=i}}" id="patient_birth__label_{{=i}}">Birth:</label>
Ryan Herbert's avatar
Ryan Herbert committed
24
        <input class="date form-control" id="patient_birth_{{=i}}" name="patient[{{=i}}][birth]" type="text"
Ryan Herbert's avatar
Ryan Herbert committed
25
            value="{{if set is not None and set['birth'] is not None:}}{{=set['birth']}}{{pass}}"
Ryan Herbert's avatar
Ryan Herbert committed
26
            placeholder="yyyy-mm-dd" title="yyyy-mm-dd" pattern="(?:19|20)[0-9]{2}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-9])|(?:(?!02)(?:0[1-9]|1[0-2])-(?:30))|(?:(?:0[13578]|1[02])-31))">
Ryan Herbert's avatar
Ryan Herbert committed
27
    </div>
Ryan Herbert's avatar
Ryan Herbert committed
28
    <div class="field_div">
29
        <label for="patient_info_{{=i}}" id="patient_info__label_{{=i}}">Info:</label>
Ryan Herbert's avatar
Ryan Herbert committed
30 31 32 33
        <textarea
            onfocus="$(this).data('keys', [$('#group_select option:selected').val()]);
                     new VidjilAutoComplete().setupTags(this);"
            data-needs-atwho="true"
Ryan Herbert's avatar
Ryan Herbert committed
34
            class="text form-control"
Ryan Herbert's avatar
Ryan Herbert committed
35 36
            id="patient_info_{{=i}}"
            name="patient[{{=i}}][info]"
Ryan Herbert's avatar
Ryan Herbert committed
37
            rows="1">{{if set is not None and set['info'] is not None:}}{{=set['info']}}{{pass}}</textarea>
Ryan Herbert's avatar
Ryan Herbert committed
38 39
    </div>
</fieldset>