Re: [Dhis2-devs] [Dhis2-users] OpenMRS to DHIS2

2014-01-28 Thread Edwin Mulwa
Thanks Christine,

I will certainly try this during the week and give you feedback on whether
it worked for us.

Thanks!

Edwin



On Tue, Jan 28, 2014 at 6:50 PM, christine ceblano wrote:

> Hi Edwin,
>
> Attached is the updated documentation of the steps (almost similar to the
> doc that Mohammad Ullah shared with you, although more organized I think).
>  It uses the DHIS2 Reporting Module of Bob Jolliffe (+Saptarshi).  It's
> more of mysql query inside the xml that you'll need to customize.
>
> As Pascal mentioned, there is also an OpenMRS-DHIS2 Integration module
> made by Srimaurya that employs another approach (Cohort instead of mysql
> queries).  You may also wish to check that out if doing the cohort is more
> suited in your case.
>
> Just let us know how we can help.  Thanks.
>
>
> On Tue, Jan 28, 2014 at 8:38 PM, Edwin Mulwa  wrote:
>
>> Thanks Mohammad,
>>
>> I will take a look and let you know if it was helpful.
>>
>> Eddie
>>
>>
>>
>> On Tue, Jan 28, 2014 at 8:15 AM, Mohammad Ullah wrote:
>>
>>> Hi Edwin,
>>>
>>> Follow the document attached here which describes how to transfer data
>>> from openmrs to dhis2 using the DHIS2 reporting module. This is an example
>>> from Community Health Information Tracking System (CHITS). Christine
>>> ceblano is an expert on this topics as she has done this for Philippine.
>>>
>>>
>>> On Mon, Jan 27, 2014 at 12:27 PM, Edwin Mulwa  wrote:
>>>
 Hi All,

 Is there a tool/module that automates data transfer from OpenMRS to
 DHIS2? I need such a tool for some work that I am doing.

 Thanks.

 Edwin


 ___
 Mailing list: https://launchpad.net/~dhis2-users
 Post to : dhis2-us...@lists.launchpad.net
 Unsubscribe : https://launchpad.net/~dhis2-users
 More help   : https://help.launchpad.net/ListHelp


>>>
>>>
>>> --
>>> *Mohammad Ullah*
>>> 
>>> *Technical Advisor - HIS*
>>> Priority Area - Health
>>> Deutsche Gesellschaft für Internationale Zusammenarbeit (GIZ) GmbH
>>> House10/A, Road 90, Gulshan 2, Dhaka 1212, Bangladesh
>>>
>>> *Office location:*
>>> Room # 304, Shahid Dr. Milan Bhavan,
>>> Management Information System (MIS)
>>> Directorate General of Health Services of MoHFW, Mohakhali,
>>> Dhaka-1212, Bangladesh
>>> T.  +880 (0) 8816459, 8816412 Ext:118
>>>  M. +88 0196 3156 988
>>> Web. http://lnkd.in/gQrxXz
>>> E  
>>> mohammad.ul...@giz.de,
>>> munnab...@gmail.com
>>>
>>> *Skype : mohammad_ullah_giz*
>>>
>>
>>
>
>
> --
> *Christine A. CEBLANO*
> Research Associate
> Health Infomatics
>
> *NATIONAL TELEHEALTH CENTER*
> University of the Philippines Manila
> 3rd Floor IT Complex, Philippine General Hospital
> Taft Ave., Ermita, Manila, Philippines 1000
> Email: ad...@info.telehealth.ph
> Telefax: +63 2 525 6501
> Website: http://www.telehealth.ph
>
> Disclaimer:
> This e-mail, together with any attachments, is intended for the named
> recipients only and is confidential. It may also be privileged or otherwise
> protected by law.  If you have received it in error, please notify the
> sender immediately by reply e-mail and delete it and any attachments from
> your system. You may not copy or disclose its contents to anyone.
>
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 13888: NPE checks in AttributeValueSortOrderComparator

2014-01-28 Thread noreply

revno: 13888
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Wed 2014-01-29 10:35:59 +0700
message:
  NPE checks in AttributeValueSortOrderComparator
modified:
  
dhis-2/dhis-api/src/main/java/org/hisp/dhis/attribute/comparator/AttributeValueSortOrderComparator.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-api/src/main/java/org/hisp/dhis/attribute/comparator/AttributeValueSortOrderComparator.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/attribute/comparator/AttributeValueSortOrderComparator.java	2014-01-23 09:32:35 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/attribute/comparator/AttributeValueSortOrderComparator.java	2014-01-29 03:35:59 +
@@ -43,6 +43,11 @@
 @Override
 public int compare( AttributeValue o1, AttributeValue o2 )
 {
+if ( o1 == null || o2 == null || o1.getAttribute() == null || o2.getAttribute() == null )
+{
+return 0;
+}
+
 if ( o1.getAttribute().getSortOrder() == null || o2.getAttribute().getSortOrder() == 0 )
 {
 return o1.getAttribute().getName().compareTo( o2.getAttribute().getName() );

___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


[Dhis2-devs] DHIS2 Table relationship

2014-01-28 Thread Rin Channara
Dear all,
Anyone has DHIS2 Tables relationship. So it is easy for check ralationships of 
each table and do reports.

Thank you very much.
CHANNARA


Sent from Samsung Mobile
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] Fwd: [DHIS2] DHIS2 2.13 Upgrade

2014-01-28 Thread Jan Henrik Øverland
[?]


On Tue, Jan 28, 2014 at 3:59 PM, Prosper BT  wrote:

> They are actually many appreciations from the field in Uganda
>
>
> -- Forwarded message --
> From: DHIS2 Message [No reply] 
> Date: Tue, Jan 28, 2014 at 1:09 PM
> Subject: [DHIS2] DHIS2 2.13 Upgrade
> To:
>
>
> Thanks for making the system more user friendly!
>
> Eyattu Jude
> Amuria District
> eyattuj...@gmail.com
> 0775523624
>
>
>
> --
> Prosper Behumbiize, MPH
> Phone:+256 414 320076
> Cell: +256 772 139037
>  +256 752 751776
>
>
> ___
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to : dhis2-devs@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>
<>___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


[Dhis2-devs] Fwd: [DHIS2] DHIS2 2.13 Upgrade

2014-01-28 Thread Prosper BT
They are actually many appreciations from the field in Uganda


-- Forwarded message --
From: DHIS2 Message [No reply] 
Date: Tue, Jan 28, 2014 at 1:09 PM
Subject: [DHIS2] DHIS2 2.13 Upgrade
To:


Thanks for making the system more user friendly!

Eyattu Jude
Amuria District
eyattuj...@gmail.com
0775523624



-- 
Prosper Behumbiize, MPH
Phone:+256 414 320076
Cell: +256 772 139037
 +256 752 751776
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 13887: SQL view, fixed bug, the db sql view was not dropped when the dhis sql view was deleted

2014-01-28 Thread noreply

revno: 13887
committer: Lars Helge Øverland 
branch nick: dhis2
timestamp: Tue 2014-01-28 16:18:54 +0200
message:
  SQL view, fixed bug, the db sql view was not dropped when the dhis sql view 
was deleted
modified:
  
dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/sqlview/DefaultSqlViewService.java
  
dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/sqlview/jdbc/JdbcSqlViewExpandStore.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-administration/src/main/java/org/hisp/dhis/sqlview/DefaultSqlViewService.java'
--- dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/sqlview/DefaultSqlViewService.java	2013-10-02 13:49:44 +
+++ dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/sqlview/DefaultSqlViewService.java	2014-01-28 14:18:54 +
@@ -73,6 +73,8 @@
 @Override
 public void deleteSqlView( SqlView sqlViewObject )
 {
+dropViewTable( sqlViewObject.getViewName() );
+
 sqlViewStore.delete( sqlViewObject );
 }
 

=== modified file 'dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/sqlview/jdbc/JdbcSqlViewExpandStore.java'
--- dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/sqlview/jdbc/JdbcSqlViewExpandStore.java	2013-10-08 17:16:47 +
+++ dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/sqlview/jdbc/JdbcSqlViewExpandStore.java	2014-01-28 14:18:54 +
@@ -164,11 +164,15 @@
 {
 try
 {
-jdbcTemplate.update( "DROP VIEW IF EXISTS " + statementBuilder.columnQuote( viewName ) );
+final String sql = "DROP VIEW IF EXISTS " + statementBuilder.columnQuote( viewName );
+
+log.info( "Drop view SQL: " + sql );
+
+jdbcTemplate.update( sql );
 }
 catch ( BadSqlGrammarException ex )
 {
-throw new RuntimeException( "Failed to drop view: " + viewName, ex );
+log.warn( "Could not drop view: " + viewName, ex );
 }
 }
 }
\ No newline at end of file

___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] Fwd: [DHIS2] Upgrade

2014-01-28 Thread Lars Helge Øverland
Thanks Prosper, its encouraging that someone likes the work of us
pretending-to-be designers.

Lars


On Tue, Jan 28, 2014 at 12:52 PM, Prosper BT  wrote:

> This should make your day,
>
> Message from the Field after upgrading to 2.13
>
>
>
> -- Forwarded message --
> From: DHIS2 Message [No reply] 
> Date: Tue, Jan 28, 2014 at 1:07 PM
> Subject: [DHIS2] Upgrade
> To:
>
>
> What an upgrade! I like it. The out look is a "morale booster". Thanks
> DHIS 2 team!
>
>
> Eyattu Jude
> Amuria District
> eyattuj...@gmail.com
> 0775523624
>
>
>
> --
> Prosper Behumbiize, MPH
> Phone:+256 414 320076
> Cell: +256 772 139037
>  +256 752 751776
>
>
> ___
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to : dhis2-devs@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] trouble in posting equipment data using web-api

2014-01-28 Thread Brajesh Murari
Thanks Bharath
 
Regards
Brajesh Murari





On Tuesday, 28 January 2014 6:08 PM, Brajesh Murari  
wrote:
 
Found solution how to fix it.
its working

Thanks 
Brajesh Murari





On Tuesday, 28 January 2014 3:56 PM, Brajesh Murari  
wrote:
 
Hi Morten,

I am facing trouble while posting data using dhis2-web-api module for equipment.
I have attached EquipmentDataValueController.java file along with the trace 
which you can find in the attachment. When i am watching trace closely, i have 
found 

Nested exception is org.hibernate.exception.SQLGrammarException: could not 
execute statement 
Caused by: org.postgresql.util.PSQLException: ERROR: column "lastupdated" 
specified more than once


Although, i am using lastupdated only once in controller.

Can any one on list or you help, me how i can fix this issue!

Regards 
Brajesh Murari





___
Mailing list: https://launchpad.net/~dhis2-devs
Post to     : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 13884: Reduced title font size for PNG maps and charts

2014-01-28 Thread noreply

revno: 13884
committer: Lars Helge Øverland 
branch nick: dhis2
timestamp: Tue 2014-01-28 14:20:49 +0200
message:
  Reduced title font size for PNG maps and charts
modified:
  
dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/dataintegrity/DefaultDataIntegrityService.java
  
dhis-2/dhis-services/dhis-service-mapgeneration/src/main/java/org/hisp/dhis/mapgeneration/Legend.java
  
dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/chart/impl/DefaultChartService.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-administration/src/main/java/org/hisp/dhis/dataintegrity/DefaultDataIntegrityService.java'
--- dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/dataintegrity/DefaultDataIntegrityService.java	2013-08-23 16:00:30 +
+++ dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/dataintegrity/DefaultDataIntegrityService.java	2014-01-28 12:20:49 +
@@ -440,7 +440,7 @@
 {
 parent = unit;
 
-while ( (parent = parent.getParent()) != null )
+while ( ( parent = parent.getParent() ) != null )
 {
 if ( parent.equals( unit ) ) // Cyclic reference
 {

=== modified file 'dhis-2/dhis-services/dhis-service-mapgeneration/src/main/java/org/hisp/dhis/mapgeneration/Legend.java'
--- dhis-2/dhis-services/dhis-service-mapgeneration/src/main/java/org/hisp/dhis/mapgeneration/Legend.java	2013-10-16 09:44:07 +
+++ dhis-2/dhis-services/dhis-service-mapgeneration/src/main/java/org/hisp/dhis/mapgeneration/Legend.java	2014-01-28 12:20:49 +
@@ -45,7 +45,7 @@
  */
 public class Legend
 {
-public static final Font TITLE_FONT = new Font( "title", Font.BOLD, 14 );
+public static final Font TITLE_FONT = new Font( "title", Font.BOLD, 12 );
 public static final Font PLAIN_FONT = new Font( "plain", Font.PLAIN, 10 );
 
 private InternalMapLayer mapLayer;

=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/chart/impl/DefaultChartService.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/chart/impl/DefaultChartService.java	2013-12-19 18:12:57 +
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/chart/impl/DefaultChartService.java	2014-01-28 12:20:49 +
@@ -105,9 +105,9 @@
 public class DefaultChartService
 implements ChartService
 {
-private static final Font titleFont = new Font( Font.SANS_SERIF, Font.BOLD, 15 );
+private static final Font titleFont = new Font( Font.SANS_SERIF, Font.BOLD, 12 );
 
-private static final Font subTitleFont = new Font( Font.SANS_SERIF, Font.PLAIN, 12 );
+private static final Font subTitleFont = new Font( Font.SANS_SERIF, Font.PLAIN, 11 );
 
 private static final Font labelFont = new Font( Font.SANS_SERIF, Font.PLAIN, 10 );
 

___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] [Dhis2-users] OpenMRS to DHIS2

2014-01-28 Thread Edwin Mulwa
Thanks Mohammad,

I will take a look and let you know if it was helpful.

Eddie



On Tue, Jan 28, 2014 at 8:15 AM, Mohammad Ullah  wrote:

> Hi Edwin,
>
> Follow the document attached here which describes how to transfer data
> from openmrs to dhis2 using the DHIS2 reporting module. This is an example
> from Community Health Information Tracking System (CHITS). Christine
> ceblano is an expert on this topics as she has done this for Philippine.
>
>
> On Mon, Jan 27, 2014 at 12:27 PM, Edwin Mulwa  wrote:
>
>> Hi All,
>>
>> Is there a tool/module that automates data transfer from OpenMRS to
>> DHIS2? I need such a tool for some work that I am doing.
>>
>> Thanks.
>>
>> Edwin
>>
>>
>> ___
>> Mailing list: https://launchpad.net/~dhis2-users
>> Post to : dhis2-us...@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~dhis2-users
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>
>
> --
> *Mohammad Ullah*
> 
> *Technical Advisor - HIS*
> Priority Area - Health
> Deutsche Gesellschaft für Internationale Zusammenarbeit (GIZ) GmbH
> House10/A, Road 90, Gulshan 2, Dhaka 1212, Bangladesh
>
> *Office location:*
> Room # 304, Shahid Dr. Milan Bhavan,
> Management Information System (MIS)
> Directorate General of Health Services of MoHFW, Mohakhali,
> Dhaka-1212, Bangladesh
> T.  +880 (0) 8816459, 8816412 Ext:118
>  M. +88 0196 3156 988
> Web. http://lnkd.in/gQrxXz
> E  
> mohammad.ul...@giz.de,
> munnab...@gmail.com
>
> *Skype : mohammad_ullah_giz*
>
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] trouble in posting equipment data using web-api

2014-01-28 Thread Brajesh Murari
Found solution how to fix it.
its working

Thanks 
Brajesh Murari





On Tuesday, 28 January 2014 3:56 PM, Brajesh Murari  
wrote:
 
Hi Morten,

I am facing trouble while posting data using dhis2-web-api module for equipment.
I have attached EquipmentDataValueController.java file along with the trace 
which you can find in the attachment. When i am watching trace closely, i have 
found 

Nested exception is org.hibernate.exception.SQLGrammarException: could not 
execute statement 
Caused by: org.postgresql.util.PSQLException: ERROR: column "lastupdated" 
specified more than once


Although, i am using lastupdated only once in controller.

Can any one on list or you help, me how i can fix this issue!

Regards 
Brajesh Murari___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 13886: PNG maps, using proper period names

2014-01-28 Thread noreply

revno: 13886
committer: Lars Helge Øverland 
branch nick: dhis2
timestamp: Tue 2014-01-28 14:36:54 +0200
message:
  PNG maps, using proper period names
modified:
  dhis-2/dhis-services/dhis-service-mapgeneration/pom.xml
  
dhis-2/dhis-services/dhis-service-mapgeneration/src/main/java/org/hisp/dhis/mapgeneration/GeoToolsMapGenerationService.java
  
dhis-2/dhis-services/dhis-service-mapgeneration/src/main/java/org/hisp/dhis/mapgeneration/Legend.java
  
dhis-2/dhis-services/dhis-service-mapgeneration/src/main/java/org/hisp/dhis/mapgeneration/LegendSet.java
  
dhis-2/dhis-services/dhis-service-mapgeneration/src/main/resources/META-INF/dhis/beans.xml


--
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-mapgeneration/pom.xml'
--- dhis-2/dhis-services/dhis-service-mapgeneration/pom.xml	2014-01-09 21:56:49 +
+++ dhis-2/dhis-services/dhis-service-mapgeneration/pom.xml	2014-01-28 12:36:54 +
@@ -29,6 +29,10 @@
   org.hisp.dhis
   dhis-service-analytics
 
+
+  org.hisp.dhis
+  dhis-service-i18n
+
 
 
 

=== modified file 'dhis-2/dhis-services/dhis-service-mapgeneration/src/main/java/org/hisp/dhis/mapgeneration/GeoToolsMapGenerationService.java'
--- dhis-2/dhis-services/dhis-service-mapgeneration/src/main/java/org/hisp/dhis/mapgeneration/GeoToolsMapGenerationService.java	2013-11-04 18:46:33 +
+++ dhis-2/dhis-services/dhis-service-mapgeneration/src/main/java/org/hisp/dhis/mapgeneration/GeoToolsMapGenerationService.java	2014-01-28 12:36:54 +
@@ -42,6 +42,7 @@
 import org.hisp.dhis.analytics.AnalyticsService;
 import org.hisp.dhis.analytics.DataQueryParams;
 import org.hisp.dhis.common.Grid;
+import org.hisp.dhis.i18n.I18nManager;
 import org.hisp.dhis.mapgeneration.IntervalSet.DistributionStrategy;
 import org.hisp.dhis.mapping.Map;
 import org.hisp.dhis.mapping.MapView;
@@ -90,6 +91,13 @@
 {
 this.currentUserService = currentUserService;
 }
+
+private I18nManager i18nManager;
+
+public void setI18nManager( I18nManager i18nManager )
+{
+this.i18nManager = i18nManager;
+}
 
 // -
 // MapGenerationService implementation
@@ -156,7 +164,7 @@
 
 LegendSet legendSet = new LegendSet( mapLayer ); //TODO
 
-BufferedImage legendImage = legendSet.render();
+BufferedImage legendImage = legendSet.render( i18nManager.getI18nFormat() );
 
 // Combine the legend image and the map image into one image
 return combineLegendAndMapImages( legendImage, mapImage );

=== modified file 'dhis-2/dhis-services/dhis-service-mapgeneration/src/main/java/org/hisp/dhis/mapgeneration/Legend.java'
--- dhis-2/dhis-services/dhis-service-mapgeneration/src/main/java/org/hisp/dhis/mapgeneration/Legend.java	2014-01-28 12:20:49 +
+++ dhis-2/dhis-services/dhis-service-mapgeneration/src/main/java/org/hisp/dhis/mapgeneration/Legend.java	2014-01-28 12:36:54 +
@@ -34,6 +34,8 @@
 import java.util.ArrayList;
 import java.util.List;
 
+import org.hisp.dhis.i18n.I18nFormat;
+
 /**
  * A legend is a graphical presentation of data contained in a map layer. This
  * class works as helper for LegendSet when it comes to drawing the actual
@@ -46,7 +48,7 @@
 public class Legend
 {
 public static final Font TITLE_FONT = new Font( "title", Font.BOLD, 12 );
-public static final Font PLAIN_FONT = new Font( "plain", Font.PLAIN, 10 );
+public static final Font PLAIN_FONT = new Font( "plain", Font.PLAIN, 11 );
 
 private InternalMapLayer mapLayer;
 
@@ -65,13 +67,13 @@
 }
 }
 
-public void draw( Graphics2D g )
+public void draw( Graphics2D g, I18nFormat format )
 {
 g.setColor( Color.BLACK );
 g.setFont( TITLE_FONT );
 g.drawString( mapLayer.getName(), 0, 15 );
 g.setFont( PLAIN_FONT );
-g.drawString( mapLayer.getPeriod().getStartDateString() + "", 0, 35 );
+g.drawString( format.formatPeriod( mapLayer.getPeriod() ) + "", 0, 35 );
 
 g.translate( 0, HEADER_HEIGHT );
 

=== modified file 'dhis-2/dhis-services/dhis-service-mapgeneration/src/main/java/org/hisp/dhis/mapgeneration/LegendSet.java'
--- dhis-2/dhis-services/dhis-service-mapgeneration/src/main/java/org/hisp/dhis/mapgeneration/LegendSet.java	2013-10-16 09:44:07 +
+++ dhis-2/dhis-services/dhis-service-mapgeneration/src/main/java/org/hisp/dhis/mapgeneration/LegendSet.java	2014-01-28 12:36:54 +
@@ -35,6 +35,8 @@
 import java.util.ArrayList;
 import java.util.List;
 
+import org.hisp.dhis.i18n.I18nFormat;
+
 /**
  * This class can be used to render a set o

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 13885: support IN operator in person search

2014-01-28 Thread noreply

revno: 13885
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Tue 2014-01-28 19:22:12 +0700
message:
  support IN operator in person search
modified:
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/event/PersonController.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/event/PersonController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/event/PersonController.java	2014-01-28 12:12:50 +
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/event/PersonController.java	2014-01-28 12:22:12 +
@@ -165,7 +165,7 @@
 
 if ( split.length != 3 )
 {
-throw new HttpClientErrorException( HttpStatus.BAD_REQUEST, "Filter " + filter + " is not in valid format." +
+throw new HttpClientErrorException( HttpStatus.BAD_REQUEST, "Filter " + filter + " is not in valid format. " +
 "Valid syntax is attribute=ATTRIBUTE_UID:OPERATOR:VALUE." );
 }
 
@@ -218,6 +218,15 @@
 Restrictions.ge( "attributeValue.value", split[2] )
 ) );
 }
+else if ( "in".equals( split[1].toLowerCase() ) )
+{
+String[] in = split[2].split( ";" );
+
+and.add( Restrictions.and(
+Restrictions.eq( "attribute.uid", split[0] ),
+Restrictions.in( "attributeValue.value", in )
+) );
+}
 }
 
 criteria.addOrder( Order.desc( "lastUpdated" ) );

___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 13883: Added COUNT aggregation operator for data elements. Already supported by web api.

2014-01-28 Thread noreply

revno: 13883
committer: Lars Helge Øverland 
branch nick: dhis2
timestamp: Tue 2014-01-28 14:20:08 +0200
message:
  Added COUNT aggregation operator for data elements. Already supported by web 
api.
modified:
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/dataElementForm.vm


--
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-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/dataElementForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/dataElementForm.vm	2014-01-23 19:05:43 +
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/dataElementForm.vm	2014-01-28 12:20:08 +
@@ -142,6 +142,7 @@
 			
 $i18n.getString( "sum" )
 $i18n.getString( "average" )
+$i18n.getString( "count" )
 			
 		
 	

___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 13882: sort by lastUpdated in person search

2014-01-28 Thread noreply

revno: 13882
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Tue 2014-01-28 19:12:50 +0700
message:
  sort by lastUpdated in person search
modified:
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/event/PersonController.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/event/PersonController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/event/PersonController.java	2014-01-28 11:18:49 +
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/event/PersonController.java	2014-01-28 12:12:50 +
@@ -32,6 +32,7 @@
 import org.hibernate.SessionFactory;
 import org.hibernate.criterion.Conjunction;
 import org.hibernate.criterion.Disjunction;
+import org.hibernate.criterion.Order;
 import org.hibernate.criterion.Restrictions;
 import org.hisp.dhis.api.controller.WebOptions;
 import org.hisp.dhis.api.controller.exception.NotFoundException;
@@ -94,16 +95,16 @@
 @PreAuthorize( "hasRole('ALL') or hasRole('F_ACCESS_PATIENT_ATTRIBUTES')" )
 public String getPersons( @RequestParam( value = "orgUnit", required = false ) String orgUnitUid,
 @RequestParam( value = "program", required = false ) String programUid,
-@RequestParam( value = "attribute", required = false ) List filters,
+@RequestParam( value = "attribute", required = false ) List attributeFilters,
 @RequestParam( required = false ) Map parameters, Model model )
 throws Exception
 {
 WebOptions options = new WebOptions( parameters );
 Persons persons = new Persons();
 
-if ( filters != null )
+if ( attributeFilters != null )
 {
-persons = personsByFilter( filters, orgUnitUid );
+persons = personsByFilter( attributeFilters, orgUnitUid );
 }
 else if ( orgUnitUid != null )
 {
@@ -132,7 +133,7 @@
 }
 
 @SuppressWarnings( "unchecked" )
-private Persons personsByFilter( List filters, String orgUnitUid )
+private Persons personsByFilter( List attributeFilters, String orgUnitUid )
 {
 Criteria criteria = sessionFactory.getCurrentSession().createCriteria( Patient.class );
 criteria.createAlias( "attributeValues", "attributeValue" );
@@ -155,7 +156,7 @@
 }
 
 // validate attributes, and build criteria
-for ( String filter : filters )
+for ( String filter : attributeFilters )
 {
 String[] split = filter.split( ":" );
 
@@ -219,6 +220,8 @@
 }
 }
 
+criteria.addOrder( Order.desc( "lastUpdated" ) );
+
 return personService.getPersons( criteria.list() );
 }
 

___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 13881: minor NPE check, snapshot value can in certain cases be equal to null

2014-01-28 Thread noreply

revno: 13881
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Tue 2014-01-28 18:45:19 +0700
message:
  minor NPE check, snapshot value can in certain cases be equal to null
modified:
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/hibernate/HibernateEventListenerWiring.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-core/src/main/java/org/hisp/dhis/hibernate/HibernateEventListenerWiring.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/hibernate/HibernateEventListenerWiring.java	2014-01-28 04:23:09 +
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/hibernate/HibernateEventListenerWiring.java	2014-01-28 11:45:19 +
@@ -115,11 +115,14 @@
 
 Map map = (Map) oldValue;
 
-for ( Object o : map.keySet() )
+if ( oldValue != null )
 {
-if ( o instanceof IdentifiableObject )
+for ( Object o : map.keySet() )
 {
-oldCol.add( o );
+if ( o instanceof IdentifiableObject )
+{
+oldCol.add( o );
+}
 }
 }
 

___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 13880: minor

2014-01-28 Thread noreply

revno: 13880
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Tue 2014-01-28 18:18:49 +0700
message:
  minor
modified:
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/event/PersonController.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/event/PersonController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/event/PersonController.java	2014-01-28 11:17:59 +
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/event/PersonController.java	2014-01-28 11:18:49 +
@@ -207,7 +207,7 @@
 {
 and.add( Restrictions.and(
 Restrictions.eq( "attribute.uid", split[0] ),
-Restrictions.gt( "attributeValue.value", split[2] )
+Restrictions.lt( "attributeValue.value", split[2] )
 ) );
 }
 else if ( "ge".equals( split[1].toLowerCase() ) )

___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 13879: added operators ge, ne, gt, lt in person search

2014-01-28 Thread noreply

revno: 13879
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Tue 2014-01-28 18:17:59 +0700
message:
  added operators ge, ne, gt, lt in person search
modified:
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/event/PersonController.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/event/PersonController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/event/PersonController.java	2014-01-28 11:08:31 +
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/event/PersonController.java	2014-01-28 11:17:59 +
@@ -189,6 +189,34 @@
 Restrictions.eq( "attributeValue.value", split[2] )
 ) );
 }
+else if ( "ne".equals( split[1].toLowerCase() ) )
+{
+and.add( Restrictions.and(
+Restrictions.eq( "attribute.uid", split[0] ),
+Restrictions.ne( "attributeValue.value", split[2] )
+) );
+}
+else if ( "gt".equals( split[1].toLowerCase() ) )
+{
+and.add( Restrictions.and(
+Restrictions.eq( "attribute.uid", split[0] ),
+Restrictions.gt( "attributeValue.value", split[2] )
+) );
+}
+else if ( "lt".equals( split[1].toLowerCase() ) )
+{
+and.add( Restrictions.and(
+Restrictions.eq( "attribute.uid", split[0] ),
+Restrictions.gt( "attributeValue.value", split[2] )
+) );
+}
+else if ( "ge".equals( split[1].toLowerCase() ) )
+{
+and.add( Restrictions.and(
+Restrictions.eq( "attribute.uid", split[0] ),
+Restrictions.ge( "attributeValue.value", split[2] )
+) );
+}
 }
 
 return personService.getPersons( criteria.list() );

___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 13878: bug fix in program stage section action

2014-01-28 Thread noreply

revno: 13878
committer: Abyot Asalefew Gizaw aby...@gmail.com
branch nick: dhis2
timestamp: Tue 2014-01-28 12:11:19 +0100
message:
  bug fix in program stage section action
modified:
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/META-INF/dhis/beans.xml


--
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-maintenance/dhis-web-maintenance-patient/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/META-INF/dhis/beans.xml	2014-01-23 14:18:27 +
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/META-INF/dhis/beans.xml	2014-01-28 11:11:19 +
@@ -401,6 +401,7 @@
 		class="org.hisp.dhis.patient.action.programstage.GetProgramStageSectionAction"
 		scope="prototype">
 		
+		
 	
 
 	___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 13877: only join in organisationunit table if needed in person search

2014-01-28 Thread noreply

revno: 13877
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Tue 2014-01-28 18:08:31 +0700
message:
  only join in organisationunit table if needed in person search
modified:
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/event/PersonController.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/event/PersonController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/event/PersonController.java	2014-01-28 11:02:46 +
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/event/PersonController.java	2014-01-28 11:08:31 +
@@ -135,7 +135,6 @@
 private Persons personsByFilter( List filters, String orgUnitUid )
 {
 Criteria criteria = sessionFactory.getCurrentSession().createCriteria( Patient.class );
-criteria.createAlias( "organisationUnit", "organisationUnit" );
 criteria.createAlias( "attributeValues", "attributeValue" );
 criteria.createAlias( "attributeValue.patientAttribute", "attribute" );
 
@@ -151,6 +150,7 @@
 throw new HttpClientErrorException( HttpStatus.BAD_REQUEST, "OrganisationUnit with UID " + orgUnitUid + " does not exist." );
 }
 
+criteria.createAlias( "organisationUnit", "organisationUnit" );
 criteria.add( Restrictions.eq( "organisationUnit.uid", orgUnitUid ) );
 }
 

___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 13876: person search, allow searching for persons by ?attribute=attribute-uid:op:value, can be used mult...

2014-01-28 Thread noreply

revno: 13876
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Tue 2014-01-28 18:02:46 +0700
message:
  person search, allow searching for persons by 
?attribute=attribute-uid:op:value, can be used multiple times (or), also works 
together with orgUnit (and), currenly lives in PersonController, will be moved 
to service layer after tracker refactor
modified:
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/event/PersonController.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/event/PersonController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/event/PersonController.java	2014-01-28 09:03:46 +
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/event/PersonController.java	2014-01-28 11:02:46 +
@@ -28,12 +28,11 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import java.io.IOException;
-import java.util.Map;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
+import org.hibernate.Criteria;
+import org.hibernate.SessionFactory;
+import org.hibernate.criterion.Conjunction;
+import org.hibernate.criterion.Disjunction;
+import org.hibernate.criterion.Restrictions;
 import org.hisp.dhis.api.controller.WebOptions;
 import org.hisp.dhis.api.controller.exception.NotFoundException;
 import org.hisp.dhis.api.utils.ContextUtils;
@@ -46,6 +45,8 @@
 import org.hisp.dhis.dxf2.importsummary.ImportSummary;
 import org.hisp.dhis.dxf2.utils.JacksonUtils;
 import org.hisp.dhis.organisationunit.OrganisationUnit;
+import org.hisp.dhis.patient.Patient;
+import org.hisp.dhis.patient.PatientAttribute;
 import org.hisp.dhis.program.Program;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpStatus;
@@ -60,6 +61,12 @@
 import org.springframework.web.bind.annotation.ResponseStatus;
 import org.springframework.web.client.HttpClientErrorException;
 
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.util.List;
+import java.util.Map;
+
 /**
  * @author Morten Olav Hansen 
  */
@@ -76,6 +83,9 @@
 @Autowired
 private IdentifiableObjectManager manager;
 
+@Autowired
+private SessionFactory sessionFactory;
+
 // -
 // READ
 // -
@@ -84,13 +94,18 @@
 @PreAuthorize( "hasRole('ALL') or hasRole('F_ACCESS_PATIENT_ATTRIBUTES')" )
 public String getPersons( @RequestParam( value = "orgUnit", required = false ) String orgUnitUid,
 @RequestParam( value = "program", required = false ) String programUid,
+@RequestParam( value = "attribute", required = false ) List filters,
 @RequestParam( required = false ) Map parameters, Model model )
 throws Exception
 {
 WebOptions options = new WebOptions( parameters );
 Persons persons = new Persons();
-
-if ( orgUnitUid != null )
+
+if ( filters != null )
+{
+persons = personsByFilter( filters, orgUnitUid );
+}
+else if ( orgUnitUid != null )
 {
 if ( programUid != null )
 {
@@ -116,6 +131,69 @@
 return "persons";
 }
 
+@SuppressWarnings( "unchecked" )
+private Persons personsByFilter( List filters, String orgUnitUid )
+{
+Criteria criteria = sessionFactory.getCurrentSession().createCriteria( Patient.class );
+criteria.createAlias( "organisationUnit", "organisationUnit" );
+criteria.createAlias( "attributeValues", "attributeValue" );
+criteria.createAlias( "attributeValue.patientAttribute", "attribute" );
+
+Disjunction or = Restrictions.or();
+criteria.add( or );
+
+if ( orgUnitUid != null )
+{
+OrganisationUnit organisationUnit = manager.get( OrganisationUnit.class, orgUnitUid );
+
+if ( organisationUnit == null )
+{
+throw new HttpClientErrorException( HttpStatus.BAD_REQUEST, "OrganisationUnit with UID " + orgUnitUid + " does not exist." );
+}
+
+criteria.add( Restrictions.eq( "organisationUnit.uid", orgUnitUid ) );
+}
+
+// validate attributes, and build criteria
+for ( String filter : filters )
+{
+String[] split = filter.split( ":" );
+
+Conjunction and = Restrictions.and();
+or.add( and );
+
+

[Dhis2-devs] Fwd: [DHIS2] Upgrade

2014-01-28 Thread Prosper BT
This should make your day,

Message from the Field after upgrading to 2.13



-- Forwarded message --
From: DHIS2 Message [No reply] 
Date: Tue, Jan 28, 2014 at 1:07 PM
Subject: [DHIS2] Upgrade
To:


What an upgrade! I like it. The out look is a "morale booster". Thanks DHIS
2 team!


Eyattu Jude
Amuria District
eyattuj...@gmail.com
0775523624



-- 
Prosper Behumbiize, MPH
Phone:+256 414 320076
Cell: +256 772 139037
 +256 752 751776
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 13875: exposing attribute code through the web api

2014-01-28 Thread noreply

revno: 13875
committer: Abyot Asalefew Gizaw aby...@gmail.com
branch nick: dhis2
timestamp: Tue 2014-01-28 11:01:16 +0100
message:
  exposing attribute code through the web api
modified:
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/enrollment/Enrollment.java
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/person/AbstractPersonService.java
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/person/Attribute.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-dxf2/src/main/java/org/hisp/dhis/dxf2/events/enrollment/Enrollment.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/enrollment/Enrollment.java	2014-01-02 13:13:21 +
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/enrollment/Enrollment.java	2014-01-28 10:01:16 +
@@ -38,7 +38,7 @@
 /**
  * @author Morten Olav Hansen 
  */
-@JacksonXmlRootElement(localName = "enrollment", namespace = DxfNamespaces.DXF_2_0)
+@JacksonXmlRootElement( localName = "enrollment", namespace = DxfNamespaces.DXF_2_0 )
 public class Enrollment
 {
 private String enrollment;
@@ -57,8 +57,8 @@
 {
 }
 
-@JsonProperty(required = true)
-@JacksonXmlProperty(isAttribute = true)
+@JsonProperty( required = true )
+@JacksonXmlProperty( isAttribute = true )
 public String getPerson()
 {
 return person;
@@ -69,8 +69,8 @@
 this.person = person;
 }
 
-@JsonProperty(required = true)
-@JacksonXmlProperty(isAttribute = true)
+@JsonProperty( required = true )
+@JacksonXmlProperty( isAttribute = true )
 public String getEnrollment()
 {
 return enrollment;
@@ -81,8 +81,8 @@
 this.enrollment = enrollment;
 }
 
-@JsonProperty(required = true)
-@JacksonXmlProperty(isAttribute = true)
+@JsonProperty( required = true )
+@JacksonXmlProperty( isAttribute = true )
 public String getProgram()
 {
 return program;
@@ -93,8 +93,8 @@
 this.program = program;
 }
 
-@JsonProperty(required = true)
-@JacksonXmlProperty(namespace = DxfNamespaces.DXF_2_0)
+@JsonProperty( required = true )
+@JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
 public EnrollmentStatus getStatus()
 {
 return status;
@@ -105,8 +105,8 @@
 this.status = status;
 }
 
-@JsonProperty(required = true)
-@JacksonXmlProperty(namespace = DxfNamespaces.DXF_2_0)
+@JsonProperty( required = true )
+@JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
 public Date getDateOfEnrollment()
 {
 return dateOfEnrollment;
@@ -117,8 +117,8 @@
 this.dateOfEnrollment = dateOfEnrollment;
 }
 
-@JsonProperty(required = true)
-@JacksonXmlProperty(namespace = DxfNamespaces.DXF_2_0)
+@JsonProperty( required = true )
+@JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
 public Date getDateOfIncident()
 {
 return dateOfIncident;
@@ -132,17 +132,26 @@
 @Override
 public boolean equals( Object o )
 {
-if ( this == o ) return true;
-if ( o == null || getClass() != o.getClass() ) return false;
+if ( this == o )
+return true;
+if ( o == null || getClass() != o.getClass() )
+return false;
 
 Enrollment that = (Enrollment) o;
 
-if ( dateOfEnrollment != null ? !dateOfEnrollment.equals( that.dateOfEnrollment ) : that.dateOfEnrollment != null ) return false;
-if ( dateOfIncident != null ? !dateOfIncident.equals( that.dateOfIncident ) : that.dateOfIncident != null ) return false;
-if ( enrollment != null ? !enrollment.equals( that.enrollment ) : that.enrollment != null ) return false;
-if ( person != null ? !person.equals( that.person ) : that.person != null ) return false;
-if ( program != null ? !program.equals( that.program ) : that.program != null ) return false;
-if ( status != that.status ) return false;
+if ( dateOfEnrollment != null ? !dateOfEnrollment.equals( that.dateOfEnrollment )
+: that.dateOfEnrollment != null )
+return false;
+if ( dateOfIncident != null ? !dateOfIncident.equals( that.dateOfIncident ) : that.dateOfIncident != null )
+return false;
+if ( enrollment != null ? !enrollment.equals( that.enrollment ) : that.enrollment != null )
+return false;
+if ( person != null ? !person.equals( that.person ) : that.person != null )
+return false;
+if ( program != null ? !program.equals( that.p

Re: [Dhis2-devs] [Dhis2-users] OpenMRS to DHIS2

2014-01-28 Thread Pascal Brandt
Hi,

This 
modulemay
also be of interest.

Regards,
Pascal



On 28 January 2014 08:33, Thái Chương  wrote:

> Currently I don't think that we have a tool for mapping between openMRS
> report and DHIS2 report.
> But the module which awanth and Mohammad Ullah said can collect data from
> openMRS (by sql queries) and transfer to a dataset in DHIS2. And It's not
> automatic.
> It should give you some ideas
>
>
> 2014-01-28 Mohammad Ullah 
>
> Hi Edwin,
>>
>> Follow the document attached here which describes how to transfer data
>> from openmrs to dhis2 using the DHIS2 reporting module. This is an example
>> from Community Health Information Tracking System (CHITS). Christine
>> ceblano is an expert on this topics as she has done this for Philippine.
>>
>>
>> On Mon, Jan 27, 2014 at 12:27 PM, Edwin Mulwa  wrote:
>>
>>> Hi All,
>>>
>>> Is there a tool/module that automates data transfer from OpenMRS to
>>> DHIS2? I need such a tool for some work that I am doing.
>>>
>>> Thanks.
>>>
>>> Edwin
>>>
>>>
>>> ___
>>> Mailing list: https://launchpad.net/~dhis2-users
>>> Post to : dhis2-us...@lists.launchpad.net
>>> Unsubscribe : https://launchpad.net/~dhis2-users
>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>>
>>
>>
>> --
>> *Mohammad Ullah*
>> 
>> *Technical Advisor - HIS*
>> Priority Area - Health
>> Deutsche Gesellschaft für Internationale Zusammenarbeit (GIZ) GmbH
>> House10/A, Road 90, Gulshan 2, Dhaka 1212, Bangladesh
>>
>> *Office location:*
>> Room # 304, Shahid Dr. Milan Bhavan,
>> Management Information System (MIS)
>> Directorate General of Health Services of MoHFW, Mohakhali,
>> Dhaka-1212, Bangladesh
>> T.  +880 (0) 8816459, 8816412 Ext:118
>>  M. +88 0196 3156 988
>> Web. http://lnkd.in/gQrxXz
>> E  
>> mohammad.ul...@giz.de,
>> munnab...@gmail.com
>>
>> *Skype : mohammad_ullah_giz*
>>
>
>
>
> --
> Thai Chuong
> HCMUT - Computer science and engineering Faculty
> Website: http://thuytruc.net
> YM/Skype : thaichuong159
> Email: thaichuong...@gmail.com
> Phone: (+84) 918776134
>
> ___
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to : dhis2-devs@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>


-- 

*Pascal BrandtSenio*

*r Software Developer, Jembi Health Systems |  SOUTH AFRICA Mobile: +27 84
827 9342 | Office: +27 21 701 0939 | Skype:
psbrandtE-mail: pas...@jembi.org *
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 13874: minor code reformat in PersonController

2014-01-28 Thread noreply

revno: 13874
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Tue 2014-01-28 16:03:46 +0700
message:
  minor code reformat in PersonController
modified:
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/event/PersonController.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/event/PersonController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/event/PersonController.java	2014-01-23 14:18:27 +
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/event/PersonController.java	2014-01-28 09:03:46 +
@@ -82,10 +82,9 @@
 
 @RequestMapping( value = "", method = RequestMethod.GET )
 @PreAuthorize( "hasRole('ALL') or hasRole('F_ACCESS_PATIENT_ATTRIBUTES')" )
-public String getPersons( @RequestParam( value = "orgUnit", required = false )
-String orgUnitUid, @RequestParam( value = "program", required = false )
-String programUid, @RequestParam( required = false )
-Map parameters, Model model )
+public String getPersons( @RequestParam( value = "orgUnit", required = false ) String orgUnitUid,
+@RequestParam( value = "program", required = false ) String programUid,
+@RequestParam( required = false ) Map parameters, Model model )
 throws Exception
 {
 WebOptions options = new WebOptions( parameters );
@@ -119,9 +118,7 @@
 
 @RequestMapping( value = "/{id}", method = RequestMethod.GET )
 @PreAuthorize( "hasRole('ALL') or hasRole('F_ACCESS_PATIENT_ATTRIBUTES')" )
-public String getPerson( @PathVariable
-String id, @RequestParam
-Map parameters, Model model )
+public String getPerson( @PathVariable String id, @RequestParam Map parameters, Model model )
 throws NotFoundException
 {
 WebOptions options = new WebOptions( parameters );
@@ -196,8 +193,7 @@
 @RequestMapping( value = "/{id}", method = RequestMethod.PUT, consumes = MediaType.APPLICATION_XML_VALUE )
 @ResponseStatus( value = HttpStatus.NO_CONTENT )
 @PreAuthorize( "hasRole('ALL') or hasRole('F_PATIENT_ADD')" )
-public void updatePersonXml( @PathVariable
-String id, HttpServletRequest request, HttpServletResponse response )
+public void updatePersonXml( @PathVariable String id, HttpServletRequest request, HttpServletResponse response )
 throws IOException
 {
 ImportSummary importSummary = personService.updatePersonXml( id, request.getInputStream() );
@@ -207,8 +203,7 @@
 @RequestMapping( value = "/{id}", method = RequestMethod.PUT, consumes = MediaType.APPLICATION_JSON_VALUE )
 @ResponseStatus( value = HttpStatus.NO_CONTENT )
 @PreAuthorize( "hasRole('ALL') or hasRole('F_PATIENT_ADD')" )
-public void updatePersonJson( @PathVariable
-String id, HttpServletRequest request, HttpServletResponse response )
+public void updatePersonJson( @PathVariable String id, HttpServletRequest request, HttpServletResponse response )
 throws IOException
 {
 ImportSummary importSummary = personService.updatePersonJson( id, request.getInputStream() );
@@ -222,8 +217,7 @@
 @RequestMapping( value = "/{id}", method = RequestMethod.DELETE )
 @ResponseStatus( value = HttpStatus.NO_CONTENT )
 @PreAuthorize( "hasRole('ALL') or hasRole('F_PATIENT_DELETE')" )
-public void deletePerson( @PathVariable
-String id )
+public void deletePerson( @PathVariable String id )
 throws NotFoundException
 {
 Person person = getPerson( id );

___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] [Bug 1273379] [NEW] war file download from stable link not updated

2014-01-28 Thread Adebusoye Anifalaje
Thanks.

Got it.

Busoye


On 28 Jan 2014, at 10:23, Morten Olav Hansen <1273...@bugs.launchpad.net> wrote:

> Hi,
> 
> Could you please try with this [1] link, until we fix stable.dhis2.org ?
> This will always point to the newest build.
> 
> [1]
> http://apps.dhis2.org/ci/job/dhis-2.14/lastSuccessfulBuild/artifact/dhis-2/dhis-web/dhis-web-portal/target/dhis.war
> 
> --
> Morten
> 
> 
> On Tue, Jan 28, 2014 at 2:02 AM, Adebusoye Anifalaje wrote:
> 
>> Public bug reported:
>> 
>> Just downloaded a war file from the stable.dhis2.org link. It is not
>> pointing to the most current version. It's important to check this out
>> because I think the fix  for analytics tables was implemented after this
>> build.
>> 
>> Thanks
>> 
>> Version:
>> 2.14
>> Build revision:
>> 13726
>> Build date:
>> 2014-01-20 21:20
>> 
>> ** Affects: dhis2
>> Importance: Undecided
>> Status: New
>> 
>> --
>> You received this bug notification because you are subscribed to DHIS.
>> https://bugs.launchpad.net/bugs/1273379
>> 
>> Title:
>>  war file download from stable link not updated
>> 
>> Status in DHIS 2:
>>  New
>> 
>> Bug description:
>>  Just downloaded a war file from the stable.dhis2.org link. It is not
>>  pointing to the most current version. It's important to check this out
>>  because I think the fix  for analytics tables was implemented after
>>  this build.
>> 
>>  Thanks
>> 
>>  Version:
>>  2.14
>>  Build revision:
>>  13726
>>  Build date:
>>  2014-01-20 21:20
>> 
>> To manage notifications about this bug go to:
>> https://bugs.launchpad.net/dhis2/+bug/1273379/+subscriptions
>> 
> 
> -- 
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1273379
> 
> Title:
>  war file download from stable link not updated
> 
> Status in DHIS 2:
>  New
> 
> Bug description:
>  Just downloaded a war file from the stable.dhis2.org link. It is not
>  pointing to the most current version. It's important to check this out
>  because I think the fix  for analytics tables was implemented after
>  this build.
> 
>  Thanks
> 
>  Version:
>  2.14
>  Build revision:
>  13726
>  Build date:
>  2014-01-20 21:20
> 
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/dhis2/+bug/1273379/+subscriptions

-- 
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.
https://bugs.launchpad.net/bugs/1273379

Title:
  war file download from stable link not updated

Status in DHIS 2:
  New

Bug description:
  Just downloaded a war file from the stable.dhis2.org link. It is not
  pointing to the most current version. It's important to check this out
  because I think the fix  for analytics tables was implemented after
  this build.

  Thanks

  Version:
  2.14
  Build revision:
  13726
  Build date:
  2014-01-20 21:20

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1273379/+subscriptions

___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] [Bug 1273379] [NEW] war file download from stable link not updated

2014-01-28 Thread Morten Olav Hansen
Hi,

Could you please try with this [1] link, until we fix stable.dhis2.org ?
This will always point to the newest build.

[1]
http://apps.dhis2.org/ci/job/dhis-2.14/lastSuccessfulBuild/artifact/dhis-2/dhis-web/dhis-web-portal/target/dhis.war

--
Morten


On Tue, Jan 28, 2014 at 2:02 AM, Adebusoye Anifalaje wrote:

> Public bug reported:
>
> Just downloaded a war file from the stable.dhis2.org link. It is not
> pointing to the most current version. It's important to check this out
> because I think the fix  for analytics tables was implemented after this
> build.
>
> Thanks
>
> Version:
> 2.14
> Build revision:
> 13726
> Build date:
> 2014-01-20 21:20
>
> ** Affects: dhis2
>  Importance: Undecided
>  Status: New
>
> --
> You received this bug notification because you are subscribed to DHIS.
> https://bugs.launchpad.net/bugs/1273379
>
> Title:
>   war file download from stable link not updated
>
> Status in DHIS 2:
>   New
>
> Bug description:
>   Just downloaded a war file from the stable.dhis2.org link. It is not
>   pointing to the most current version. It's important to check this out
>   because I think the fix  for analytics tables was implemented after
>   this build.
>
>   Thanks
>
>   Version:
>   2.14
>   Build revision:
>   13726
>   Build date:
>   2014-01-20 21:20
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/dhis2/+bug/1273379/+subscriptions
>

-- 
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.
https://bugs.launchpad.net/bugs/1273379

Title:
  war file download from stable link not updated

Status in DHIS 2:
  New

Bug description:
  Just downloaded a war file from the stable.dhis2.org link. It is not
  pointing to the most current version. It's important to check this out
  because I think the fix  for analytics tables was implemented after
  this build.

  Thanks

  Version:
  2.14
  Build revision:
  13726
  Build date:
  2014-01-20 21:20

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1273379/+subscriptions

___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 13873: fixes for updating event status in event-api

2014-01-28 Thread noreply

revno: 13873
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Tue 2014-01-28 15:10:39 +0700
message:
  fixes for updating event status in event-api
modified:
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/AbstractEventService.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-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/AbstractEventService.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/AbstractEventService.java	2014-01-27 10:31:33 +
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/AbstractEventService.java	2014-01-28 08:10:39 +
@@ -462,10 +462,28 @@
 
 String storedBy = getStoredBy( event, null );
 
+if ( event.getStatus() == EventStatus.ACTIVE )
+{
+programStageInstance.setCompleted( false );
+programStageInstance.setStatus( ProgramStageInstance.ACTIVE_STATUS );
+programStageInstance.setCompletedDate( null );
+programStageInstance.setCompletedUser( null );
+}
+else if ( event.getStatus() == EventStatus.COMPLETED )
+{
+programStageInstance.setStatus( ProgramStageInstance.COMPLETED_STATUS );
+programStageInstance.setCompletedDate( date );
+programStageInstance.setCompletedUser( storedBy );
+
+if ( !programStageInstance.isCompleted() )
+{
+programStageInstanceService.completeProgramStageInstance( programStageInstance, i18nManager.getI18nFormat() );
+}
+}
+
 programStageInstance.setDueDate( date );
 programStageInstance.setExecutionDate( date );
 programStageInstance.setOrganisationUnit( organisationUnit );
-programStageInstance.setCompletedUser( storedBy );
 
 programStageInstanceService.updateProgramStageInstance( programStageInstance );
 

___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp