=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramInstanceService.java' --- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramInstanceService.java 2012-10-06 16:13:56 +0000 +++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramInstanceService.java 2012-10-07 03:09:51 +0000 @@ -331,13 +331,14 @@ grid.addValue( programInstance.getProgram().getDateOfEnrollmentDescription() ); grid.addValue( format.formatDate( programInstance.getEnrollmentDate() ) ); - if ( programInstance.getProgram().getDisplayIncidentDate() ) + if ( programInstance.getProgram().getDisplayIncidentDate() != null + && programInstance.getProgram().getDisplayIncidentDate() ) { grid.addRow(); grid.addValue( programInstance.getProgram().getDateOfIncidentDescription() ); grid.addValue( format.formatDate( programInstance.getDateOfIncident() ) ); } - + getProgramStageInstancesReport( grid, programInstance, format, i18n ); return grid; @@ -366,17 +367,16 @@ // due-date && report-date // ----------------------------------------------------------------- - Date executionDate = programStageInstance.getExecutionDate(); - String executionDateValue = (executionDate != null) ? format.formatDate( programStageInstance - .getExecutionDate() ) : "[" + i18n.getString( "none" ) + "]"; - grid.addRow(); grid.addValue( i18n.getString( "due_date" ) ); grid.addValue( format.formatDate( programStageInstance.getDueDate() ) ); - grid.addRow(); - grid.addValue( programStageInstance.getProgramStage().getReportDateDescription() ); - grid.addValue( executionDateValue ); + if ( programStageInstance.getExecutionDate() != null ) + { + grid.addRow(); + grid.addValue( programStageInstance.getProgramStage().getReportDateDescription() ); + grid.addValue( format.formatDate( programStageInstance.getExecutionDate() ) ); + } // ----------------------------------------------------------------- // Values === modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/report/GenerateReportAction.java' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/report/GenerateReportAction.java 2012-10-06 16:13:56 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/report/GenerateReportAction.java 2012-10-07 03:09:51 +0000 @@ -187,10 +187,10 @@ { orgunitIds.addAll( organisationUnitService.getOrganisationUnitHierarchy().getChildren( organisationUnit.getId() ) ); + orgunitIds.remove( organisationUnit.getId() ); } else { - orgunitIds.add( organisationUnit.getId() ); orgunitIds.addAll( organisationUnitService.getOrganisationUnitHierarchy().getChildren( organisationUnit.getId() ) ); } === 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-10-06 16:13:56 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/report/GenerateTabularReportAction.java 2012-10-07 03:09:51 +0000 @@ -294,11 +294,11 @@ OrganisationUnit selectedOrgunit = organisationUnitService.getOrganisationUnit( orgunitId ); orgunitIds.addAll( organisationUnitService.getOrganisationUnitHierarchy().getChildren( selectedOrgunit.getId() ) ); + orgunitIds.remove( orgunitId ); } } else { - organisationUnits.addAll( orgunitIds ); for ( Integer orgunitId : orgunitIds ) { OrganisationUnit selectedOrgunit = organisationUnitService.getOrganisationUnit( orgunitId );