dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #24190
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 11814: Event analytics, added org unit names in response
------------------------------------------------------------
revno: 11814
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2013-08-27 11:19:47 +0200
message:
Event analytics, added org unit names in response
modified:
dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/DefaultEventAnalyticsService.java
dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/JdbcEventAnalyticsManager.java
dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcEventAnalyticsTableManager.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-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/DefaultEventAnalyticsService.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/DefaultEventAnalyticsService.java 2013-08-27 09:01:06 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/DefaultEventAnalyticsService.java 2013-08-27 09:19:47 +0000
@@ -71,6 +71,7 @@
private static final String ITEM_PROGRAM_STAGE = "ps";
private static final String ITEM_EXECUTION_DATE = "executiondate";
private static final String ITEM_ORG_UNIT = "ou";
+ private static final String ITEM_ORG_UNIT_NAME = "ouname";
@Autowired
private ProgramService programService;
@@ -107,6 +108,7 @@
grid.addHeader( new GridHeader( "Program stage", ITEM_PROGRAM_STAGE ) );
grid.addHeader( new GridHeader( "Execution date", ITEM_EXECUTION_DATE ) );
grid.addHeader( new GridHeader( "Organisation unit", ITEM_ORG_UNIT ) );
+ grid.addHeader( new GridHeader( "Organisation unit name", ITEM_ORG_UNIT_NAME ) );
// ---------------------------------------------------------------------
// Headers
=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/JdbcEventAnalyticsManager.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/JdbcEventAnalyticsManager.java 2013-08-23 16:05:01 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/JdbcEventAnalyticsManager.java 2013-08-27 09:19:47 +0000
@@ -58,7 +58,7 @@
public Grid getEvents( EventQueryParams params, Grid grid )
{
- String sql = "select psi,ps,executiondate,ou,";
+ String sql = "select psi,ps,executiondate,ou,ouname,";
// ---------------------------------------------------------------------
// Items
=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcEventAnalyticsTableManager.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcEventAnalyticsTableManager.java 2013-08-23 16:05:01 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcEventAnalyticsTableManager.java 2013-08-27 09:19:47 +0000
@@ -216,8 +216,9 @@
String[] ps = { "ps", "character(11) not null", "ps.uid" };
String[] ed = { "executiondate", "date", "psi.executiondate" };
String[] ou = { "ou", "character(11) not null", "ou.uid" };
+ String[] oun = { "ouname", "character(160) not null", "ou.name" };
- columns.addAll( Arrays.asList( psi, ps, ed, ou ) );
+ columns.addAll( Arrays.asList( psi, ps, ed, ou, oun ) );
return columns;
}