Re: [Dhis2-devs] Fwd: dhis-web-mapping

2012-09-10 Thread Martin Namutso
Hi Morten,

Its indeed different...I have the tool on my laptop pointing to the Server
using cURL!

-

* Blessings & regards*

*Martin Namutso | IT\MIS Specialist | Mob: +256 782 006 662*

*- If you think education is expensive try ignorance! -*


On Wed, Sep 5, 2012 at 2:59 PM, Morten Olav Hansen wrote:

> Hi
>
> The server you are running cURL from, is it different from the server that
> have DHIS 2? both GIS and DV uses ajax to get its data, so that would be
> X-domain breach (XHR only allows requests on the same server origin).
>
> --
> Morten
>
>
> On Tue, Sep 4, 2012 at 8:50 PM, Martin Namutso  wrote:
>
>> Oooops *"copy-and-paste-syndrome"* sorry about that...ignore the comment
>> talking about JSON.
>>
>> I am using the web mapping module directly because i realize the charts /
>> maps generated use the id's from the web-api and i was thinking getting
>> those id's from the web-api and passing the id's in the URL as shown below
>> should start to give me some results. However i do sense that i may need to
>> have other *"modules / ???"* included before passing direct to the
>> module..
>>
>> Your advise again is highly appreciated!
>>
>> in the above scenario the URL is pre-posted using the GET method with
>> options for ou & pe for example
>> http://aa.bb.cc.dd/api/reports/MSVvjCQU6Kr/data.pdf?pe=2012-01-01&ou=x75Yh65MaUa
>>
>> When i generate a chart or map i get a full URL
>> for maps ===>
>> http://aa.bb.cc.dd/dhis-web-mapping/mapping/index.html?id=cc5D0epyFJC
>> hence i was thinking of simply retrieving the id's of the maps from the
>> web-api and passing them to the URL until before id=_posted_id
>>
>> for charts ===>
>> http://aa.bb.cc.dd/dhis-web-visualizer/app/index.html?id=OT8OXRFEkfV
>> hence i was thinking of simply retrieving the id's of the charts from the
>> web-api and passing them to the URL until before id=_posted_id
>>
>> FYII am trying to make it able for the person getting the charts /
>> maps not only be able to view the static jpeg chart / map but also have
>> some interaction with the chart & map module to query and create more
>> reports. Otherwise, i'm able of simply displaying the jpeg chart / map.
>> <---> Is this dynamism possible?
>>
>>
>> -
>>
>> kind regards
>>
>> *Martin Namutso | Information System Specialist | Mob: +256 782 006 662*
>>
>> *- If you think education is expensive try ignorance! -*
>>
>>
>> On Tue, Sep 4, 2012 at 3:26 PM, Morten Olav Hansen wrote:
>>
>>> Hi Martin
>>>
>>> Sorry, I'm a big confused. Why are you using the dhis-web-mapping module
>>> directly? Wouldn't it be better to use it through the web api? are you
>>> looking for data or images? (you mention JSON in your code..)
>>>
>>> --
>>> Morten
>>>
>>>
>>> On Tue, Sep 4, 2012 at 8:10 PM, Martin Namutso wrote:
>>>

 Hey guys,

 I am enhancing and re-developing the dynamic tool that picks maps,
 charts, reports from any DHIS2 system and i am dynamically sending the id's
 of the maps & charts but on the page to diaplay the maps / charts, it
 doesnt load..what could i be doing wrong??? I have shared a sample excerpt
 of the maps page which doesn't load in my tool but as you can see in the
 jpeg attached loads just fine in the DHIS2 system!

 >>> $ch = curl_init( "
 http://aaa.bbb.ccc.ddd/dhis-web-mapping/mapping/index.html?id=cc5D0epyFJC";
 );
 $options = array(
 CURLOPT_RETURNTRANSFER => true,
 CURLOPT_USERPWD => "username:password",
 CURLOPT_HTTPHEADER => array('Content-type: text/html')   #
 NOT SURE THIS IS CORRECT!
 );
 curl_setopt_array( $ch, $options );

 $result =  curl_exec($ch); // Getting jSON result string
 print $result;
 curl_close($ch);
 ?>

 *FYI:::**
 The standard reports work just fine!
 The data-visualizer also doesn't load*!

 -

 kind regards

 *Martin Namutso | Information System Specialist | Mob: +256 782 006 662
 *

 *- If you think education is expensive try ignorance! -*


 ___
 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 8024: Added support for Json datavalueset.

2012-09-10 Thread noreply

revno: 8024
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Mon 2012-09-10 15:50:51 +0700
message:
  Added support for Json datavalueset.
modified:
  dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/datavalue/DataValue.java
  
dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/datavalueset/DataValueSet.java
  
dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/datavalueset/DataValueSetService.java
  
dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/datavalueset/DefaultDataValueSetService.java
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/DataValueSetController.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-dxf2/src/main/java/org/hisp/dhis/dxf2/datavalue/DataValue.java'
--- dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/datavalue/DataValue.java	2012-06-13 08:44:07 +
+++ dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/datavalue/DataValue.java	2012-09-10 08:50:51 +
@@ -28,6 +28,15 @@
  */
 
 
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonView;
+import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
+import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
+import org.hisp.dhis.common.Dxf2Namespace;
+import org.hisp.dhis.common.view.DetailedView;
+import org.hisp.dhis.common.view.ExportView;
+
+@JacksonXmlRootElement( localName = "dataValue", namespace = Dxf2Namespace.NAMESPACE )
 public class DataValue
 {
 //--
@@ -65,6 +74,9 @@
 // Getters and setters
 //--
 
+@JsonProperty
+@JsonView( { DetailedView.class, ExportView.class } )
+@JacksonXmlProperty( namespace = Dxf2Namespace.NAMESPACE )
 public String getDataElement()
 {
 return dataElement;
@@ -75,6 +87,9 @@
 this.dataElement = dataElement;
 }
 
+@JsonProperty
+@JsonView( { DetailedView.class, ExportView.class } )
+@JacksonXmlProperty( namespace = Dxf2Namespace.NAMESPACE )
 public String getPeriod()
 {
 return period;
@@ -85,6 +100,9 @@
 this.period = period;
 }
 
+@JsonProperty
+@JsonView( { DetailedView.class, ExportView.class } )
+@JacksonXmlProperty( namespace = Dxf2Namespace.NAMESPACE )
 public String getOrgUnit()
 {
 return orgUnit;
@@ -95,6 +113,9 @@
 this.orgUnit = orgUnit;
 }
 
+@JsonProperty
+@JsonView( { DetailedView.class, ExportView.class } )
+@JacksonXmlProperty( namespace = Dxf2Namespace.NAMESPACE )
 public String getCategoryOptionCombo()
 {
 return categoryOptionCombo;
@@ -105,6 +126,9 @@
 this.categoryOptionCombo = categoryOptionCombo;
 }
 
+@JsonProperty
+@JsonView( { DetailedView.class, ExportView.class } )
+@JacksonXmlProperty( namespace = Dxf2Namespace.NAMESPACE )
 public String getValue()
 {
 return value;
@@ -115,6 +139,9 @@
 this.value = value;
 }
 
+@JsonProperty
+@JsonView( { DetailedView.class, ExportView.class } )
+@JacksonXmlProperty( namespace = Dxf2Namespace.NAMESPACE )
 public String getStoredBy()
 {
 return storedBy;
@@ -125,6 +152,9 @@
 this.storedBy = storedBy;
 }
 
+@JsonProperty
+@JsonView( { DetailedView.class, ExportView.class } )
+@JacksonXmlProperty( namespace = Dxf2Namespace.NAMESPACE )
 public String getTimestamp()
 {
 return timestamp;
@@ -135,6 +165,9 @@
 this.timestamp = timestamp;
 }
 
+@JsonProperty
+@JsonView( { DetailedView.class, ExportView.class } )
+@JacksonXmlProperty( namespace = Dxf2Namespace.NAMESPACE )
 public String getComment()
 {
 return comment;
@@ -145,6 +178,9 @@
 this.comment = comment;
 }
 
+@JsonProperty
+@JsonView( { DetailedView.class, ExportView.class } )
+@JacksonXmlProperty( namespace = Dxf2Namespace.NAMESPACE )
 public Boolean getFollowup()
 {
 return followup;

=== modified file 'dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/datavalueset/DataValueSet.java'
--- dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/datavalueset/DataValueSet.java	2012-04-15 20:48:08 +
+++ dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/datavalueset/DataValueSet.java	2012-09-10 08:50:51 +
@@ -28,10 +28,20 @@
  */
 
 import java.util.ArrayList;
+import java.util.Iterator;
 import java.util.List;
 
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonView;
+import com.fasterxml.jackson.dataformat.xml.annotation.Jackson

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

2012-09-10 Thread noreply

revno: 8025
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Mon 2012-09-10 16:48:06 +0700
message:
  minor fix
modified:
  
dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/datavalueset/DefaultDataValueSetService.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-dxf2/src/main/java/org/hisp/dhis/dxf2/datavalueset/DefaultDataValueSetService.java'
--- dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/datavalueset/DefaultDataValueSetService.java	2012-09-10 08:50:51 +
+++ dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/datavalueset/DefaultDataValueSetService.java	2012-09-10 09:48:06 +
@@ -211,7 +211,6 @@
 try
 {
 DataValueSet dataValueSet = JacksonUtils.fromJson( in, DataValueSet.class );
-log.info( dataValueSet );
 return saveDataValueSet( importOptions, id, dataValueSet );
 }
 catch ( Exception ex )

___
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 8026: Automatic SMS reminder (WIP).

2012-09-10 Thread noreply

revno: 8026
committer: Tran Chau 
branch nick: dhis2
timestamp: Mon 2012-09-10 17:28:33 +0700
message:
  Automatic SMS reminder (WIP).
added:
  
dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/SchedulingProgramObject.java
  
dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/scheduling/
  
dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/scheduling/DefaultProgramSchedulingManager.java
  
dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/scheduling/ProgramSchedulingManager.java
  
dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/scheduling/SendScheduledMessageTask.java
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/schedule/
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/schedule/GetGatewayAction.java
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/schedule/ScheduleSendMessageTasksAction.java
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/scheduling.js
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/jsonResponseScheduleTasks.vm
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/menuScheduling.vm
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/scheduleSendMessage.vm
modified:
  
dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageInstanceService.java
  
dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageInstanceStore.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/SystemSettingManager.java
  
dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramStageInstanceService.java
  
dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStageInstanceStore.java
  
dhis-2/dhis-services/dhis-service-patient/src/main/resources/META-INF/dhis/beans.xml
  
dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/scheduling/SchedulingManager.java
  
dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/reminder/SendSmsToListAction.java
  
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientProgramTracking.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/pom.xml
  
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/org/hisp/dhis/patient/i18n_module.properties
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/struts.xml
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/index.vm
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/menu.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/program/ProgramStageInstanceService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageInstanceService.java	2012-08-16 13:46:23 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageInstanceService.java	2012-09-10 10:28:33 +
@@ -99,4 +99,6 @@
 void removeEmptyEvents( ProgramStage programStage );
 
 void updateProgramStageInstances( Collection programStageInstances, OutboundSms outboundSms );
+
+Collection getSendMesssageEvents();
 }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageInstanceStore.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageInstanceStore.java	2012-08-16 13:46:23 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageInstanceStore.java	2012-09-10 10:28:33 +
@@ -85,4 +85,6 @@
 void removeEmptyEvents( ProgramStage programStage );
 
 void update( Collection programStageInstanceIds, OutboundSms outboundSms );
+
+Collection getSendMesssageEvents();
 }

=== added file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/SchedulingProgramObject.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/SchedulingProgramObject.java	1970-01-01 00:00:00 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/SchedulingProgramObject.java	2012-09-10 10:28:33 +
@@ -0,0 +

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 8027: Fixed bug in data entry. There was a slight inconsistency between client and server side validati...

2012-09-10 Thread noreply

revno: 8027
committer: Lars Helge Ă˜verland 
branch nick: dhis2
timestamp: Mon 2012-09-10 18:11:09 +0200
message:
  Fixed bug in data entry. There was a slight inconsistency between client and 
server side validation of zero values, leading to vaulues of type 0.01 to pass 
as non-zero at the client but not the server.
added:
  dhis-2/dhis-api/src/test/java/org/hisp/dhis/datavalue/
  dhis-2/dhis-api/src/test/java/org/hisp/dhis/datavalue/DataValueTest.java
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/datavalue/DataValue.java
  
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.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-api/src/main/java/org/hisp/dhis/datavalue/DataValue.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/datavalue/DataValue.java	2011-12-26 10:07:59 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/datavalue/DataValue.java	2012-09-10 16:11:09 +
@@ -27,15 +27,16 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+import java.io.Serializable;
+import java.util.Date;
+import java.util.regex.Pattern;
+
 import org.hisp.dhis.common.ImportableObject;
 import org.hisp.dhis.dataelement.DataElement;
 import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo;
 import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.hisp.dhis.period.Period;
 
-import java.io.Serializable;
-import java.util.Date;
-
 /**
  * @author Kristian Nordal
  * @version $Id: DataValue.java 4638 2008-02-25 10:06:47Z larshelg $
@@ -48,6 +49,8 @@
  */
 private static final long serialVersionUID = 6269303850789110610L;
 
+private static final Pattern ZERO_PATTERN = Pattern.compile( "^0(\\.0*)?$" );
+
 public static final String TRUE = "true";
 public static final String FALSE = "false";
 
@@ -167,7 +170,7 @@
 public boolean isZero()
 {
 return dataElement != null && dataElement.getType().equals( DataElement.VALUE_TYPE_INT )
-&& value != null && new Double( value ).intValue() == 0;
+&& value != null && ZERO_PATTERN.matcher( value ).find();
 }
 
 public boolean isNullValue()

=== added directory 'dhis-2/dhis-api/src/test/java/org/hisp/dhis/datavalue'
=== added file 'dhis-2/dhis-api/src/test/java/org/hisp/dhis/datavalue/DataValueTest.java'
--- dhis-2/dhis-api/src/test/java/org/hisp/dhis/datavalue/DataValueTest.java	1970-01-01 00:00:00 +
+++ dhis-2/dhis-api/src/test/java/org/hisp/dhis/datavalue/DataValueTest.java	2012-09-10 16:11:09 +
@@ -0,0 +1,70 @@
+package org.hisp.dhis.datavalue;
+
+/*
+ * Copyright (c) 2004-2012, University of Oslo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this
+ *   list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ *   this list of conditions and the following disclaimer in the documentation
+ *   and/or other materials provided with the distribution.
+ * * Neither the name of the HISP project nor the names of its contributors may
+ *   be used to endorse or promote products derived from this software without
+ *   specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+import org.hisp.dhis.dataelement.DataElement;
+import org.junit.Test;
+
+import static junit.framework.Assert.*;
+
+/**
+ * @author Lars Helge Overland
+ */
+public class DataValueTest
+{
+@Test
+public void testIsZero()
+{
+DataElement dataElement = new DataElement( "A" );
+dataElement.setType( DataElement.VALUE_TYPE_INT );
+
+DataValue dataValue = new DataValue();
+dataValue.setDataElement( dataElement );
+
+dataValue.setValue( "5" );
+  

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 8028: Move Time Setting for sending message from system-setting to maintenance-patient.

2012-09-10 Thread noreply

revno: 8028
committer: Tran Chau 
branch nick: dhis2
timestamp: Tue 2012-09-11 08:58:59 +0700
message:
  Move Time Setting for sending message from system-setting to 
maintenance-patient.
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStage.java
  
dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/scheduling/SendScheduledMessageTask.java
  
dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStageInstanceStore.java
  
dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/interceptor/SystemSettingInterceptor.java
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/schedule/GetGatewayAction.java
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/schedule/ScheduleSendMessageTasksAction.java
  
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/org/hisp/dhis/patient/i18n_module.properties
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/scheduling.js
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/scheduleSendMessage.vm
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/SetGeneralSettingsAction.java
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/org/hisp/dhis/settings/i18n_module.properties
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/systemGeneralSettings.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/program/ProgramStage.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStage.java	2012-09-10 02:46:35 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStage.java	2012-09-11 01:58:59 +
@@ -44,12 +44,12 @@
 
 public static final String TYPE_CUSTOM = "custom";
 
-public static final String TEMPLATE_MESSSAGE_PATIENT_NAME = "patient-name";
-public static final String TEMPLATE_MESSSAGE_PROGRAM_NAME = "program-name";
-public static final String TEMPLATE_MESSSAGE_PROGAM_STAGE_NAME = "program-stage-name";
-public static final String TEMPLATE_MESSSAGE_DUE_DATE = "due-date";
-public static final String TEMPLATE_MESSSAGE_ORGUNIT_NAME = "orgunit-name";
-public static final String TEMPLATE_MESSSAGE_DAYS_SINCE_DUE_DATE = "days-since-due-date";
+public static final String TEMPLATE_MESSSAGE_PATIENT_NAME = "{patient-name}";
+public static final String TEMPLATE_MESSSAGE_PROGRAM_NAME = "{program-name}";
+public static final String TEMPLATE_MESSSAGE_PROGAM_STAGE_NAME = "{program-stage-name}";
+public static final String TEMPLATE_MESSSAGE_DUE_DATE = "{due-date}";
+public static final String TEMPLATE_MESSSAGE_ORGUNIT_NAME = "{orgunit-name}";
+public static final String TEMPLATE_MESSSAGE_DAYS_SINCE_DUE_DATE = "{days-since-due-date}";
 
 /**
  * Determines if a de-serialized file is compatible with this class.

=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/scheduling/SendScheduledMessageTask.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/scheduling/SendScheduledMessageTask.java	2012-09-10 10:28:33 +
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/scheduling/SendScheduledMessageTask.java	2012-09-11 01:58:59 +
@@ -29,9 +29,7 @@
 
 import static org.hisp.dhis.setting.SystemSettingManager.KEY_SEND_MESSAGE_GATEWAY;
 
-import java.util.ArrayList;
 import java.util.Collection;
-import java.util.List;
 
 import org.hisp.dhis.program.ProgramStageInstance;
 import org.hisp.dhis.program.ProgramStageInstanceService;

=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStageInstanceStore.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStageInstanceStore.java	2012-09-10 10:28:33 +
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStageInstanceStore.java	2012-09-11 01:58:59 +
@@ -307,7 +307,7 @@
 String organisationunitName = rs.getString( "orgunitName" );
 String programNam

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 8029: Automatic SMS reminder (WIP).

2012-09-10 Thread noreply

revno: 8029
committer: Tran Chau 
branch nick: dhis2
timestamp: Tue 2012-09-11 10:54:32 +0700
message:
  Automatic SMS reminder (WIP).
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStage.java
  
dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/scheduling/SendScheduledMessageTask.java
  
dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStageInstanceStore.java
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addProgramStageForm.vm
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/scheduling.js
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programStageList.vm
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/scheduleSendMessage.vm
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramStageForm.vm
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/SetGeneralSettingsAction.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/program/ProgramStage.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStage.java	2012-09-11 01:58:59 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStage.java	2012-09-11 03:54:32 +
@@ -44,7 +44,7 @@
 
 public static final String TYPE_CUSTOM = "custom";
 
-public static final String TEMPLATE_MESSSAGE_PATIENT_NAME = "{patient-name}";
+public static final String TEMPLATE_MESSSAGE_PATIENT_NAME = "{person-name}";
 public static final String TEMPLATE_MESSSAGE_PROGRAM_NAME = "{program-name}";
 public static final String TEMPLATE_MESSSAGE_PROGAM_STAGE_NAME = "{program-stage-name}";
 public static final String TEMPLATE_MESSSAGE_DUE_DATE = "{due-date}";

=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/scheduling/SendScheduledMessageTask.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/scheduling/SendScheduledMessageTask.java	2012-09-11 01:58:59 +
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/scheduling/SendScheduledMessageTask.java	2012-09-11 03:54:32 +
@@ -112,6 +112,7 @@
 {
 OutboundSms outboundSms = new OutboundSms( message, phoneNumber );
 outboundSmsService.sendMessage( outboundSms, gatewayId );
+System.out.println("\n\n === \n outboundSms : " + outboundSms.getId() );
 
 //List outboundSmsList = programStageInstance.getOutboundSms();
 //if ( outboundSmsList == null )

=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStageInstanceStore.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStageInstanceStore.java	2012-09-11 01:58:59 +
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStageInstanceStore.java	2012-09-11 03:54:32 +
@@ -288,21 +288,21 @@
 + " and p.phonenumber is not NULL and p.phonenumber != '' "
 + " and ps.templatemessage is not NULL and ps.templatemessage != '' "
 + " and pg.type=1 and ps.daysallowedsendmessage is not null "
-+ " and (DATE(now()) - DATE(psi.duedate) ) = ps.daysallowedsendmessage ";
++ " and (  DATE(now()) - DATE(psi.duedate) ) = ps.daysallowedsendmessage ";
 
 SqlRowSet rs = jdbcTemplate.queryForRowSet( sql );
-
+
 int cols = rs.getMetaData().getColumnCount();
 
 Collection schedulingProgramObjects = new HashSet();
 
 while ( rs.next() )
 {
-  
+String message = "";
 for ( int i = 1; i <= cols; i++ )
 {
  
-String message = rs.getString( "templatemessage" );
+message = rs.getString( "templatemessage" );
 String patientName = rs.getString( "firstName" );
 String organisationunitName = rs.getString( "or

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 8030: Automatic SMS reminder (Done).

2012-09-10 Thread noreply

revno: 8030
committer: Tran Chau 
branch nick: dhis2
timestamp: Tue 2012-09-11 11:54:34 +0700
message:
  Automatic SMS reminder (Done).
modified:
  
dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/SchedulingProgramObject.java
  
dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/scheduling/SendScheduledMessageTask.java
  
dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStageInstanceStore.java
  
dhis-2/dhis-services/dhis-service-patient/src/main/resources/META-INF/dhis/beans.xml
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties


--
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/program/SchedulingProgramObject.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/SchedulingProgramObject.java	2012-09-10 10:28:33 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/SchedulingProgramObject.java	2012-09-11 04:54:34 +
@@ -36,7 +36,7 @@
 {
 private String phoneNumber;
 
-private ProgramStageInstance programStageInstance;
+private Integer programStageInstanceId;
 
 private String message;
 
@@ -45,10 +45,10 @@
 
 }
 
-public SchedulingProgramObject( String phonenumber, ProgramStageInstance programStageInstance, String message )
+public SchedulingProgramObject( String phonenumber, Integer programStageInstanceId, String message )
 {
 this.phoneNumber = phonenumber;
-this.programStageInstance = programStageInstance;
+this.programStageInstanceId = programStageInstanceId;
 this.message = message;
 }
 
@@ -62,14 +62,14 @@
 this.phoneNumber = phoneNumber;
 }
 
-public ProgramStageInstance getProgramStageInstance()
+public Integer getProgramStageInstanceId()
 {
-return programStageInstance;
+return programStageInstanceId;
 }
 
-public void setProgramStageInstance( ProgramStageInstance programStageInstance )
+public void setProgramStageInstanceId( Integer programStageInstanceId )
 {
-this.programStageInstance = programStageInstance;
+this.programStageInstanceId = programStageInstanceId;
 }
 
 public String getMessage()

=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/scheduling/SendScheduledMessageTask.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/scheduling/SendScheduledMessageTask.java	2012-09-11 03:54:32 +
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/scheduling/SendScheduledMessageTask.java	2012-09-11 04:54:34 +
@@ -31,13 +31,13 @@
 
 import java.util.Collection;
 
-import org.hisp.dhis.program.ProgramStageInstance;
 import org.hisp.dhis.program.ProgramStageInstanceService;
 import org.hisp.dhis.program.SchedulingProgramObject;
 import org.hisp.dhis.setting.SystemSettingManager;
 import org.hisp.dhis.sms.SmsServiceException;
 import org.hisp.dhis.sms.outbound.OutboundSms;
 import org.hisp.dhis.sms.outbound.OutboundSmsService;
+import org.springframework.jdbc.core.JdbcTemplate;
 
 /**
  * @author Chau Thu Tran
@@ -60,28 +60,32 @@
 {
 this.programStageInstanceService = programStageInstanceService;
 }
+
+private JdbcTemplate jdbcTemplate;
 
+public void setJdbcTemplate( JdbcTemplate jdbcTemplate )
+{
+this.jdbcTemplate = jdbcTemplate;
+}
+
 private OutboundSmsService outboundSmsService;
 
 public void setOutboundSmsService( OutboundSmsService outboundSmsService )
 {
 this.outboundSmsService = outboundSmsService;
 }
-
+
 // -
 // Constructors
 // -
 
-public SendScheduledMessageTask()
-{
-}
-
 public SendScheduledMessageTask( SystemSettingManager systemSettingManager,
-ProgramStageInstanceService programStageInstanceService, OutboundSmsService outboundSmsService )
+ProgramStageInstanceService programStageInstanceService, OutboundSmsService outboundSmsService,JdbcTemplate jdbcTemplate )
 {
 this.systemSettingManager = systemSettingManager;
 this.programStageInstanceService = programStageInstanceService;
 this.outboundSmsService = outboundSmsService;
+this.jdbcTemplate = jdbcTemplate;
 }
 
 // -
@@ -101,27 +105,21 @@
 for ( SchedulingProgramObject scheduling

Re: [Dhis2-devs] Problem creating datamart

2012-09-10 Thread Hannan Khan
Thanks Jason.

I put the Java heap space 1GB and Maximum 6GB (Xmx6144m and Xms1024m). But
still getting 'java.lang.OutOfMemoryError: Java heap space' error. That why
I asked that whether that is a bug or not.

I am trying to other options and contact you soon.

Regards

Hannan

On Mon, Sep 10, 2012 at 11:40 AM, Jason Pickering <
jason.p.picker...@gmail.com> wrote:

> Hi Hannan,
>
> You configuration may have worked previously, but some things were
> changed in the datamart and you will need to allocate more memory to
> it after 2.7.
>
> The details are here of the server setup are here
>
> http://dhis2.org/doc/snapshot/en/implementer/html/ch08.html#d5e413
>
> and the important part is the JAVA_OPTS environment variable, for
> instance...
>
> export JAVA_OPTS='-Xmx6000m -Xms3000m -XX:MaxPermSize=800m
> -XX:PermSize=400m'
>
> I am not really sure what your settings are, but you should at least
> specify these options, of course adjusting them for the amount of
> memory which can be allocated to DHIS2 .
>
> Best regards,
> Jason
>
>
>
>
> On Mon, Sep 10, 2012 at 10:49 AM, Hannan Khan  wrote:
> > Dear Jason
> >
> > Thanks for your advice. We are running dhis2 from 2010. In earlier
> version
> > we dont have any problem creating datamart. After updating to version
> 2.7 we
> > imported a big chuck of data from two data souce and after that we have
> > problem creating datamart.
> >
> > So far I know the configuration is ok, however I will check again and get
> > back to you.
> >
> > Regards
> >
> > Hannan
> > from Samsung Galaxy
> >
> > On Sep 9, 2012 5:39 PM, "Jason Pickering" 
> > wrote:
> >>
> >> This is not a bug. You must increase the heap size. Please consult the
> >> implementation manual for details.
> >>
> >> Regards,
> >> Jason
> >>
> >> --
> >> Sent from my mobile
> >>
> >> On Sep 9, 2012 1:12 PM, "Hannan Khan"  wrote:
> >>>
> >>> We are using dhis2 version 2.7. Whenever we generating datamart are it
> >>> taking long time and it never ends.The error message is (in the tomcat
> log
> >>> file)
> >>>
> 'dhis2-org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor
> >>> processChildren SEVERE: Exception invoking periodic operation:
> >>> java.lang.OutOfMemoryError: Java heap space'.
> >>>
> >>> I attached the log file.
> >>>
> >>> Regards
> >>>
> >>> Hannan Khan
> >>>
> >>> National Data Warehouse
> >>>
> >>>
> >>>
> >>>
> >>> ___
> >>> 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] Problem creating datamart

2012-09-10 Thread Jason Pickering
The PergGen space is the important option.  What are you JAVA_OPTS.?

--
Sent from my mobile
On Sep 11, 2012 7:25 AM, "Hannan Khan"  wrote:

> Thanks Jason.
>
> I put the Java heap space 1GB and Maximum 6GB (Xmx6144m and Xms1024m). But
> still getting 'java.lang.OutOfMemoryError: Java heap space' error. That why
> I asked that whether that is a bug or not.
>
> I am trying to other options and contact you soon.
>
> Regards
>
> Hannan
>
> On Mon, Sep 10, 2012 at 11:40 AM, Jason Pickering <
> jason.p.picker...@gmail.com> wrote:
>
>> Hi Hannan,
>>
>> You configuration may have worked previously, but some things were
>> changed in the datamart and you will need to allocate more memory to
>> it after 2.7.
>>
>> The details are here of the server setup are here
>>
>> http://dhis2.org/doc/snapshot/en/implementer/html/ch08.html#d5e413
>>
>> and the important part is the JAVA_OPTS environment variable, for
>> instance...
>>
>> export JAVA_OPTS='-Xmx6000m -Xms3000m -XX:MaxPermSize=800m
>> -XX:PermSize=400m'
>>
>> I am not really sure what your settings are, but you should at least
>> specify these options, of course adjusting them for the amount of
>> memory which can be allocated to DHIS2 .
>>
>> Best regards,
>> Jason
>>
>>
>>
>>
>> On Mon, Sep 10, 2012 at 10:49 AM, Hannan Khan  wrote:
>> > Dear Jason
>> >
>> > Thanks for your advice. We are running dhis2 from 2010. In earlier
>> version
>> > we dont have any problem creating datamart. After updating to version
>> 2.7 we
>> > imported a big chuck of data from two data souce and after that we have
>> > problem creating datamart.
>> >
>> > So far I know the configuration is ok, however I will check again and
>> get
>> > back to you.
>> >
>> > Regards
>> >
>> > Hannan
>> > from Samsung Galaxy
>> >
>> > On Sep 9, 2012 5:39 PM, "Jason Pickering" 
>> > wrote:
>> >>
>> >> This is not a bug. You must increase the heap size. Please consult the
>> >> implementation manual for details.
>> >>
>> >> Regards,
>> >> Jason
>> >>
>> >> --
>> >> Sent from my mobile
>> >>
>> >> On Sep 9, 2012 1:12 PM, "Hannan Khan"  wrote:
>> >>>
>> >>> We are using dhis2 version 2.7. Whenever we generating datamart are it
>> >>> taking long time and it never ends.The error message is (in the
>> tomcat log
>> >>> file)
>> >>>
>> 'dhis2-org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor
>> >>> processChildren SEVERE: Exception invoking periodic operation:
>> >>> java.lang.OutOfMemoryError: Java heap space'.
>> >>>
>> >>> I attached the log file.
>> >>>
>> >>> Regards
>> >>>
>> >>> Hannan Khan
>> >>>
>> >>> National Data Warehouse
>> >>>
>> >>>
>> >>>
>> >>>
>> >>> ___
>> >>> 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 8031: Minor fix.

2012-09-10 Thread noreply

revno: 8031
committer: Tran Chau 
branch nick: dhis2
timestamp: Tue 2012-09-11 13:12:20 +0700
message:
  Minor fix.
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStage.java
  
dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/PatientDashboardAction.java
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties


--
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/program/ProgramStage.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStage.java	2012-09-11 03:54:32 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStage.java	2012-09-11 06:12:20 +
@@ -44,7 +44,7 @@
 
 public static final String TYPE_CUSTOM = "custom";
 
-public static final String TEMPLATE_MESSSAGE_PATIENT_NAME = "{person-name}";
+public static final String TEMPLATE_MESSSAGE_PATIENT_NAME = "{patient-name}";
 public static final String TEMPLATE_MESSSAGE_PROGRAM_NAME = "{program-name}";
 public static final String TEMPLATE_MESSSAGE_PROGAM_STAGE_NAME = "{program-stage-name}";
 public static final String TEMPLATE_MESSSAGE_DUE_DATE = "{due-date}";

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/PatientDashboardAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/PatientDashboardAction.java	2012-08-12 06:10:50 +
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/PatientDashboardAction.java	2012-09-11 06:12:20 +
@@ -27,12 +27,9 @@
 
 package org.hisp.dhis.caseentry.action.patient;
 
-import java.util.ArrayList;
 import java.util.Collection;
-import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
-import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
@@ -43,9 +40,7 @@
 import org.hisp.dhis.patientattributevalue.PatientAttributeValueService;
 import org.hisp.dhis.program.ProgramInstance;
 import org.hisp.dhis.program.ProgramInstanceService;
-import org.hisp.dhis.program.ProgramStageInstance;
 import org.hisp.dhis.program.ProgramStageInstanceService;
-import org.hisp.dhis.program.comparator.ProgramStageInstanceDueDateComparator;
 import org.hisp.dhis.relationship.Relationship;
 import org.hisp.dhis.relationship.RelationshipService;
 

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties	2012-09-11 04:54:34 +
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties	2012-09-11 06:12:20 +
@@ -269,7 +269,7 @@
 identifiers_and_attributes = Identifiers / Attributes
 displayed_in_list = Displayed in list
 report_date_description = Description of report date
-days_before_due_date = Days after due date
+days_before_due_date = Days before due date
 days_after_due_date = Days after due date
 template_message = Template reminder message
 params = Parameters

___
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 1048942] [NEW] Wrong periods used for shared graphs

2012-09-10 Thread Olav P
Public bug reported:

Made a graph in DV for last three months (june - august), saved it as a
system favourite, then shared is as an interpretation. The graph that is
shown in the interpretation is for jul - sept instead of june - august.
Going to DV by clicking on the chart will show the correct periods (june
- august).

** Affects: dhis2
 Importance: Undecided
 Status: New

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

Title:
  Wrong periods used for shared graphs

Status in DHIS 2 - District Health Information Software:
  New

Bug description:
  Made a graph in DV for last three months (june - august), saved it as
  a system favourite, then shared is as an interpretation. The graph
  that is shown in the interpretation is for jul - sept instead of june
  - august. Going to DV by clicking on the chart will show the correct
  periods (june - august).

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1048942/+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] [Bug 1048941] [NEW] Wrong periods used for shared graphs

2012-09-10 Thread Olav P
Public bug reported:

Made a graph in DV for last three months (june - august), saved it as a
system favourite, then shared is as an interpretation. The graph that is
shown in the interpretation is for jul - sept instead of june - august.
Going to DV by clicking on the chart will show the correct periods (june
- august).

** Affects: dhis2
 Importance: Undecided
 Status: New

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

Title:
  Wrong periods used for shared graphs

Status in DHIS 2 - District Health Information Software:
  New

Bug description:
  Made a graph in DV for last three months (june - august), saved it as
  a system favourite, then shared is as an interpretation. The graph
  that is shown in the interpretation is for jul - sept instead of june
  - august. Going to DV by clicking on the chart will show the correct
  periods (june - august).

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1048941/+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 8032: Added new controller: CurrentUserController at /api/currentUser. Gives information about current ...

2012-09-10 Thread noreply

revno: 8032
committer: Morten Olav Hansen 
branch nick: dhis2
timestamp: Tue 2012-09-11 13:48:03 +0700
message:
  Added new controller: CurrentUserController at /api/currentUser. Gives 
information about current user. Also added /inbox (messageConversation and 
interpretations), /dashboard (still WIP) to get basic information.
added:
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/user/CurrentUserController.java
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/webdomain/user/
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/webdomain/user/Dashboard.java
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/webdomain/user/Inbox.java
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/interpretation/Interpretation.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/message/MessageConversation.java
  
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/utils/WebUtils.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/interpretation/Interpretation.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/interpretation/Interpretation.java	2012-09-03 19:48:33 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/interpretation/Interpretation.java	2012-09-11 06:48:03 +
@@ -30,6 +30,7 @@
 import com.fasterxml.jackson.annotation.JsonProperty;
 import com.fasterxml.jackson.annotation.JsonView;
 import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
 import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
 import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
 import org.hisp.dhis.chart.Chart;
@@ -157,7 +158,7 @@
 // -
 
 @JsonProperty
-@JsonDeserialize( as = BaseIdentifiableObject.class )
+@JsonSerialize( as = BaseIdentifiableObject.class )
 @JsonView( { DetailedView.class, ExportView.class } )
 @JacksonXmlProperty( namespace = Dxf2Namespace.NAMESPACE )
 public Chart getChart()
@@ -171,7 +172,7 @@
 }
 
 @JsonProperty
-@JsonDeserialize( as = BaseIdentifiableObject.class )
+@JsonSerialize( as = BaseIdentifiableObject.class )
 @JsonView( { DetailedView.class, ExportView.class } )
 @JacksonXmlProperty( namespace = Dxf2Namespace.NAMESPACE )
 public MapView getMapView()
@@ -185,7 +186,7 @@
 }
 
 @JsonProperty
-@JsonDeserialize( as = BaseIdentifiableObject.class )
+@JsonSerialize( as = BaseIdentifiableObject.class )
 @JsonView( { DetailedView.class, ExportView.class } )
 @JacksonXmlProperty( namespace = Dxf2Namespace.NAMESPACE )
 public ReportTable getReportTable()
@@ -199,7 +200,7 @@
 }
 
 @JsonProperty
-@JsonDeserialize( as = BaseIdentifiableObject.class )
+@JsonSerialize( as = BaseIdentifiableObject.class )
 @JsonView( { DetailedView.class, ExportView.class } )
 @JacksonXmlProperty( namespace = Dxf2Namespace.NAMESPACE )
 public DataSet getDataSet()
@@ -213,7 +214,7 @@
 }
 
 @JsonProperty
-@JsonDeserialize( as = BaseIdentifiableObject.class )
+@JsonSerialize( as = BaseIdentifiableObject.class )
 @JsonView( { DetailedView.class, ExportView.class } )
 @JacksonXmlProperty( namespace = Dxf2Namespace.NAMESPACE )
 public Period getPeriod()
@@ -227,7 +228,7 @@
 }
 
 @JsonProperty
-@JsonDeserialize( as = BaseIdentifiableObject.class )
+@JsonSerialize( as = BaseIdentifiableObject.class )
 @JsonView( { DetailedView.class, ExportView.class } )
 @JacksonXmlProperty( namespace = Dxf2Namespace.NAMESPACE )
 public OrganisationUnit getOrganisationUnit()
@@ -254,7 +255,7 @@
 }
 
 @JsonProperty
-@JsonDeserialize( as = BaseIdentifiableObject.class )
+@JsonSerialize( as = BaseIdentifiableObject.class )
 @JsonView( { DetailedView.class, ExportView.class } )
 @JacksonXmlProperty( namespace = Dxf2Namespace.NAMESPACE )
 public User getUser()
@@ -281,7 +282,7 @@
 }
 
 @JsonProperty
-@JsonDeserialize( contentAs = BaseIdentifiableObject.class )
+@JsonSerialize( contentAs = BaseIdentifiableObject.class )
 @JsonView( { DetailedView.class, ExportView.class } )
 @JacksonXmlProperty( namespace = Dxf2Namespace.NAMESPACE )
 public List getComments()

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/message/MessageConversation.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/message/MessageConversation.java	2012-04-20 18:31:48 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/message/MessageConversation.java	2012-09-11 06:48:03 +