← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 13797: csd: support organization_oid as attribute-value

 

------------------------------------------------------------
revno: 13797
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2014-01-21 16:29:20 +0700
message:
  csd: support organization_oid as attribute-value
modified:
  dhis-2/dhis-web/dhis-web-ohie/src/main/java/org/hisp/dhis/web/ohie/csd/webapi/CsdController.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-ohie/src/main/java/org/hisp/dhis/web/ohie/csd/webapi/CsdController.java'
--- dhis-2/dhis-web/dhis-web-ohie/src/main/java/org/hisp/dhis/web/ohie/csd/webapi/CsdController.java	2014-01-21 07:35:08 +0000
+++ dhis-2/dhis-web/dhis-web-ohie/src/main/java/org/hisp/dhis/web/ohie/csd/webapi/CsdController.java	2014-01-21 09:29:20 +0000
@@ -260,7 +260,7 @@
                 facility.getCodedTypes().add( codedType );
             }
 
-            Organization organization = new Organization( "1.3.6.1.4.1.21367.200.99.1" );
+            Organization organization = new Organization( "No oid, please provide organization_oid attribute value." );
             facility.getOrganizations().add( organization );
 
             for ( DataSet dataSet : organisationUnit.getDataSets() )
@@ -334,6 +334,10 @@
 
                     addressLines.get( attributeSplit[1] ).add( addressLine );
                 }
+                else if ( attributeValue.getAttribute().getName().equals( "organisation_oid" ) )
+                {
+                    organization.setOid( attributeValue.getValue() );
+                }
             }
 
             for ( String key : addressLines.keySet() )