=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageInstanceService.java' --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageInstanceService.java 2012-11-06 02:44:50 +0000 +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageInstanceService.java 2012-11-14 05:52:34 +0000 @@ -89,10 +89,10 @@ List getProgramStageInstances( Patient patient, Boolean completed ); Grid getTabularReport( ProgramStage programStage, List columns, Collection organisationUnits, - int level, Date startDate, Date endDate, boolean descOrder, Integer min, Integer max ); + int level, Date startDate, Date endDate, boolean descOrder, Boolean completed, Integer min, Integer max ); int getTabularReportCount( ProgramStage programStage, List columns, - Collection organisationUnits, int level, Date startDate, Date endDate ); + Collection organisationUnits, int level, Boolean completed, Date startDate, Date endDate ); List getProgramStageInstancesReport( ProgramInstance programInstance, I18nFormat format, I18n i18n ); === modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageInstanceStore.java' --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageInstanceStore.java 2012-11-06 03:01:51 +0000 +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageInstanceStore.java 2012-11-14 05:52:34 +0000 @@ -77,10 +77,10 @@ Grid getTabularReport( ProgramStage programStage, Map orgUnitLevelMap, Collection orgUnits, List columns, int level, int maxLevel, Date startDate, - Date endDate, boolean descOrder, Integer min, Integer max ); + Date endDate, boolean descOrder, Boolean completed, Integer min, Integer max ); int getTabularReportCount( ProgramStage programStage, List columns, - Collection organisationUnits, int level, int maxLevel, Date startDate, Date endDate ); + Collection organisationUnits, int level, int maxLevel, Date startDate, Date endDate, Boolean completed ); void removeEmptyEvents( ProgramStage programStage, OrganisationUnit organisationUnit ); === modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramStageInstanceService.java' --- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramStageInstanceService.java 2012-11-06 02:44:50 +0000 +++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramStageInstanceService.java 2012-11-14 05:52:34 +0000 @@ -169,7 +169,7 @@ } public Grid getTabularReport( ProgramStage programStage, List columns, - Collection organisationUnits, int level, Date startDate, Date endDate, boolean descOrder, Integer min, + Collection organisationUnits, int level, Date startDate, Date endDate, boolean descOrder, Boolean completed, Integer min, Integer max ) { int maxLevel = organisationUnitService.getMaxOfOrganisationUnitLevels(); @@ -177,16 +177,16 @@ Map orgUnitLevelMap = organisationUnitService.getOrganisationUnitLevelMap(); return programStageInstanceStore.getTabularReport( programStage, orgUnitLevelMap, organisationUnits, columns, - level, maxLevel, startDate, endDate, descOrder, min, max ); + level, maxLevel, startDate, endDate, descOrder, completed, min, max ); } public int getTabularReportCount( ProgramStage programStage, List columns, - Collection organisationUnits, int level, Date startDate, Date endDate ) + Collection organisationUnits, int level, Boolean completed, Date startDate, Date endDate ) { int maxLevel = organisationUnitService.getMaxOfOrganisationUnitLevels(); return programStageInstanceStore.getTabularReportCount( programStage, columns, organisationUnits, level, - maxLevel, startDate, endDate ); + maxLevel, startDate, endDate, completed ); } public List getProgramStageInstancesReport( ProgramInstance programInstance, I18nFormat format, I18n i18n ) === modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStageInstanceStore.java' --- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStageInstanceStore.java 2012-11-06 02:44:50 +0000 +++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStageInstanceStore.java 2012-11-14 05:52:34 +0000 @@ -193,7 +193,7 @@ public Grid getTabularReport( ProgramStage programStage, Map orgUnitLevelMap, Collection orgUnits, List columns, int level, int maxLevel, Date startDate, - Date endDate, boolean descOrder, Integer min, Integer max ) + Date endDate, boolean descOrder, Boolean completed, Integer min, Integer max ) { // --------------------------------------------------------------------- // Headers TODO hidden cols @@ -229,7 +229,7 @@ // --------------------------------------------------------------------- String sql = getTabularReportSql( false, programStage, columns, orgUnits, level, maxLevel, startDate, endDate, - descOrder, min, max ); + descOrder, completed, min, max ); SqlRowSet rowSet = jdbcTemplate.queryForRowSet( sql ); @@ -239,10 +239,10 @@ } public int getTabularReportCount( ProgramStage programStage, List columns, - Collection organisationUnits, int level, int maxLevel, Date startDate, Date endDate ) + Collection organisationUnits, int level, int maxLevel, Date startDate, Date endDate, Boolean completed ) { String sql = getTabularReportSql( true, programStage, columns, organisationUnits, level, maxLevel, startDate, - endDate, false, null, null ); + endDate, false, completed, null, null ); return jdbcTemplate.queryForInt( sql ); } @@ -346,7 +346,7 @@ private String getTabularReportSql( boolean count, ProgramStage programStage, List columns, Collection orgUnits, int level, int maxLevel, Date startDate, Date endDate, boolean descOrder, - Integer min, Integer max ) + Boolean completed, Integer min, Integer max ) { Set deKeys = new HashSet(); String selector = count ? "count(*) " : "* "; @@ -462,7 +462,11 @@ { sql += "and ou.organisationunitid in (" + TextUtils.getCommaDelimitedString( orgUnits ) + ") "; } - + if( completed!= null ) + { + sql += "and psi.completed="+ completed + " "; + } + sql += "order by "; for ( int i = level; i <= maxLevel; i++ ) === modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/report/GenerateTabularReportAction.java' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/report/GenerateTabularReportAction.java 2012-11-08 02:58:24 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/report/GenerateTabularReportAction.java 2012-11-14 05:52:34 +0000 @@ -196,6 +196,13 @@ this.format = format; } + private Boolean completed; + + public void setCompleted( Boolean completed ) + { + this.completed = completed; + } + private List dataElements = new ArrayList(); public List getDataElements() @@ -317,20 +324,20 @@ if ( type == null ) // Tabular report { totalRecords = programStageInstanceService.getTabularReportCount( programStage, columns, - organisationUnits, level, startValue, endValue ); + organisationUnits, level, completed, startValue, endValue ); total = getNumberOfPages( totalRecords ); this.paging = createPaging( totalRecords ); grid = programStageInstanceService.getTabularReport( programStage, columns, organisationUnits, level, - startValue, endValue, !orderByOrgunitAsc, getStartPos(), paging.getPageSize() ); + startValue, endValue, !orderByOrgunitAsc, completed, getStartPos(), paging.getPageSize() ); } else // Download as Excel { grid = programStageInstanceService.getTabularReport( programStage, columns, organisationUnits, level, - startValue, endValue, !orderByOrgunitAsc, null, null ); + startValue, endValue, !orderByOrgunitAsc, completed, null, null ); } } catch ( SQLGrammarException ex ) === modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties 2012-11-09 14:38:35 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties 2012-11-14 05:52:34 +0000 @@ -473,4 +473,5 @@ specify_a_date = Please specify a date clear_all = Clear all show_all = Show all -you_have_active_filters = You have active filters \ No newline at end of file +you_have_active_filters = You have active filters +back_to_event_list = Back to event list \ No newline at end of file === modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/anonymousRegistration.vm' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/anonymousRegistration.vm 2012-11-13 04:54:30 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/anonymousRegistration.vm 2012-11-14 05:52:34 +0000 @@ -5,7 +5,9 @@ }); -

$i18n.getString( "anonymous_events_management" ) #openHelp('single_event_without_registration')

+

$i18n.getString( "anonymous_events_management" ) #openHelp('single_event_without_registration')

+

+ @@ -51,6 +53,7 @@ + $i18n.getString("incomplete")   @@ -103,10 +106,6 @@