=== modified file 'dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/datavalueset/DefaultDataValueSetService.java' --- dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/datavalueset/DefaultDataValueSetService.java 2013-02-13 00:57:36 +0000 +++ dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/datavalueset/DefaultDataValueSetService.java 2013-03-14 03:45:19 +0000 @@ -67,6 +67,7 @@ import java.io.OutputStream; import java.io.Reader; import java.io.Writer; +import java.util.Collection; import java.util.Date; import java.util.HashMap; import java.util.HashSet; @@ -251,7 +252,23 @@ boolean skipExistingCheck = importOptions.isSkipExistingCheck(); Map dataElementMap = identifiableObjectManager.getIdMap( DataElement.class, dataElementIdScheme ); - Map orgUnitMap = identifiableObjectManager.getIdMap( OrganisationUnit.class, orgUnitIdScheme ); + + Map orgUnitMap = new HashMap(); + + if ( !orgUnitIdScheme.equals( IdentifiableProperty.UUID ) ) + { + identifiableObjectManager.getIdMap( OrganisationUnit.class, orgUnitIdScheme ); + } + else + { + Collection allOrganisationUnits = organisationUnitService.getAllOrganisationUnits(); + + for ( OrganisationUnit organisationUnit : allOrganisationUnits ) + { + orgUnitMap.put( organisationUnit.getUuid(), organisationUnit ); + } + } + Map categoryOptionComboMap = identifiableObjectManager.getIdMap( DataElementCategoryOptionCombo.class, IdentifiableProperty.UID ); Map periodMap = new HashMap();