=== modified file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/reports/ReportService.java' --- local/in/dhis-in-api/src/main/java/org/hisp/dhis/reports/ReportService.java 2011-04-29 13:45:23 +0000 +++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/reports/ReportService.java 2011-05-18 11:56:37 +0000 @@ -34,6 +34,7 @@ import java.util.Map; import org.hisp.dhis.dataelement.DataElement; +import org.hisp.dhis.indicator.Indicator; import org.hisp.dhis.organisationunit.OrganisationUnit; import org.hisp.dhis.period.Period; import org.hisp.dhis.period.PeriodType; @@ -133,4 +134,13 @@ Map getResultDataValueFromAggregateTable( Integer orgunitId, String dataElmentIdsByComma, String periodIdsByComma ); Map getAggDataFromDataValueTable( String orgUnitIdsByComma, String dataElmentIdsByComma, String periodsByComma ); + + String getDataelementIds( List reportDesignList ); + + String getAggVal( String expression, Map aggDeMap ); + + Map> getIndicatorDataValueFromAggregateTable( Integer orgunitId, String indicatorIdsByComma, Integer periodId ); + + double getIndividualIndicatorValue( Indicator indicator, OrganisationUnit orgunit, Date startDate, Date endDate ); + } === modified file 'local/in/dhis-in-services/dhis-in-service-reports/src/main/java/org/hisp/dhis/reports/DefaultReportService.java' --- local/in/dhis-in-services/dhis-in-service-reports/src/main/java/org/hisp/dhis/reports/DefaultReportService.java 2011-04-29 13:45:23 +0000 +++ local/in/dhis-in-services/dhis-in-service-reports/src/main/java/org/hisp/dhis/reports/DefaultReportService.java 2011-05-18 11:56:37 +0000 @@ -1239,7 +1239,7 @@ { int deFlag1 = 0; int deFlag2 = 0; - + try { Pattern pattern = Pattern.compile( "(\\[\\d+\\.\\d+\\])" ); @@ -1803,6 +1803,7 @@ } } + public Map getAggDataFromDataValueTable( String orgUnitIdsByComma, String dataElmentIdsByComma, String periodIdsByComma ) { Map aggDeMap = new HashMap(); @@ -1833,7 +1834,7 @@ throw new RuntimeException( "Illegal DataElement id", e ); } } - + public String getResultDataValueFromAggregateTable( String formula, String periodIdsByComma, Integer orgunitId ) { try @@ -2024,4 +2025,180 @@ return ""+recordCount; } + + public String getDataelementIds( List reportDesignList ) + { + String dataElmentIdsByComma = "-1"; + for( Report_inDesign report_inDesign : reportDesignList ) + { + String formula = report_inDesign.getExpression(); + try + { + Pattern pattern = Pattern.compile( "(\\[\\d+\\.\\d+\\])" ); + + Matcher matcher = pattern.matcher( formula ); + StringBuffer buffer = new StringBuffer(); + + while ( matcher.find() ) + { + String replaceString = matcher.group(); + + replaceString = replaceString.replaceAll( "[\\[\\]]", "" ); + replaceString = replaceString.substring( 0, replaceString.indexOf( '.' ) ); + + int dataElementId = Integer.parseInt( replaceString ); + dataElmentIdsByComma += "," + dataElementId; + replaceString = ""; + matcher.appendReplacement( buffer, replaceString ); + } + } + catch( Exception e ) + { + + } + } + + return dataElmentIdsByComma; + } + + public String getAggVal( String expression, Map aggDeMap ) + { + try + { + Pattern pattern = Pattern.compile( "(\\[\\d+\\.\\d+\\])" ); + + Matcher matcher = pattern.matcher( expression ); + StringBuffer buffer = new StringBuffer(); + + String resultValue = ""; + + while ( matcher.find() ) + { + String replaceString = matcher.group(); + + replaceString = replaceString.replaceAll( "[\\[\\]]", "" ); + + replaceString = aggDeMap.get( replaceString ); + + if( replaceString == null ) + { + replaceString = "0"; + } + + matcher.appendReplacement( buffer, replaceString ); + + resultValue = replaceString; + } + + matcher.appendTail( buffer ); + + double d = 0.0; + try + { + d = MathUtils.calculateExpression( buffer.toString() ); + } + catch ( Exception e ) + { + d = 0.0; + resultValue = ""; + } + + resultValue = "" + (double) d; + + return resultValue; + } + catch ( NumberFormatException ex ) + { + throw new RuntimeException( "Illegal DataElement id", ex ); + } + } + + public Map> getIndicatorDataValueFromAggregateTable( Integer orgunitId, String indicatorIdsByComma, Integer periodId ) + { + Map> aggIndicatorMap = new HashMap>(); + try + { + String query = "SELECT indicatorid, numeratorvalue, denominatorvalue FROM aggregatedindicatorvalue " + + " WHERE indicatorid IN (" + indicatorIdsByComma + " ) AND "+ + " organisationunitid = "+ orgunitId +" AND "+ + " periodid = " + periodId; + + SqlRowSet rs = jdbcTemplate.queryForRowSet( query ); + + while ( rs.next() ) + { + Integer indicatorId = rs.getInt( 1 ); + Double aggregatedIndicatorValue = rs.getDouble( 2 ); + Double aggNumeratorValue = rs.getDouble( 3 ); + Double aggDenominatorValue = rs.getDouble( 4 ); + + List tempList = new ArrayList(); + if( aggregatedIndicatorValue != null ) + { + tempList.add( ""+aggregatedIndicatorValue ); + tempList.add( ""+aggNumeratorValue ); + tempList.add( ""+aggDenominatorValue ); + + aggIndicatorMap.put( ""+indicatorId, tempList ); + } + } + + return aggIndicatorMap; + } + catch( Exception e ) + { + throw new RuntimeException( "Illegal DataElement id", e ); + } + } + + public double getIndividualIndicatorValue( Indicator indicator, OrganisationUnit orgunit, Date startDate, Date endDate ) + { + String numeratorExp = indicator.getNumerator(); + String denominatorExp = indicator.getDenominator(); + int indicatorFactor = indicator.getIndicatorType().getFactor(); + String reportModelTB = ""; + String numeratorVal = getIndividualResultDataValue( numeratorExp, startDate, endDate, orgunit, reportModelTB ); + String denominatorVal = getIndividualResultDataValue( denominatorExp, startDate, endDate, orgunit, reportModelTB ); + + double numeratorValue; + try + { + numeratorValue = Double.parseDouble( numeratorVal ); + } + catch ( Exception e ) + { + numeratorValue = 0.0; + } + + double denominatorValue; + try + { + denominatorValue = Double.parseDouble( denominatorVal ); + } + catch ( Exception e ) + { + denominatorValue = 1.0; + } + + double aggregatedValue; + try + { + if( denominatorValue == 0 ) + { + aggregatedValue = 0.0; + } + else + { + aggregatedValue = ( numeratorValue / denominatorValue ) * indicatorFactor; + } + } + catch ( Exception e ) + { + System.out.println( "Exception while calculating Indicator value for Indicaotr " + indicator.getName() ); + aggregatedValue = 0.0; + } + + return aggregatedValue; + } + } === modified file 'local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/aggregation/action/GenerateAggregationReportAnalyserResultAction.java' --- local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/aggregation/action/GenerateAggregationReportAnalyserResultAction.java 2011-04-15 11:39:32 +0000 +++ local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/aggregation/action/GenerateAggregationReportAnalyserResultAction.java 2011-05-18 11:56:37 +0000 @@ -1,6 +1,7 @@ package org.hisp.dhis.reports.aggregation.action; import static org.hisp.dhis.system.util.ConversionUtils.getIdentifiers; +import static org.hisp.dhis.system.util.TextUtils.getCommaDelimitedString; import java.io.BufferedInputStream; import java.io.File; @@ -12,8 +13,10 @@ import java.util.Collection; import java.util.Collections; import java.util.Date; +import java.util.HashMap; import java.util.Iterator; import java.util.List; +import java.util.Map; import java.util.UUID; import jxl.CellType; @@ -144,14 +147,7 @@ { this.endDate = endDate; } -/* - private String aggCB; - public void setAggCB( String aggCB ) - { - this.aggCB = aggCB; - } -*/ private String periodTypeId; public void setPeriodTypeId( String periodTypeId ) @@ -159,6 +155,13 @@ this.periodTypeId = periodTypeId; } + private String aggData; + + public void setAggData( String aggData ) + { + this.aggData = aggData; + } + private String reportModelTB; private List orgUnitList; @@ -177,18 +180,10 @@ private Integer monthCount; - private String aggData; - - public void setAggData( String aggData ) - { - this.aggData = aggData; - } - // ------------------------------------------------------------------------- // Action implementation // ------------------------------------------------------------------------- - public String execute() - throws Exception + public String execute() throws Exception { statementManager.initialise(); @@ -238,8 +233,11 @@ System.out.println( orgUnitList.get( 0 ).getName()+ " : " + selReportObj.getName()+" : Report Generation Start Time is : " + new Date() ); sDate = format.parseDate( startDate ); - eDate = format.parseDate( endDate ); + + List periodList = new ArrayList( periodService.getIntersectingPeriods( sDate, eDate ) ); + Collection periodIds = new ArrayList( getIdentifiers(Period.class, periodList ) ); + String periodIdsByComma = getCommaDelimitedString( periodIds ); Calendar tempStartDate = Calendar.getInstance(); Calendar tempEndDate = Calendar.getInstance(); @@ -252,15 +250,33 @@ // Getting DataValues List reportDesignList = reportService.getReportDesign( deCodesXMLFileName ); + String dataElmentIdsByComma = reportService.getDataelementIds( reportDesignList ); + int orgUnitCount = 0; - Iterator it = orgUnitList.iterator(); while ( it.hasNext() ) { OrganisationUnit currentOrgUnit = (OrganisationUnit) it.next(); + Map aggDeMap = new HashMap(); + if( aggData.equalsIgnoreCase( USEEXISTINGAGGDATA ) ) + { + aggDeMap.putAll( reportService.getResultDataValueFromAggregateTable( currentOrgUnit.getId(), dataElmentIdsByComma, periodIdsByComma ) ); + } + else if( aggData.equalsIgnoreCase( GENERATEAGGDATA ) ) + { + List childOrgUnitTree = new ArrayList( organisationUnitService.getOrganisationUnitWithChildren( currentOrgUnit.getId() ) ); + List childOrgUnitTreeIds = new ArrayList( getIdentifiers( OrganisationUnit.class, childOrgUnitTree ) ); + String childOrgUnitsByComma = getCommaDelimitedString( childOrgUnitTreeIds ); + + aggDeMap.putAll( reportService.getAggDataFromDataValueTable( childOrgUnitsByComma, dataElmentIdsByComma, periodIdsByComma ) ); + } + else if( aggData.equalsIgnoreCase( USECAPTUREDDATA ) ) + { + aggDeMap.putAll( reportService.getAggDataFromDataValueTable( ""+currentOrgUnit.getId(), dataElmentIdsByComma, periodIdsByComma ) ); + } + int count1 = 0; - Iterator reportDesignIterator = reportDesignList.iterator(); while ( reportDesignIterator.hasNext() ) { @@ -655,17 +671,18 @@ { if( aggData.equalsIgnoreCase( USECAPTUREDDATA ) ) { - tempStr = reportService.getIndividualResultDataValue(deCodeString, sDate, eDate, currentOrgUnit, reportModelTB ); + tempStr = reportService.getAggVal( deCodeString, aggDeMap ); + //tempStr = reportService.getIndividualResultDataValue(deCodeString, sDate, eDate, currentOrgUnit, reportModelTB ); } else if( aggData.equalsIgnoreCase( GENERATEAGGDATA ) ) { - tempStr = reportService.getResultDataValue( deCodeString, sDate, eDate, currentOrgUnit, reportModelTB ); + tempStr = reportService.getAggVal( deCodeString, aggDeMap ); + //tempStr = reportService.getResultDataValue( deCodeString, sDate, eDate, currentOrgUnit, reportModelTB ); } else if( aggData.equalsIgnoreCase( USEEXISTINGAGGDATA ) ) { - List periodList = new ArrayList( periodService.getPeriodsBetweenDates( sDate, eDate ) ); - Collection periodIds = new ArrayList( getIdentifiers(Period.class, periodList ) ); - tempStr = reportService.getResultDataValueFromAggregateTable( deCodeString, periodIds, currentOrgUnit, reportModelTB ); + tempStr = reportService.getAggVal( deCodeString, aggDeMap ); + //tempStr = reportService.getResultDataValueFromAggregateTable( deCodeString, periodIds, currentOrgUnit, reportModelTB ); } } else === modified file 'local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/csreview/action/GenerateCSReviewReportResultAction.java' --- local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/csreview/action/GenerateCSReviewReportResultAction.java 2011-04-29 13:45:23 +0000 +++ local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/csreview/action/GenerateCSReviewReportResultAction.java 2011-05-18 11:56:37 +0000 @@ -238,7 +238,7 @@ // Getting DeCodes List reportDesignList = reportService.getReportDesign( deCodesXMLFileName ); - String dataElmentIdsByComma = getDataelementIds( reportDesignList ); + String dataElmentIdsByComma = reportService.getDataelementIds( reportDesignList ); //List deCodesList = getDECodes( deCodesXMLFileName ); // Getting Exel Template === modified file 'local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/ed/action/EDReportFormAction.java' --- local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/ed/action/EDReportFormAction.java 2010-08-28 10:15:38 +0000 +++ local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/ed/action/EDReportFormAction.java 2011-05-18 11:56:37 +0000 @@ -7,6 +7,9 @@ import java.util.Iterator; import java.util.List; +import org.hisp.dhis.indicator.IndicatorGroup; +import org.hisp.dhis.indicator.IndicatorService; +import org.hisp.dhis.indicator.comparator.IndicatorGroupNameComparator; import org.hisp.dhis.period.MonthlyPeriodType; import org.hisp.dhis.period.Period; import org.hisp.dhis.period.PeriodService; @@ -28,7 +31,13 @@ { this.periodService = periodService; } + + private IndicatorService indicatorService ; + public void setIndicatorService( IndicatorService indicatorService ) + { + this.indicatorService = indicatorService; + } // ------------------------------------------------------------------------- // Getter & Setter // ------------------------------------------------------------------------- @@ -46,7 +55,14 @@ { return simpleDateFormat; } - + + private List indicatorGroups; + + public List getIndicatorGroups() + { + return indicatorGroups; + } + // ------------------------------------------------------------------------- // Action implementation // ------------------------------------------------------------------------- @@ -54,6 +70,11 @@ public String execute() throws Exception { + //Indicator Group + indicatorGroups = new ArrayList( indicatorService.getAllIndicatorGroups()) ; + Collections.sort( indicatorGroups, new IndicatorGroupNameComparator() ); + + //period information periods = new ArrayList( periodService.getPeriodsByPeriodType( new MonthlyPeriodType() ) ); Iterator periodIterator = periods.iterator(); === modified file 'local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/ed/action/EDReportResultAction.java' --- local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/ed/action/EDReportResultAction.java 2011-04-15 11:39:32 +0000 +++ local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/ed/action/EDReportResultAction.java 2011-05-18 11:56:37 +0000 @@ -1,14 +1,22 @@ package org.hisp.dhis.reports.ed.action; +import static org.hisp.dhis.system.util.ConversionUtils.getIdentifiers; +import static org.hisp.dhis.system.util.TextUtils.getCommaDelimitedString; + import java.io.BufferedInputStream; import java.io.File; import java.io.FileInputStream; import java.io.InputStream; import java.text.SimpleDateFormat; import java.util.ArrayList; +import java.util.Collection; import java.util.Collections; +import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.UUID; +import java.util.regex.Matcher; +import java.util.regex.Pattern; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; @@ -31,11 +39,11 @@ import org.hisp.dhis.indicator.IndicatorGroup; import org.hisp.dhis.indicator.IndicatorService; import org.hisp.dhis.organisationunit.OrganisationUnit; -import org.hisp.dhis.organisationunit.OrganisationUnitService; import org.hisp.dhis.organisationunit.comparator.OrganisationUnitShortNameComparator; import org.hisp.dhis.period.Period; import org.hisp.dhis.period.PeriodService; import org.hisp.dhis.reports.ReportService; +import org.hisp.dhis.user.CurrentUserService; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; @@ -48,6 +56,14 @@ public class EDReportResultAction implements Action { + + private final String GENERATEAGGDATA = "generateaggdata"; + + private final String USEEXISTINGAGGDATA = "useexistingaggdata"; + + private final String USECAPTUREDDATA = "usecaptureddata"; + + // ------------------------------------------------------------------------- // Dependencies // ------------------------------------------------------------------------- @@ -65,13 +81,6 @@ this.periodService = periodService; } - private OrganisationUnitService organisationUnitService; - - public void setOrganisationUnitService( OrganisationUnitService organisationUnitService ) - { - this.organisationUnitService = organisationUnitService; - } - private IndicatorService indicatorService; public void setIndicatorService( IndicatorService indicatorService ) @@ -92,6 +101,13 @@ { this.reportService = reportService; } + + private CurrentUserService currentUserService; + + public void setCurrentUserService( CurrentUserService currentUserService ) + { + this.currentUserService = currentUserService; + } // ------------------------------------------------------------------------- // Getter & Setter @@ -124,8 +140,23 @@ this.selectedEndPeriodId = selectedEndPeriodId; } + private Integer indicatorGroupId; + + public void setIndicatorGroupId( Integer indicatorGroupId ) + { + this.indicatorGroupId = indicatorGroupId; + } + private String raFolderName; - + + private String aggData; + + public void setAggData( String aggData ) + { + this.aggData = aggData; + } + + private List orgUnitList; // ------------------------------------------------------------------------- // Action implementation // ------------------------------------------------------------------------- @@ -134,37 +165,20 @@ throws Exception { statementManager.initialise(); - + + orgUnitList = new ArrayList(); raFolderName = reportService.getRAFolderName(); SimpleDateFormat simpleDateFormat = new SimpleDateFormat( "MMM-yy" ); - List headerInfo = getInfoFromXMLForEDReport(); - - String outputReportPath = System.getenv( "DHIS2_HOME" ) + File.separator + raFolderName + File.separator - + "output" + File.separator + UUID.randomUUID().toString() + ".xls"; + String outputReportPath = System.getenv( "DHIS2_HOME" ) + File.separator + raFolderName + File.separator + "output" + File.separator + UUID.randomUUID().toString() + ".xls"; WritableWorkbook outputReportWorkbook = Workbook.createWorkbook( new File( outputReportPath ) ); WritableSheet sheet0 = outputReportWorkbook.createSheet( "EDReport", 0 ); - - if ( headerInfo == null || headerInfo.size() == 0 ) - { - System.out.println( "There is problem with report xml file, please check" ); - sheet0.addCell( new Label( 2, 2, "There is problem with report xml file, please check", getCellFormat2() ) ); - outputReportWorkbook.write(); - outputReportWorkbook.close(); - - fileName = "EDReport.xls"; - File outputReportFile = new File( outputReportPath ); - inputStream = new BufferedInputStream( new FileInputStream( outputReportFile ) ); - - outputReportFile.deleteOnExit(); - statementManager.destroy(); - return SUCCESS; - } - + + // Period Info Period selectedStartPeriod = periodService.getPeriod( selectedStartPeriodId ); Period selectedEndPeriod = periodService.getPeriod( selectedEndPeriodId ); - + if ( selectedStartPeriod == null || selectedEndPeriod == null ) { System.out.println( "There is no period with that id" ); @@ -172,7 +186,7 @@ outputReportWorkbook.write(); outputReportWorkbook.close(); - fileName = "EDReport.xls"; + fileName = "IndicatorReport.xls"; File outputReportFile = new File( outputReportPath ); inputStream = new BufferedInputStream( new FileInputStream( outputReportFile ) ); @@ -181,17 +195,34 @@ return SUCCESS; } - // HardCoded with Bihar State OrgUnitId - 7 - OrganisationUnit selectedOrgUnit = organisationUnitService.getOrganisationUnit( headerInfo.get( 0 ) ); + List periodList = new ArrayList( periodService.getIntersectingPeriods( selectedStartPeriod.getStartDate(), selectedEndPeriod.getEndDate() ) ); + Collection periodIds = new ArrayList( getIdentifiers(Period.class, periodList ) ); + String periodIdsByComma = getCommaDelimitedString( periodIds ); - if ( selectedOrgUnit == null ) - { - System.out.println( "There is no orgunit with that id" ); - sheet0.addCell( new Label( 2, 2, "There is no orgunit with that id", getCellFormat2() ) ); + + List curUserRootOrgUnitList = new ArrayList( currentUserService.getCurrentUser().getOrganisationUnits() ); + String orgUnitName = ""; + + if ( curUserRootOrgUnitList != null && curUserRootOrgUnitList.size() > 0 ) + { + for ( OrganisationUnit orgUnit : curUserRootOrgUnitList ) + { + orgUnitName += orgUnit.getName() + ", "; + List childList = new ArrayList( orgUnit.getChildren() ); + Collections.sort( childList, new OrganisationUnitShortNameComparator() ); + orgUnitList.addAll( childList ); + orgUnitList.add( orgUnit ); + } + } + + if ( curUserRootOrgUnitList == null || curUserRootOrgUnitList.size() == 0 ) + { + System.out.println( "There is no orgunit with that User" ); + sheet0.addCell( new Label( 2, 2, "There is no orgunit with that User", getCellFormat2() ) ); outputReportWorkbook.write(); outputReportWorkbook.close(); - fileName = "EDReport.xls"; + fileName = "IndicatorReport.xls"; File outputReportFile = new File( outputReportPath ); inputStream = new BufferedInputStream( new FileInputStream( outputReportFile ) ); @@ -201,13 +232,8 @@ return SUCCESS; } - List orgUnitList = new ArrayList( selectedOrgUnit.getChildren() ); - Collections.sort( orgUnitList, new OrganisationUnitShortNameComparator() ); - orgUnitList.add( selectedOrgUnit ); - - // HardCoded with ED IndicatorGroup - 12 - IndicatorGroup selectedIndicatorGroup = indicatorService.getIndicatorGroup( headerInfo.get( 1 ) ); - + IndicatorGroup selectedIndicatorGroup = indicatorService.getIndicatorGroup( indicatorGroupId ); + if ( selectedIndicatorGroup == null ) { System.out.println( "There is no IndicatorGroup with that id" ); @@ -215,7 +241,7 @@ outputReportWorkbook.write(); outputReportWorkbook.close(); - fileName = "EDReport.xls"; + fileName = "IndicatorReport.xls"; File outputReportFile = new File( outputReportPath ); inputStream = new BufferedInputStream( new FileInputStream( outputReportFile ) ); @@ -226,7 +252,8 @@ } List indicators = new ArrayList( selectedIndicatorGroup.getMembers() ); - + String dataElmentIdsByComma = getDataelementIds( indicators ); + int rowCount = 4; int colCount = 0; @@ -243,12 +270,10 @@ sheet0.addCell( new Label( colCount++, rowCount + 1, "Numerator", getCellFormat1() ) ); sheet0.addCell( new Label( colCount++, rowCount + 1, "Denominator", getCellFormat1() ) ); sheet0.addCell( new Label( colCount++, rowCount + 1, "Indicator", getCellFormat1() ) ); - - // colCount += 3; } // Printing Main Header Info - String mainHeaderInfo = "Key Indicator Analysis - " + selectedOrgUnit.getName() + " From : " + String mainHeaderInfo = "Indicator Group Name - " + selectedIndicatorGroup.getName() + " ,OrgUnit Name is "+ orgUnitName + " From : " + simpleDateFormat.format( selectedStartPeriod.getStartDate() ) + " To : " + simpleDateFormat.format( selectedEndPeriod.getStartDate() ); sheet0.mergeCells( 0, 1, colCount - 1, 1 ); @@ -259,7 +284,12 @@ for ( OrganisationUnit ou : orgUnitList ) { colCount = 0; - + Map aggDeMap = new HashMap(); + if( aggData.equalsIgnoreCase( USEEXISTINGAGGDATA ) ) + { + aggDeMap.putAll( reportService.getResultDataValueFromAggregateTable( ou.getId(), dataElmentIdsByComma, periodIdsByComma ) ); + } + if ( slno != orgUnitList.size() ) { sheet0.addCell( new Number( colCount++, rowCount, slno, getCellFormat2() ) ); @@ -272,12 +302,78 @@ for ( Indicator indicator : indicators ) { - Double numValue = aggregationService.getAggregatedNumeratorValue( indicator, selectedStartPeriod - .getStartDate(), selectedEndPeriod.getEndDate(), ou ); - Double denValue = aggregationService.getAggregatedDenominatorValue( indicator, selectedStartPeriod - .getStartDate(), selectedEndPeriod.getEndDate(), ou ); - Double indValue = aggregationService.getAggregatedIndicatorValue( indicator, selectedStartPeriod - .getStartDate(), selectedEndPeriod.getEndDate(), ou ); + Double numValue = 0.0; + Double denValue = 0.0; + Double indValue = 0.0; + + if( aggData.equalsIgnoreCase( GENERATEAGGDATA ) ) + { + numValue = aggregationService.getAggregatedNumeratorValue( indicator, selectedStartPeriod.getStartDate(), selectedEndPeriod.getEndDate(), ou ); + denValue = aggregationService.getAggregatedDenominatorValue( indicator, selectedStartPeriod.getStartDate(), selectedEndPeriod.getEndDate(), ou ); + indValue = aggregationService.getAggregatedIndicatorValue( indicator, selectedStartPeriod.getStartDate(), selectedEndPeriod.getEndDate(), ou ); + } + else if ( aggData.equalsIgnoreCase( USECAPTUREDDATA ) ) + { + indValue = reportService.getIndividualIndicatorValue( indicator, ou, selectedStartPeriod.getStartDate(), selectedEndPeriod.getEndDate() ); + + String tempStr = reportService.getIndividualResultDataValue( indicator.getNumerator(), selectedStartPeriod.getStartDate(), selectedEndPeriod.getEndDate(), ou, "" ); + + try + { + numValue = Double.parseDouble( tempStr ); + } + catch ( Exception e ) + { + numValue = 0.0; + } + + tempStr = reportService.getIndividualResultDataValue( indicator.getDenominator(), selectedStartPeriod.getStartDate(), selectedEndPeriod.getEndDate(), ou, "" ); + + try + { + denValue = Double.parseDouble( tempStr ); + } + catch ( Exception e ) + { + denValue = 0.0; + } + } + else if ( aggData.equalsIgnoreCase( USEEXISTINGAGGDATA ) ) + { + try + { + numValue = Double.parseDouble( reportService.getAggVal( indicator.getNumerator(), aggDeMap ) ); + } + catch( Exception e ) + { + numValue = 0.0; + } + + try + { + denValue = Double.parseDouble( reportService.getAggVal( indicator.getDenominator(), aggDeMap ) ); + } + catch( Exception e ) + { + denValue = 0.0; + } + + try + { + if( denValue != 0.0 ) + { + indValue = ( numValue / denValue ) * indicator.getIndicatorType().getFactor(); + } + else + { + indValue = 0.0; + } + } + catch( Exception e ) + { + indValue = 0.0; + } + } if ( indValue == null ) indValue = 0.0; @@ -333,9 +429,15 @@ outputReportWorkbook.write(); outputReportWorkbook.close(); - fileName = "EDReport_" + simpleDateFormat.format( selectedStartPeriod.getStartDate() ) + "_" - + simpleDateFormat.format( selectedEndPeriod.getStartDate() ) + ".xls"; + + fileName = "IndicatorReport_" + orgUnitName + "_" + simpleDateFormat.format( selectedStartPeriod.getStartDate() ) + "_" + simpleDateFormat.format( selectedEndPeriod.getStartDate() ) + ".xls"; + fileName = fileName.replaceAll( " ", "" ); + fileName = fileName.replaceAll( ",", "_" ); + File outputReportFile = new File( outputReportPath ); + + System.out.println( fileName ); + inputStream = new BufferedInputStream( new FileInputStream( outputReportFile ) ); outputReportFile.deleteOnExit(); @@ -447,5 +549,40 @@ return wCellformat; } + + public String getDataelementIds( List indicatorList ) + { + String dataElmentIdsByComma = "-1"; + for( Indicator indicator : indicatorList ) + { + String formula = indicator.getNumerator() + " + " + indicator.getDenominator(); + try + { + Pattern pattern = Pattern.compile( "(\\[\\d+\\.\\d+\\])" ); + + Matcher matcher = pattern.matcher( formula ); + StringBuffer buffer = new StringBuffer(); + + while ( matcher.find() ) + { + String replaceString = matcher.group(); + + replaceString = replaceString.replaceAll( "[\\[\\]]", "" ); + replaceString = replaceString.substring( 0, replaceString.indexOf( '.' ) ); + + int dataElementId = Integer.parseInt( replaceString ); + dataElmentIdsByComma += "," + dataElementId; + replaceString = ""; + matcher.appendReplacement( buffer, replaceString ); + } + } + catch( Exception e ) + { + + } + } + + return dataElmentIdsByComma; + } } === modified file 'local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/meta/action/GenerateMetaDataReportResultAction.java' --- local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/meta/action/GenerateMetaDataReportResultAction.java 2011-04-15 11:53:12 +0000 +++ local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/meta/action/GenerateMetaDataReportResultAction.java 2011-05-18 11:56:37 +0000 @@ -456,6 +456,10 @@ sheet0.addCell( new Label( colStart + 6, rowStart, "DataElementShortName", getCellFormat1() ) ); sheet0.addCell( new Label( colStart + 7, rowStart, "DataElementType", getCellFormat1() ) ); sheet0.addCell( new Label( colStart + 8, rowStart, "DataElementUrl", getCellFormat1() ) ); + sheet0.addCell( new Label( colStart + 9, rowStart, "DomainType", getCellFormat1() ) ); + sheet0.addCell( new Label( colStart + 10, rowStart, "NumberType", getCellFormat1() ) ); + sheet0.addCell( new Label( colStart + 11, rowStart, "PeriodType", getCellFormat1() ) ); + sheet0.addCell( new Label( colStart + 12, rowStart, "LastUpdated", getCellFormat1() ) ); } } @@ -483,7 +487,50 @@ sheet0.addCell( new Label( colStart + 6, rowStart, dataElement.getShortName(), wCellformat ) ); sheet0.addCell( new Label( colStart + 7, rowStart, dataElement.getType(), wCellformat ) ); sheet0.addCell( new Label( colStart + 8, rowStart, dataElement.getUrl(), wCellformat ) ); + + String domainType = new String(); + if ( dataElement.getDomainType() != null ) + { + domainType = dataElement.getDomainType(); + } + else + { + domainType = ""; + } + sheet0.addCell( new Label( colStart + 9, rowStart, domainType, wCellformat ) ); + + String numberType = new String(); + if ( dataElement.getNumberType() != null ) + { + numberType = dataElement.getNumberType(); + } + else + { + numberType = ""; + } + sheet0.addCell( new Label( colStart + 10, rowStart, numberType, wCellformat ) ); + String periodType = new String(); + if ( dataElement.getPeriodType() != null ) + { + periodType = dataElement.getPeriodType().getName(); + } + else + { + periodType = ""; + } + sheet0.addCell( new Label( colStart + 11, rowStart, periodType, wCellformat ) ); + + String lastUpdate = new String(); + if ( dataElement.getLastUpdated() != null ) + { + lastUpdate = dataElement.getLastUpdated().toString(); + } + else + { + lastUpdate = ""; + } + sheet0.addCell( new Label( colStart + 12, rowStart, lastUpdate, wCellformat ) ); } } @@ -491,7 +538,7 @@ rowStart++; } - + outputReportWorkbook.write(); outputReportWorkbook.close(); @@ -545,6 +592,10 @@ sheet0.addCell( new Label( colStart + 6, rowStart, "DataElementShortName", getCellFormat1() ) ); sheet0.addCell( new Label( colStart + 7, rowStart, "DataElementType", getCellFormat1() ) ); sheet0.addCell( new Label( colStart + 8, rowStart, "DataElementUrl", getCellFormat1() ) ); + sheet0.addCell( new Label( colStart + 9, rowStart, "DomainType", getCellFormat1() ) ); + sheet0.addCell( new Label( colStart + 10, rowStart, "NumberType", getCellFormat1() ) ); + sheet0.addCell( new Label( colStart + 11, rowStart, "PeriodType", getCellFormat1() ) ); + sheet0.addCell( new Label( colStart + 12, rowStart, "LastUpdated", getCellFormat1() ) ); } } @@ -566,7 +617,7 @@ if ( incID.equalsIgnoreCase( PRINT ) ) { - sheet0.mergeCells( colStart + 1, rowStart, colStart + 8, rowStart ); + sheet0.mergeCells( colStart + 1, rowStart, colStart + 12, rowStart ); } rowStart++; @@ -596,6 +647,50 @@ sheet0.addCell( new Label( colStart + 6, rowStart, dataElement.getShortName(), wCellformat ) ); sheet0.addCell( new Label( colStart + 7, rowStart, dataElement.getType(), wCellformat ) ); sheet0.addCell( new Label( colStart + 8, rowStart, dataElement.getUrl(), wCellformat ) ); + + String domainType = new String(); + if ( dataElement.getDomainType() != null ) + { + domainType = dataElement.getDomainType(); + } + else + { + domainType = ""; + } + sheet0.addCell( new Label( colStart + 9, rowStart, domainType, wCellformat ) ); + + String numberType = new String(); + if ( dataElement.getNumberType() != null ) + { + numberType = dataElement.getNumberType(); + } + else + { + numberType = ""; + } + sheet0.addCell( new Label( colStart + 10, rowStart, numberType, wCellformat ) ); + + String periodType = new String(); + if ( dataElement.getPeriodType() != null ) + { + periodType = dataElement.getPeriodType().getName(); + } + else + { + periodType = ""; + } + sheet0.addCell( new Label( colStart + 11, rowStart, periodType, wCellformat ) ); + + String lastUpdate = new String(); + if ( dataElement.getLastUpdated() != null ) + { + lastUpdate = dataElement.getLastUpdated().toString(); + } + else + { + lastUpdate = ""; + } + sheet0.addCell( new Label( colStart + 12, rowStart, lastUpdate, wCellformat ) ); } } @@ -656,6 +751,11 @@ sheet0.addCell( new Label( colStart + 6, rowStart, "organisationUnitCode", getCellFormat1() ) ); sheet0.addCell( new Label( colStart + 7, rowStart, "organisationUnitUrl", getCellFormat1() ) ); sheet0.addCell( new Label( colStart + 8, rowStart, "Last Updated", getCellFormat1() ) ); + sheet0.addCell( new Label( colStart + 9, rowStart, "Contact Person", getCellFormat1() ) ); + sheet0.addCell( new Label( colStart + 10, rowStart, "Phone Number", getCellFormat1() ) ); + sheet0.addCell( new Label( colStart + 11, rowStart, "Email", getCellFormat1() ) ); + sheet0.addCell( new Label( colStart + 12, rowStart, "Comment", getCellFormat1() ) ); + sheet0.addCell( new Label( colStart + 13, rowStart, "Coordinates", getCellFormat1() ) ); } } @@ -677,7 +777,7 @@ if ( incID.equalsIgnoreCase( PRINT ) ) { - sheet0.mergeCells( colStart + 1, rowStart, colStart + 8, rowStart ); + sheet0.mergeCells( colStart + 1, rowStart, colStart + 13, rowStart ); } rowStart++; @@ -748,6 +848,62 @@ lastUpdate = ""; } sheet0.addCell( new Label( colStart + 8, rowStart, lastUpdate, wCellformat ) ); + + String contactPerson = new String(); + if ( organisationUnit.getContactPerson() != null ) + { + contactPerson = organisationUnit.getContactPerson(); + } + else + { + contactPerson = ""; + } + sheet0.addCell( new Label( colStart + 9, rowStart, contactPerson, wCellformat ) ); + + String phoneNumber = new String(); + if( organisationUnit.getPhoneNumber() != null ) + { + phoneNumber = organisationUnit.getPhoneNumber(); + } + else + { + phoneNumber = ""; + } + sheet0.addCell( new Label( colStart + 10, rowStart, phoneNumber, wCellformat ) ); + + String email = new String(); + if( organisationUnit.getEmail() != null ) + { + email = organisationUnit.getEmail(); + } + else + { + email = ""; + } + sheet0.addCell( new Label( colStart + 11, rowStart, email, wCellformat ) ); + + String comment = new String(); + if( organisationUnit.getComment() != null ) + { + comment = organisationUnit.getComment(); + } + else + { + comment = ""; + } + sheet0.addCell( new Label( colStart + 12, rowStart, comment, wCellformat ) ); + + String coordinates = new String(); + if( organisationUnit.getCoordinates() != null ) + { + coordinates = organisationUnit.getCoordinates(); + } + else + { + coordinates = ""; + } + sheet0.addCell( new Label( colStart + 13, rowStart, coordinates, wCellformat ) ); + } else { @@ -902,6 +1058,8 @@ sheet0.addCell( new Label( colStart + 9, rowStart, "Contact Person", getCellFormat1() ) ); sheet0.addCell( new Label( colStart + 10, rowStart, "Phone Number", getCellFormat1() ) ); sheet0.addCell( new Label( colStart + 11, rowStart, "Email", getCellFormat1() ) ); + sheet0.addCell( new Label( colStart + 12, rowStart, "Comment", getCellFormat1() ) ); + sheet0.addCell( new Label( colStart + 13, rowStart, "Coordinates", getCellFormat1() ) ); } else if ( incID.equalsIgnoreCase( SOURCE ) ) { @@ -1014,6 +1172,28 @@ email = ""; } sheet0.addCell( new Label( colStart + 11, rowStart, email, wCellformat ) ); + + String comment = new String(); + if( ou.getComment() != null ) + { + comment = ou.getComment(); + } + else + { + comment = ""; + } + sheet0.addCell( new Label( colStart + 12, rowStart, comment, wCellformat ) ); + + String coordinates = new String(); + if( ou.getCoordinates() != null ) + { + coordinates = ou.getCoordinates(); + } + else + { + coordinates = ""; + } + sheet0.addCell( new Label( colStart + 13, rowStart, coordinates, wCellformat ) ); } else if ( incID.equalsIgnoreCase( SOURCE ) ) { @@ -1342,8 +1522,7 @@ sheet0.addCell( new Label( colStart + 2, rowStart, dataSet.getShortName(), wCellformat ) ); sheet0.addCell( new Label( colStart + 3, rowStart, dataSet.getCode(), wCellformat ) ); sheet0.addCell( new Label( colStart + 4, rowStart, dataSet.getAlternativeName(), wCellformat ) ); - sheet0 - .addCell( new Label( colStart + 5, rowStart, dataSet.getPeriodType().getName(), wCellformat ) ); + sheet0.addCell( new Label( colStart + 5, rowStart, dataSet.getPeriodType().getName(), wCellformat ) ); } } @@ -1405,8 +1584,8 @@ sheet0.addCell( new Label( colStart + 5, rowStart, "ValidationRuleType", getCellFormat1() ) ); sheet0.addCell( new Label( colStart + 6, rowStart, "ValidationRuleLeftSideDescription", getCellFormat1() ) ); - sheet0.addCell( new Label( colStart + 7, rowStart, "ValidationRuleRightSideDescription", - getCellFormat1() ) ); + sheet0.addCell( new Label( colStart + 7, rowStart, "ValidationRuleRightSideDescription", getCellFormat1() ) ); + sheet0.addCell( new Label( colStart + 8, rowStart, "ValidationRulePeriodType", getCellFormat1() ) ); } } @@ -1435,6 +1614,17 @@ wCellformat ) ); sheet0.addCell( new Label( colStart + 7, rowStart, validationRule.getRightSide().getDescription(), wCellformat ) ); + + String periodType = new String(); + if ( validationRule.getPeriodType() != null ) + { + periodType = validationRule.getPeriodType().getName(); + } + else + { + periodType = ""; + } + sheet0.addCell( new Label( colStart + 8, rowStart, periodType, wCellformat ) ); } } @@ -1497,6 +1687,7 @@ getCellFormat1() ) ); sheet0.addCell( new Label( colStart + 7, rowStart, "ValidationRuleRightSideDescription", getCellFormat1() ) ); + sheet0.addCell( new Label( colStart + 8, rowStart, "ValidationRulePeriodType", getCellFormat1() ) ); } } @@ -1518,7 +1709,7 @@ if ( incID.equalsIgnoreCase( PRINT ) ) { - sheet0.mergeCells( colStart + 1, rowStart, colStart + 7, rowStart ); + sheet0.mergeCells( colStart + 1, rowStart, colStart + 8, rowStart ); } rowStart++; @@ -1547,6 +1738,16 @@ .getDescription(), wCellformat ) ); sheet0.addCell( new Label( colStart + 7, rowStart, validationRule.getRightSide() .getDescription(), wCellformat ) ); + String periodType = new String(); + if ( validationRule.getPeriodType() != null ) + { + periodType = validationRule.getPeriodType().getName(); + } + else + { + periodType = ""; + } + sheet0.addCell( new Label( colStart + 8, rowStart, periodType, wCellformat ) ); } } === modified file 'local/in/dhis-web-reports-national/src/main/resources/META-INF/dhis/beans.xml' --- local/in/dhis-web-reports-national/src/main/resources/META-INF/dhis/beans.xml 2011-04-29 13:45:23 +0000 +++ local/in/dhis-web-reports-national/src/main/resources/META-INF/dhis/beans.xml 2011-05-18 11:56:37 +0000 @@ -173,9 +173,8 @@ class="org.hisp.dhis.reports.ed.action.EDReportFormAction" scope="prototype"> - - - + + - - - - - - - - - - - - - - + + + + + + @@ -1175,6 +1166,7 @@ + @@ -1311,6 +1303,5 @@ - === modified file 'local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/edReportForm.vm' --- local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/edReportForm.vm 2010-06-04 11:50:05 +0000 +++ local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/edReportForm.vm 2011-05-18 11:56:37 +0000 @@ -1,46 +1,62 @@ -

ED Report Analyser

-
-
+

Indicator Report Analyser

+

-
- + +
+ - - - - - - - - - + + + + + + + + + - - - - - - - - + + + + + + + + - -
- From Date :
+ 1.$i18n.getString( "indicator_group" ) :
+ +
+ 3.From Date :
 
 
- To Date :
+
  
  
+ 2.$i18n.getString( "generated_data_type" ) :
+ +
+ 4.To Date :
 
 
  
  
- +
-
\ No newline at end of file + + + \ No newline at end of file === modified file 'local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/javascript/reports.js' --- local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/javascript/reports.js 2011-04-15 11:40:14 +0000 +++ local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/javascript/reports.js 2011-05-18 11:56:37 +0000 @@ -517,22 +517,27 @@ //----------------------------------------------------------------------------- -// FormValidations for ED Report +//FormValidations for ED Report //----------------------------------------------------------------------------- function formValidationsForEDReport() { - var startPeriodObj = document.getElementById('selectedStartPeriodId'); - var endPeriodObj = document.getElementById('selectedEndPeriodId'); + var startPeriodObj = document.getElementById('selectedStartPeriodId'); + var endPeriodObj = document.getElementById('selectedEndPeriodId'); + var indicatorGroupObj = document.getElementById('indicatorGroupId'); - sDateTxt = startPeriodObj.options[startPeriodObj.selectedIndex].text; - sDate = formatDate(new Date(getDateFromFormat(sDateTxt,"MMM-y")),"yyyy-MM-dd"); - eDateTxt = endPeriodObj.options[endPeriodObj.selectedIndex].text; - eDate = formatDate(new Date(getDateFromFormat(eDateTxt,"MMM-y")),"yyyy-MM-dd"); - - if(sDate > eDate) { - alert("Starting Date is Greater");return false; - } - - return true; + sDateTxt = startPeriodObj.options[startPeriodObj.selectedIndex].text; + sDate = formatDate(new Date(getDateFromFormat(sDateTxt,"MMM-y")),"yyyy-MM-dd"); + eDateTxt = endPeriodObj.options[endPeriodObj.selectedIndex].text; + eDate = formatDate(new Date(getDateFromFormat(eDateTxt,"MMM-y")),"yyyy-MM-dd"); + + if(sDate > eDate) + { + alert( "Starting Date is Greater" );return false; + } + else if( indicatorGroupObj.options[indicatorGroupObj.selectedIndex].value == "ALL" ) + { + alert( "Please Select Indicator Group" );return false; + } + return true; } // formValidations Function End === modified file 'local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/menu.vm' --- local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/menu.vm 2011-04-15 11:40:14 +0000 +++ local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/menu.vm 2011-05-18 11:56:37 +0000 @@ -1,85 +1,85 @@ -

Report Analyser

- -#if( $auth.hasAccess( "dhis-web-reports", "reportManagement") ) - -#end - -#if( $auth.hasAccess( "dhis-web-reports", "upwardReportAnalyser") ) -
    -
  • Report Analysis
  • -
      - #if( $auth.hasAccess( "dhis-web-reports", "upwardReportAnalyser") ) -
    • GOI Reports
    • - #end - #if( $auth.hasAccess( "dhis-web-reports", "edReportForm") ) -
    • ED Report
    • - #end - #if( $auth.hasAccess( "dhis-web-reports", "routineReportAnalyser") ) -
    • Routine Reports
    • - #end - #if( $auth.hasAccess( "dhis-web-reports", "feedbackReportAnalyser") ) -
    • Feedback Reports
    • - #end - #if( $auth.hasAccess( "dhis-web-reports", "aggregationReportAnalyser") ) -
    • Aggregation Reports
    • - #end - #if( $auth.hasAccess( "dhis-web-reports", "linelistingReportAnalyser") ) -
    • Linelisting Reports
    • - #end - #if( $auth.hasAccess( "dhis-web-reports", "periodWiseprogressReportAnalyser") ) -
    • Periodwise Progress Reports
    • - #end - #if( $auth.hasAccess( "dhis-web-reports", "ouWiseProgressReportAnalyser") ) -
    • Orgunitwise Progress Reports
    • - #end - #if( $auth.hasAccess( "dhis-web-reports", "metaDataReportAnalyser") ) -
    • Meta Data Reports
    • - #end - #if( $auth.hasAccess( "dhis-web-reports", "dataSetLockReportAnalyser") ) -
    • DataSet Lock Reports
    • - #end - #if( $auth.hasAccess( "dhis-web-reports", "quarterlyPhysicalReport") ) -
    • Quarterly Physical Output Reports
    • - #end - #if( $auth.hasAccess( "dhis-web-reports", "mobileReportAnalyser") ) -
    • Mobile Reports
    • - #end - #if( $auth.hasAccess( "dhis-web-reports", "csReviewReportForm") ) -
    • CS Review Reports
    • - #end - #if( $auth.hasAccess( "dhis-web-reports", "populateUsers") ) -
    • Populate Users
    • - #end - #if( $auth.hasAccess( "dhis-web-reports", "autoReportAnalyser") ) -
    • Bulk Reports
    • - #end -
    • Populate Users From Excel
    • - -
    -
-#end - -#if( $auth.hasAccess( "dhis-web-reports", "benificiaryInfoReportsAnalyser") ) -
    -
  • NameBased Reports
  • -
      - #if( $auth.hasAccess( "dhis-web-reports", "benificiaryInfoReportsAnalyser") ) -
    • NBITS Benificiary Info
    • - #end - #if( $auth.hasAccess( "dhis-web-reports", "activePlanReportsAnalyser") ) -
    • NBITS ActivityPlan
    • - #end - #if( $auth.hasAccess( "dhis-web-reports", "portalReportsAnalyser") ) -
    • NBITS Portal Reports
    • - #end - #if( $auth.hasAccess( "dhis-web-reports", "nbitsReportsAnalyser") ) -
    • NBITS Reports
    • - #end -
    -
+

Report Analyser

+ +#if( $auth.hasAccess( "dhis-web-reports", "reportManagement") ) + +#end + +#if( $auth.hasAccess( "dhis-web-reports", "upwardReportAnalyser") ) +
    +
  • Report Analysis
  • +
      + #if( $auth.hasAccess( "dhis-web-reports", "upwardReportAnalyser") ) +
    • GOI Reports
    • + #end + #if( $auth.hasAccess( "dhis-web-reports", "edReportForm") ) +
    • Indicator Reports
    • + #end + #if( $auth.hasAccess( "dhis-web-reports", "routineReportAnalyser") ) +
    • Routine Reports
    • + #end + #if( $auth.hasAccess( "dhis-web-reports", "feedbackReportAnalyser") ) +
    • Feedback Reports
    • + #end + #if( $auth.hasAccess( "dhis-web-reports", "aggregationReportAnalyser") ) +
    • Aggregation Reports
    • + #end + #if( $auth.hasAccess( "dhis-web-reports", "linelistingReportAnalyser") ) +
    • Linelisting Reports
    • + #end + #if( $auth.hasAccess( "dhis-web-reports", "periodWiseprogressReportAnalyser") ) +
    • Periodwise Progress Reports
    • + #end + #if( $auth.hasAccess( "dhis-web-reports", "ouWiseProgressReportAnalyser") ) +
    • Orgunitwise Progress Reports
    • + #end + #if( $auth.hasAccess( "dhis-web-reports", "metaDataReportAnalyser") ) +
    • Meta Data Reports
    • + #end + #if( $auth.hasAccess( "dhis-web-reports", "dataSetLockReportAnalyser") ) +
    • DataSet Lock Reports
    • + #end + #if( $auth.hasAccess( "dhis-web-reports", "quarterlyPhysicalReport") ) +
    • Quarterly Physical Output Reports
    • + #end + #if( $auth.hasAccess( "dhis-web-reports", "mobileReportAnalyser") ) +
    • Mobile Reports
    • + #end + #if( $auth.hasAccess( "dhis-web-reports", "csReviewReportForm") ) +
    • CS Review Reports
    • + #end + #if( $auth.hasAccess( "dhis-web-reports", "populateUsers") ) +
    • Populate Users
    • + #end + #if( $auth.hasAccess( "dhis-web-reports", "autoReportAnalyser") ) +
    • Bulk Reports
    • + #end +
    • Populate Users From Excel
    • + +
    +
+#end + +#if( $auth.hasAccess( "dhis-web-reports", "benificiaryInfoReportsAnalyser") ) +
    +
  • NameBased Reports
  • +
      + #if( $auth.hasAccess( "dhis-web-reports", "benificiaryInfoReportsAnalyser") ) +
    • NBITS Benificiary Info
    • + #end + #if( $auth.hasAccess( "dhis-web-reports", "activePlanReportsAnalyser") ) +
    • NBITS ActivityPlan
    • + #end + #if( $auth.hasAccess( "dhis-web-reports", "portalReportsAnalyser") ) +
    • NBITS Portal Reports
    • + #end + #if( $auth.hasAccess( "dhis-web-reports", "nbitsReportsAnalyser") ) +
    • NBITS Reports
    • + #end +
    +
#end \ No newline at end of file