~dhis2-devs-core/dhis2/dhis2-patient-tz

« back to all changes in this revision

Viewing changes to local/tz/dhis-web-maintenance-patient-tz/src/main/webapp/dhis-web-maintenance-patient/updateCaseAggregation.vm

  • Committer: John Francis Mukulu
  • Date: 2011-08-09 06:36:18 UTC
  • mfrom: (4244.1.21 dhis2)
  • Revision ID: john.f.mukulu@gmail.com-20110809063618-wad1pcc9fd1mnc6k
[merge]

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<script>
2
 
        jQuery(document).ready( function(){
3
 
                validation( 'updateCaseAggregationForm', function(form){
4
 
                        form.submit();
5
 
                }); 
6
 
        });     
7
 
        
8
 
</script>
9
 
                                                                                                                
10
 
<h3>$i18n.getString( "update_case_aggregation_condition" )</h3>
11
 
 
12
 
<form id="updateCaseAggregationForm" action="updateCaseAggregation.action" method="post" >
13
 
 
14
 
<input type='hidden' id='id' name='id' value='$caseAggregation.id'>
15
 
 
16
 
<table> 
17
 
        <thead>
18
 
      <tr>
19
 
        <th colspan="2">$i18n.getString( "case_aggregation_condition_detail" )</th>
20
 
      </tr>
21
 
    </thead>
22
 
        
23
 
    <tbody>
24
 
        
25
 
    <tr>
26
 
        <td width="20em" ><label>$i18n.getString( "description" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
27
 
        <td><input type="text" id="description" name="description" style="width:30em" class="{validate:{required:true}}" value="$caseAggregation.description"></td>
28
 
    </tr>
29
 
    
30
 
    <tr>
31
 
                <td width="20em"><label for="dataElementGroup">$i18n.getString( "dataelement_group" )</label></td>
32
 
                <td>
33
 
                        <select id="dataElementGroup" name="dataElementGroup" style="min-width:30.5em" onchange="getAggDataElements();">
34
 
                                <option value="0">[$i18n.getString('please_select')]</option>
35
 
                                #foreach( $dataElementGroup in $dataElementGroups)
36
 
                                        <option value="$dataElementGroup.id" >$dataElementGroup.name</option>
37
 
                                #end
38
 
                        </select>
39
 
                </td>                           
40
 
        </tr>
41
 
    
42
 
    <tr>
43
 
                <td width="20em"><label for="dataElement">$i18n.getString( "dataelement" )<em title="$i18n.getString( "required" )" class="required">*</em></label></td>
44
 
                <td>
45
 
                        <select id="aggregationDataElementId" name="aggregationDataElementId" style="min-width:30.5em" class="{validate:{required:true}}" >
46
 
                                <option value="$caseAggregation.aggregationDataElement.id.$caseAggregation.optionCombo.id">$caseAggregation.aggregationDataElement.name ($caseAggregation.optionCombo.name)</option>
47
 
                        </select>
48
 
                </td>                           
49
 
        </tr>
50
 
        <tr>
51
 
                <input type="radio" id="operator" name="operator" value="COUNT" checked style='display:none;'/>
52
 
        </tr>
53
 
        <tr>
54
 
        <td colspan="2"><p></p></td>
55
 
    </tr>
56
 
        
57
 
    </tbody>
58
 
</table>
59
 
 
60
 
 
61
 
   
62
 
<table>
63
 
        <thead>
64
 
                <tr>
65
 
                        <th colspan="3">$i18n.getString( "condition_detail" )</th>
66
 
                </tr>
67
 
        </thead>
68
 
        
69
 
        <tbody>
70
 
        
71
 
        <tr>
72
 
        
73
 
        <td>
74
 
                <fieldset style="border: 1px solid #3f5d8e; ">
75
 
                <legend>$i18n.getString( "program_stage_de" )</legend>
76
 
                
77
 
                <table>
78
 
                
79
 
                        <tr>
80
 
                                <td>
81
 
                                        <label for="program">$i18n.getString( "program" )</label>
82
 
                                </td>
83
 
                        </tr>
84
 
                        <tr>
85
 
                                <td>
86
 
                                        <select id="program" name="program" style="min-width:20em" onChange="getProgramStages();">
87
 
                                                <option value="0">[$i18n.getString('please_select')]</option>
88
 
                                                #foreach( $program in $programs )
89
 
                                                        <option value="$program.id">$encoder.htmlEncode( $program.name )</option>
90
 
                                                #end
91
 
                                        </select>
92
 
                                </td>
93
 
                        </tr>
94
 
                        
95
 
                        <tr>
96
 
                                <td>
97
 
                                        <label for="programStage">$i18n.getString( "program_stage" )</label>
98
 
                                </td>
99
 
                        </tr>
100
 
                        <tr>
101
 
                                <td>
102
 
                                        <select id="programStage" name="programStage" style="min-width:20em" onChange="getPrgramStageDataElements();">
103
 
                                        </select>
104
 
                                </td>
105
 
                        </tr>
106
 
                        
107
 
                        <tr>
108
 
                                <td>
109
 
                                        <label for="dataelement">$i18n.getString( "dataelement" )</label>
110
 
                                </td>
111
 
                        </tr>
112
 
                        <tr>
113
 
                                <td>
114
 
                                        <select id="programstageDE" name="programstageDE" size="5" style="width:20em" ondblclick="insertInfo(this);">
115
 
                                        </select>
116
 
                                </td>
117
 
                        </tr>
118
 
                </table>
119
 
                </fieldset>
120
 
                
121
 
                </td>
122
 
                
123
 
                <td>
124
 
                <fieldset style="border: 1px solid #3f5d8e; ">
125
 
                <legend>$i18n.getString( "case_attributes" )</legend>
126
 
                
127
 
                <table>
128
 
                
129
 
                        <tr>
130
 
                                <td>
131
 
                                        <select id="caseProperty" name="caseProperty" size="5" ondblclick="insertInfo(this);" style="width:20em; height:14.5em" >
132
 
                                                <option value="[CP:gender]">$i18n.getString( "gender" )</option>
133
 
                                                <option value="[CP:dob]">$i18n.getString( "dob" )</option>
134
 
                                                
135
 
                                                #foreach( $patientAttribute in $patientAttributes )
136
 
                                                <option value="[CA:$patientAttribute.id]">$encoder.htmlEncode( $patientAttribute.name )</option>
137
 
                                                #end
138
 
                                        </select>
139
 
                                </td>
140
 
                        </tr>
141
 
                </table>
142
 
                </td>
143
 
                
144
 
                <td>
145
 
                <fieldset style="border: 1px solid #3f5d8e; ">
146
 
                <legend>$i18n.getString( "program_properties" )</legend>
147
 
                
148
 
                <table>
149
 
                
150
 
                        <tr>
151
 
                                <td>
152
 
                                        <select id="caseProperty" name="caseProperty" size="5" ondblclick="insertInfo(this);" style="width:15em; height:14.5em" >
153
 
                                                #foreach( $program in $programs )
154
 
                                                        <option value="[PG:$program.id]">$i18n.getString('program'): $encoder.htmlEncode( $program.name )</option>
155
 
                                                #end
156
 
                                                <option value="[PP:enrollmentdate - dateofincident]">$i18n.getString( "enrolldate_minus_incidentdate" )</option>
157
 
                                                <option value="[PP:enrollmentdate]">$i18n.getString( "date_of_enrollment" )</option>
158
 
                                                <option value="[PP:incidentdate]">$i18n.getString( "date_of_incident" )</option>
159
 
                                        </select>
160
 
                                </td>
161
 
                        </tr>
162
 
                </table>
163
 
                </td>
164
 
        </tr>   
165
 
        <tr>
166
 
                <td colspan='3'>
167
 
                        <img src="../images/less.png" alt="$i18n.getString( 'less' )" onclick='insertOperator( "<" );' style="cursor:pointer;">
168
 
                        <img src="../images/less_or_equal.png" alt="$i18n.getString( 'less_or_equal' )" onclick='insertOperator( "<=" );' style="cursor:pointer;">
169
 
                        <img src="../images/greater.png" alt="$i18n.getString( 'greater' )" onclick='insertOperator( ">" );' style="cursor:pointer;">
170
 
                        <img src="../images/greater_or_equal.png" alt="$i18n.getString( 'greater_or_equal' )" onclick='insertOperator( ">=" );' style="cursor:pointer;">
171
 
                        <img src="../images/equal.png" alt="$i18n.getString( 'equal' )" onclick='insertOperator( "=" );' style="cursor:pointer;">
172
 
                        <img src="../images/diff.png" alt="$i18n.getString( 'diff' )" onclick='insertOperator( "!=" );' style="cursor:pointer;">
173
 
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
174
 
                        <img src="../images/plus.png" alt="$i18n.getString( 'plus' )" onclick='insertOperator( "+" );' style="cursor:pointer;">
175
 
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
176
 
                        <img src="../images/is_null.png" alt="$i18n.getString( 'is_null' )" onclick='insertOperator( "is null" );' style="cursor:pointer;">
177
 
                        <img src="../images/not_null.png" alt="$i18n.getString( 'not_null' )" onclick='insertOperator( "is not null" );' style="cursor:pointer;">
178
 
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
179
 
                        <img src="../images/and.png" alt="$i18n.getString( 'and' )" onclick='insertOperator( "AND" );' style="cursor:pointer;">
180
 
                        <img src="../images/or.png" alt="$i18n.getString( 'or' )" onclick='insertOperator( "OR" );' style="cursor:pointer;">
181
 
                        <img src="../images/in.png" alt="$i18n.getString( 'in' )" onclick='insertOperator( "IN" );' style="cursor:pointer;">
182
 
                        
183
 
                        <img src="../images/clear.png" align="right" alt="$i18n.getString( 'clear' )" onclick="byId('aggregationCondition').value='';" style="cursor:pointer;">
184
 
                </td>
185
 
        
186
 
    </tbody>
187
 
        <tr>
188
 
                <td colspan='3'>
189
 
                        <fieldset style="border: 1px solid #3f5d8e; ">
190
 
                                <legend>$i18n.getString( "condition" )</legend>
191
 
                                <textarea id="aggregationCondition" name="aggregationCondition" style="width:62.5em; height:10em" class="{validate:{required:true}}" onkeyup='getConditionDescription();'>$caseAggregation.aggregationExpression</textarea>
192
 
                        </fieldset>
193
 
                </td>
194
 
        </tr>
195
 
        
196
 
        <tr>
197
 
                <td colspan='3'>
198
 
                        <fieldset style="border: 1px solid #3f5d8e; ">
199
 
                                <legend>$i18n.getString( "description" )</legend>
200
 
                                <div id='aggregationDescription'>$!description</div>
201
 
                        </fieldset>
202
 
                </td>
203
 
        </tr>
204
 
        
205
 
</table>
206
 
 
207
 
<p>
208
 
    <input type="submit" value="$i18n.getString( "update" )" style="width:10em">
209
 
    <input type="button" value="$i18n.getString( "cancel" )" onclick="window.location.href='caseAggregation.action'" style="width:10em">
210
 
</p>
211
 
 
212
 
</form>
213
 
 
214
 
<script>
215
 
        byId('description').focus();
216
 
</script>