~dhis2-devs-core/dhis2/ovc_bcc

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
/*
function validationTraining( arrrValue, fieldID )
{
	
	if( arrrValue == "true" || arrrValue == "Yes" )
	{
		document.getElementById( fieldID ).disabled = false;
	} 
	else
	{
		document.getElementById( fieldID ).value = "";
	    document.getElementById( fieldID ).disabled = true;
	}  
	
}
*/

//Module 1
function validationTrainingMod1()
{
	var attrMod1Object = document.getElementById('attr36');
	var arrrMod1Value = attrMod1Object.options[ attrMod1Object.selectedIndex ].value;
	
	if( arrrMod1Value == "true" || arrrMod1Value == "Yes" )
	{
		document.getElementById( "attr37" ).disabled = false;
	} 
	else
	{
		document.getElementById( "attr37" ).value = "";
	    document.getElementById( "attr37" ).disabled = true;
	}  
	
}
//Module 2 -4
function validationTrainingMod2()
{
	var attrMod2Object = document.getElementById('attr38');
	var arrrMod2Value = attrMod2Object.options[ attrMod2Object.selectedIndex ].value;
	
	if( arrrMod2Value == "true" || arrrMod2Value == "Yes" )
	{
		document.getElementById( "attr105" ).disabled = false;
	} 
	else
	{
		document.getElementById( "attr105" ).value = "";
	    document.getElementById( "attr105" ).disabled = true;
	}  
	
}


//Module 5
function validationTrainingMod5()
{
	var attrMod5Object = document.getElementById('attr39');
	var arrrMod5Value = attrMod5Object.options[ attrMod5Object.selectedIndex ].value;
	
	if( arrrMod5Value == "true" || arrrMod5Value == "Yes" )
	{
		document.getElementById( "attr106" ).disabled = false;
	} 
	else
	{
		document.getElementById( "attr106" ).value = "";
	    document.getElementById( "attr106" ).disabled = true;
	}  
	
}
//Module 1 to 5
function validationTrainingMod1To5()
{
	var attrMod1To5Object = document.getElementById('attr175');
	var arrrMod1To5Value = attrMod1To5Object.options[ attrMod1To5Object.selectedIndex ].value;
	
	if( arrrMod1To5Value == "true" || arrrMod1To5Value == "Yes" )
	{
		document.getElementById( "attr187" ).disabled = false;
	} 
	else
	{
		document.getElementById( "attr187" ).value = "";
	    document.getElementById( "attr187" ).disabled = true;
	}  
	
}

//Module 6
function validationTrainingMod6()
{
	var attrMod6Object = document.getElementById('attr40');
	var arrrMod6Value = attrMod6Object.options[ attrMod6Object.selectedIndex ].value;
	
	if( arrrMod6Value == "true" || arrrMod6Value == "Yes" )
	{
		document.getElementById( "attr107" ).disabled = false;
	} 
	else
	{
		document.getElementById( "attr107" ).value = "";
	    document.getElementById( "attr107" ).disabled = true;
	}  
	
}

//Module 7
function validationTrainingMod7()
{
	var attrMod7Object = document.getElementById('attr41');
	var arrrMod7Value = attrMod7Object.options[ attrMod7Object.selectedIndex ].value;
	
	if( arrrMod7Value == "true" || arrrMod7Value == "Yes" )
	{
		document.getElementById( "attr108" ).disabled = false;
	} 
	else
	{
		document.getElementById( "attr108" ).value = "";
	    document.getElementById( "attr108" ).disabled = true;
	}  
	
}


//HBPNC Round I
function validationTrainingHBPNC1()
{
	var attrHBPNC1Object = document.getElementById('attr42');
	var arrrHBPNC1Value = attrHBPNC1Object.options[ attrHBPNC1Object.selectedIndex ].value;
	
	if( arrrHBPNC1Value == "true" || arrrHBPNC1Value == "Yes" )
	{
		document.getElementById( "attr110" ).disabled = false;
	} 
	else
	{
		document.getElementById( "attr110" ).value = "";
	    document.getElementById( "attr110" ).disabled = true;
	}  
	
}

//HBPNC Round 2
function validationTrainingHBPNC2()
{
	var attrHBPNC2Object = document.getElementById('attr43');
	var arrrHBPNC2Value = attrHBPNC2Object.options[ attrHBPNC2Object.selectedIndex ].value;
	
	if( arrrHBPNC2Value == "true" || arrrHBPNC2Value == "Yes" )
	{
		document.getElementById( "attr111" ).disabled = false;
	} 
	else
	{
		document.getElementById( "attr111" ).value = "";
	    document.getElementById( "attr111" ).disabled = true;
	}  
	
}


// HIV/AIDS
function validationTrainingHIVAIDS()
{
	var attrHIVAIDSObject = document.getElementById('attr44');
	var arrrHIVAIDSValue = attrHIVAIDSObject.options[ attrHIVAIDSObject.selectedIndex ].value;
	
	if( arrrHIVAIDSValue == "true" || arrrHIVAIDSValue == "Yes" )
	{
		document.getElementById( "attr112" ).disabled = false;
	} 
	else
	{
		document.getElementById( "attr112" ).value = "";
	    document.getElementById( "attr112" ).disabled = true;
	}  
	
}

// Menstrual Hygiene
function validationTrainingMenstrualHygiene()
{
	var attrMenstrualHygieneObject = document.getElementById('attr45');
	var arrrMenstrualHygieneValue = attrMenstrualHygieneObject.options[ attrMenstrualHygieneObject.selectedIndex ].value;
	
	if( arrrMenstrualHygieneValue == "true" || arrrMenstrualHygieneValue == "Yes" )
	{
		document.getElementById( "attr113" ).disabled = false;
	} 
	else
	{
		document.getElementById( "attr113" ).value = "";
	    document.getElementById( "attr113" ).disabled = true;
	}  
	
}


// STI RTI
function validationTrainingSTIRTI()
{
	var attrSTIRTIObject = document.getElementById('attr46');
	var arrrSTIRTIValue = attrSTIRTIObject.options[ attrSTIRTIObject.selectedIndex ].value;
	
	if( arrrSTIRTIValue == "true" || arrrSTIRTIValue == "Yes" )
	{
		document.getElementById( "attr114" ).disabled = false;
	} 
	else
	{
		document.getElementById( "attr114" ).value = "";
	    document.getElementById( "attr114" ).disabled = true;
	}  
	
}



//RNTCP
function validationTrainingRNTCP()
{
	var attrRNTCPObject = document.getElementById('attr47');
	var arrrRNTCPValue = attrRNTCPObject.options[ attrRNTCPObject.selectedIndex ].value;
	
	if( arrrRNTCPValue == "true" || arrrRNTCPValue == "Yes" )
	{
		document.getElementById( "attr115" ).disabled = false;
	} 
	else
	{
		document.getElementById( "attr115" ).value = "";
	    document.getElementById( "attr115" ).disabled = true;
	}  
	
}



//Family Planning
function validationTrainingFamilyPlanning()
{
	var attrFamilyPlanningObject = document.getElementById('attr48');
	var arrrFamilyPlanningValue = attrFamilyPlanningObject.options[ attrFamilyPlanningObject.selectedIndex ].value;
	
	if( arrrFamilyPlanningValue == "true" || arrrFamilyPlanningValue == "Yes" )
	{
		document.getElementById( "attr116" ).disabled = false;
	} 
	else
	{
		document.getElementById( "attr116" ).value = "";
	    document.getElementById( "attr116" ).disabled = true;
	}  
	
}

//Pulse Polio
function validationTrainingPulsePolio()
{
	var attrPulsePolioObject = document.getElementById('attr49');
	var arrrPulsePolioValue = attrPulsePolioObject.options[ attrPulsePolioObject.selectedIndex ].value;
	
	if( arrrPulsePolioValue == "true" || arrrPulsePolioValue == "Yes" )
	{
		document.getElementById( "attr117" ).disabled = false;
	} 
	else
	{
		document.getElementById( "attr117" ).value = "";
	    document.getElementById( "attr117" ).disabled = true;
	}  
	
}

//Counselling
/*
function validationTrainingCounselling()
{
	var attrCounsellingObject = document.getElementById('attr50');
	var arrrCounsellingValue = attrCounsellingObject.options[ attrCounsellingObject.selectedIndex ].value;
	
	if( arrrCounsellingValue == "true" || arrrCounsellingValue == "Yes" )
	{
		document.getElementById( "attr118" ).disabled = false;
	} 
	else
	{
		document.getElementById( "attr118" ).value = "";
	    document.getElementById( "attr118" ).disabled = true;
	}  
	
}
*/
// Any Other Training
function validationAnyOtherTraining()
{
	var attrObject = document.getElementById('attr51');
	var arrrValue = attrObject.options[ attrObject.selectedIndex ].value;
	
	
	if( arrrValue == "true" || arrrValue == "Yes" )
	{
		document.getElementById( "attr120" ).disabled = false;
		document.getElementById( "attr119" ).disabled = false;
	} 
	else
	{
		document.getElementById( "attr120" ).value = "";
	    document.getElementById( "attr120" ).disabled = true;
	    document.getElementById( "attr119" ).value = "";
	    document.getElementById( "attr119" ).disabled = true;
	}  
	
}