=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/SelectAction.java' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/SelectAction.java 2013-09-05 19:12:06 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/SelectAction.java 2013-10-09 06:58:10 +0000 @@ -118,9 +118,11 @@ patientAttributes = patientAttributeService.getAllPatientAttributes(); - programs = new ArrayList( programService.getProgramsByCurrentUser() ); + programs = new ArrayList( programService.getProgramsByDisplayOnAllOrgunit( true, null ) ); + programs.addAll( programService.getProgramsByDisplayOnAllOrgunit( false, organisationUnit ) ); + programs.retainAll( programService.getProgramsByCurrentUser() ); programs.removeAll( programService.getPrograms( Program.SINGLE_EVENT_WITHOUT_REGISTRATION ) ); - + Collections.sort( programs, IdentifiableObjectNameComparator.INSTANCE ); return SUCCESS;