=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/hibernate/HibernatePatientStore.java' --- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/hibernate/HibernatePatientStore.java 2013-03-21 04:37:26 +0000 +++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/hibernate/HibernatePatientStore.java 2013-03-21 04:51:21 +0000 @@ -676,9 +676,15 @@ private Collection getOrgunitChildren( OrganisationUnit orgunit ) { Collection orgunitIds = new HashSet(); - orgunitIds.addAll( organisationUnitService.getOrganisationUnitHierarchy().getChildren( orgunit.getId() ) ); - orgunitIds.remove( orgunit.getId() ); - + if ( orgunit != null ) + { + orgunitIds.addAll( organisationUnitService.getOrganisationUnitHierarchy().getChildren( orgunit.getId() ) ); + orgunitIds.remove( orgunit.getId() ); + } + if ( orgunitIds.size() == 0 ) + { + orgunitIds.add( 0 ); + } return orgunitIds; } === modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/activityPlan.js' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/activityPlan.js 2013-03-21 04:37:26 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/activityPlan.js 2013-03-21 04:51:21 +0000 @@ -68,7 +68,7 @@ { showById('colorHelpLink'); showById('listPatientDiv'); - resize(); + setTableStyles(); hideLoader(); }); }