~mortenoh/+junk/dhis2-detailed-import-export

« back to all changes in this revision

Viewing changes to local/in/dhis-web-reports/src/main/webapp/dhis-web-reports/Kerala/kform6.jsp

  • Committer: larshelge at gmail
  • Date: 2009-03-03 16:46:36 UTC
  • Revision ID: larshelge@gmail.com-20090303164636-2sjlrquo7ib1gf7r
Initial check-in

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<%@ page import="java.sql.*" %>
 
2
<%@ page import="com.opensymphony.xwork.util.OgnlValueStack" %>
 
3
 
 
4
<%
 
5
      Connection con=null;
 
6
      
 
7
      // for Performance in the Reporting Month
 
8
      Statement st=null;
 
9
      ResultSet rs=null;
 
10
      
 
11
      // for selected OrgUnit Name and Population
 
12
      Statement st1=null;
 
13
      ResultSet rs1=null;
 
14
      
 
15
      // for Performance in Corresponding month Last Year
 
16
      Statement st2=null;
 
17
      ResultSet rs2=null;
 
18
      
 
19
      // for Cumulative Performance till Current Month
 
20
      Statement st4=null;
 
21
      ResultSet rs4=null;
 
22
     
 
23
      // for Cumulative Performance till corresponding month of Last Year
 
24
      Statement st3=null;
 
25
      ResultSet rs3=null;
 
26
 
 
27
      // for Taluk Name and Id
 
28
      Statement st5=null;
 
29
      ResultSet rs5=null;
 
30
 
 
31
      // for District Name and Id
 
32
      Statement st6=null;
 
33
      ResultSet rs6=null;
 
34
 
 
35
     // for PHC Name and Id
 
36
      Statement st8=null;
 
37
      ResultSet rs8=null;
 
38
 
 
39
     // for CHC Name and Id
 
40
      Statement st9=null;
 
41
      ResultSet rs9=null;
 
42
 
 
43
     // for PHC Population Estimates
 
44
      Statement st10=null;
 
45
      ResultSet rs10=null;
 
46
 
 
47
     // for Data Period Start Date and End Date
 
48
      Statement st11=null;
 
49
      ResultSet rs11=null;
 
50
      
 
51
     // for DataElement ids based on DataElement code
 
52
      Statement st12=null;
 
53
      ResultSet rs12=null;
 
54
     
 
55
      
 
56
      String userName = "dhis";           
 
57
      String password = "";           
 
58
      String urlForConnection = "jdbc:mysql://localhost/kl_dhis2";
 
59
          
 
60
      int talukID = 0;
 
61
      String talukName = "";
 
62
      int districtID = 0; 
 
63
      String districtName = ""; 
 
64
      int CHCID = 0;
 
65
      String CHCName ="";
 
66
      int PHCID = 0;
 
67
      String PHCName ="";          
 
68
      int totPHCPopulation = -1;
 
69
      int totSCPopulation = -1;
 
70
 
 
71
          OgnlValueStack stack = (OgnlValueStack)request.getAttribute("webwork.valueStack");
 
72
          String selectedId = (String) stack.findValue( "orgUnitId" );
 
73
          int selectedOrgUnitID =         Integer.parseInt( selectedId );
 
74
        
 
75
  
 
76
          String startingDate  =  (String) stack.findValue( "startingPeriod" );
 
77
          String endingDate  =   (String) stack.findValue( "endingPeriod" );
 
78
        
 
79
          String monthlyPeriodId = (String) stack.findValue( "monthlyPeriodTypeId" );
 
80
          int periodTypeID =   Integer.parseInt( monthlyPeriodId );
 
81
               
 
82
          int lastYear = 0;
 
83
      
 
84
          String selectedOrgUnitName = "";
 
85
          String selectedDataPeriodStartDate = "";
 
86
          String selectedDataPeriodEndDate = "";
 
87
          String lastDataPeriodStartDate = "";
 
88
          
 
89
           String dataElementCodes[] = {
 
90
                                                                                "' '", "' '", 
 
91
                                                                                "'Form6_DE1'", "'Form6_DE2'", "'Form6_DE3'", "'Form6_DE4'", "' '", "'Form6_DE5'", "'Form6_DE6'", "'Form6_DE7'", 
 
92
                                                                                "'Form6_DE8'", "'Form6_DE9'", 
 
93
                                                                                
 
94
                                                                                "' '", "' '", 
 
95
                                                                                
 
96
                                                                                "'Form6_DE10'", 
 
97
                                                                                
 
98
                                                                                "' '", 
 
99
                                                                                
 
100
                                                                                "'Form6_DE11'", "'Form6_DE12'", "'Form6_DE13'", "'Form6_DE14'", "'Form6_DE15'", "'Form6_DE16'", 
 
101
                                                                                
 
102
                                                                                "' '", "' '", "' '", "' '", "' '", 
 
103
                                                                                
 
104
                                                                                "'Form6_DE17'", "'Form6_DE18'", "'Form6_DE19'", "'Form6_DE20'",
 
105
                                                                                
 
106
                                                                                "' '", "' '", 
 
107
                                                                                
 
108
                                                                                "'Form6_DE21'", "'Form6_DE22'", "'Form6_DE23'", "'Form6_DE24'", "'Form6_DE25'", "'Form6_DE26'", 
 
109
                                                                                
 
110
                                                                                "' '", "' '", 
 
111
                                                                                
 
112
                                                                                "'Form6_DE29'", "'Form6_DE30'", "'Form6_DE27'", "'Form6_DE28'", "'Form6_DE31'", "'Form6_DE32'", 
 
113
                                                                                
 
114
                                                                                "' '", "' '", 
 
115
                                                                                
 
116
                                                                                "'Form6_DE33'", "'Form6_DE34'", 
 
117
                                                                                
 
118
                                                                                "' '", 
 
119
                                                                                
 
120
                                                                                "'Form6_DE35'", "'Form6_DE36'", "'Form6_DE37'", 
 
121
                                                                                
 
122
                                                                                "' '", "' '", "' '","' '", "' '", 
 
123
                                                                                
 
124
                                                                                "'Form6_DE38'", "'Form6_DE39'", "'Form6_DE40'", "'Form6_DE41'", "'Form6_DE42'", "'Form6_DE43'", 
 
125
                                                                                
 
126
                                                                                "' '", "' '", "' '", "' '", "' '", "' '", 
 
127
                                                                                
 
128
                                                                                "'Form6_DE44'", "'Form6_DE45'", "'Form6_DE46'", "'Form6_DE47'", "'Form6_DE48'", "'Form6_DE49'", "'Form6_DE50'", "'Form6_DE51'", 
 
129
                                                                                "'Form6_DE52'", "'Form6_DE53'", "'Form6_DE54'", "'Form6_DE55'", "'Form6_DE56'", "'Form6_DE57'", "'Form6_DE58'", "'Form6_DE59'", 
 
130
                                                                                "'Form6_DE60'", "'Form6_DE61'", 
 
131
                                                                                
 
132
                                                                                "' '", "' '", 
 
133
                                                                                
 
134
                                                                                "'Form6_DE62'", "'Form6_DE63'", "'Form6_DE64'", "'Form6_DE65'", 
 
135
                                                                                
 
136
                                                                                "' '", "' '", "' '", "' '", 
 
137
                                                                                
 
138
                                                                                "'Form6_DE66'", "'Form6_DE67'", 
 
139
                                                                                
 
140
                                                                                "' '", "' '", 
 
141
                                                                                
 
142
                                                                                "'Form6_DE68'", "'Form6_DE69'", 
 
143
                                                                                
 
144
                                                                                "' '", "' '", 
 
145
                                                                                
 
146
                                                                                "'Form6_DE70'", "'Form6_DE71'", 
 
147
                                                                                
 
148
                                                                                // Adverse Reactions
 
149
                                                                                "'Form6_DE181'", "'Form6_DE182'",
 
150
 
 
151
                                                                                "' '", "' '",
 
152
                                                                                
 
153
                                                                                "'Form6_DE72'", "'Form6_DE73'", "'Form6_DE74'", "'Form6_DE75'", "'Form6_DE76'", "'Form6_DE77'", 
 
154
                                                                                
 
155
                                                                                "' '", "' '", "' '", "' '", "' '", "' '",
 
156
 
 
157
                                                                                "'Form6_DE78'", "'Form6_DE79'", "'Form6_DE80'", "'Form6_DE81'", "'Form6_DE82'", "'Form6_DE83'", "'Form6_DE84'", "'Form6_DE85'", 
 
158
                                                                                
 
159
                                                                                "' '", "' '",
 
160
 
 
161
                                                                                "'Form6_DE86'", "'Form6_DE87'", "'Form6_DE88'", "'Form6_DE89'", "'Form6_DE90'", "'Form6_DE91'", "'Form6_DE92'", "'Form6_DE93'", 
 
162
                                                                                
 
163
                                                                                "' '", "' '",
 
164
 
 
165
                                                                                "'Form6_DE94'", "'Form6_DE95'", "'Form6_DE96'", "'Form6_DE97'", "'Form6_DE98'", "'Form6_DE99'", "'Form6_DE100'", "'Form6_DE101'", 
 
166
                                                                                
 
167
                                                                                "' '", "' '",
 
168
 
 
169
                                                                                "'Form6_DE102'", "'Form6_DE103'", "'Form6_DE104'", "'Form6_DE105'", "'Form6_DE106'", "'Form6_DE107'", "'Form6_DE108'", "'Form6_DE109'",
 
170
                                                                                
 
171
                                                                                "' '", "' '",
 
172
 
 
173
                                                                                "'Form6_DE110'", "'Form6_DE111'", "'Form6_DE112'", "'Form6_DE113'", "'Form6_DE114'", "'Form6_DE115'", 
 
174
 
 
175
                                                                                "' '", "' '",
 
176
 
 
177
                                                                                "'Form6_DE116'", "'Form6_DE117'", "'Form6_DE118'", "'Form6_DE119'", "'Form6_DE120'", "'Form6_DE121'", 
 
178
                                                                                
 
179
                                                                                "' '", "' '","' '", "' '",
 
180
 
 
181
                                                                                "'Form6_DE122'", "'Form6_DE123'", "'Form6_DE124'", "'Form6_DE125'", "'Form6_DE126'", "'Form6_DE127'", "'Form6_DE128'", "'Form6_DE129'",
 
182
                                                                                
 
183
                                                                                "' '", "' '",
 
184
 
 
185
                                                                                "'Form6_DE130'", 
 
186
                                                                                
 
187
                                                                                "' '",
 
188
                                                                                
 
189
                                                                                "'Form6_DE131'", "'Form6_DE133'", 
 
190
                                                                                
 
191
                                                                                "' '", 
 
192
                                                                                
 
193
                                                                                "'Form6_DE132'", "'Form6_DE134'", 
 
194
                                                                                
 
195
                                                                                "'Form6_DE183'", 
 
196
                                                                                
 
197
                                                                                "'Form6_DE135'", "'Form6_DE136'", 
 
198
                                                                                
 
199
                                                                                "' '", 
 
200
                                                                                
 
201
                                                                                "'Form6_DE137'", "'Form6_DE138'", 
 
202
                                                                                
 
203
                                                                                "' '", 
 
204
                                                                                
 
205
                                                                                "'Form6_DE139'", "'Form6_DE140'", "'Form6_DE141'", "'Form6_DE142'", "'Form6_DE143'", 
 
206
                                                                                
 
207
                                                                                "' '",
 
208
                                                                                
 
209
                                                                                "'Form6_DE144'", "'Form6_DE145'", "'Form6_DE146'", "'Form6_DE147'", "'Form6_DE148'",
 
210
                                                                                
 
211
                                                                                "' '", "' '","' '",
 
212
 
 
213
                                                                                "'Form6_DE149'", "'Form6_DE150'", "'Form6_DE151'", "'Form6_DE152'", "'Form6_DE153'", "'Form6_DE154'", "'Form6_DE155'", 
 
214
 
 
215
                                                                                "' '", "' '",
 
216
 
 
217
                                                                                "'Form6_DE156'", "'Form6_DE157'", "'Form6_DE158'", "'Form6_DE159'"
 
218
                                                                                
 
219
                                                                                                                                                        
 
220
                                                                           };
 
221
 
 
222
                 
 
223
        int dataElementIDs[] = new int[dataElementCodes.length+5];  
 
224
        int entryNumberValues[]=  new int[dataElementCodes.length+5];     
 
225
    int entryValuesForLastYear[]= new int[dataElementCodes.length+5];      
 
226
    int cumentryValuesForCurYear[]= new int[dataElementCodes.length+5];      
 
227
    int cumentryValuesForLastYear[]= new int[dataElementCodes.length+5];      
 
228
        
 
229
        String monthNames[] = { "", "January", "February", "March", "April", "May", "June", "July", "August", "September","October", "November", "December" };    
 
230
        
 
231
%>
 
232
 
 
233
<%
 
234
     try
 
235
      {
 
236
        Class.forName ("com.mysql.jdbc.Driver").newInstance ();
 
237
        con = DriverManager.getConnection (urlForConnection, userName, password);
 
238
        
 
239
        st=con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_READ_ONLY); 
 
240
        st1=con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_READ_ONLY);
 
241
        st2=con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_READ_ONLY);
 
242
        st3=con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_READ_ONLY);
 
243
        st4=con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_READ_ONLY);
 
244
        st5=con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_READ_ONLY); 
 
245
        st6=con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_READ_ONLY);
 
246
        st8=con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_READ_ONLY);
 
247
        st9=con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_READ_ONLY);
 
248
        st10=con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_READ_ONLY);
 
249
        st11=con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_READ_ONLY);
 
250
        st12=con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_READ_ONLY);
 
251
 
 
252
     
 
253
        //rs1 = st1.executeQuery("SELECT organisationunit.name FROM organisationunit WHERE id ="+selectedOrgUnitID);
 
254
        rs1 = st1.executeQuery("SELECT organisationunit.name FROM organisationunit WHERE organisationunitid ="+selectedOrgUnitID);        
 
255
        if(rs1.next())  {   selectedOrgUnitName = rs1.getString(1);        }
 
256
        else   {        selectedOrgUnitName = "";                  }  
 
257
 
 
258
//      rs11 = st11.executeQuery("select startDate,endDate from period where id = "+selectedDataPeriodID);
 
259
//              if(rs11.next())
 
260
//                {
 
261
//                      selectedDataPeriodStartDate =  rs11.getDate(1).toString();
 
262
//                      selectedDataPeriodEndDate   =  rs11.getDate(2).toString();
 
263
//                }
 
264
  
 
265
                selectedDataPeriodStartDate = startingDate;
 
266
                
 
267
      } // try block end
 
268
     catch(Exception e)  { out.println(e.getMessage());  }
 
269
     finally
 
270
       {
 
271
                        try
 
272
                                {
 
273
                                        if(rs1!=null)  rs1.close();                     if(st1!=null)  st1.close();
 
274
                                        if(rs11!=null)  rs11.close();           if(st11!=null)  st11.close();
 
275
                                }
 
276
                        catch(Exception e)   {  out.println(e.getMessage());   }
 
277
       } // finally block end           
 
278
 
 
279
        String partsOfDataPeriodStartDate[]  =  selectedDataPeriodStartDate.split("-");
 
280
        lastYear  = Integer.parseInt(partsOfDataPeriodStartDate[0]) - 1;
 
281
        lastDataPeriodStartDate = lastYear+"-"+partsOfDataPeriodStartDate[1]+"-"+partsOfDataPeriodStartDate[2];
 
282
        
 
283
        int tempForMonth1 = Integer.parseInt(partsOfDataPeriodStartDate[1]);
 
284
        int tempForYear = 0;
 
285
                
 
286
        if(tempForMonth1 < 4)           {   tempForYear = lastYear;  }
 
287
        else  {   tempForYear = lastYear + 1;           }
 
288
         
 
289
         String curYearStart = tempForYear+"-04-01";
 
290
         String lastYearStart = (tempForYear-1)+"-04-01";
 
291
         String lastYearEnd = lastYear+"-"+partsOfDataPeriodStartDate[1]+"-"+partsOfDataPeriodStartDate[2];
 
292
         
 
293
     //for district, taluk, CHC names
 
294
     try
 
295
      {
 
296
                //rs8=st8.executeQuery("select organisationunit.id, organisationunit.name FROM organisationunit WHERE organisationunit.id in ( select organisationunit.parent from organisationunit where organisationunit.id = "+selectedOrgUnitID+")");
 
297
                rs8=st8.executeQuery("select organisationunit.organisationunitid, organisationunit.name FROM organisationunit WHERE organisationunit.organisationunitid in ( select organisationunit.parentid from organisationunit where organisationunit.organisationunitid = "+selectedOrgUnitID+")");        
 
298
                        if(rs8.next())  { PHCID = rs8.getInt(1);PHCName = rs8.getString(2);  } 
 
299
                        else  {  PHCID = 0; PHCName = "";  } 
 
300
 
 
301
                        //rs9=st9.executeQuery("select organisationunit.id, organisationunit.name FROM organisationunit WHERE organisationunit.id in ( select organisationunit.parent from organisationunit where organisationunit.id = "+PHCID+")");
 
302
                        rs9=st9.executeQuery("select organisationunit.organisationunitid, organisationunit.name FROM organisationunit WHERE organisationunit.organisationunitid in ( select organisationunit.parentid from organisationunit where organisationunit.organisationunitid = "+PHCID+")");   
 
303
                        if(rs9.next())  { CHCID = rs9.getInt(1);CHCName = rs9.getString(2);  } 
 
304
                        else  {  CHCID = 0; CHCName = "";  } 
 
305
 
 
306
                        //rs5=st5.executeQuery("select organisationunit.id, organisationunit.name FROM organisationunit WHERE organisationunit.id in ( select organisationunit.parent from organisationunit where organisationunit.id = "+CHCID+")");
 
307
                        rs5=st5.executeQuery("select organisationunit.organisationunitid, organisationunit.name FROM organisationunit WHERE organisationunit.organisationunitid in ( select organisationunit.parentid from organisationunit where organisationunit.organisationunitid = "+CHCID+")");   
 
308
                        if(rs5.next())  { talukID = rs5.getInt(1); talukName = rs5.getString(2);  } 
 
309
                        else  {  talukID = 0; talukName = "";  } 
 
310
        
 
311
                    //rs6=st6.executeQuery("select organisationunit.id, organisationunit.name FROM organisationunit WHERE organisationunit.id in ( select organisationunit.parent from organisationunit where organisationunit.id = "+talukID+")");
 
312
                    rs6=st6.executeQuery("select organisationunit.organisationunitid, organisationunit.name FROM organisationunit WHERE organisationunit.organisationunitid in ( select organisationunit.parentid from organisationunit where organisationunit.organisationunitid = "+talukID+")"); 
 
313
                    if(rs6.next()) {  districtID = rs6.getInt(1); districtName = rs6.getString(2);}
 
314
                        else {districtID = 0; districtName = "";}      
 
315
 
 
316
                        //rs10=st10.executeQuery("SELECT sum(datavalue.value) FROM organisationunit INNER JOIN (dataelement INNER JOIN datavalue ON dataelement.id = datavalue.dataElement) ON organisationunit.id = datavalue.source WHERE organisationunit.parent = "+PHCID+" AND dataelement.name like 'Total Population'");
 
317
                        rs10=st10.executeQuery("SELECT sum(datavalue.value) FROM organisationunit INNER JOIN (dataelement INNER JOIN datavalue ON dataelement.dataelementid = datavalue.dataelementid) ON organisationunit.organisationunitid = datavalue.sourceid WHERE organisationunit.parentid = "+PHCID+" AND dataelement.name like 'Total Population'");
 
318
                        if(rs10.next()) { totPHCPopulation = rs10.getInt(1);}
 
319
                        else {totPHCPopulation = 0;}      
 
320
       
 
321
       }   // try block end              
 
322
     catch(Exception e)  { out.println("Exception1 : "+e.getMessage());  }
 
323
     finally
 
324
       {
 
325
                 try
 
326
                          {
 
327
                            if(rs5!=null)  rs5.close();                 if(st5!=null)  st5.close();
 
328
                            if(rs6!=null)  rs6.close();                 if(st6!=null)  st6.close();
 
329
                            if(rs8!=null)  rs8.close();                 if(st8!=null)  st8.close();   
 
330
                            if(rs9!=null)  rs9.close();                 if(st9!=null)  st9.close();
 
331
                            if(rs10!=null)  rs10.close();               if(st10!=null)  st10.close();                                                                                                                
 
332
                          }
 
333
                catch(Exception e)   {  out.println("Exception2 : "+e.getMessage());   }
 
334
       }  // finally block end
 
335
    
 
336
    int in = 0;
 
337
     try
 
338
      {
 
339
                int i=0;    
 
340
                int j= dataElementCodes.length;
 
341
                String query = "";
 
342
                
 
343
                        
 
344
                while(i!=j)
 
345
                        {
 
346
                
 
347
                                entryNumberValues[i]     = -1;
 
348
                                entryValuesForLastYear[i] = -1;
 
349
                                cumentryValuesForCurYear[i] = -1;
 
350
                                cumentryValuesForLastYear[i] = -1;
 
351
                                                                                
 
352
 
 
353
                                                
 
354
                                                // for Performance in the reporting month
 
355
                                                //query = "SELECT sum(datavalue.value) FROM datavalue INNER JOIN dataelement ON datavalue.dataElement = dataelement.id WHERE datavalue.period in (select id from period where startdate between '"+startingDate+"' and '"+startingDate+"') AND datavalue.source in ( select id from organisationunit where id ="+selectedOrgUnitID+") AND dataelement.code in ("+dataElementCodes[i]+")";
 
356
                                                query = "SELECT sum(datavalue.value) FROM datavalue INNER JOIN dataelement ON datavalue.dataelementid = dataelement.dataelementid WHERE datavalue.periodid in (select periodid from period where startdate between '"+startingDate+"' and '"+startingDate+"') AND datavalue.sourceid in ( select organisationunitid from organisationunit where organisationunitid ="+selectedOrgUnitID+") AND dataelement.code in ("+dataElementCodes[i]+")"; 
 
357
                                                rs=st.executeQuery(query);                                          
 
358
                                            if(rs.next())  {  entryNumberValues[i] = rs.getInt(1);  } 
 
359
                                                else  {  entryNumberValues[i] = 0;  } 
 
360
                                                                                        
 
361
                                    
 
362
                                    // for Cumulative Performance till Current Month
 
363
                                        //query = "SELECT sum(datavalue.value) FROM datavalue INNER JOIN dataelement ON datavalue.dataElement = dataelement.id WHERE datavalue.period in (select id from period where startdate between '"+curYearStart+"' and '"+selectedDataPeriodStartDate+"' and periodType = "+periodTypeID+")  AND datavalue.source in ( select id from organisationunit where id ="+selectedOrgUnitID+")  AND dataelement.code in ("+dataElementCodes[i]+")";
 
364
                                        query = "SELECT sum(datavalue.value) FROM datavalue INNER JOIN dataelement ON datavalue.dataelementid = dataelement.dataelementid WHERE datavalue.periodid in (select periodid from period where startdate between '"+curYearStart+"' and '"+selectedDataPeriodStartDate+"' and periodtypeid = "+periodTypeID+")  AND datavalue.sourceid in ( select organisationunitid from organisationunit where organisationunitid ="+selectedOrgUnitID+")  AND dataelement.code in ("+dataElementCodes[i]+")";                         
 
365
                                    rs4=st4.executeQuery(query);
 
366
                                        if(rs4.next())  {  cumentryValuesForCurYear[i]= rs4.getInt(1);  } 
 
367
                                    else  {  cumentryValuesForCurYear[i] = 0;  } 
 
368
                                    
 
369
                                    
 
370
                                    // for Performance in Corresponding month Last Year
 
371
                                        //query = "SELECT sum(datavalue.value) FROM datavalue INNER JOIN dataelement ON datavalue.dataElement = dataelement.id WHERE datavalue.period in (select id from period where startdate between '"+lastYearEnd+"' and '"+lastYearEnd+"') AND datavalue.source in ( select id from organisationunit where id ="+selectedOrgUnitID+") AND dataelement.code in ("+dataElementCodes[i]+")";
 
372
                                        query = "SELECT sum(datavalue.value) FROM datavalue INNER JOIN dataelement ON datavalue.dataelementid = dataelement.dataelementid WHERE datavalue.periodid in (select periodid from period where startdate between '"+lastYearEnd+"' and '"+lastYearEnd+"') AND datavalue.sourceid in ( select organisationunitid from organisationunit where organisationunitid ="+selectedOrgUnitID+") AND dataelement.code in ("+dataElementCodes[i]+")"; 
 
373
                                        rs2=st2.executeQuery(query); 
 
374
                                if(rs2.next())  {  entryValuesForLastYear[i] = rs2.getInt(1);  } 
 
375
                                    else  {  entryValuesForLastYear[i] = 0;  } 
 
376
 
 
377
                                    
 
378
                                    // for Cumulative Performance till corresponding month of Last Year
 
379
                                    //query = "SELECT sum(datavalue.value) FROM datavalue INNER JOIN dataelement ON datavalue.dataElement = dataelement.id WHERE datavalue.period in (select id from period where startdate between '"+lastYearStart+"' and '"+lastYearEnd+"' and periodType = "+periodTypeID+")  AND datavalue.source in ( select id from organisationunit where id ="+selectedOrgUnitID+")  AND dataelement.code in ("+dataElementCodes[i]+")";
 
380
                                    query = "SELECT sum(datavalue.value) FROM datavalue INNER JOIN dataelement ON datavalue.dataelementid = dataelement.dataelementid WHERE datavalue.periodid in (select periodid from period where startdate between '"+lastYearStart+"' and '"+lastYearEnd+"' and periodtypeid = "+periodTypeID+")  AND datavalue.sourceid in ( select organisationunitid from organisationunit where organisationunitid ="+selectedOrgUnitID+")  AND dataelement.code in ("+dataElementCodes[i]+")";                            
 
381
                                    rs3=st3.executeQuery(query);
 
382
                                            if(rs3.next())  {  cumentryValuesForLastYear[i]= rs3.getInt(1);  } 
 
383
                                        else  {  cumentryValuesForLastYear[i] = 0;  }                                                                                   
 
384
 
 
385
                                        
 
386
                                i++;
 
387
                        }  // while loop end
 
388
      }  // try block end                
 
389
     catch(Exception e)  { out.println(e.getMessage());  }
 
390
     finally
 
391
       {
 
392
                         try
 
393
                                {
 
394
                                    if(rs!=null)  rs.close();           if(st!=null)  st.close();                                                       
 
395
                                        if(rs2!=null)  rs2.close();             if(st2!=null)  st2.close();    
 
396
                                        if(rs3!=null)  rs3.close();             if(st3!=null)  st3.close();                                     
 
397
                                        if(rs4!=null)  rs4.close();             if(st4!=null)  st4.close();
 
398
                                        if(rs12!=null)  rs12.close();           if(st12!=null)  st12.close();
 
399
                                                                                
 
400
                                        if(con!=null) con.close();                                      
 
401
                        }        
 
402
                        catch(Exception e)   {  out.println("Exception3 : "+e.getMessage());   }
 
403
       }  // finally block end                                  
 
404
%>
 
405
 
 
406
<HTML>
 
407
<HEAD>
 
408
   <TITLE> Report of ANM</TITLE>
 
409
   <script src="../dhis-web-reports/Kerala/KDENamesForForm6.js" type="text/javascript" language="Javascript"></script>  
 
410
   <script>
 
411
                function fun1()
 
412
                { 
 
413
                    
 
414
                        var start=0;
 
415
                        var end = 28;    
 
416
                        var j=1;
 
417
                        var k=0;                
 
418
                        var id="";                      
 
419
                
 
420
                        while(j<=6)
 
421
                         {                          
 
422
                                
 
423
                                if(j==1) end = 11;
 
424
                                        else if(j==2 || j==5) end = 30;
 
425
                                        else if(j==4) end = 29;
 
426
                                        else if(j==6) end = 25;
 
427
                                else end = 28;
 
428
                                        for(start=0;start<=end;start++)
 
429
                                         {      
 
430
                                                id="cell1"+k;                                     
 
431
                                                document.getElementById(id).innerHTML = slnoForForm6[k];
 
432
                                                id="cell2"+k;                                     
 
433
                                                document.getElementById(id).innerHTML = denamesForForm6[k];
 
434
                                                k++;
 
435
                                         }
 
436
                                        j++; 
 
437
                                 }                                                              
 
438
                        }
 
439
        </script>                   
 
440
</HEAD>
 
441
<BODY BGCOLOR="#FFFFFF" onload="fun1()">
 
442
        <font face="Arial" size="2">(To be submitted by 15th of following month to PHC)</font><BR><br>
 
443
        <center>
 
444
                <font face="Arial" size="3">
 
445
                        <b>FORM 6<BR>MONTHLY REPORT FOR SUB-CENTRE / URBAN HEALTH POST / REVAMPING CENTRE<BR>(REPORT OF ANM / MPW (MALE)</b>
 
446
                </font>
 
447
        </center>
 
448
        <br>
 
449
        
 
450
        <table cellpadding="0" cellspacing="0" bgcolor="ffffff" align="center" style="border-style:solid; border-width:0; border-collapse: collapse; padding: 0; position:relative; top:10" bordercolor="#ffffff" width="100%"  border="0">
 
451
                <tr style="border-collapse: collapse; border-left-style: solid; border-left-width: 0; border-right-style: solid; border-right-width: 0; padding: 0" bordercolor="#111111" width="100%">
 
452
                <td width="50%" style="border-collapse: collapse; border-left-style: solid; border-left-width: 0; border-right-style: solid; border-right-width: 0; padding-left:15; padding-right:0; padding-top:0; padding-bottom:0" bordercolor="#111111"  height="23">
 
453
                        <font face="Arial" size="2">1.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;State &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:&nbsp; &nbsp;&nbsp;&nbsp;KERALA </font>
 
454
                </td>
 
455
                <td width="50%" style="border-collapse: collapse; border-left-style: solid; border-left-width: 0; border-right-style: solid; border-right-width: 0; padding-left:15; padding-right:0; padding-top:0; padding-bottom:0" bordercolor="#111111"  height="23">
 
456
                        <font face="Arial" size="2">7.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reporting for the month of :&nbsp;&nbsp;<%=monthNames[Integer.parseInt(partsOfDataPeriodStartDate[1])]%> - <%=partsOfDataPeriodStartDate[0]%> </font>
 
457
                </td>   
 
458
                </tr>
 
459
                <tr>
 
460
                <td width="50%" style="border-collapse: collapse; border-left-style: solid; border-left-width: 0; border-right-style: solid; border-right-width: 0; padding-left:15; padding-right:0; padding-top:0; padding-bottom:0" bordercolor="#111111" height="19">
 
461
                        <font face="Arial" size="2">2.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;District &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:&nbsp; &nbsp;&nbsp;&nbsp;<%=districtName%></font>
 
462
                </td>
 
463
                <td width="50%" style="border-collapse: collapse; border-left-style: solid; border-left-width: 0; border-right-style: solid; border-right-width: 0; padding-left:15; padding-right:0; padding-top:0; padding-bottom:0" bordercolor="#111111"  height="19">
 
464
                        <font face="Arial" size="2">8.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Eligible couples (as on 1st April of the year) :</font>
 
465
                </td>
 
466
                </tr>
 
467
                <tr>
 
468
                <td width="50%" style="border-collapse: collapse; border-left-style: solid; border-left-width: 0; border-right-style: solid; border-right-width: 0; padding-left:15; padding-right:0; padding-top:0; padding-bottom:0" bordercolor="#111111"  height="19">
 
469
                        <font face="Arial" size="2">3.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PHC &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<%=PHCName%></font>
 
470
                </td>
 
471
                <td width="50%" style="border-collapse: collapse; border-left-style: solid; border-left-width: 0; border-right-style: solid; border-right-width: 0; padding-left:15; padding-right:0; padding-top:0; padding-bottom:0" bordercolor="#111111"  height="19"></td>
 
472
                </tr>
 
473
                <tr>
 
474
                <td width="50%" style="border-collapse: collapse; border-left-style: solid; border-left-width: 0; border-right-style: solid; border-right-width: 0; padding-left:15; padding-right:0; padding-top:0; padding-bottom:0" bordercolor="#111111"  height="23">
 
475
                        <font face="Arial" size="2">4.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sub Centre&nbsp;:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<%=selectedOrgUnitName%> </font>
 
476
                </td>
 
477
                <td width="50%" style="border-collapse: collapse; border-left-style: solid; border-left-width: 0; border-right-style: solid; border-right-width: 0; padding-left:15; padding-right:0; padding-top:0; padding-bottom:0" bordercolor="#111111" width="100%" height="23"></td>
 
478
                </tr>
 
479
                <tr>
 
480
                <td width="50%" style="border-collapse: collapse; border-left-style: solid; border-left-width: 0; border-right-style: solid; border-right-width: 0; padding-left:15; padding-right:0; padding-top:0; padding-bottom:0" bordercolor="#111111" width="100%" height="19">
 
481
                        <font face="Arial" size="2">5.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Population of PHC :&nbsp;&nbsp;&nbsp;&nbsp;<%=totPHCPopulation%></font>
 
482
                </td>
 
483
                <td width="50%" style="border-collapse: collapse; border-left-style: solid; border-left-width: 0; border-right-style: solid; border-right-width: 0; padding-left:15; padding-right:0; padding-top:0; padding-bottom:0" bordercolor="#111111" width="100%" height="19"></td>
 
484
                </tr> 
 
485
                <tr>
 
486
                <td width="50%" style="border-collapse: collapse; border-left-style: solid; border-left-width: 0; border-right-style: solid; border-right-width: 0; padding-left:15; padding-right:0; padding-top:0; padding-bottom:0" bordercolor="#111111" width="100%" height="1" colspan="2">
 
487
                <font face="Arial" size="2">6.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Population of Sub-centre :&nbsp;&nbsp;&nbsp;&nbsp;<%=totSCPopulation%></font>
 
488
                </td>
 
489
                <td width="50%" style="border-collapse: collapse; border-left-style: solid; border-left-width: 0; border-right-style: solid; border-right-width: 0; padding-left:15; padding-right:0; padding-top:0; padding-bottom:0" bordercolor="#111111" width="100%" height="19"> </td>
 
490
                </tr>
 
491
  </table>  
 
492
<br><br>
 
493
<font face="Arial" size="3"><b>II.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Services</b></font><br>
 
494
<br>
 
495
<%
 
496
        int i;
 
497
        int j = 1;
 
498
        int k = 0;
 
499
        int l = 0;
 
500
        int endcount = 28;
 
501
        int flag = 0;
 
502
        String tempForentryNumberValues1 = "";
 
503
        String tempForentryNumberValues2 = "";
 
504
        String tempForentryValuesForLastYear1 = "";
 
505
        String tempForentryValuesForLastYear2 = "";
 
506
        String tempForcumentryValuesForCurYear1 = "";
 
507
        String tempForcumentryValuesForCurYear2 = "";
 
508
        String tempForcumentryValuesForLastYear1 = "";
 
509
        String tempForcumentryValuesForLastYear2 = "";
 
510
                        
 
511
        String temp1 = "";
 
512
        
 
513
        String temp2 = "";
 
514
        
 
515
        int temp = 0;
 
516
        while(j<=6)
 
517
         { 
 
518
            if(flag == 0) 
 
519
              { %>
 
520
                <table cellpadding="0" cellspacing="0" style="border-collapse: collapse; border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1; border-top-style: solid; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1;padding: 0" bordercolor="#111111" width="100%">
 
521
                                <tr>
 
522
                                <td width="3%" style="border-collapse: collapse; border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1; border-top-style: solid; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1;padding: 0" bordercolor="#111111" width="100%" align="center"><font face="Arial" size="2">Sl. No.</font></td>
 
523
                                <td width="50%" style="border-style:solid; border-width:1; border-collapse: collapse; padding-left:15; padding-right:0; padding-top:0; padding-bottom:0" bordercolor="#111111" width="100%" align="center"><font face="Arial" size="2">Services</font></td>
 
524
                                <td width="10%" style="border-style:solid; border-width:1; border-collapse: collapse; padding-left:3; padding-right:3; padding-top:0; padding-bottom:0" bordercolor="#111111" width="100%" align="center"  colspan="2"><font face="Arial" size="2">Performance in corresponding month last year</font></td>
 
525
                                <td width="10%" style="border-style:solid; border-width:1; border-collapse: collapse; padding-left:3; padding-right:3; padding-top:0; padding-bottom:0" bordercolor="#111111" width="100%" align="center"  colspan="2"><font face="Arial" size="2">Performance in the reporting month</font></td>
 
526
                                <td width="10%" style="border-style:solid; border-width:1; border-collapse: collapse; padding-left:3; padding-right:3; padding-top:0; padding-bottom:0" bordercolor="#111111" width="100%" align="center"  colspan="2"><font face="Arial" size="2">Cumulative performance till corresponding month of last year</font></td>
 
527
                                <td width="10%" style="border-style:solid; border-width:1; border-collapse: collapse; padding-left:3; padding-right:3; padding-top:0; padding-bottom:0" bordercolor="#111111" width="100%" align="center"  colspan="2"><font face="Arial" size="2">Cumulative performance till current month</font></td>
 
528
                                <td width="7%" style="border-style:solid; border-width:1; border-collapse: collapse; padding-left:3; padding-right:3; padding-top:0; padding-bottom:0" bordercolor="#111111" width="100%" align="center"><font face="Arial" size="2">Planned performance in current year</font></td>
 
529
                                </tr>
 
530
                   <%   
 
531
               flag = 1;
 
532
               }
 
533
            else
 
534
              { %>
 
535
                <br>
 
536
                        <table cellpadding="0" cellspacing="0" style="border-collapse: collapse; border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1; border-top-style: solid; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1;padding: 0" bordercolor="#111111" width="100%">  
 
537
              <%}   
 
538
               
 
539
                
 
540
                if(j==1) endcount = 11; 
 
541
                else if(j==2 || j==5) endcount = 30; 
 
542
                else if(j==4) endcount = 29;
 
543
                else if(j==6) endcount = 25;
 
544
                else endcount = 28;
 
545
                
 
546
                for(i=0;i<=endcount;i++)
 
547
                {       
 
548
             String id1="cell1"+k;
 
549
             String id2="cell2"+k;
 
550
            
 
551
             if((k>=23 && k<=34) || (k>=44 && k<=111))
 
552
              { 
 
553
                  if(k==23 || k==44) 
 
554
                        {
 
555
                        tempForentryNumberValues1= "<B>M</B>";
 
556
                        tempForentryValuesForLastYear1 = "<B>M</B>";
 
557
                        tempForcumentryValuesForLastYear1 = "<B>M</B>";
 
558
                        tempForcumentryValuesForCurYear1 = "<B>M</B>";
 
559
                      
 
560
                        tempForentryNumberValues2 = "<B>F</B>";
 
561
                        tempForentryValuesForLastYear2 = "<B>F</B>";
 
562
                        tempForcumentryValuesForLastYear2 = "<B>F</B>";
 
563
                        tempForcumentryValuesForCurYear2 = "<B>F</B>";                                                
 
564
                        
 
565
                        l=l+2;
 
566
                        }
 
567
                         else if(k==24 || k==27 || k==31 || k==45 || k==49 || k==50 || k==51 || k==61 || k==64 || k==65 || k==67 || k==69 || k==72 || (k>=76 && k<=78) || k==83 || k==88 || k==93 || k==98 || k==102 || k==106 || k==107) 
 
568
                        {
 
569
                        tempForentryNumberValues1= "";
 
570
                        tempForentryValuesForLastYear1 = "";
 
571
                        tempForcumentryValuesForLastYear1 = "";
 
572
                        tempForcumentryValuesForCurYear1 = "";
 
573
                      
 
574
                        tempForentryNumberValues2 = "";
 
575
                        tempForentryValuesForLastYear2 = "";
 
576
                        tempForcumentryValuesForLastYear2 = "";
 
577
                        tempForcumentryValuesForCurYear2 = "";                                                
 
578
                        
 
579
                        l=l+2;
 
580
                        }
 
581
                        
 
582
                          else
 
583
                        {
 
584
                                temp = entryNumberValues[l];
 
585
                                                if(temp==-1) tempForentryNumberValues1 = "";
 
586
                                else tempForentryNumberValues1 = ""+temp;
 
587
//tempForentryNumberValues1 = dataElementCodes[l];
 
588
                      
 
589
                                temp = entryValuesForLastYear[l];
 
590
                                                if(temp==-1) tempForentryValuesForLastYear1 = "";
 
591
                                else tempForentryValuesForLastYear1 = ""+temp;
 
592
 
 
593
                                                temp = cumentryValuesForLastYear[l];
 
594
                                                if(temp==-1) tempForcumentryValuesForLastYear1 = "";
 
595
                                                else tempForcumentryValuesForLastYear1 = ""+temp;
 
596
                     
 
597
                                                temp = cumentryValuesForCurYear[l];
 
598
                                                if(temp==-1) tempForcumentryValuesForCurYear1 = "";
 
599
                                                else tempForcumentryValuesForCurYear1 = ""+temp;
 
600
 
 
601
                                                l++;    
 
602
                     
 
603
                                                temp = entryNumberValues[l];
 
604
                                                if(temp==-1) tempForentryNumberValues2 = "";
 
605
                                else tempForentryNumberValues2 = ""+temp;
 
606
//tempForentryNumberValues2 = dataElementCodes[l];
 
607
                                
 
608
                     
 
609
                                temp = entryValuesForLastYear[l];
 
610
                                                if(temp==-1) tempForentryValuesForLastYear2 = "";
 
611
                                else tempForentryValuesForLastYear2 = ""+temp;
 
612
                     
 
613
                                                temp = cumentryValuesForLastYear[l];
 
614
                                                if(temp==-1) tempForcumentryValuesForLastYear2 = "";
 
615
                                                else tempForcumentryValuesForLastYear2 = ""+temp;
 
616
 
 
617
                                                temp = cumentryValuesForCurYear[l];
 
618
                                                if(temp==-1) tempForcumentryValuesForCurYear2 = "";
 
619
                                                else tempForcumentryValuesForCurYear2 = ""+temp;                     
 
620
                                                 
 
621
                                                l++;
 
622
 
 
623
                        }  // else block end
 
624
                        %>
 
625
                <tr>
 
626
                        <td id="<%=id1%>" name="<%=id1%>" width="3%" style="border-collapse: collapse; border-top-style: solid; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1; border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1; padding-bottom:0; " bordercolor="#111111" width="100%" align="left"></td>
 
627
                        <td id="<%=id2%>" name="<%=id2%>" width="50%" style="border-collapse: collapse; border-top-style: solid; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1; border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1; padding-bottom:0; " bordercolor="#111111" width="100%"></td>
 
628
                        <td width="5%" style="border-collapse: collapse; border-top-style: solid; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1; border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1; padding-bottom:0; " bordercolor="#111111" width="100%" align="center"><font face="Arial" size="2"><%=tempForentryValuesForLastYear1%></font></td>
 
629
                        <td width="5%" style="border-collapse: collapse; border-top-style: solid; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1; border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1; padding-bottom:0; " bordercolor="#111111" width="100%" align="center"><font face="Arial" size="2"><%=tempForentryValuesForLastYear2%></font></td>
 
630
                        <td width="5%" style="border-collapse: collapse; border-top-style: solid; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1; border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1; padding-bottom:0; " bordercolor="#111111" width="100%" align="center"><font face="Arial" size="2"><%=tempForentryNumberValues1%></font></td>
 
631
                        <td width="5%" style="border-collapse: collapse; border-top-style: solid; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1; border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1; padding-bottom:0; " bordercolor="#111111" width="100%" align="center"><font face="Arial" size="2"><%=tempForentryNumberValues2%></font></td>
 
632
                        <td width="5%" style="border-collapse: collapse; border-top-style: solid; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1; border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1; padding-bottom:0; " bordercolor="#111111" width="100%" align="center"><font face="Arial" size="2"><%=tempForcumentryValuesForLastYear1%></font></td>
 
633
                        <td width="5%" style="border-collapse: collapse; border-top-style: solid; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1; border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1; padding-bottom:0; " bordercolor="#111111" width="100%" align="center"><font face="Arial" size="2"><%=tempForcumentryValuesForLastYear2%></font></td>
 
634
                        <td width="5%" style="border-collapse: collapse; border-top-style: solid; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1; border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1; padding-bottom:0; " bordercolor="#111111" width="100%" align="center"><font face="Arial" size="2"><%=tempForcumentryValuesForCurYear1%></font></td>
 
635
                        <td width="5%" style="border-collapse: collapse; border-top-style: solid; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1; border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1; padding-bottom:0; " bordercolor="#111111" width="100%" align="center"><font face="Arial" size="2"><%=tempForcumentryValuesForCurYear2%></font></td>
 
636
                        <td width="7%" style="border-collapse: collapse; border-top-style: solid; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1; border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1; padding-bottom:0;" bordercolor="#111111" width="100%" align="center">&nbsp;</td>
 
637
                        </tr>
 
638
           <%   }
 
639
             else
 
640
              {  
 
641
                 if(k==0 || k==1 || k==6 || k==12 || k==13 || k==15 || k==22 || k==35 || k==36 || k==39 || k==43 || k==112 || k==113 || k==115 || k==118 || k==121 || k==124 || k==127 || k==133 || k==139 || k==140 || k==141 || k==149 || k==150 || (k>=155 && k<=158))
 
642
                  {
 
643
                        tempForentryNumberValues1 = "";
 
644
                        tempForentryValuesForLastYear1 = "";
 
645
                        tempForcumentryValuesForLastYear1  = "";
 
646
                        tempForcumentryValuesForCurYear1 = "";
 
647
                        
 
648
                        l++;
 
649
                  }
 
650
                 else 
 
651
                  {
 
652
                        temp =  entryNumberValues[l];
 
653
                        if(temp==-1) tempForentryNumberValues1 = "";
 
654
                        else tempForentryNumberValues1 = ""+temp;
 
655
//tempForentryNumberValues1 = dataElementCodes[l];
 
656
                        
 
657
                 
 
658
                        temp = entryValuesForLastYear[l];
 
659
                        if(temp==-1) tempForentryValuesForLastYear1 = "";
 
660
                        else tempForentryValuesForLastYear1 = ""+temp;
 
661
                 
 
662
                                temp = cumentryValuesForLastYear[l];
 
663
                                if(temp==-1) tempForcumentryValuesForLastYear1 = "";
 
664
                                else tempForcumentryValuesForLastYear1 = ""+temp;
 
665
 
 
666
                                temp = cumentryValuesForCurYear[l];
 
667
                                if(temp==-1) tempForcumentryValuesForCurYear1 = "";
 
668
                                else tempForcumentryValuesForCurYear1 = ""+temp;
 
669
                 
 
670
                                l++;
 
671
                         }      
 
672
               %>
 
673
                <tr>
 
674
                        <td id="<%=id1%>" name="<%=id1%>" width="3%" style="border-collapse: collapse; border-top-style: solid; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1; border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1; padding-bottom:0; " bordercolor="#111111" width="100%" align="left">&nbsp;</td>
 
675
                        <td id="<%=id2%>" name="<%=id2%>" width="50%" style="border-collapse: collapse; border-top-style: solid; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1; border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1; padding-bottom:0; " bordercolor="#111111" width="100%"></td>
 
676
                        <td width="10%" style="border-collapse: collapse; border-top-style: solid; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1; border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1; padding-bottom:0; " bordercolor="#111111" width="100%" align="center" colspan="2"><font face="Arial" size="2"><%=tempForentryValuesForLastYear1%></font></td>
 
677
                        <td width="10%" style="border-collapse: collapse; border-top-style: solid; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1; border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1; padding-bottom:0; " bordercolor="#111111" width="100%" align="center" colspan="2"><font face="Arial" size="2"><%=tempForentryNumberValues1%></font></td>
 
678
                        <td width="10%" style="border-collapse: collapse; border-top-style: solid; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1; border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1; padding-bottom:0; " bordercolor="#111111" width="100%" align="center" colspan="2"><font face="Arial" size="2"><%=tempForcumentryValuesForLastYear1%></font></td>
 
679
                        <td width="10%" style="border-collapse: collapse; border-top-style: solid; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1; border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1; padding-bottom:0; " bordercolor="#111111" width="100%" align="center" colspan="2"><font face="Arial" size="2"><%=tempForcumentryValuesForCurYear1%></font></td>
 
680
                                <td width="7%" style="border-collapse: collapse; border-top-style: solid; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1; border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1; padding-bottom:0; " bordercolor="#111111" width="100%" align="center"></td>
 
681
                        </tr>
 
682
                <% 
 
683
             }                     
 
684
                 k++;
 
685
                }               
 
686
                 j++;
 
687
                %>
 
688
                </table>
 
689
                <%
 
690
         }      
 
691
 %>
 
692
</BODY>
 
693
</HTML>
 
 
b'\\ No newline at end of file'