Re: [Dhis2-users] [Dhis2-devs] Web API : Get Indicator Value

2015-09-20 Thread Julhas Sujan
Hi Pamod,

Please check the following link as for indicators data:
../api/indicators.json?dataSet=XT5UDcXpXst=201506=ddTZZY0GhLW

For value format as an array:
$resultData1= Array
(
'resultData' => Array
(
'headers' => Array
(
'0' => Array
(
'name' => 'dx',
'column' => 'Data',
'type' => 'java.lang.String'
),

'1' => Array
(
'name' => 'pe',
'column' => 'Period',
'type' => 'java.lang.String'
),

'2' => Array
(
'name' => 'ou',
'column' => 'Organisation unit',
'type' => 'java.lang.String'
),

'3' => Array
(
'name' => 'value',
'column' => 'Value',
'type' => 'java.lang.Double'
),

),

'metaData' => Array
(
   'names' => Array
(
'pe' => 'Period',
'yAfJFLuVkEa' => 'Argariya CC, Gazipur Sadar',
'ou' => 'Organisation unit',
'dx' => 'Data',
'JQt3QsxwLp5' => 'Zinc_ClosingBalance',
'201506' => 'August 2015'
)

),

'rows' => Array
(
'0' => Array
(
'0' => 'JQt3QsxwLp5',//indicator id
'1' => 201508,
'2' => 'yAfJFLuVkEa',// organization unit
'3' => 1360.0// Indicator value
)

)

)

);

$indicatorId=$data['resultData']['rows'][0][0];
$orgUnitServer=$data['resultData']['rows'][0][2];
$indicatorValue=$data['resultData']['rows'][0][3];// Indicator Values

Hope it will be helpful for you.


Best Regards
Julhas Sujan
Management Science for Health(MSH)
Dhaka, Bangladesh
Skype: julhas08
Web: www.julhas.info

On Sun, Sep 20, 2015 at 1:22 PM, Pamod Amarakoon  wrote:

> Dear All,
>
> 1. what is the format to get a value of an aggregated indicator of a
> particular data set using web - API. Is it stored in database or calculated
> in real time
>
> 2. is the relative period available for Previous Day (yesterday).
>
> Thank you
>
> --
> Regards,
> Pamod Amarakoon
>
> Confidentiality Notice: the information contained in this email and any
> attachments may be legally privileged and confidential. If you are not an
> intended recipient, you are hereby notified that any dissemination,
> distribution, or copying of this e-mail is strictly prohibited. If you have
> received this e-mail in error, please notify the sender and permanently
> delete the e-mail and any attachments immediately. You should not retain,
> copy or use this e-mail or any attachments for any purpose, nor disclose
> all or any part of the contents to any other person.
>
> [image: http://ehealthasia.org] 
>
>
> ___
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to : dhis2-d...@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>
___
Mailing list: https://launchpad.net/~dhis2-users
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-users
More help   : https://help.launchpad.net/ListHelp


[Dhis2-users] Web API : Get Indicator Value

2015-09-20 Thread Pamod Amarakoon
Dear All,

1. what is the format to get a value of an aggregated indicator of a
particular data set using web - API. Is it stored in database or calculated
in real time

2. is the relative period available for Previous Day (yesterday).

Thank you

-- 
Regards,
Pamod Amarakoon

Confidentiality Notice: the information contained in this email and any
attachments may be legally privileged and confidential. If you are not an
intended recipient, you are hereby notified that any dissemination,
distribution, or copying of this e-mail is strictly prohibited. If you have
received this e-mail in error, please notify the sender and permanently
delete the e-mail and any attachments immediately. You should not retain,
copy or use this e-mail or any attachments for any purpose, nor disclose
all or any part of the contents to any other person.

[image: http://ehealthasia.org] 
___
Mailing list: https://launchpad.net/~dhis2-users
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-users
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-users] [Dhis2-devs] Web API : Get Indicator Value

2015-09-20 Thread Pamod Amarakoon
Dear Julhas,

Thank you for the reply. I'll try this.

On Sun, Sep 20, 2015 at 2:57 PM, Julhas Sujan 
wrote:

> Hi Pamod,
>
> Please check the following link as for indicators data:
>
> ../api/indicators.json?dataSet=XT5UDcXpXst=201506=ddTZZY0GhLW
>
> For value format as an array:
> $resultData1= Array
> (
> 'resultData' => Array
> (
> 'headers' => Array
> (
> '0' => Array
> (
> 'name' => 'dx',
> 'column' => 'Data',
> 'type' => 'java.lang.String'
> ),
>
> '1' => Array
> (
> 'name' => 'pe',
> 'column' => 'Period',
> 'type' => 'java.lang.String'
> ),
>
> '2' => Array
> (
> 'name' => 'ou',
> 'column' => 'Organisation unit',
> 'type' => 'java.lang.String'
> ),
>
> '3' => Array
> (
> 'name' => 'value',
> 'column' => 'Value',
> 'type' => 'java.lang.Double'
> ),
>
> ),
>
> 'metaData' => Array
> (
>'names' => Array
> (
> 'pe' => 'Period',
> 'yAfJFLuVkEa' => 'Argariya CC, Gazipur Sadar',
> 'ou' => 'Organisation unit',
> 'dx' => 'Data',
> 'JQt3QsxwLp5' => 'Zinc_ClosingBalance',
> '201506' => 'August 2015'
> )
>
> ),
>
> 'rows' => Array
> (
> '0' => Array
> (
> '0' => 'JQt3QsxwLp5',//indicator id
> '1' => 201508,
> '2' => 'yAfJFLuVkEa',// organization unit
> '3' => 1360.0// Indicator value
> )
>
> )
>
> )
>
> );
>
> $indicatorId=$data['resultData']['rows'][0][0];
> $orgUnitServer=$data['resultData']['rows'][0][2];
> $indicatorValue=$data['resultData']['rows'][0][3];// Indicator Values
>
> Hope it will be helpful for you.
>
>
> Best Regards
> Julhas Sujan
> Management Science for Health(MSH)
> Dhaka, Bangladesh
> Skype: julhas08
> Web: www.julhas.info
>
> On Sun, Sep 20, 2015 at 1:22 PM, Pamod Amarakoon  wrote:
>
>> Dear All,
>>
>> 1. what is the format to get a value of an aggregated indicator of a
>> particular data set using web - API. Is it stored in database or calculated
>> in real time
>>
>> 2. is the relative period available for Previous Day (yesterday).
>>
>> Thank you
>>
>> --
>> Regards,
>> Pamod Amarakoon
>>
>> Confidentiality Notice: the information contained in this email and any
>> attachments may be legally privileged and confidential. If you are not an
>> intended recipient, you are hereby notified that any dissemination,
>> distribution, or copying of this e-mail is strictly prohibited. If you have
>> received this e-mail in error, please notify the sender and permanently
>> delete the e-mail and any attachments immediately. You should not retain,
>> copy or use this e-mail or any attachments for any purpose, nor disclose
>> all or any part of the contents to any other person.
>>
>> [image: http://ehealthasia.org] 
>>
>>
>> ___
>> Mailing list: https://launchpad.net/~dhis2-devs
>> Post to : dhis2-d...@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~dhis2-devs
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>


-- 
Regards,
Pamod Amarakoon

Confidentiality Notice: the information contained in this email and any
attachments may be legally privileged and confidential. If you are not an
intended recipient, you are hereby notified that any dissemination,
distribution, or copying of this e-mail is strictly prohibited. If you have
received this e-mail in error, please notify the sender and permanently
delete the e-mail and any attachments immediately. You should not retain,
copy or use this e-mail or any attachments for any purpose, nor disclose
all or any part of the contents to any other person.

[image: http://ehealthasia.org] 
___
Mailing list: https://launchpad.net/~dhis2-users
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-users
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-users] [Dhis2-devs] getting maven build errors

2015-09-20 Thread Knut Staring
You could try to just skp the tests:
mvn clean install -DskipTests=true

as it says in the instructions:
https://www.dhis2.org/development

Knut

On Sunday, September 20, 2015, haider iqbal  wrote:

> Hi,
>
> I have downloaded the source code but i am getting build errors when i run
> the command " mvn install " on terminal in dhis-2 directory.
>
> I have attached the build log file. Kindly help me solve the issue.
>
> Regards,
> Haider Iqba
>


-- 
Knut Staring
Dept. of Informatics, University of Oslo
Norway: +4791880522
Skype: knutstar
http://dhis2.org
___
Mailing list: https://launchpad.net/~dhis2-users
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-users
More help   : https://help.launchpad.net/ListHelp


[Dhis2-users] [Dhis2] getting maven build errors

2015-09-20 Thread haider iqbal
Hi,

I have downloaded the source code but i am getting build errors when i run
the command " mvn install " on terminal in dhis-2 directory.

I have attached the build log file. Kindly help me solve the issue.

Regards,
Haider Iqba
[INFO] Scanning for projects...
[INFO] 
[INFO] Reactor Build Order:
[INFO] 
[INFO] DHIS 2
[INFO] DHIS API
[INFO] DHIS Support Parent Project
[INFO] DHIS External Support
[INFO] DHIS Hibernate Support
[INFO] DHIS Test Support
[INFO] DHIS Support Commons
[INFO] DHIS System Support
[INFO] DHIS JDBC Service
[INFO] DHIS Services Parent Project
[INFO] DHIS Core API Implementations
[INFO] DHIS Administration Service
[INFO] DHIS DXF 2 Data Exchange
[INFO] DHIS Mobile Service
[INFO] DHIS Analytics
[INFO] DHIS Event Reporting Service
[INFO] DHIS Reporting Service
[INFO] DHIS Import-Export Service
[INFO] 
[INFO] 
[INFO] Building DHIS 2 2.21-SNAPSHOT
[INFO] 
[INFO] 
[INFO] --- maven-install-plugin:2.4:install (default-install) @ dhis ---
[INFO] Installing C:\Users\Haider\Desktop\dhis2\dhis-2\pom.xml to 
C:\Users\Haider\.m2\repository\org\hisp\dhis\dhis\2.21-SNAPSHOT\dhis-2.21-SNAPSHOT.pom
[INFO] 
[INFO] 
[INFO] Building DHIS API 2.21-SNAPSHOT
[INFO] 
[INFO] Downloading: 
http://repo1.maven.org/maven2/org/smslib/smslib/3.5.2/smslib-3.5.2.pom
[INFO] Downloading: 
http://download.osgeo.org/webdav/geotools/org/smslib/smslib/3.5.2/smslib-3.5.2.pom
[INFO] Downloading: 
http://smslib.org/maven2/v3/org/smslib/smslib/3.5.2/smslib-3.5.2.pom
[INFO] Downloaded: 
http://smslib.org/maven2/v3/org/smslib/smslib/3.5.2/smslib-3.5.2.pom (3 KB at 
1.3 KB/sec)
[INFO] Downloading: 
http://repo1.maven.org/maven2/org/smslib/smslib/3.5.2/smslib-3.5.2.jar
[INFO] Downloading: 
http://download.osgeo.org/webdav/geotools/org/smslib/smslib/3.5.2/smslib-3.5.2.jar
[INFO] Downloading: 
http://smslib.org/maven2/v3/org/smslib/smslib/3.5.2/smslib-3.5.2.jar
[INFO] Downloaded: 
http://smslib.org/maven2/v3/org/smslib/smslib/3.5.2/smslib-3.5.2.jar (348 KB at 
102.4 KB/sec)
[INFO] 
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ dhis-api 
---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 0 resource
[INFO] 
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ dhis-api ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ 
dhis-api ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] 
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ 
dhis-api ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-surefire-plugin:2.16:test (default-test) @ dhis-api ---
[INFO] Surefire report directory: 
C:\Users\Haider\Desktop\dhis2\dhis-2\dhis-api\target\surefire-reports
[INFO] parallel='none', perCoreThreadCount=true, threadCount=0, 
useUnlimitedThreads=false, threadCountSuites=0, threadCountClasses=0, 
threadCountMethods=0

---
 T E S T S
---
Running org.hisp.dhis.appmanager.AppTest
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.378 sec - in 
org.hisp.dhis.appmanager.AppTest
Running org.hisp.dhis.calendar.DateTimeUnitPeriodTypeParserTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.561 sec - in 
org.hisp.dhis.calendar.DateTimeUnitPeriodTypeParserTest
Running org.hisp.dhis.calendar.DateTimeUnitTest
Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.031 sec - in 
org.hisp.dhis.calendar.DateTimeUnitTest
Running org.hisp.dhis.calendar.impl.EthiopianCalendarTest
Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.267 sec - in 
org.hisp.dhis.calendar.impl.EthiopianCalendarTest
Running org.hisp.dhis.calendar.impl.NepaliCalendarTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.094 sec - in 
org.hisp.dhis.calendar.impl.NepaliCalendarTest
Running org.hisp.dhis.common.AccessStringHelperTest
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.016 sec - in 
org.hisp.dhis.common.AccessStringHelperTest
Running org.hisp.dhis.common.BaseAnalyticalObjectTest
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.593 sec - in 
org.hisp.dhis.common.BaseAnalyticalObjectTest
Running org.hisp.dhis.common.CodeGeneratorTest
Tests run: 1, Failures: 0, Errors: 

Re: [Dhis2-users] Program rule does not seem to be working

2015-09-20 Thread Pramil Liyanage
Dear Ese,

Try with single quotations 'Female' and clear the cache and try.
If not working, get the latest build and try. I also had a similar issue
with an older build, but when I replaced with the latest, worked fine.

Regards
Pramil

On Mon, Sep 21, 2015 at 8:00 AM, Ese Egerega  wrote:

> Dear all,
>
> The Program Rule feature does not seem to be working for me. I am trying
> to hide a section in the tracker based on if the Gender selected during
> program registration is Female.
>
> To achieve this, I created a program rule that should hide the section but
> nothing seem to happen in Tracker Capture. The section is still displayed
> as if there is no rule set.
>
> In program rule I entered Gender as source field and used the following as
> my expression:
>
> A{Gender} == "Female"
>
> I will appreciate any assistance.
>
> Thanks,
> Ese
>
>
>
> ___
> Mailing list: https://launchpad.net/~dhis2-users
> Post to : dhis2-users@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-users
> More help   : https://help.launchpad.net/ListHelp
>
>


-- 

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


Re: [Dhis2-users] Program rule does not seem to be working

2015-09-20 Thread Ese Egerega
Thanks so much Pramil. I will try that now.

-Ese

On Mon, Sep 21, 2015 at 3:45 AM, Pramil Liyanage  wrote:

> Dear Ese,
>
> Try with single quotations 'Female' and clear the cache and try.
> If not working, get the latest build and try. I also had a similar issue
> with an older build, but when I replaced with the latest, worked fine.
>
> Regards
> Pramil
>
> On Mon, Sep 21, 2015 at 8:00 AM, Ese Egerega  wrote:
>
>> Dear all,
>>
>> The Program Rule feature does not seem to be working for me. I am trying
>> to hide a section in the tracker based on if the Gender selected during
>> program registration is Female.
>>
>> To achieve this, I created a program rule that should hide the section
>> but nothing seem to happen in Tracker Capture. The section is still
>> displayed as if there is no rule set.
>>
>> In program rule I entered Gender as source field and used the following
>> as my expression:
>>
>> A{Gender} == "Female"
>>
>> I will appreciate any assistance.
>>
>> Thanks,
>> Ese
>>
>>
>>
>> ___
>> Mailing list: https://launchpad.net/~dhis2-users
>> Post to : dhis2-users@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~dhis2-users
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>
>
> --
> 
>
___
Mailing list: https://launchpad.net/~dhis2-users
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-users
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-users] [Dhis2-devs] getting maven build errors

2015-09-20 Thread haider iqbal
Thank you for your support. I build the code by skipping tests and it was
successfully built.

Hiader Iqbal
On Sep 21, 2015 7:52 AM, "Morten Olav Hansen"  wrote:

> Hi
>
> The test failures are due to you current local timezone (Asia/Karachi).
> Sorry, but as Knut says.. please use -DskipTests=true for now.. you might
> also have issues running DHIS 2, some timezones have been known to be
> incompatible.. we fix it when we see it, but for now.. maybe you could
> adjust your time zone. I will look into it, but it could take a few days.
>
> --
> Morten
>
> On Sun, Sep 20, 2015 at 9:31 PM, Knut Staring  wrote:
>
>> You could try to just skp the tests:
>> mvn clean install -DskipTests=true
>>
>> as it says in the instructions:
>> https://www.dhis2.org/development
>>
>> Knut
>>
>>
>> On Sunday, September 20, 2015, haider iqbal 
>> wrote:
>>
>>> Hi,
>>>
>>> I have downloaded the source code but i am getting build errors when i
>>> run the command " mvn install " on terminal in dhis-2 directory.
>>>
>>> I have attached the build log file. Kindly help me solve the issue.
>>>
>>> Regards,
>>> Haider Iqba
>>>
>>
>>
>> --
>> Knut Staring
>> Dept. of Informatics, University of Oslo
>> Norway: +4791880522
>> Skype: knutstar
>> http://dhis2.org
>>
>>
>> ___
>> Mailing list: https://launchpad.net/~dhis2-users
>> Post to : dhis2-users@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~dhis2-users
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>
___
Mailing list: https://launchpad.net/~dhis2-users
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-users
More help   : https://help.launchpad.net/ListHelp


[Dhis2-users] Program rule does not seem to be working

2015-09-20 Thread Ese Egerega
Dear all,

The Program Rule feature does not seem to be working for me. I am trying to
hide a section in the tracker based on if the Gender selected during
program registration is Female.

To achieve this, I created a program rule that should hide the section but
nothing seem to happen in Tracker Capture. The section is still displayed
as if there is no rule set.

In program rule I entered Gender as source field and used the following as
my expression:

A{Gender} == "Female"

I will appreciate any assistance.

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


Re: [Dhis2-users] [Dhis2-devs] getting maven build errors

2015-09-20 Thread Morten Olav Hansen
Hi

The test failures are due to you current local timezone (Asia/Karachi).
Sorry, but as Knut says.. please use -DskipTests=true for now.. you might
also have issues running DHIS 2, some timezones have been known to be
incompatible.. we fix it when we see it, but for now.. maybe you could
adjust your time zone. I will look into it, but it could take a few days.

--
Morten

On Sun, Sep 20, 2015 at 9:31 PM, Knut Staring  wrote:

> You could try to just skp the tests:
> mvn clean install -DskipTests=true
>
> as it says in the instructions:
> https://www.dhis2.org/development
>
> Knut
>
>
> On Sunday, September 20, 2015, haider iqbal 
> wrote:
>
>> Hi,
>>
>> I have downloaded the source code but i am getting build errors when i
>> run the command " mvn install " on terminal in dhis-2 directory.
>>
>> I have attached the build log file. Kindly help me solve the issue.
>>
>> Regards,
>> Haider Iqba
>>
>
>
> --
> Knut Staring
> Dept. of Informatics, University of Oslo
> Norway: +4791880522
> Skype: knutstar
> http://dhis2.org
>
>
> ___
> Mailing list: https://launchpad.net/~dhis2-users
> Post to : dhis2-users@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-users
> More help   : https://help.launchpad.net/ListHelp
>
>
___
Mailing list: https://launchpad.net/~dhis2-users
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-users
More help   : https://help.launchpad.net/ListHelp