Re: [Dhis2-devs] Getting the OU for items recorded in datavalues table

2018-06-25 Thread Brajesh Murari
robin

source is the main inception point of DHIS development then period means
time frame then elements means cell then datasets which combines source,
time, elements in unified form. most of the time we are working on data
collection in health domain perhaps this combination has capacity to solve
Nth dimension theorem of Mathematica. The probable reason behind
unification of three independent frames is to understand nature of medium
or you can say like in the form of organizationunit.

bm

On Mon 25 Jun, 2018, 7:42 PM Edward Robinson, 
wrote:

> Ah, got it, makes sense,
>
> Thanks
>
> Ed
>
>
>
> *From:* Knut Staring 
> *Sent:* Sunday, 24 June 2018 8:36 PM
> *To:* Edward Robinson 
> *Cc:* David Huser ; DHIS 2 developers <
> dhis2-devs@lists.launchpad.net>
> *Subject:* Re: [Dhis2-devs] Getting the OU for items recorded in
> datavalues table
>
>
>
> This is an unfortunate relic in a few key tables. Dates back to 2005...
>
>
>
> On Tue, Jun 19, 2018, 2:35 PM Edward Robinson <
> erobin...@projectbalance.com> wrote:
>
> Oh wow, that simple?  Sourceid = organisationunitid?
>
> Thanks for the quick response David.  For some reason I was expecting
> organisationunitid to be present in the datavalue table.  Do you know the
> reason it’s called sourceid?
>
> Ed
>
>
>
> *From:* David Huser 
> *Sent:* Tuesday, 19 June 2018 2:33 PM
> *To:* Edward Robinson 
> *Cc:* DHIS 2 Developers list 
> *Subject:* Re: [Dhis2-devs] Getting the OU for items recorded in
> datavalues table
>
>
>
> Hi Ed,
>
> This should get you started:
>
>
>
> SELECT dv.dataelementid, dv.value, ou.name
> FROM datavalue dv
> JOIN organisationunit ou
> ON ou.organisationunitid = dv.sourceid;
>
>
>
> Best,
> David
>
>
>
> On Tue, Jun 19, 2018 at 2:21 PM Edward Robinson <
> erobin...@projectbalance.com> wrote:
>
> How can the OU be determined for the data in the datavalues table?
>
> The fields are dataelementid, periodid, sourceid, categoryoptioncomboid,
> attributeoptioncomboid, value, storedby, created, lastupdated, comment,
> followup, deleted
>
> I’m guessing it involves the sourceid field (and possibly others) but I’m
> having a hard time figuring it out at the moment.
>
>
>
> Thanks in advance!
>
> Ed
>
> ___
> 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
>
>
>
>
> --
>
>
>
> *David Huser*
> DHIS2 Support Specialist
>
> dhu...@baosystems.com | https://baosystems.com |  2900 K Street, Suite
> 507, Washington D.C. 20007
>
>
>
> ___
> 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
>
___
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] Getting the OU for items recorded in datavalues table

2018-06-25 Thread Edward Robinson
Understood, thanks everyone,
Regards
Ed

From: Calle Hedberg 
Sent: Monday, 25 June 2018 1:44 AM
To: Brajesh Murari 
Cc: Edward Robinson ; DHIS 2 developers 

Subject: Re: [Dhis2-devs] Getting the OU for items recorded in datavalues table

Hi,

Incorrect - the term "sourceid" has never been used in DHIS v1. DHIS1 
introduced and maintained the principle that the id reference field for any 
table would be called id.

I'm not sure WHY it was decided at the time to change this principle for some 
of the organisationunitid foreign key fields, but the idea was dropped quickly. 
Ola or Lars might recall...

regards
calle

On 19 June 2018 at 16:46, Brajesh Murari 
mailto:brajesh.mur...@gmail.com>> wrote:
sourceid is available for distinguishing different types of organizationunit. 
It is one of id available since DHIS 1. In some of the DHIS2 releases, it was 
removed and later on it was found very useful, so it was included. It's like 
parent to organisationunit.

BM

On Tue 19 Jun, 2018, 6:06 PM Edward Robinson, 
mailto:erobin...@projectbalance.com>> wrote:
Oh wow, that simple?  Sourceid = organisationunitid?
Thanks for the quick response David.  For some reason I was expecting 
organisationunitid to be present in the datavalue table.  Do you know the 
reason it’s called sourceid?
Ed

From: David Huser mailto:dhu...@baosystems.com>>
Sent: Tuesday, 19 June 2018 2:33 PM
To: Edward Robinson 
mailto:erobin...@projectbalance.com>>
Cc: DHIS 2 Developers list 
mailto:dhis2-devs@lists.launchpad.net>>
Subject: Re: [Dhis2-devs] Getting the OU for items recorded in datavalues table

Hi Ed,

This should get you started:

SELECT dv.dataelementid, dv.value, ou.name
FROM datavalue dv
JOIN organisationunit ou
ON ou.organisationunitid = dv.sourceid;

Best,
David

On Tue, Jun 19, 2018 at 2:21 PM Edward Robinson 
mailto:erobin...@projectbalance.com>> wrote:
How can the OU be determined for the data in the datavalues table?
The fields are dataelementid, periodid, sourceid, categoryoptioncomboid, 
attributeoptioncomboid, value, storedby, created, lastupdated, comment, 
followup, deleted
I’m guessing it involves the sourceid field (and possibly others) but I’m 
having a hard time figuring it out at the moment.

Thanks in advance!
Ed
___
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


--
[https://docs.google.com/uc?export=download=0B3FU6Lx45t71cUgwM0swdzZOcUk=0B3FU6Lx45t71VGRUVElxbzIxM2VsOXVqN0hZUFRtMk1ZaXcwPQ]


David Huser
DHIS2 Support Specialist
dhu...@baosystems.com | https://baosystems.com |  
2900 K Street, Suite 507, Washington D.C. 20007


___
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



--

***

Calle Hedberg

46D Alma Road, 7700 Rosebank, SOUTH AFRICA

Tel/fax (home): +27-21-685-6472

Cell: +27-82-853-5352

Iridium SatPhone: +8816-315-19119

Email: calle.hedb...@gmail.com

Skype: calle_hedberg

***

___
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] Getting the OU for items recorded in datavalues table

2018-06-25 Thread Edward Robinson
Ah, got it, makes sense,
Thanks
Ed

From: Knut Staring 
Sent: Sunday, 24 June 2018 8:36 PM
To: Edward Robinson 
Cc: David Huser ; DHIS 2 developers 

Subject: Re: [Dhis2-devs] Getting the OU for items recorded in datavalues table

This is an unfortunate relic in a few key tables. Dates back to 2005...

On Tue, Jun 19, 2018, 2:35 PM Edward Robinson 
mailto:erobin...@projectbalance.com>> wrote:
Oh wow, that simple?  Sourceid = organisationunitid?
Thanks for the quick response David.  For some reason I was expecting 
organisationunitid to be present in the datavalue table.  Do you know the 
reason it’s called sourceid?
Ed

From: David Huser mailto:dhu...@baosystems.com>>
Sent: Tuesday, 19 June 2018 2:33 PM
To: Edward Robinson 
mailto:erobin...@projectbalance.com>>
Cc: DHIS 2 Developers list 
mailto:dhis2-devs@lists.launchpad.net>>
Subject: Re: [Dhis2-devs] Getting the OU for items recorded in datavalues table

Hi Ed,

This should get you started:

SELECT dv.dataelementid, dv.value, ou.name
FROM datavalue dv
JOIN organisationunit ou
ON ou.organisationunitid = dv.sourceid;

Best,
David

On Tue, Jun 19, 2018 at 2:21 PM Edward Robinson 
mailto:erobin...@projectbalance.com>> wrote:
How can the OU be determined for the data in the datavalues table?
The fields are dataelementid, periodid, sourceid, categoryoptioncomboid, 
attributeoptioncomboid, value, storedby, created, lastupdated, comment, 
followup, deleted
I’m guessing it involves the sourceid field (and possibly others) but I’m 
having a hard time figuring it out at the moment.

Thanks in advance!
Ed
___
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


--
[https://docs.google.com/uc?export=download=0B3FU6Lx45t71cUgwM0swdzZOcUk=0B3FU6Lx45t71VGRUVElxbzIxM2VsOXVqN0hZUFRtMk1ZaXcwPQ]


David Huser
DHIS2 Support Specialist
dhu...@baosystems.com | https://baosystems.com |  
2900 K Street, Suite 507, Washington D.C. 20007


___
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] Getting the OU for items recorded in datavalues table

2018-06-24 Thread Calle Hedberg
Hi,

Incorrect - the term "sourceid" has never been used in DHIS v1. DHIS1
introduced and maintained the principle that the id reference field for any
table would be called id.

I'm not sure WHY it was decided at the time to change this principle for
some of the organisationunitid foreign key fields, but the idea was dropped
quickly. Ola or Lars might recall...

regards
calle

On 19 June 2018 at 16:46, Brajesh Murari  wrote:

> sourceid is available for distinguishing different types of
> organizationunit. It is one of id available since DHIS 1. In some of the
> DHIS2 releases, it was removed and later on it was found very useful, so it
> was included. It's like parent to organisationunit.
>
> BM
>
>
> On Tue 19 Jun, 2018, 6:06 PM Edward Robinson, <
> erobin...@projectbalance.com> wrote:
>
>> Oh wow, that simple?  Sourceid = organisationunitid?
>>
>> Thanks for the quick response David.  For some reason I was expecting
>> organisationunitid to be present in the datavalue table.  Do you know the
>> reason it’s called sourceid?
>>
>> Ed
>>
>>
>>
>> *From:* David Huser 
>> *Sent:* Tuesday, 19 June 2018 2:33 PM
>> *To:* Edward Robinson 
>> *Cc:* DHIS 2 Developers list 
>> *Subject:* Re: [Dhis2-devs] Getting the OU for items recorded in
>> datavalues table
>>
>>
>>
>> Hi Ed,
>>
>> This should get you started:
>>
>>
>>
>> SELECT dv.dataelementid, dv.value, ou.name
>> FROM datavalue dv
>> JOIN organisationunit ou
>> ON ou.organisationunitid = dv.sourceid;
>>
>>
>>
>> Best,
>> David
>>
>>
>>
>> On Tue, Jun 19, 2018 at 2:21 PM Edward Robinson <
>> erobin...@projectbalance.com> wrote:
>>
>> How can the OU be determined for the data in the datavalues table?
>>
>> The fields are dataelementid, periodid, sourceid, categoryoptioncomboid,
>> attributeoptioncomboid, value, storedby, created, lastupdated, comment,
>> followup, deleted
>>
>> I’m guessing it involves the sourceid field (and possibly others) but I’m
>> having a hard time figuring it out at the moment.
>>
>>
>>
>> Thanks in advance!
>>
>> Ed
>>
>> ___
>> 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
>>
>>
>>
>>
>> --
>>
>>
>>
>> *David Huser*
>> DHIS2 Support Specialist
>>
>> dhu...@baosystems.com | https://baosystems.com |  2900 K Street, Suite
>> 507, Washington D.C. 20007
>>
>>
>> ___
>> 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
>
>


-- 

***

Calle Hedberg

46D Alma Road, 7700 Rosebank, SOUTH AFRICA

Tel/fax (home): +27-21-685-6472

Cell: +27-82-853-5352

Iridium SatPhone: +8816-315-19119

Email: calle.hedb...@gmail.com

Skype: calle_hedberg

***
___
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] Getting the OU for items recorded in datavalues table

2018-06-24 Thread Knut Staring
This is an unfortunate relic in a few key tables. Dates back to 2005...

On Tue, Jun 19, 2018, 2:35 PM Edward Robinson 
wrote:

> Oh wow, that simple?  Sourceid = organisationunitid?
>
> Thanks for the quick response David.  For some reason I was expecting
> organisationunitid to be present in the datavalue table.  Do you know the
> reason it’s called sourceid?
>
> Ed
>
>
>
> *From:* David Huser 
> *Sent:* Tuesday, 19 June 2018 2:33 PM
> *To:* Edward Robinson 
> *Cc:* DHIS 2 Developers list 
> *Subject:* Re: [Dhis2-devs] Getting the OU for items recorded in
> datavalues table
>
>
>
> Hi Ed,
>
> This should get you started:
>
>
>
> SELECT dv.dataelementid, dv.value, ou.name
> FROM datavalue dv
> JOIN organisationunit ou
> ON ou.organisationunitid = dv.sourceid;
>
>
>
> Best,
> David
>
>
>
> On Tue, Jun 19, 2018 at 2:21 PM Edward Robinson <
> erobin...@projectbalance.com> wrote:
>
> How can the OU be determined for the data in the datavalues table?
>
> The fields are dataelementid, periodid, sourceid, categoryoptioncomboid,
> attributeoptioncomboid, value, storedby, created, lastupdated, comment,
> followup, deleted
>
> I’m guessing it involves the sourceid field (and possibly others) but I’m
> having a hard time figuring it out at the moment.
>
>
>
> Thanks in advance!
>
> Ed
>
> ___
> 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
>
>
>
>
> --
>
>
>
> *David Huser*
> DHIS2 Support Specialist
>
> dhu...@baosystems.com | https://baosystems.com |  2900 K Street, Suite
> 507, Washington D.C. 20007
>
>
> ___
> 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] Getting the OU for items recorded in datavalues table

2018-06-24 Thread Brajesh Murari
Welcome Robin

On Wed 20 Jun, 2018, 1:08 PM Edward Robinson, 
wrote:

> Thank you Brajesh,
>
> Ed
>
>
>
> *From:* Brajesh Murari 
> *Sent:* Tuesday, 19 June 2018 4:47 PM
> *To:* Edward Robinson 
> *Cc:* David Huser ; DHIS 2 developers <
> dhis2-devs@lists.launchpad.net>
> *Subject:* Re: [Dhis2-devs] Getting the OU for items recorded in
> datavalues table
>
>
>
> sourceid is available for distinguishing different types of
> organizationunit. It is one of id available since DHIS 1. In some of the
> DHIS2 releases, it was removed and later on it was found very useful, so it
> was included. It's like parent to organisationunit.
>
>
>
> BM
>
> On Tue 19 Jun, 2018, 6:06 PM Edward Robinson, <
> erobin...@projectbalance.com> wrote:
>
> Oh wow, that simple?  Sourceid = organisationunitid?
>
> Thanks for the quick response David.  For some reason I was expecting
> organisationunitid to be present in the datavalue table.  Do you know the
> reason it’s called sourceid?
>
> Ed
>
>
>
> *From:* David Huser 
> *Sent:* Tuesday, 19 June 2018 2:33 PM
> *To:* Edward Robinson 
> *Cc:* DHIS 2 Developers list 
> *Subject:* Re: [Dhis2-devs] Getting the OU for items recorded in
> datavalues table
>
>
>
> Hi Ed,
>
> This should get you started:
>
>
>
> SELECT dv.dataelementid, dv.value, ou.name
> FROM datavalue dv
> JOIN organisationunit ou
> ON ou.organisationunitid = dv.sourceid;
>
>
>
> Best,
> David
>
>
>
> On Tue, Jun 19, 2018 at 2:21 PM Edward Robinson <
> erobin...@projectbalance.com> wrote:
>
> How can the OU be determined for the data in the datavalues table?
>
> The fields are dataelementid, periodid, sourceid, categoryoptioncomboid,
> attributeoptioncomboid, value, storedby, created, lastupdated, comment,
> followup, deleted
>
> I’m guessing it involves the sourceid field (and possibly others) but I’m
> having a hard time figuring it out at the moment.
>
>
>
> Thanks in advance!
>
> Ed
>
> ___
> 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
>
>
>
>
> --
>
>
>
> *David Huser*
> DHIS2 Support Specialist
>
> dhu...@baosystems.com | https://baosystems.com |  2900 K Street, Suite
> 507, Washington D.C. 20007
>
>
>
> ___
> 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] Getting the OU for items recorded in datavalues table

2018-06-20 Thread Edward Robinson
Thank you Brajesh,
Ed

From: Brajesh Murari 
Sent: Tuesday, 19 June 2018 4:47 PM
To: Edward Robinson 
Cc: David Huser ; DHIS 2 developers 

Subject: Re: [Dhis2-devs] Getting the OU for items recorded in datavalues table

sourceid is available for distinguishing different types of organizationunit. 
It is one of id available since DHIS 1. In some of the DHIS2 releases, it was 
removed and later on it was found very useful, so it was included. It's like 
parent to organisationunit.

BM
On Tue 19 Jun, 2018, 6:06 PM Edward Robinson, 
mailto:erobin...@projectbalance.com>> wrote:
Oh wow, that simple?  Sourceid = organisationunitid?
Thanks for the quick response David.  For some reason I was expecting 
organisationunitid to be present in the datavalue table.  Do you know the 
reason it’s called sourceid?
Ed

From: David Huser mailto:dhu...@baosystems.com>>
Sent: Tuesday, 19 June 2018 2:33 PM
To: Edward Robinson 
mailto:erobin...@projectbalance.com>>
Cc: DHIS 2 Developers list 
mailto:dhis2-devs@lists.launchpad.net>>
Subject: Re: [Dhis2-devs] Getting the OU for items recorded in datavalues table

Hi Ed,

This should get you started:

SELECT dv.dataelementid, dv.value, ou.name
FROM datavalue dv
JOIN organisationunit ou
ON ou.organisationunitid = dv.sourceid;

Best,
David

On Tue, Jun 19, 2018 at 2:21 PM Edward Robinson 
mailto:erobin...@projectbalance.com>> wrote:
How can the OU be determined for the data in the datavalues table?
The fields are dataelementid, periodid, sourceid, categoryoptioncomboid, 
attributeoptioncomboid, value, storedby, created, lastupdated, comment, 
followup, deleted
I’m guessing it involves the sourceid field (and possibly others) but I’m 
having a hard time figuring it out at the moment.

Thanks in advance!
Ed
___
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


--
[https://docs.google.com/uc?export=download=0B3FU6Lx45t71cUgwM0swdzZOcUk=0B3FU6Lx45t71VGRUVElxbzIxM2VsOXVqN0hZUFRtMk1ZaXcwPQ]


David Huser
DHIS2 Support Specialist
dhu...@baosystems.com | https://baosystems.com |  
2900 K Street, Suite 507, Washington D.C. 20007


___
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] Getting the OU for items recorded in datavalues table

2018-06-19 Thread Brajesh Murari
sourceid is available for distinguishing different types of
organizationunit. It is one of id available since DHIS 1. In some of the
DHIS2 releases, it was removed and later on it was found very useful, so it
was included. It's like parent to organisationunit.

BM

On Tue 19 Jun, 2018, 6:06 PM Edward Robinson, 
wrote:

> Oh wow, that simple?  Sourceid = organisationunitid?
>
> Thanks for the quick response David.  For some reason I was expecting
> organisationunitid to be present in the datavalue table.  Do you know the
> reason it’s called sourceid?
>
> Ed
>
>
>
> *From:* David Huser 
> *Sent:* Tuesday, 19 June 2018 2:33 PM
> *To:* Edward Robinson 
> *Cc:* DHIS 2 Developers list 
> *Subject:* Re: [Dhis2-devs] Getting the OU for items recorded in
> datavalues table
>
>
>
> Hi Ed,
>
> This should get you started:
>
>
>
> SELECT dv.dataelementid, dv.value, ou.name
> FROM datavalue dv
> JOIN organisationunit ou
> ON ou.organisationunitid = dv.sourceid;
>
>
>
> Best,
> David
>
>
>
> On Tue, Jun 19, 2018 at 2:21 PM Edward Robinson <
> erobin...@projectbalance.com> wrote:
>
> How can the OU be determined for the data in the datavalues table?
>
> The fields are dataelementid, periodid, sourceid, categoryoptioncomboid,
> attributeoptioncomboid, value, storedby, created, lastupdated, comment,
> followup, deleted
>
> I’m guessing it involves the sourceid field (and possibly others) but I’m
> having a hard time figuring it out at the moment.
>
>
>
> Thanks in advance!
>
> Ed
>
> ___
> 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
>
>
>
>
> --
>
>
>
> *David Huser*
> DHIS2 Support Specialist
>
> dhu...@baosystems.com | https://baosystems.com |  2900 K Street, Suite
> 507, Washington D.C. 20007
>
>
> ___
> 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] Getting the OU for items recorded in datavalues table

2018-06-19 Thread Edward Robinson
Oh wow, that simple?  Sourceid = organisationunitid?
Thanks for the quick response David.  For some reason I was expecting 
organisationunitid to be present in the datavalue table.  Do you know the 
reason it’s called sourceid?
Ed

From: David Huser 
Sent: Tuesday, 19 June 2018 2:33 PM
To: Edward Robinson 
Cc: DHIS 2 Developers list 
Subject: Re: [Dhis2-devs] Getting the OU for items recorded in datavalues table

Hi Ed,

This should get you started:

SELECT dv.dataelementid, dv.value, ou.name
FROM datavalue dv
JOIN organisationunit ou
ON ou.organisationunitid = dv.sourceid;

Best,
David

On Tue, Jun 19, 2018 at 2:21 PM Edward Robinson 
mailto:erobin...@projectbalance.com>> wrote:
How can the OU be determined for the data in the datavalues table?
The fields are dataelementid, periodid, sourceid, categoryoptioncomboid, 
attributeoptioncomboid, value, storedby, created, lastupdated, comment, 
followup, deleted
I’m guessing it involves the sourceid field (and possibly others) but I’m 
having a hard time figuring it out at the moment.

Thanks in advance!
Ed
___
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


--
[https://docs.google.com/uc?export=download=0B3FU6Lx45t71cUgwM0swdzZOcUk=0B3FU6Lx45t71VGRUVElxbzIxM2VsOXVqN0hZUFRtMk1ZaXcwPQ]


David Huser
DHIS2 Support Specialist
dhu...@baosystems.com | https://baosystems.com |  
2900 K Street, Suite 507, Washington D.C. 20007


___
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] Getting the OU for items recorded in datavalues table

2018-06-19 Thread David Huser
Hi Ed,

This should get you started:

SELECT dv.dataelementid, dv.value, ou.name
FROM datavalue dv
JOIN organisationunit ou
ON ou.organisationunitid = dv.sourceid;

Best,
David

On Tue, Jun 19, 2018 at 2:21 PM Edward Robinson <
erobin...@projectbalance.com> wrote:

> How can the OU be determined for the data in the datavalues table?
>
> The fields are dataelementid, periodid, sourceid, categoryoptioncomboid,
> attributeoptioncomboid, value, storedby, created, lastupdated, comment,
> followup, deleted
>
> I’m guessing it involves the sourceid field (and possibly others) but I’m
> having a hard time figuring it out at the moment.
>
>
>
> Thanks in advance!
>
> Ed
> ___
> 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
>


-- 


*David Huser*
DHIS2 Support Specialist
dhu...@baosystems.com | https://baosystems.com |  2900 K Street, Suite 507,
Washington D.C. 20007
___
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] Getting the OU for items recorded in datavalues table

2018-06-19 Thread Edward Robinson
How can the OU be determined for the data in the datavalues table?
The fields are dataelementid, periodid, sourceid, categoryoptioncomboid, 
attributeoptioncomboid, value, storedby, created, lastupdated, comment, 
followup, deleted
I'm guessing it involves the sourceid field (and possibly others) but I'm 
having a hard time figuring it out at the moment.

Thanks in advance!
Ed
___
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