[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 16548: Fixed bug - Not able to start DHIS on a empty database.

2014-08-28 Thread noreply

revno: 16548
committer: Tran Chau
branch nick: dhis2
timestamp: Thu 2014-08-28 14:05:34 +0700
message:
   Fixed bug - Not able to start DHIS on a empty database.
modified:
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/InitTableAlteror.java
  
dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/startup/TableAlteror.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/startup/InitTableAlteror.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/InitTableAlteror.java	2014-07-03 09:17:44 +
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/InitTableAlteror.java	2014-08-28 07:05:34 +
@@ -62,6 +62,7 @@
 executeSql( "UPDATE programstageinstance SET status='ACTIVE' WHERE status='0';" );
 executeSql( "UPDATE programstageinstance SET status='COMPLETED' WHERE status='1';" );
 executeSql( "UPDATE programstageinstance SET status='SKIPPED' WHERE status='5';" );
+executeSql( "ALTER TABLE program DROP COLUMN displayonallorgunit" );
 }
 
 // -

=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/startup/TableAlteror.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/startup/TableAlteror.java	2014-08-26 12:43:04 +
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/startup/TableAlteror.java	2014-08-28 07:05:34 +
@@ -300,7 +300,6 @@
 updateProgramStageList();
 updateProgramAttributeList();
 
-executeSql( "ALTER TABLE program DROP COLUMN displayonallorgunit" );
 }
 
 // -

___
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] Problems with creating an SQL view in 2.16

2014-08-28 Thread Jason Pickering
Looks like there was an attempt to fix this in rev 14845, but still not
working for me.

We are using

Version:2.16Build revision:16370
Probably could be hacked rather easily, but not sure if things are still
not fixed properly in the startup routines?
Regards,Jason
Caused by: org.postgresql.util.PSQLException: ERROR: null value in column
"viewid" violates not-null constraint
  Detail: Failing row contains (null, test sql view, , SELECT uid, name
from organisationunit LIMIT 10;, bMTwKD2Vpe0, null, 2014-08-28
07:41:46.921, 4511, 2014-08-28 07:41:46.921, 2361, rw--).
at
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2161)
at
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1890)
at
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:560)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:417)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:363)
at
com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:105)
at
org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:133)
___
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] Problems with creating an SQL view in 2.16

2014-08-28 Thread Lars Helge Øverland
Hi Jason,

can you execute this on your db and see if the query fails, if so provide
the log?

alter table sqlview drop column viewid;

regards,

Lars



On Thu, Aug 28, 2014 at 9:43 AM, Jason Pickering <
jason.p.picker...@gmail.com> wrote:

> Looks like there was an attempt to fix this in rev 14845, but still not
> working for me.
>
> We are using
>
> Version:2.16 Build revision:16370
> Probably could be hacked rather easily, but not sure if things are still
> not fixed properly in the startup routines?
> Regards,Jason
> Caused by: org.postgresql.util.PSQLException: ERROR: null value in column
> "viewid" violates not-null constraint
>   Detail: Failing row contains (null, test sql view, , SELECT uid, name
> from organisationunit LIMIT 10;, bMTwKD2Vpe0, null, 2014-08-28
> 07:41:46.921, 4511, 2014-08-28 07:41:46.921, 2361, rw--).
> at
> org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2161)
> at
> org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1890)
> at
> org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
> at
> org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:560)
> at
> org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:417)
> at
> org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:363)
> at
> com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:105)
> at
> org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:133)
>
>
> ___
> 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] Problems with creating an SQL view in 2.16

2014-08-28 Thread Jason Pickering
That does not work, but this does (CAREFUL WITH THIS ONE)

alter table sqlview drop column viewid CASCADE;

There is a foreign key reference to some other table, but cannot recall
which one it was. Something to do with users I think.

Regards,
Jason



On Thu, Aug 28, 2014 at 10:10 AM, Lars Helge Øverland 
wrote:

> Hi Jason,
>
> can you execute this on your db and see if the query fails, if so provide
> the log?
>
> alter table sqlview drop column viewid;
>
> regards,
>
> Lars
>
>
>
> On Thu, Aug 28, 2014 at 9:43 AM, Jason Pickering <
> jason.p.picker...@gmail.com> wrote:
>
>> Looks like there was an attempt to fix this in rev 14845, but still not
>> working for me.
>>
>> We are using
>>
>> Version:2.16 Build revision:16370
>> Probably could be hacked rather easily, but not sure if things are still
>> not fixed properly in the startup routines?
>> Regards,Jason
>> Caused by: org.postgresql.util.PSQLException: ERROR: null value in column
>> "viewid" violates not-null constraint
>>   Detail: Failing row contains (null, test sql view, , SELECT uid, name
>> from organisationunit LIMIT 10;, bMTwKD2Vpe0, null, 2014-08-28
>> 07:41:46.921, 4511, 2014-08-28 07:41:46.921, 2361, rw--).
>> at
>> org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2161)
>> at
>> org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1890)
>> at
>> org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
>> at
>> org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:560)
>> at
>> org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:417)
>> at
>> org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:363)
>> at
>> com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:105)
>> at
>> org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:133)
>>
>>
>> ___
>> 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] Problems with creating an SQL view in 2.16

2014-08-28 Thread Lars Helge Øverland
Sure, that's the problem. We wanted to rename the "viewid" column but
renaming primary keys is tricky when using hibernate.

We must include a drop constraint on that foreign key, let me know if you
remember the name of it.

Lars



On Thu, Aug 28, 2014 at 10:13 AM, Jason Pickering <
jason.p.picker...@gmail.com> wrote:

> That does not work, but this does (CAREFUL WITH THIS ONE)
>
> alter table sqlview drop column viewid CASCADE;
>
> There is a foreign key reference to some other table, but cannot recall
> which one it was. Something to do with users I think.
>
> Regards,
> Jason
>
>
>
> On Thu, Aug 28, 2014 at 10:10 AM, Lars Helge Øverland  > wrote:
>
>> Hi Jason,
>>
>> can you execute this on your db and see if the query fails, if so provide
>> the log?
>>
>> alter table sqlview drop column viewid;
>>
>> regards,
>>
>> Lars
>>
>>
>>
>> On Thu, Aug 28, 2014 at 9:43 AM, Jason Pickering <
>> jason.p.picker...@gmail.com> wrote:
>>
>>> Looks like there was an attempt to fix this in rev 14845, but still not
>>> working for me.
>>>
>>> We are using
>>>
>>> Version:2.16 Build revision:16370
>>> Probably could be hacked rather easily, but not sure if things are still
>>> not fixed properly in the startup routines?
>>> Regards,Jason
>>> Caused by: org.postgresql.util.PSQLException: ERROR: null value in
>>> column "viewid" violates not-null constraint
>>>   Detail: Failing row contains (null, test sql view, , SELECT uid, name
>>> from organisationunit LIMIT 10;, bMTwKD2Vpe0, null, 2014-08-28
>>> 07:41:46.921, 4511, 2014-08-28 07:41:46.921, 2361, rw--).
>>> at
>>> org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2161)
>>> at
>>> org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1890)
>>> at
>>> org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
>>> at
>>> org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:560)
>>> at
>>> org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:417)
>>> at
>>> org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:363)
>>> at
>>> com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:105)
>>> at
>>> org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:133)
>>>
>>>
>>> ___
>>> 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] Empty database of DHIS2.Sql PostgreSQL

2014-08-28 Thread Guy Ekani
Hello Sir,

Please can u send me an empty database of DHIS2.sql, so that i can restore on 
PostgreSQL.

Thank U, Sincerely

 
= 
Guy ___
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] Empty database of DHIS2.Sql PostgreSQL

2014-08-28 Thread Guy Ekani
Thank u very much Its running !

 
= 
 Guy 






Le Mercredi 27 août 2014 16h56, Alex Tumwesigye  a écrit 
:
 


Dear Guy,

Create an empty postgreSQL database and edit your hibernate.properties file to 
point to your new database. Start tomcat, it will deploy DHIS2 application and 
this will create for you an empty database.

Alex



On Wed, Aug 27, 2014 at 6:51 PM, Guy Ekani  wrote:

Hello Sir,
>
>
>Please can u send me an empty database of DHIS2.sql, so that i can restore on 
>PostgreSQL.
>
>
>Thank U, Sincerely
>
> 
>= 
>Guy 
>
>
>
>
>
>
>
>___
>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
>
>


-- 

Alex Tumwesigye

Teaching Assistant,
Department of Electrical and Computer Engineering
College of Engineering, Design, Art and Technology, Makerere University

IT Consultant - BarefootPower Uganda Ltd, SmartSolar, Kenya

IT Specialist (Servers, Networks and Security, Health Information Systems - 
DHIS2 ) & Solar Consultant

+256 774149 775, + 256 759 800161

"I don't want to be anything other than what I have been - one tree hill "___
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 16549: Update the link the in left side menu for SQL View.

2014-08-28 Thread noreply

revno: 16549
committer: Tran Chau
branch nick: dhis2
timestamp: Thu 2014-08-28 15:47:36 +0700
message:
  Update the link the in left side menu for SQL View.
modified:
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/addSqlViewForm.vm
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/index.vm
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/menu.vm
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/showDataSqlViewForm.vm
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/sqlView.vm
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/updateSqlViewForm.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-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/addSqlViewForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/addSqlViewForm.vm	2014-03-25 07:48:07 +
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/addSqlViewForm.vm	2014-08-28 08:47:36 +
@@ -25,7 +25,7 @@
 			
 			
 
-
+
 			
 		
 	

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/index.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/index.vm	2013-10-03 09:11:19 +
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/index.vm	2014-08-28 08:47:36 +
@@ -6,7 +6,7 @@
 #introListImgItem( "displayMaintenanceForm.action" "maintenance" "maintenance" )
 #introListImgItem( "displayResourceTableForm.action" "resource_table" "resourcetable" )
 #introListImgItem( "locale.action" "locale" "datadictionary" )
-#introListImgItem( "showSqlViewListForm.action" "sql_view" "sqlview" )
+#introListImgItem( "sqlView.action" "sql_view" "sqlview" )
 #introListImgItem( "displayOrganisationUnitMergeForm.action" "organisation_unit_merge" "organisationunitmerge" )
 #introListImgItem( "displayDuplicateDataEliminationForm.action" "duplicate_data_elimination" "duplicatedataelimination" )
 #introListImgItem( "viewStatistics.action" "data_statistics" "datastatistics" )

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/menu.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/menu.vm	2013-10-03 09:11:19 +
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/menu.vm	2014-08-28 08:47:36 +
@@ -7,7 +7,7 @@
 	$i18n.getString( "maintenance" ) 
 	$i18n.getString( "resource_table" ) 
 	$i18n.getString( "locale" ) 
-	$i18n.getString( "sql_view" ) 
+	$i18n.getString( "sql_view" ) 
 	$i18n.getString( "organisation_unit_merge" ) 
 $i18n.getString( "duplicate_data_elimination" ) 
 	$i18n.getString( "data_statistics" ) 

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/showDataSqlViewForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/showDataSqlViewForm.vm	2014-05-31 11:11:26 +
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/showDataSqlViewForm.vm	2014-08-28 08:47:36 +
@@ -23,7 +23,7 @@
 
 
 
-
+
 
 
 

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/sqlView.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/sqlView.vm	2014-06-13 09:05:03 +
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/sqlView.vm	2014-08-28 08:47:36 +
@@ -10,7 +10,7 @@
   menuItemActiveClass: 'contextMenuItemActive'
 });
 	});
-
+	isAjax = false;
 	var i18n_none = '$encoder.jsEscape( $i18n.getString( "none" ) , "'")';
 	var i18n_confirm_delete = '$encoder.jsEscape( $i18n.get

Re: [Dhis2-devs] Problems with creating an SQL view in 2.16

2014-08-28 Thread Jason Pickering
Not 100% sure, but think is was this

Referenced by:
TABLE "sqlviewusergroupaccesses" CONSTRAINT "fk39f92993428ceacc"
FOREIGN KEY (sqlviewid) REFERENCES sqlview(viewid)


On Thu, Aug 28, 2014 at 10:15 AM, Lars Helge Øverland 
wrote:

> Sure, that's the problem. We wanted to rename the "viewid" column but
> renaming primary keys is tricky when using hibernate.
>
> We must include a drop constraint on that foreign key, let me know if you
> remember the name of it.
>
> Lars
>
>
>
> On Thu, Aug 28, 2014 at 10:13 AM, Jason Pickering <
> jason.p.picker...@gmail.com> wrote:
>
>> That does not work, but this does (CAREFUL WITH THIS ONE)
>>
>> alter table sqlview drop column viewid CASCADE;
>>
>> There is a foreign key reference to some other table, but cannot recall
>> which one it was. Something to do with users I think.
>>
>> Regards,
>> Jason
>>
>>
>>
>> On Thu, Aug 28, 2014 at 10:10 AM, Lars Helge Øverland <
>> larshe...@gmail.com> wrote:
>>
>>> Hi Jason,
>>>
>>> can you execute this on your db and see if the query fails, if so
>>> provide the log?
>>>
>>> alter table sqlview drop column viewid;
>>>
>>> regards,
>>>
>>> Lars
>>>
>>>
>>>
>>> On Thu, Aug 28, 2014 at 9:43 AM, Jason Pickering <
>>> jason.p.picker...@gmail.com> wrote:
>>>
 Looks like there was an attempt to fix this in rev 14845, but still not
 working for me.

 We are using

 Version:2.16 Build revision:16370
 Probably could be hacked rather easily, but not sure if things are
 still not fixed properly in the startup routines?
 Regards,Jason
 Caused by: org.postgresql.util.PSQLException: ERROR: null value in
 column "viewid" violates not-null constraint
   Detail: Failing row contains (null, test sql view, , SELECT uid, name
 from organisationunit LIMIT 10;, bMTwKD2Vpe0, null, 2014-08-28
 07:41:46.921, 4511, 2014-08-28 07:41:46.921, 2361, rw--).
 at
 org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2161)
 at
 org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1890)
 at
 org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
 at
 org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:560)
 at
 org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:417)
 at
 org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:363)
 at
 com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:105)
 at
 org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:133)


 ___
 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] Problems with creating an SQL view in 2.16

2014-08-28 Thread Jason Pickering
That may look a little funny actually, because in the affected system, the
key was slightly different. This is what it looks like now on another 2.16
system.

Referenced by:
TABLE "sqlviewusergroupaccesses" CONSTRAINT "fk39f92993428ceacc"
FOREIGN KEY (sqlviewid) REFERENCES sqlview(sqlviewid)

So, I think I should have hacked it as

Referenced by:
TABLE "sqlviewusergroupaccesses" CONSTRAINT "fk39f92993428ceacc"
FOREIGN KEY (viewid) REFERENCES sqlview(viewid) ?




On Thu, Aug 28, 2014 at 10:53 AM, Jason Pickering <
jason.p.picker...@gmail.com> wrote:

> Not 100% sure, but think is was this
>
> Referenced by:
> TABLE "sqlviewusergroupaccesses" CONSTRAINT "fk39f92993428ceacc"
> FOREIGN KEY (sqlviewid) REFERENCES sqlview(viewid)
>
>
> On Thu, Aug 28, 2014 at 10:15 AM, Lars Helge Øverland  > wrote:
>
>> Sure, that's the problem. We wanted to rename the "viewid" column but
>> renaming primary keys is tricky when using hibernate.
>>
>> We must include a drop constraint on that foreign key, let me know if you
>> remember the name of it.
>>
>> Lars
>>
>>
>>
>> On Thu, Aug 28, 2014 at 10:13 AM, Jason Pickering <
>> jason.p.picker...@gmail.com> wrote:
>>
>>> That does not work, but this does (CAREFUL WITH THIS ONE)
>>>
>>> alter table sqlview drop column viewid CASCADE;
>>>
>>> There is a foreign key reference to some other table, but cannot recall
>>> which one it was. Something to do with users I think.
>>>
>>> Regards,
>>> Jason
>>>
>>>
>>>
>>> On Thu, Aug 28, 2014 at 10:10 AM, Lars Helge Øverland <
>>> larshe...@gmail.com> wrote:
>>>
 Hi Jason,

 can you execute this on your db and see if the query fails, if so
 provide the log?

 alter table sqlview drop column viewid;

 regards,

 Lars



 On Thu, Aug 28, 2014 at 9:43 AM, Jason Pickering <
 jason.p.picker...@gmail.com> wrote:

> Looks like there was an attempt to fix this in rev 14845, but still
> not working for me.
>
> We are using
>
> Version:2.16 Build revision:16370
> Probably could be hacked rather easily, but not sure if things are
> still not fixed properly in the startup routines?
> Regards,Jason
> Caused by: org.postgresql.util.PSQLException: ERROR: null value in
> column "viewid" violates not-null constraint
>   Detail: Failing row contains (null, test sql view, , SELECT uid,
> name from organisationunit LIMIT 10;, bMTwKD2Vpe0, null, 2014-08-28
> 07:41:46.921, 4511, 2014-08-28 07:41:46.921, 2361, rw--).
> at
> org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2161)
> at
> org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1890)
> at
> org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
> at
> org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:560)
> at
> org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:417)
> at
> org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:363)
> at
> com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:105)
> at
> org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:133)
>
>
> ___
> 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 16550: Fixed bug - (DE group editor) Issues with View 2 tab.

2014-08-28 Thread noreply

revno: 16550
committer: Tran Chau
branch nick: dhis2
timestamp: Thu 2014-08-28 16:15:48 +0700
message:
  Fixed bug - (DE group editor) Issues with View 2 tab.
modified:
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/dataElementGroupEditorView.vm
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/dataElementGroupEditorView.js


--
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/dataElementGroupEditorView.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/dataElementGroupEditorView.vm	2012-11-21 09:36:35 +
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/dataElementGroupEditorView.vm	2014-08-28 09:15:48 +
@@ -113,7 +113,7 @@
 
 			
 
-	
+	
 
 
 	

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/dataElementGroupEditorView.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/dataElementGroupEditorView.js	2013-06-25 13:58:55 +
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/dataElementGroupEditorView.js	2014-08-28 09:15:48 +
@@ -350,12 +350,13 @@
 
 var id = jQuery( "#view_2 #availableDataElements2" ).val();
 var list_2 = jQuery( "#view_2 #assignedGroups" );
-list_2.empty();
-
+
 jQuery.postJSON( "getAssignedDataElementGroups.action", {
 dataElementId : ( isNotNull( id ) ? id : -1 )
 }, function( json )
-{
+{ 
+		clearListById('view_2 [id="assignedGroups"]');
+	
 jQuery.each( json.dataElementGroups, function( i, item )
 {
 list_2.append( '' + item.name + '' );

___
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] [Bug 1359698] Re: (DE group editor) Issues with "View 2"

2014-08-28 Thread Thu Tran
** Changed in: dhis2
   Status: New => Fix Committed

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

Title:
  (DE group editor) Issues with "View 2"

Status in DHIS 2:
  Fix Committed

Bug description:
  Two issues with "View 2" (dhis-web-maintenance-
  datadictionary/dataElementGroupEditor.action)

  1) If you double click an available data element the entries in
  "selected groups" doubles up.

  2) If you select available data elements by using the keyboard up and
  down arrows, the "selected groups" list is not updated.

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1359698/+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 16551: keyAnalysisDisplayProperty added to api/me/user-account

2014-08-28 Thread noreply

revno: 16551
committer: Jan Henrik Overland 
branch nick: dhis2
timestamp: Thu 2014-08-28 12:29:24 +0200
message:
  keyAnalysisDisplayProperty added to api/me/user-account
modified:
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/user/CurrentUserController.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/webapi/controller/user/CurrentUserController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/user/CurrentUserController.java	2014-08-24 13:57:12 +
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/user/CurrentUserController.java	2014-08-28 10:29:24 +
@@ -32,6 +32,8 @@
 import static org.hisp.dhis.user.UserSettingService.KEY_MESSAGE_EMAIL_NOTIFICATION;
 import static org.hisp.dhis.user.UserSettingService.KEY_MESSAGE_SMS_NOTIFICATION;
 import static org.hisp.dhis.user.UserSettingService.KEY_UI_LOCALE;
+import static org.hisp.dhis.user.UserSettingService.KEY_ANALYSIS_DISPLAY_PROPERTY;
+
 
 import java.io.IOException;
 import java.text.SimpleDateFormat;
@@ -312,6 +314,7 @@
 userAccount.getSettings().put( KEY_DB_LOCALE, TextUtils.toString( userSettingService.getUserSetting( KEY_DB_LOCALE ) ) );
 userAccount.getSettings().put( KEY_MESSAGE_EMAIL_NOTIFICATION, TextUtils.toString( userSettingService.getUserSetting( KEY_MESSAGE_EMAIL_NOTIFICATION ) ) );
 userAccount.getSettings().put( KEY_MESSAGE_SMS_NOTIFICATION, TextUtils.toString( userSettingService.getUserSetting( KEY_MESSAGE_SMS_NOTIFICATION ) ) );
+userAccount.getSettings().put( KEY_ANALYSIS_DISPLAY_PROPERTY, TextUtils.toString( userSettingService.getUserSetting( KEY_ANALYSIS_DISPLAY_PROPERTY ) ) );
 
 response.setContentType( MediaType.APPLICATION_JSON_VALUE );
 JacksonUtils.toJson( response.getOutputStream(), userAccount );

___
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 16552: PT respecting analysis display property, work in progress.

2014-08-28 Thread noreply
Merge authors:
  Jan Henrik Øverland (janhenrik-overland)

revno: 16552 [merge]
committer: Jan Henrik Overland 
branch nick: dhis2
timestamp: Thu 2014-08-28 12:32:33 +0200
message:
  PT respecting analysis display property, work in progress.
modified:
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/user/CurrentUserController.java
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/scripts/app.js
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/scripts/core.js


--
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/webapi/controller/user/CurrentUserController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/user/CurrentUserController.java	2014-08-28 10:29:24 +
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/user/CurrentUserController.java	2014-08-28 10:31:16 +
@@ -34,7 +34,6 @@
 import static org.hisp.dhis.user.UserSettingService.KEY_UI_LOCALE;
 import static org.hisp.dhis.user.UserSettingService.KEY_ANALYSIS_DISPLAY_PROPERTY;
 
-
 import java.io.IOException;
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/scripts/app.js	2014-08-27 14:03:18 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/scripts/app.js	2014-08-28 09:59:21 +
@@ -2616,10 +2616,10 @@
 }
 
 if (Ext.isString(uid)) {
-	path = '/indicators.json?fields=id,name&filter=indicatorGroups.id:eq:' + uid + (filter ? '&filter=name:like:' + filter : '');
+	path = '/indicators.json?fields=id,' + ns.core.init.namePropertyUrl + '&filter=indicatorGroups.id:eq:' + uid + (filter ? '&filter=name:like:' + filter : '');
 }
 else if (uid === 0) {
-	path = '/indicators.json?fields=id,name' + (filter ? '&filter=name:like:' + filter : '');
+	path = '/indicators.json?fields=id,' + ns.core.init.namePropertyUrl + '' + (filter ? '&filter=name:like:' + filter : '');
 }
 
 if (!path) {
@@ -2746,10 +2746,10 @@
 }
 
 if (Ext.isString(uid)) {
-	path = '/dataElements.json?fields=id,name&filter=dataElementGroups.id:eq:' + uid + (filter ? '&filter=name:like:' + filter : '');
+	path = '/dataElements.json?fields=id,' + ns.core.init.namePropertyUrl + '&filter=dataElementGroups.id:eq:' + uid + (filter ? '&filter=name:like:' + filter : '');
 }
 else if (uid === 0) {
-	path = '/dataElements.json?fields=id,name' + (filter ? '&filter=name:like:' + filter : '');
+	path = '/dataElements.json?fields=id,' + ns.core.init.namePropertyUrl + '' + (filter ? '&filter=name:like:' + filter : '');
 }
 
 if (!path) {
@@ -2788,10 +2788,10 @@
 }
 
 if (Ext.isString(uid)) {
-	path = '/dataElementOperands.json?fields=id,name&filter=dataElement.dataElementGroups.id:eq:' + uid + (filter ? '&filter=name:like:' + filter : '');
+	path = '/dataElementOperands.json?fields=id,' + ns.core.init.namePropertyUrl + '&filter=dataElement.dataElementGroups.id:eq:' + uid + (filter ? '&filter=name:like:' + filter : '');
 }
 else if (uid === 0) {
-	path = '/dataElementOperands.json?fields=id,name' + (filter ? '&filter=name:like:' + filter : '');
+	path = '/dataElementOperands.json?fields=id,' + ns.core.init.namePropertyUrl + '' + (filter ? '&filter=name:like:' + filter : '');
 }
 
 if (!path) {
@@ -2892,7 +2892,7 @@
 },
 loadPage: function(filter, append) {
 var store = this,
-path = '/dataSets.json?fields=id,name' + (filter ? '&filter=name:like:' + filter : '');
+path = '/dataSets.json?fields=id,' + ns.core.init.namePropertyUrl + '' + (filter ? '&filter=name:like:' + filter : '');
 
 filter = filter || dataSetFilter.getValue() || null;
 
@@ -3034,7 +3034,7 @@
 			fields: ['id', 'name'],
 			proxy: {
 type: 'ajax',
-url: ns.core.init.contextPath + '/api/organisationUnitGroups.json?fields=id,name&paging=false',
+url: ns.core.init.contextPath + '/api/organisationUnitGroups.json?fields=id,' + ns.core.init.namePropertyUrl + '&paging=false',
 reader: {
 	type: 'json',
 	root: 'organisationUnitGroups'
@@ -4441,7 +4441,7 @@
 	format: 'json',
 	noCache: false,
 	extraParams: {
-		fields: 'children[id,name,children::isNotEmpty|rename(hasChildren)&paging=false'
+		fields: 'children[id,' + ns.core.init.namePropertyUrl + ',children::isNotEmpty|rename(hasChildren)&paging=false'
 	},
 	url: n

Re: [Dhis2-devs] Fwd: [AEHIN-ORG] Patient Master Index (PMI) and Patient Medical Record

2014-08-28 Thread Bob Jolliffe
Hi Pierre

This tracker/openEMPI integration is potentially something of a hot topic
at present, with a few people starting a discussion in the hmis group of
openhie about exchanging pseudo-anonymized patient health data between the
SHR and dhis2 tracker.

Is that what is going on with the maternal health registry or something
different?  Is dhis2 effectively the SHR in this picture working together
with openEMPI as the Client Registry?  Or is it feeding off a SHR?

Thanks
Bob


On 28 August 2014 06:36, Pierre Dane  wrote:

> Further to what Ryan has mentioned below, we have integrated openEMPI and
> DHIS2 tracker into a maternal health registry which is live in South Africa
> nationally. at present we aren't using PIX/PDQ but rather a rest interface
> into openEMPI. if anyone would like to see the REST api calls we are using
> drop us a line.
>
>
> On 28 Aug 2014, at 05:34, Knut Staring  wrote:
>
> -- Forwarded message --
> From: Ryan Crichton 
> Date: Wed, Aug 20, 2014 at 2:19 PM
> Subject: Re: [AEHIN-ORG] Patient Master Index (PMI) and Patient Medical
> Record
> To: aehin-...@list.wpro.who.int
>
>
> Hi Alvin,
>
> There is an OpenHIE demo site that may be useful. I hosts a number of the
> OpenHIE components and people that are interested may explore the systems
> that make up OpenHIE and see how they work. Note: this is a work in
> progress so you may experience problem but hopefully it will be useful. You
> can find the demo site here: http://demo.ohie.org/
>
> Regards,
> Ryan
>
>
> On Wed, Aug 20, 2014 at 12:42 AM, Alvin Marcelo 
> wrote:
>
>> Thanks fr sharing Ryan. Would you have a sandbox where AeHIN members can
>> explore?
>>  On Aug 19, 2014 3:19 PM, "Ryan Crichton"  wrote:
>>
>>> Hi Sambath,
>>>
>>> You can find more about OpenEMPI here . It
>>> supports the IHE PIX
>>> 
>>> and PDQ 
>>> profiles for interoperability.
>>>
>>> Hope this helps.
>>> Ryan
>>>
>>>
>>> On Mon, Aug 18, 2014 at 10:47 AM, Alvin Marcelo >> > wrote:
>>>
 Dear Dr Sambath,

 The Philippine Health Information Exchange is testing its Client
 Registry with OpenEMPI. With support from WHO, Dr Shaun Grannis came over
 last July to provide guidance.

 What we know now is that there's a lot to learn and starting with open
 source EMPIs is a cost effective capacity-building activity. But beyond the
 software and technology is a slew of other important concepts like
 governance and enterprise architecture.

 We've encouraged our developers to join the OpenHIE mailing lists for a
 quick and free introduction to its various components. The community is
 very helpful and accommodating.

 Alvin
 On Aug 18, 2014 4:37 PM, "Ryan Crichton"  wrote:

> Hi Sambath,
>
> In addition to that you may want to get involved with the OpenHIE
> client registry community (
> https://wiki.ohie.org/display/SUB/Client+Registry+Community) I'm sure
> they could provide you with some advice. Also, you may find the
> documentation that this community has produced to be useful.
>
> Cheers,
> Ryan
>
>
> On Mon, Aug 18, 2014 at 8:12 AM, Carl Fourie  wrote:
>
>> Good Day Sambath,
>>
>> We, Jembi, have been quite active in this area with a few projects
>> that we have been running (a health information exchange in Rwanda) and
>> more recently a local mobile to national level system where we are using 
>> a
>> PMI to register pregnant women along with some patient level data.
>>
>> Please feel free to reach out to myself and or the team cc'd here for
>> more information.
>>
>> Regards
>>
>> Carl Fourie
>> ---
>> *Assistant Director of Programs, Jembi Health Systems |  SOUTH AFRICA*
>> *Mobile: +27 71 540 4477 <%2B27%2071%20540%204477> | Office: +27 21
>> 701 0939 <%2B27%2021%20701%200939> | Skype: carl.fourie17*
>> *E-mail: *c...@jembi.org
>>
>>
>>
>> On Sat, Aug 16, 2014 at 9:38 AM, Sambath Mean 
>> wrote:
>>
>>> Dear all friends and colleagues,
>>>
>>>
>>>
>>> I would be appreciated if anyone can share with me
>>> experiences/lesion learn and/or guidance related to the implementation 
>>> of
>>> Patient Master Index (PMI) linked with patient level database system.
>>>
>>>
>>>
>>> Thanks and hope to hear from you all soon
>>>
>>>
>>>
>>> Best
>>>
>>>
>>>
>>> Sambath
>>>
>>>
>>>
>>>
>>>
>>> Mean Reatanak Sambath, MD, MPH
>>>
>>>
>>>
>>> *Founder/Executive Director, Partnership for Better Health*
>>>
>>> *Lead national consultant for CRVS*
>>>
>>> *Public health specialist*
>>>
>>> *Member of AeHIN Working council*
>>>

Re: [Dhis2-devs] Fwd: [AEHIN-ORG] Patient Master Index (PMI) and Patient Medical Record

2014-08-28 Thread Pierre Dane
Hey Bob,

Thats pretty much it - openEMPI as the registry, and then tracker as the
Maternal Registry rather than the SHR (as at present its only storing
events related to pregnancy). We are working to get openMRS in there as the
SHR.

The interactions are all orchestrated by the openHIM interoperability
layer. The core and console(dashboard) of this is open-sourced at:
https://github.com/jembi/openhim-console
https://github.com/jembi/openhim-core-js
It’s just been released and we are iterating but v0.1.0 is stable.
This needs to be used in conjunction with an orchestration layer that
performs the actual api calls to openEMPI, DHIS2 and openMRS, and handles
logic flow. This isn’t ready to be opened up yet, but I could prepare an
empty template project if anyone is interested. It’s written in Java using
Mule ESB. We also want this layer to post aggregated data from other
sources into DHIS2.

Pierre







On Thu, Aug 28, 2014 at 1:48 PM, Bob Jolliffe  wrote:

> Hi Pierre
>
> This tracker/openEMPI integration is potentially something of a hot topic
> at present, with a few people starting a discussion in the hmis group of
> openhie about exchanging pseudo-anonymized patient health data between the
> SHR and dhis2 tracker.
>
> Is that what is going on with the maternal health registry or something
> different?  Is dhis2 effectively the SHR in this picture working together
> with openEMPI as the Client Registry?  Or is it feeding off a SHR?
>
> Thanks
> Bob
>
>
> On 28 August 2014 06:36, Pierre Dane  wrote:
>
>> Further to what Ryan has mentioned below, we have integrated openEMPI and
>> DHIS2 tracker into a maternal health registry which is live in South Africa
>> nationally. at present we aren't using PIX/PDQ but rather a rest interface
>> into openEMPI. if anyone would like to see the REST api calls we are using
>> drop us a line.
>>
>>
>> On 28 Aug 2014, at 05:34, Knut Staring  wrote:
>>
>> -- Forwarded message --
>> From: Ryan Crichton 
>> Date: Wed, Aug 20, 2014 at 2:19 PM
>> Subject: Re: [AEHIN-ORG] Patient Master Index (PMI) and Patient Medical
>> Record
>> To: aehin-...@list.wpro.who.int
>>
>>
>> Hi Alvin,
>>
>> There is an OpenHIE demo site that may be useful. I hosts a number of the
>> OpenHIE components and people that are interested may explore the systems
>> that make up OpenHIE and see how they work. Note: this is a work in
>> progress so you may experience problem but hopefully it will be useful. You
>> can find the demo site here: http://demo.ohie.org/
>>
>> Regards,
>> Ryan
>>
>>
>> On Wed, Aug 20, 2014 at 12:42 AM, Alvin Marcelo 
>> wrote:
>>
>>> Thanks fr sharing Ryan. Would you have a sandbox where AeHIN members can
>>> explore?
>>>  On Aug 19, 2014 3:19 PM, "Ryan Crichton"  wrote:
>>>
  Hi Sambath,

 You can find more about OpenEMPI here . It
 supports the IHE PIX
 
 and PDQ
 
 profiles for interoperability.

 Hope this helps.
 Ryan


 On Mon, Aug 18, 2014 at 10:47 AM, Alvin Marcelo <
 alvin.marc...@gmail.com> wrote:

> Dear Dr Sambath,
>
> The Philippine Health Information Exchange is testing its Client
> Registry with OpenEMPI. With support from WHO, Dr Shaun Grannis came over
> last July to provide guidance.
>
> What we know now is that there's a lot to learn and starting with open
> source EMPIs is a cost effective capacity-building activity. But beyond 
> the
> software and technology is a slew of other important concepts like
> governance and enterprise architecture.
>
> We've encouraged our developers to join the OpenHIE mailing lists for
> a quick and free introduction to its various components. The community is
> very helpful and accommodating.
>
> Alvin
> On Aug 18, 2014 4:37 PM, "Ryan Crichton"  wrote:
>
>>  Hi Sambath,
>>
>> In addition to that you may want to get involved with the OpenHIE
>> client registry community (
>> https://wiki.ohie.org/display/SUB/Client+Registry+Community) I'm
>> sure they could provide you with some advice. Also, you may find the
>> documentation that this community has produced to be useful.
>>
>> Cheers,
>> Ryan
>>
>>
>>  On Mon, Aug 18, 2014 at 8:12 AM, Carl Fourie  wrote:
>>
>>>  Good Day Sambath,
>>>
>>> We, Jembi, have been quite active in this area with a few projects
>>> that we have been running (a health information exchange in Rwanda) and
>>> more recently a local mobile to national level system where we are 
>>> using a
>>> PMI to register pregnant women along with some patient level data.
>>>
>>> Please feel free to reach out to myself and or the team cc'd here
>>> for more information.
>>>
>>> Regards
>>>
>>> Car

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 16553: Expression, replaced boolean nullIfBlank with enum MissingValueStrategy, with options SKIP_IF_ANY...

2014-08-28 Thread noreply

revno: 16553
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Thu 2014-08-28 14:01:44 +0200
message:
  Expression, replaced boolean nullIfBlank with enum MissingValueStrategy, with 
options SKIP_IF_ANY_VALUE_MISSING, SKIP_IF_ALL_VALUES_MISSING, NEVER_SKIP. 
Using this in validation rules. Useful to separate between situations where you 
want the validation rule to be skipped if there are no values present at all, 
and where you want the validation rule to be skipped if there are one or more 
values missing.
added:
  
dhis-2/dhis-api/src/main/java/org/hisp/dhis/expression/MissingValueStrategy.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/common/MissingValueStrategyUserType.java
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/expression/Expression.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/expression/ExpressionService.java
  
dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/DefaultAnalyticsTableService.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/expression/DefaultExpressionService.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java
  
dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/expression/hibernate/Expression.hbm.xml
  
dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/expression/ExpressionServiceTest.java
  
dhis-2/dhis-services/dhis-service-datamart-default/src/main/java/org/hisp/dhis/datamart/indicator/DefaultIndicatorDataMart.java
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/csv/DefaultCsvImportService.java
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/indicatorExpressionBuilderForm.vm
  
dhis-2/dhis-web/dhis-web-validationrule/src/main/java/org/hisp/dhis/validationrule/action/AddValidationRuleAction.java
  
dhis-2/dhis-web/dhis-web-validationrule/src/main/java/org/hisp/dhis/validationrule/action/UpdateValidationRuleAction.java
  
dhis-2/dhis-web/dhis-web-validationrule/src/main/resources/org/hisp/dhis/validationrule/i18n_module.properties
  
dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/addValidationRuleForm.vm
  
dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/expressionBuilderForm.vm
  
dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/javascript/expression.js
  
dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/javascript/expressionBuilder.js
  
dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/updateValidationRuleForm.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-api/src/main/java/org/hisp/dhis/expression/Expression.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/expression/Expression.java	2014-08-27 09:20:22 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/expression/Expression.java	2014-08-28 12:01:44 +
@@ -96,10 +96,10 @@
 private String description;
 
 /**
- * Indicates whether the expression should evaluate to null if there are
- * missing data values in the expression.
+ * Indicates whether the expression should evaluate to null if all or any
+ * data values are missing in the expression.
  */
-private boolean nullIfBlank;
+private MissingValueStrategy missingValueStrategy;
 
 /**
  * A reference to the DataElements in the Expression.
@@ -267,7 +267,7 @@
 }
 
 @JsonProperty
-@JsonView( { DetailedView.class, ExportView.class } )
+@JsonView({ DetailedView.class, ExportView.class })
 @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
 public String getDescription()
 {
@@ -282,15 +282,15 @@
 @JsonProperty
 @JsonView({ DetailedView.class, ExportView.class })
 @JacksonXmlProperty(namespace = DxfNamespaces.DXF_2_0)
-public boolean isNullIfBlank()
+public MissingValueStrategy getMissingValueStrategy()
 {
-return nullIfBlank;
+return missingValueStrategy;
 }
 
-public void setNullIfBlank( boolean nullIfBlank )
+public void setMissingValueStrategy( MissingValueStrategy missingValueStrategy )
 {
-this.nullIfBlank = nullIfBlank;
-}
+this.missingValueStrategy = missingValueStrategy;
+}
 
 @JsonIgnore
 public String getExplodedExpression()
@@ -309,7 +309,7 @@
 
 expression = other.getExpression() == null ? expression : other.getExpression();
 description = other.getDescription() == null ? description : other.getDescription();
-null

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 16554: event capture - bug fix in saving boolean types

2014-08-28 Thread noreply

revno: 16554
committer: Abyot Asalefew Gizaw 
branch nick: dhis2
timestamp: Thu 2014-08-28 14:23:08 +0200
message:
  event capture - bug fix in saving boolean types
modified:
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/services.js
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/defaultForm.html
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/eventList.html


--
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-apps/src/main/webapp/dhis-web-event-capture/scripts/services.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/services.js	2014-08-21 16:30:01 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/services.js	2014-08-28 12:23:08 +
@@ -262,9 +262,10 @@
 this.getAttributesAsString(attributes) +
 ' ng-model="currentEvent.' + deId + '" ' +
 ' ng-required="programStageDataElements.' + deId + '.compulsory">' + 
-'option value="">{{\'please_select\'| translate}}' +
-'{{\'no\'| translate}}' + 
-'{{\'yes\'| translate}}';
+'{{\'please_select\'| translate}}' +
+'{{\'no\'| translate}}' + 
+'{{\'yes\'| translate}}' +
+'';
 }
 if(programStageDataElements[deId].dataElement.type == "date"){
 newInputField = '
+style="width:99%;">
 {{'please_select'| translate}}
-{{'no'| translate}}
-{{'yes'| translate}}
+{{'no'| translate}}
+{{'yes'| translate}}
 
 {{'required'| translate}}
 
@@ -282,10 +282,10 @@
 
+style="width:99%;">
 {{'please_select'| translate}}
-{{'no'| translate}}
-{{'yes'| translate}}
+{{'no'| translate}}
+{{'yes'| translate}}
 
 {{'required'| translate}}
 

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/eventList.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/eventList.html	2014-08-22 11:29:33 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/eventList.html	2014-08-28 12:23:08 +
@@ -96,18 +96,22 @@
 
 
 
-
-
-
+   
 
 
-{{dhis2Event[eventGridColumn.id]}}
+ng-repeat="eventGridColumn in eventGridColumns">
+
+
+{{'no'| translate}}
+{{'yes'| translate}}
+
+
+{{dhis2Event[eventGridColumn.id]}}
+
+
 
 
 
@@ -186,11 +190,10 @@
 name="foo" 
 style="width:98%;"
 ng-class="{true: 'update-success'} [currentElement.updated == true && currentElement.id == eventGridColumn.id]"
-ng-class="{true: 'update-error'} [!cu

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 16555: fix for tz gaps in ChronologyBasedCalendar

2014-08-28 Thread noreply

revno: 16555
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Thu 2014-08-28 20:10:01 +0700
message:
  fix for tz gaps in ChronologyBasedCalendar
modified:
  
dhis-2/dhis-api/src/main/java/org/hisp/dhis/calendar/ChronologyBasedCalendar.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/calendar/DateUnit.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/calendar/ChronologyBasedCalendar.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/calendar/ChronologyBasedCalendar.java	2014-05-21 11:12:07 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/calendar/ChronologyBasedCalendar.java	2014-08-28 13:10:01 +
@@ -68,6 +68,7 @@
 
 DateTime dateTime = dateUnit.toDateTime( ISOChronology.getInstance() );
 dateTime = dateTime.withChronology( chronology );
+
 return DateUnit.fromDateTime( dateTime );
 }
 
@@ -110,8 +111,7 @@
 fromDateUnit.setDayOfWeek( isoWeekday( fromDateUnit ) );
 toDateUnit.setDayOfWeek( isoWeekday( toDateUnit ) );
 
-return new DateInterval( toIso( fromDateUnit ), toIso( toDateUnit ),
-DateIntervalType.ISO8601_YEAR );
+return new DateInterval( toIso( fromDateUnit ), toIso( toDateUnit ), DateIntervalType.ISO8601_YEAR );
 }
 
 private DateInterval toMonthIsoInterval( DateUnit dateUnit, int offset, int length )
@@ -135,8 +135,7 @@
 fromDateUnit.setDayOfWeek( isoWeekday( fromDateUnit ) );
 toDateUnit.setDayOfWeek( isoWeekday( toDateUnit ) );
 
-return new DateInterval( toIso( fromDateUnit ), toIso( toDateUnit ),
-DateIntervalType.ISO8601_MONTH );
+return new DateInterval( toIso( fromDateUnit ), toIso( toDateUnit ), DateIntervalType.ISO8601_MONTH );
 }
 
 private DateInterval toWeekIsoInterval( DateUnit dateUnit, int offset, int length )
@@ -160,8 +159,7 @@
 fromDateUnit.setDayOfWeek( isoWeekday( fromDateUnit ) );
 toDateUnit.setDayOfWeek( isoWeekday( toDateUnit ) );
 
-return new DateInterval( toIso( fromDateUnit ), toIso( toDateUnit ),
-DateIntervalType.ISO8601_WEEK );
+return new DateInterval( toIso( fromDateUnit ), toIso( toDateUnit ), DateIntervalType.ISO8601_WEEK );
 }
 
 private DateInterval toDayIsoInterval( DateUnit dateUnit, int offset, int length )
@@ -185,42 +183,41 @@
 fromDateUnit.setDayOfWeek( isoWeekday( fromDateUnit ) );
 toDateUnit.setDayOfWeek( isoWeekday( toDateUnit ) );
 
-return new DateInterval( toIso( fromDateUnit ), toIso( toDateUnit ),
-DateIntervalType.ISO8601_DAY );
+return new DateInterval( toIso( fromDateUnit ), toIso( toDateUnit ), DateIntervalType.ISO8601_DAY );
 }
 
 @Override
 public int monthsInYear()
 {
-DateTime dateTime = new DateTime( 1, 1, 1, 0, 0, chronology );
+DateTime dateTime = new DateTime( 1, 1, 1, 12, 0, chronology );
 return dateTime.monthOfYear().getMaximumValue();
 }
 
 @Override
 public int daysInWeek()
 {
-DateTime dateTime = new DateTime( 1, 1, 1, 0, 0, chronology );
+DateTime dateTime = new DateTime( 1, 1, 1, 12, 0, chronology );
 return dateTime.dayOfWeek().getMaximumValue();
 }
 
 @Override
 public int daysInYear( int year )
 {
-DateTime dateTime = new DateTime( year, 1, 1, 0, 0, chronology );
+DateTime dateTime = new DateTime( year, 1, 1, 12, 0, chronology );
 return (int) dateTime.year().toInterval().toDuration().getStandardDays();
 }
 
 @Override
 public int daysInMonth( int year, int month )
 {
-DateTime dateTime = new DateTime( year, month, 1, 0, 0, chronology );
+DateTime dateTime = new DateTime( year, month, 1, 12, 0, chronology );
 return dateTime.dayOfMonth().getMaximumValue();
 }
 
 @Override
 public int weeksInYear( int year )
 {
-DateTime dateTime = new DateTime( year, 1, 1, 0, 0, chronology );
+DateTime dateTime = new DateTime( year, 1, 1, 12, 0, chronology );
 return dateTime.weekOfWeekyear().getMaximumValue();
 }
 

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/calendar/DateUnit.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/calendar/DateUnit.java	2014-08-24 17:10:16 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/calendar/DateUnit.java	2014-08-28 13:10:01 +
@@ -184,7 +184,7 @@
 throw new RuntimeException( "Cannot convert non-ISO8601 DateUnit to DateTime." );
 }
 
-return new DateTime( year, month, day, 0, 0, ISOChronology.getInstance() );
+return new DateTime( year, month, day, 12, 0, ISOChronology.g

[Dhis2-devs] [Bug 1235288] Re: Import Meta-Data JSON throws exception

2014-08-28 Thread James Kariuki
Hi,

I get the error below when i try to import metadata from another DHIS2
instance in XML format using through the web-UI. I try using commandline
too but still get the same error.

Any idea on how to fix this or a workaround?

Thanks

 
ERROR 2014-08-28 09:18:40,473 (IOException) Unable to parse meta-data while 
reading input stream (ImportMetaDataTask.java [taskScheduler-1])
java.io.IOException: Stream closed
at java.util.zip.ZipInputStream.ensureOpen(ZipInputStream.java:66)
at java.util.zip.ZipInputStream.read(ZipInputStream.java:181)
at 
com.fasterxml.jackson.core.json.ByteSourceJsonBootstrapper.ensureLoaded(ByteSourceJsonBootstrapper.java:503)
at 
com.fasterxml.jackson.core.json.ByteSourceJsonBootstrapper.detectEncoding(ByteSourceJsonBootstrapper.java:129)
at 
com.fasterxml.jackson.core.json.ByteSourceJsonBootstrapper.constructParser(ByteSourceJsonBootstrapper.java:224)
at 
com.fasterxml.jackson.core.JsonFactory._createParser(JsonFactory.java:1242)
at 
com.fasterxml.jackson.core.JsonFactory.createParser(JsonFactory.java:753)
at 
com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2144)
at org.hisp.dhis.dxf2.utils.JacksonUtils.fromJson(JacksonUtils.java:170)
at 
org.hisp.dhis.importexport.action.util.ImportMetaDataTask.run(ImportMetaDataTask.java:84)
at 
org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:53)
at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)

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

Title:
  Import Meta-Data JSON throws exception

Status in DHIS 2:
  New

Bug description:
  When importing meta-data in JSON format the following exception is
  thrown:

  * INFO  2013-10-04 15:32:53,282 Export done at Fri Oct 04 15:32:53 BST 2013 
(DefaultExportService.java [http-apr-8080-exec-9])
  * ERROR 2013-10-04 15:33:14,789 (IOException) Unable to parse meta-data while 
reading input stream (ImportMetaDataTask.java [taskScheduler-1])
  com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'tUpdated': 
was expecting 'null', 'true', 'false' or NaN
   at [Source: java.io.BufferedInputStream@754525d2; line: 1, column: 10]
  at 
com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:1284)
  at 
com.fasterxml.jackson.core.base.ParserMinimalBase._reportError(ParserMinimalBase.java:588)
  at 
com.fasterxml.jackson.core.json.UTF8StreamJsonParser._reportInvalidToken(UTF8StreamJsonParser.java:2278)
  at 
com.fasterxml.jackson.core.json.UTF8StreamJsonParser._matchToken(UTF8StreamJsonParser.java:2236)
  at 
com.fasterxml.jackson.core.json.UTF8StreamJsonParser._nextTokenNotInObject(UTF8StreamJsonParser.java:587)
  at 
com.fasterxml.jackson.core.json.UTF8StreamJsonParser.nextToken(UTF8StreamJsonParser.java:498)
  at 
com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:2618)
  at 
com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:2565)
  at 
com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:1856)
  at 
org.hisp.dhis.dxf2.utils.JacksonUtils.fromJson(JacksonUtils.java:160)
  at 
org.hisp.dhis.importexport.action.util.ImportMetaDataTask.run(ImportMetaDataTask.java:84)
  at 
org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:53)
  at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
  at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
  at java.util.concurrent.FutureTask.run(FutureTask.java:166)
  at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
  at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
  at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
  at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
  at java.lang.Thread.run(Thread.java:724)

  
  Test:
  1. Export meta data in uncompressed JSON forma

Re: [Dhis2-devs] [Bug 1235288] Re: Import Meta-Data JSON throws exception

2014-08-28 Thread Morten Olav Hansen
What version of dhis? are you sending a zip file? xml or json?

--
Morten


On Thu, Aug 28, 2014 at 8:22 PM, James Kariuki 
wrote:

> Hi,
>
> I get the error below when i try to import metadata from another DHIS2
> instance in XML format using through the web-UI. I try using commandline
> too but still get the same error.
>
> Any idea on how to fix this or a workaround?
>
> Thanks
>
>
> ERROR 2014-08-28 09:18:40,473 (IOException) Unable to parse meta-data
> while reading input stream (ImportMetaDataTask.java [taskScheduler-1])
> java.io.IOException: Stream closed
> at java.util.zip.ZipInputStream.ensureOpen(ZipInputStream.java:66)
> at java.util.zip.ZipInputStream.read(ZipInputStream.java:181)
> at
> com.fasterxml.jackson.core.json.ByteSourceJsonBootstrapper.ensureLoaded(ByteSourceJsonBootstrapper.java:503)
> at
> com.fasterxml.jackson.core.json.ByteSourceJsonBootstrapper.detectEncoding(ByteSourceJsonBootstrapper.java:129)
> at
> com.fasterxml.jackson.core.json.ByteSourceJsonBootstrapper.constructParser(ByteSourceJsonBootstrapper.java:224)
> at
> com.fasterxml.jackson.core.JsonFactory._createParser(JsonFactory.java:1242)
> at
> com.fasterxml.jackson.core.JsonFactory.createParser(JsonFactory.java:753)
> at
> com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2144)
> at
> org.hisp.dhis.dxf2.utils.JacksonUtils.fromJson(JacksonUtils.java:170)
> at
> org.hisp.dhis.importexport.action.util.ImportMetaDataTask.run(ImportMetaDataTask.java:84)
> at
> org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:53)
> at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
> at java.util.concurrent.FutureTask.run(FutureTask.java:262)
> at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
> at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> at java.lang.Thread.run(Thread.java:745)
>
> --
> You received this bug notification because you are a member of DHIS 2
> developers, which is subscribed to DHIS.
> https://bugs.launchpad.net/bugs/1235288
>
> Title:
>   Import Meta-Data JSON throws exception
>
> Status in DHIS 2:
>   New
>
> Bug description:
>   When importing meta-data in JSON format the following exception is
>   thrown:
>
>   * INFO  2013-10-04 15:32:53,282 Export done at Fri Oct 04 15:32:53 BST
> 2013 (DefaultExportService.java [http-apr-8080-exec-9])
>   * ERROR 2013-10-04 15:33:14,789 (IOException) Unable to parse meta-data
> while reading input stream (ImportMetaDataTask.java [taskScheduler-1])
>   com.fasterxml.jackson.core.JsonParseException: Unrecognized token
> 'tUpdated': was expecting 'null', 'true', 'false' or NaN
>at [Source: java.io.BufferedInputStream@754525d2; line: 1, column: 10]
>   at
> com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:1284)
>   at
> com.fasterxml.jackson.core.base.ParserMinimalBase._reportError(ParserMinimalBase.java:588)
>   at
> com.fasterxml.jackson.core.json.UTF8StreamJsonParser._reportInvalidToken(UTF8StreamJsonParser.java:2278)
>   at
> com.fasterxml.jackson.core.json.UTF8StreamJsonParser._matchToken(UTF8StreamJsonParser.java:2236)
>   at
> com.fasterxml.jackson.core.json.UTF8StreamJsonParser._nextTokenNotInObject(UTF8StreamJsonParser.java:587)
>   at
> com.fasterxml.jackson.core.json.UTF8StreamJsonParser.nextToken(UTF8StreamJsonParser.java:498)
>   at
> com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:2618)
>   at
> com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:2565)
>   at
> com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:1856)
>   at
> org.hisp.dhis.dxf2.utils.JacksonUtils.fromJson(JacksonUtils.java:160)
>   at
> org.hisp.dhis.importexport.action.util.ImportMetaDataTask.run(ImportMetaDataTask.java:84)
>   at
> org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:53)
>   at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
>   at
> java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
>   at java.util.concurrent.FutureTask.run(FutureTask.java:166)
>   at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
>   at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
>  

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 16556: DV line charts now handling null/zeros.

2014-08-28 Thread noreply
Merge authors:
  Jan Henrik Øverland (janhenrik-overland)

revno: 16556 [merge]
committer: Jan Henrik Overland 
branch nick: dhis2
timestamp: Thu 2014-08-28 16:08:29 +0200
message:
  DV line charts now handling null/zeros.
modified:
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/scripts/core.js


--
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-apps/src/main/webapp/dhis-web-visualizer/scripts/core.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/scripts/core.js	2014-08-11 15:32:26 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/scripts/core.js	2014-08-28 14:06:16 +
@@ -3,6 +3,13 @@
 	// ext config
 	Ext.Ajax.method = 'GET';
 
+// override
+Ext.override(Ext.chart.series.Line, {
+drawSeries: function() {
+var ak=this,au=ak.chart,S=au.axes,ao=au.getChartStore(),V=ao.getCount(),u=ak.chart.surface,am={},R=ak.group,K=ak.showMarkers,aA=ak.markerGroup,D=au.shadow,C=ak.shadowGroups,X=ak.shadowAttributes,O=ak.smooth,q=C.length,ar=["M"],T=["M"],d=["M"],b=["M"],J=au.markerIndex,ai=[].concat(ak.axis),ah,av=[],ag={},aa=[],v={},I=false,Q=[],az=ak.markerStyle,Z=ak.style,t=ak.colorArrayStyle,P=t&&t.length||0,L=Ext.isNumber,aw=ak.seriesIdx,g=ak.getAxesForXAndYFields(),l=g.xAxis,ay=g.yAxis,ac,h,ab,ad,A,c,ae,H,G,f,e,s,r,W,N,M,at,m,F,E,aB,n,p,B,a,Y,af,z,aq,w,ap,o,ax,an,al,U,k,aj;if(ak.fireEvent("beforedraw",ak)===false){return}if(!V||ak.seriesIsHidden){aj=this.items;if(aj){for(N=0,at=aj.length;Nam.width){a=ak.shrink(av,aa,am.width);av=a.x;aa=a.y}ak.items=[];k=0;at=av.length;for(N=0;N___
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] [Bug 1358804] Re: Data visualizer line chart shows fictitious data

2014-08-28 Thread Jan Henrik Øverland
Bug reproduced in trunk, 2.16 and 2.15.

Fix commited to trunk, 2.16 and 2.15.

** Changed in: dhis2
   Status: Confirmed => Fix Committed

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

Title:
  Data visualizer line chart shows fictitious data

Status in DHIS 2:
  Fix Committed

Bug description:
  I'm running DHIS2 version 2.16 and I have a dataset in which data for
  one indicator have been entered for only a few months.  When I plot a
  bar chart, the data show up correctly (just four months have non-zero
  values).  When I change it to a line chart (no trend line option
  selected), non-zero data appear for all months, even though no data
  exist for the other months (confirmed by the pivot table).

  I've reproduced the same bug in the Sierra Leone demo database 
(https://apps.dhis2.org/demo/ ):
  Choose Indicators —> Diarrhoea
  Yearly —> Select all years
  Organisation units —> Bo
  The bar chart shows data for just 2013 and 2014 (correct).  The line chart 
shows the same data for 2013 and 2013, but then fictitious data for 2005-2012.

  I'm nearly certain that this bug hasn't always been present, though I
  can't provide proof; even a few months ago, I think line charts were
  generated correctly.

  I'm using Chrome version 36.0.1985.143 m on Windows 7.

  - Chip Barnett, International Rescue Committee

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1358804/+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-documenters/dhis2/dhis2-docbook-docs] Rev 1177: Docs, improved reporting rates. Using reports, removed outdated sections.

2014-08-28 Thread noreply

revno: 1177
committer: Lars Helge Overland 
branch nick: dhis2-docbook-docs
timestamp: Thu 2014-08-28 17:48:47 +0200
message:
  Docs, improved reporting rates. Using reports, removed outdated sections.
modified:
  src/docbkx/en/dhis2_user_man_using_reporting.xml
  src/docbkx/en/resources/images/dhis2UserManual/completeness_report.png


--
lp:~dhis2-documenters/dhis2/dhis2-docbook-docs
https://code.launchpad.net/~dhis2-documenters/dhis2/dhis2-docbook-docs

Your team DHIS 2 developers is subscribed to branch 
lp:~dhis2-documenters/dhis2/dhis2-docbook-docs.
To unsubscribe from this branch go to 
https://code.launchpad.net/~dhis2-documenters/dhis2/dhis2-docbook-docs/+edit-subscription
=== modified file 'src/docbkx/en/dhis2_user_man_using_reporting.xml'
--- src/docbkx/en/dhis2_user_man_using_reporting.xml	2013-06-01 12:33:28 +
+++ src/docbkx/en/dhis2_user_man_using_reporting.xml	2014-08-28 15:48:47 +
@@ -36,7 +36,7 @@
   Standard reports
   
 
-  
+  
 
   
 
@@ -56,7 +56,7 @@
   Report table parameters
   
 
-  
+  
 
   
 
@@ -70,7 +70,7 @@
   Report table view
   
 
-  
+  
 
   
 
@@ -99,47 +99,76 @@
 Using data visualizer
 The data visualizer module can be accessed under "Services" in the top menu. See the chapter called "Using data visualizer" for a thorough explanation of this module.
   
-  
-Using the dashboard
-The dashboard is your first view into the data every time you log on to the system. Every user has its own dashboard, and a dashboard consists of 4 chart areas to the right and 3 short cut areas to the left.
-
-  Dashboard
-  
-
-  
-
-  
-
-Customise shortcut areas: Each of the three short cut areas can hold a list of items from one of the following objects; Reports (standard), Documents, Data mart exports, Report tables, Map views, RSS Health. To add a new object type to a shortcut area click on the Insert link just above the area. Then to populate the list you need to add items one by one from the Services->Reports menus. From the various lists of reports, report tables, charts etc. you can add an item by clicking on the pie chart icon next to the item you want to add to the dashboard. 
-E.g. to add your three favourite standard reports to the dashboard, first Insert Reports to one of the shortcut areas in the dashboard, then go to Services->Reports and click on Standard reports. From the list of standard reports you locate the reports you want and click on the pie chart icon next to each of the reports you want to add to the dashboard. When you go back to the dashboard you will see the three reports listed in the shortcut area where you inserted Reports.
-Use the Clear link above the shortcut area to empty an area. The Close link closes the insert menu without inserting a new object type.  
-Customise chart areas: There are four chart areas. To insert a chart simply click on insert and click on one of the charts in the list. Use Close to close the list without adding a new chart, and use Clear to empty a chart area. These charts will be updated every time you open the dashboard,  will automatically show data for the orgunit assigned to the current user, and will update the data when new periods are available. 
-
-  Adding charts to the dashboard
-  
-
-  
-
-  
-
-  
   
 Using reporting rate summary
-Access the reporting rate summary from the Services->Reports menu. Reporting rate summaries will show how many datasets (forms) that have been submitted by organisation unit and period. You an use one of three different methods to calculate completeness; 1) based on complete button in data entry, 2) based on a set of defined compulsory data elements, or 3) based on the total registered data values for a dataset.  
-To run the report do the following:
-Select an orgunit from the tree.
-Select one of the completeness methods.
-Select all or one dataset (All will give you a report with all datasets for the selected
-  orgunit. One dataset will give you a report with completeness for all the children of the
-  selected orgunit.
-Select a period type and a period from the list of available periods for that period type. Move back/forward one year by using the Prev/Next buttons.
-Then the report will be shown automatically.
-Change any of the parameters above and the report will be updated automatically.
+Access the reporting rate summary from the Services->Reports menu. Reporting rate
+  summaries will show how many datasets (forms) that have been submitted by organisation unit
+  and period. There are two methods available to calculate reporting rates
+  (completeness):
+
+  
+Based on complete da

[Dhis2-devs] Using /api/dashboards to assign user groups to dashboards

2014-08-28 Thread Sandesh Sukumar Doolipeta
Hi ,

  We are trying to create dashboards using "/api/dashboards" api. While
creating the dashboards , we also want to assign user groups to the
dashboard.

The following is the json being posted ,
==
{
"displayName": "Chad",
"name": "Chad",
"dashboardItems": [
{
"chart": {
"id": "36041e3ee38"
}
},
{
"chart": {
"id": "e7f643ca378"
}
}
],
"publicAccess": "",
"access": {
"read": true,
"manage": true,
"update": true,
"externalize": true,
"write": true,
"delete": true
},
"externalAccess": false,
"userGroupAccesses": [
  {
"userGroup": {
"id": "aede79b3fbf"
}
}
],
"id": "abfd69cb586"
}
==

 Though the above json , creates the dashboard , it does not assign the
user group to it.

 When I looked into the code ,

  I saw that , HibernateGenericStore.java is a work in progress ,

==

  // TODO we might want to allow setting sharing props on save, but for now
we null them out
identifiableObject.setPublicAccess( null );
identifiableObject.setUserGroupAccesses( new
HashSet() );

==


 Is there any other way to assign user groups to dashboard ? Am I
missing anything ?



-- 
*Sandesh Doolipeta**Application Developer*
emailsande...@thoughtworks.com
Telephone9686062727
[image: ThoughtWorks] 
___
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 16557: Login page, css fix for overflow

2014-08-28 Thread noreply

revno: 16557
committer: Lars Helge Overland 
branch nick: dhis2
timestamp: Fri 2014-08-29 08:17:57 +0200
message:
  Login page, css fix for overflow
modified:
  
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/login.css


--
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-commons-resources/src/main/webapp/dhis-web-commons/css/login.css'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/login.css	2014-05-07 14:37:40 +
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/login.css	2014-08-29 06:17:57 +
@@ -3,7 +3,6 @@
 {
   font-family: LiberationSans, sans-serif;
   line-height: 125%;
-  overflow: hidden;
 }
 
 html,body
@@ -71,7 +70,7 @@
 #loginField
 {
   position: relative;
-  margin: 120px auto 0 auto;
+  margin: 128px auto 0 auto;
   width: 270px;
 }
 

___
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 16558: Support a formula for retrieving the number of days between DATE attribue-values in aggregate que...

2014-08-28 Thread noreply

revno: 16558
committer: Tran Chau
branch nick: dhis2
timestamp: Fri 2014-08-29 13:39:13 +0700
message:
  Support a formula for retrieving the number of days between DATE 
attribue-values in aggregate query builder formulas.
modified:
  
dhis-2/dhis-api/src/main/java/org/hisp/dhis/caseaggregation/CaseAggregationCondition.java
  
dhis-2/dhis-services/dhis-service-eventreporting/src/main/java/org/hisp/dhis/caseaggregation/hibernate/HibernateCaseAggregationConditionStore.java
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/resources/org/hisp/dhis/trackedentity/i18n_module.properties
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/caseAggregationForm.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-api/src/main/java/org/hisp/dhis/caseaggregation/CaseAggregationCondition.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/caseaggregation/CaseAggregationCondition.java	2014-05-12 14:37:40 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/caseaggregation/CaseAggregationCondition.java	2014-08-29 06:39:13 +
@@ -91,6 +91,8 @@
 public static String MINUS_OPERATOR = "DATEDIFF";
 
 public static String MINUS_DATAELEMENT_OPERATOR = "DEDATEDIFF";
+
+public static String MINUS_ATTRIBUTE_OPERATOR = "ATTRDATEDIFF";
 
 public static String AUTO_STORED_BY = "aggregated_from_tracker";
 
@@ -108,6 +110,10 @@
 + OBJECT_PROGRAM_STAGE_DATAELEMENT + SEPARATOR_OBJECT + "([0-9]+" + SEPARATOR_ID + "[0-9]+" + SEPARATOR_ID
 + "[0-9]+)+\\])\\s*(,)\\s*(\\[" + OBJECT_PROGRAM_STAGE_DATAELEMENT + SEPARATOR_OBJECT + "([0-9]+"
 + SEPARATOR_ID + "[0-9]+" + SEPARATOR_ID + "[0-9]+)+\\])\\s*\\)\\s*(>=|<=|!=|>|<|=){1}\\s*([0-9]+)";
+public static final String minusAttributeRegExp = MINUS_ATTRIBUTE_OPERATOR + "{1}\\s*\\(\\s*(\\["
++ OBJECT_TRACKED_ENTITY_ATTRIBUTE + SEPARATOR_OBJECT + "([0-9]+)+\\])\\s*(,)\\s*(\\[" 
++ OBJECT_TRACKED_ENTITY_ATTRIBUTE + SEPARATOR_OBJECT + "([0-9]+)+\\])\\s*\\)\\s*(>=|<=|!=|>|<|=){1}\\s*([0-9]+)";
+
 
 // -
 // Fields

=== modified file 'dhis-2/dhis-services/dhis-service-eventreporting/src/main/java/org/hisp/dhis/caseaggregation/hibernate/HibernateCaseAggregationConditionStore.java'
--- dhis-2/dhis-services/dhis-service-eventreporting/src/main/java/org/hisp/dhis/caseaggregation/hibernate/HibernateCaseAggregationConditionStore.java	2014-08-26 12:43:04 +
+++ dhis-2/dhis-services/dhis-service-eventreporting/src/main/java/org/hisp/dhis/caseaggregation/hibernate/HibernateCaseAggregationConditionStore.java	2014-08-29 06:39:13 +
@@ -507,7 +507,7 @@
 
 String sqlOrgunitCompleted = "";
 
-// Get minus(date dataelement, date dataelement) out from the expression
+// Get minus(DATE dataelement, DATE dataelement) out from the expression
 // and run them later
 
 Map minus2SQLMap = new HashMap<>();
@@ -530,6 +530,29 @@
 idx2++;
 }
 
+// Get minus(DATE attribute, DATE attribute) out from the expression
+// and run them later
+
+Map minus2AttributeSQLMap = new HashMap<>();
+int idx1 = 0;
+Pattern patternAttrMinus2 = Pattern.compile( CaseAggregationCondition.minusAttributeRegExp );
+Matcher matcherAttrMinus2 = patternAttrMinus2.matcher( caseExpression );
+while ( matcherAttrMinus2.find() )
+{ 
+   String attribute1 = matcherAttrMinus2.group( 2 );
+   String attribute2 = matcherAttrMinus2.group( 5 );
+   String compareSide = matcherAttrMinus2.group( 6 ) + matcherAttrMinus2.group( 7 );
+   minus2AttributeSQLMap.put(
+idx1,
+getConditionForMisus2Attribute(attribute1, attribute2, compareSide ));
+   
+caseExpression = caseExpression.replace( matcherAttrMinus2.group( 0 ),
+CaseAggregationCondition.MINUS_ATTRIBUTE_OPERATOR + "_" + idx1 );
+
+idx1++;
+}
+
+
 // Get minus(date dataelement, date) out from the expression and run
 // them later
 
@@ -669,6 +692,13 @@
 sql = sql
 .replace( CaseAggregationCondition.MINUS_DATAELEMENT_OPERATOR + "_" + key, minus2SQLMap.get( key ) );
 }
+
+for ( int key = 0; key < idx1; key++ )
+{
+sql = sql
+.replace( CaseAggregationCondition.MINUS_ATTRIBUTE_OPERATOR + "_" + key, minus2AttributeSQLMap.get( key ) );
+}
+
 
 return sql + " ) ";
 }
@@ -949,6 +979,18 @@
 + endDate
 + "

Re: [Dhis2-devs] Using /api/dashboards to assign user groups to dashboards

2014-08-28 Thread Morten Olav Hansen
Hi

Are you OK with using two requests for this? we have a sharing API at
/api/sharing that will do what you want

--
Morten


On Fri, Aug 29, 2014 at 3:10 AM, Sandesh Sukumar Doolipeta <
sande...@thoughtworks.com> wrote:

> Hi ,
>
>   We are trying to create dashboards using "/api/dashboards" api.
> While creating the dashboards , we also want to assign user groups to the
> dashboard.
>
> The following is the json being posted ,
> ==
> {
> "displayName": "Chad",
> "name": "Chad",
> "dashboardItems": [
> {
> "chart": {
> "id": "36041e3ee38"
> }
> },
> {
> "chart": {
> "id": "e7f643ca378"
> }
> }
> ],
> "publicAccess": "",
> "access": {
> "read": true,
> "manage": true,
> "update": true,
> "externalize": true,
> "write": true,
> "delete": true
> },
> "externalAccess": false,
> "userGroupAccesses": [
>   {
> "userGroup": {
> "id": "aede79b3fbf"
> }
> }
> ],
> "id": "abfd69cb586"
> }
> ==
>
>  Though the above json , creates the dashboard , it does not assign the
> user group to it.
>
>  When I looked into the code ,
>
>   I saw that , HibernateGenericStore.java is a work in progress ,
>
> ==
>
>   // TODO we might want to allow setting sharing props on save, but for
> now we null them out
> identifiableObject.setPublicAccess( null );
> identifiableObject.setUserGroupAccesses( new
> HashSet() );
>
> ==
>
>
>  Is there any other way to assign user groups to dashboard ? Am I
> missing anything ?
>
>
>
> --
> *Sandesh Doolipeta**Application Developer*
> emailsande...@thoughtworks.com
> Telephone9686062727
> [image: ThoughtWorks] 
>
___
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