dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #25131
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 12389: Minor correction - need to set idScheme=CODE
------------------------------------------------------------
revno: 12389
committer: Bob Jolliffe <bobjolliffe@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2013-10-02 13:58:34 +0100
message:
Minor correction - need to set idScheme=CODE
modified:
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/DataValueSetController.java
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/DataValueSetController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/DataValueSetController.java 2013-10-02 12:25:58 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/DataValueSetController.java 2013-10-02 12:58:34 +0000
@@ -209,6 +209,11 @@
StringWriter dxf2 = new StringWriter();
transformer.transform( new StreamSource( in ), new StreamResult( dxf2 ) );
+
+ // override id scheme
+ importOptions.setOrgUnitIdScheme( "CODE");
+ importOptions.setDataElementIdScheme( "CODE");
+
ImportSummary summary = dataValueSetService.saveDataValueSetJson(
new ByteArrayInputStream(dxf2.toString().getBytes( "UTF-8") ), importOptions );
}