dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #27714
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 13799: csd: support service_oid attribute
------------------------------------------------------------
revno: 13799
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2014-01-21 16:43:33 +0700
message:
csd: support service_oid attribute
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 09:34:09 +0000
+++ dhis-2/dhis-web/dhis-web-ohie/src/main/java/org/hisp/dhis/web/ohie/csd/webapi/CsdController.java 2014-01-21 09:43:33 +0000
@@ -271,7 +271,17 @@
}
Service service = new Service();
- service.setOid( dataSet.getCode() );
+ service.setOid( "No oid, please provide service_oid attribute value." );
+
+ for ( AttributeValue attributeValue : dataSet.getAttributeValues() )
+ {
+ if ( attributeValue.getAttribute().getName().equals( "service_oid" ) )
+ {
+ service.setOid( attributeValue.getValue() );
+ break;
+ }
+ }
+
service.getNames().add( new Name( new CommonName( dataSet.getDisplayName() ) ) );
organization.getServices().add( service );