Print list of data element values

Hi all,

How do I print a list of data element values in a program stage? I have configured some of them to be displayed in reports, is there ba way to display that list?

Kind regards

Hi Joao

Create a SQLview using this:

···

On Tue, Apr 14, 2015 at 3:34 PM, Joao Mazuze Joao_Mazuze@chasssmt.com wrote:

Hi all,

How do I print a list of data element values in a program stage? I have configured some of them to be displayed in reports, is there ba way to display that list?

Kind regards


This message may contain privileged and confidential information intended solely for the addressee. Please do not read, disseminate or copy it unless you are the intended recipient. If this message has been received in error, we kindly ask that you notify the sender immediately by return email and delete all copies of the message from your system.


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

Health Information Systems Program - South Africa

**- - - - - - - ****- - - - - - - ****- - - - - - - ****- - - - - - - ****- - - - - **

Mobile : 073 246 2992
Landline: 021 554 3130
Fax: 086 733 8432
Skype: gregory_rowles

sorry, using this:

SELECT program.uid as ProgUID, program.name as Prog, trackedentityattribute.trackedentityattributeid as ProgAttribID, trackedentityattribute.uid as ProgAttribUID, trackedentityattribute.name as ProgAttrib, programstage.uid as ProgStageUID, programstage.name as ProgStage, dataelement.dataelementid as ProgStageElementID, dataelement.uid as ProgStageElementUID, dataelement.name as ProgStageElement FROM public.program, public.program_attributes, public.trackedentityattribute, public.programstage, public.programstage_dataelements, public.dataelement WHERE program_attributes.trackedentityattributeid = trackedentityattribute.trackedentityattributeid AND program_attributes.programid = program.programid AND programstage.programid = program.programid AND programstage_dataelements.programstageid = programstage.programstageid AND dataelement.dataelementid = programstage_dataelements.dataelementid ORDER BY program.name, trackedentityattribute.name, programstage.name, dataelement.name

···

On Tue, Apr 14, 2015 at 4:14 PM, Greg Rowles greg.rowles@gmail.com wrote:

Hi Joao

Create a SQLview using this:

On Tue, Apr 14, 2015 at 3:34 PM, Joao Mazuze Joao_Mazuze@chasssmt.com wrote:

Hi all,

How do I print a list of data element values in a program stage? I have configured some of them to be displayed in reports, is there ba way to display that list?

Kind regards


This message may contain privileged and confidential information intended solely for the addressee. Please do not read, disseminate or copy it unless you are the intended recipient. If this message has been received in error, we kindly ask that you notify the sender immediately by return email and delete all copies of the message from your system.


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

Health Information Systems Program - South Africa

**- - - - - - - ****- - - - - - - ****- - - - - - - ****- - - - - - - ****- - - - - **

Mobile : 073 246 2992
Landline: 021 554 3130
Fax: 086 733 8432
Skype: gregory_rowles

Health Information Systems Program - South Africa

**- - - - - - - ****- - - - - - - ****- - - - - - - ****- - - - - - - ****- - - - - **

Mobile : 073 246 2992
Landline: 021 554 3130
Fax: 086 733 8432
Skype: gregory_rowles

Hi Greg,

Is there a way of adjusting the query to produce something like this?

···

A

B

C

D

D

……

M

32323

sssssss

dgfgfgf

ffgfgf

fgfgfg

fff

S

Where A,B,C,…,M are dataelements and the second line are respective values for any specific program stage?

Kind regards,

Joao

From: Greg Rowles [mailto:greg.rowles@gmail.com]

Sent: 14 April 2015 16:15

To: Joao Mazuze

Cc: dhis2-users@lists.launchpad.net

Subject: Re: [Dhis2-users] Print list of data element values

sorry, using this:

SELECT program.uid as ProgUID,
program.name
as Prog, trackedentityattribute.trackedentityattributeid as ProgAttribID, trackedentityattribute.uid as ProgAttribUID, trackedentityattribute.name as ProgAttrib, programstage.uid as ProgStageUID, programstage.name as ProgStage, dataelement.dataelementid as ProgStageElementID, dataelement.uid as ProgStageElementUID, dataelement.name as ProgStageElement FROM public.program, public.program_attributes, public.trackedentityattribute, public.programstage, public.programstage_dataelements, public.dataelement WHERE program_attributes.trackedentityattributeid = trackedentityattribute.trackedentityattributeid AND program_attributes.programid = program.programid AND programstage.programid = program.programid AND programstage_dataelements.programstageid = programstage.programstageid AND dataelement.dataelementid = programstage_dataelements.dataelementid ORDER BY program.name, trackedentityattribute.name,
programstage.name
, dataelement.name

On Tue, Apr 14, 2015 at 4:14 PM, Greg Rowles greg.rowles@gmail.com wrote:

Hi Joao

Create a SQLview using this:

On Tue, Apr 14, 2015 at 3:34 PM, Joao Mazuze Joao_Mazuze@chasssmt.com wrote:

Hi all,

How do I print a list of data element values in a program stage? I have configured some of them to be displayed in reports, is there ba way to display that list?

Kind regards


This message may contain privileged and confidential information intended solely for the addressee. Please do not read, disseminate or copy it unless you are the intended recipient. If this message has been received in error, we kindly ask that you notify the sender immediately by return email and delete all copies of the message from your system.


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

Health Information Systems Program - South Africa

**- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - **

Mobile : 073 246 2992

Landline: 021 554 3130

Fax: 086 733 8432

Skype: gregory_rowles

Health Information Systems Program - South Africa

**- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - **

Mobile : 073 246 2992

Landline: 021 554 3130

Fax: 086 733 8432

Skype: gregory_rowles

For that, I think you would need to do something like Crosstab in your SQL:

Here is an example:

http://stackoverflow.com/questions/3002499/postgresql-crosstab-query

···

On Tue, Apr 14, 2015 at 9:23 PM, Joao Mazuze Joao_Mazuze@chasssmt.com wrote:

Hi Greg,

Is there a way of adjusting the query to produce something like this?

A

B

C

D

D

……

M

32323

sssssss

dgfgfgf

ffgfgf

fgfgfg

fff

S

Where A,B,C,…,M are dataelements and the second line are respective values for any specific program stage?

Kind regards,

Joao

From: Greg Rowles [mailto:greg.rowles@gmail.com]

Sent: 14 April 2015 16:15

To: Joao Mazuze

Cc: dhis2-users@lists.launchpad.net

Subject: Re: [Dhis2-users] Print list of data element values

sorry, using this:

SELECT program.uid as ProgUID,
program.name
as Prog, trackedentityattribute.trackedentityattributeid as ProgAttribID, trackedentityattribute.uid as ProgAttribUID, trackedentityattribute.name as ProgAttrib, programstage.uid as ProgStageUID, programstage.name as ProgStage, dataelement.dataelementid as ProgStageElementID, dataelement.uid as ProgStageElementUID, dataelement.name as ProgStageElement FROM public.program, public.program_attributes, public.trackedentityattribute, public.programstage, public.programstage_dataelements, public.dataelement WHERE program_attributes.trackedentityattributeid = trackedentityattribute.trackedentityattributeid AND program_attributes.programid = program.programid AND programstage.programid = program.programid AND programstage_dataelements.programstageid = programstage.programstageid AND dataelement.dataelementid = programstage_dataelements.dataelementid ORDER BY program.name, trackedentityattribute.name,
programstage.name
, dataelement.name

On Tue, Apr 14, 2015 at 4:14 PM, Greg Rowles greg.rowles@gmail.com wrote:

Hi Joao

Create a SQLview using this:

On Tue, Apr 14, 2015 at 3:34 PM, Joao Mazuze Joao_Mazuze@chasssmt.com wrote:

Hi all,

How do I print a list of data element values in a program stage? I have configured some of them to be displayed in reports, is there ba way to display that list?

Kind regards


This message may contain privileged and confidential information intended solely for the addressee. Please do not read, disseminate or copy it unless you are the intended recipient. If this message has been received in error, we kindly ask that you notify the sender immediately by return email and delete all copies of the message from your system.


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

Health Information Systems Program - South Africa

**- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - **

Mobile : 073 246 2992

Landline: 021 554 3130

Fax: 086 733 8432

Skype: gregory_rowles

Health Information Systems Program - South Africa

**- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - **

Mobile : 073 246 2992

Landline: 021 554 3130

Fax: 086 733 8432

Skype: gregory_rowles


This message may contain privileged and confidential information intended solely for the addressee. Please do not read, disseminate or copy it unless you are the intended recipient. If this message has been received in error, we kindly ask that you notify the sender immediately by return email and delete all copies of the message from your system.


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

Knut Staring

Dept. of Informatics, University of Oslo

Norway: +4791880522

Skype: knutstar

http://dhis2.org

It is something like we can see when we list from a program on a tracked entity form search. But I am not able to get data element s from a specific program stage belonging to that program.

Best regards

···

sorry, using this:

SELECT program.uid as ProgUID,
program.name
as Prog, trackedentityattribute.trackedentityattributeid as ProgAttribID, trackedentityattribute.uid as ProgAttribUID, trackedentityattribute.name as ProgAttrib, programstage.uid as ProgStageUID, programstage.name as ProgStage, dataelement.dataelementid as ProgStageElementID, dataelement.uid as ProgStageElementUID, dataelement.name as ProgStageElement FROM public.program, public.program_attributes, public.trackedentityattribute, public.programstage, public.programstage_dataelements, public.dataelement WHERE program_attributes.trackedentityattributeid = trackedentityattribute.trackedentityattributeid AND program_attributes.programid = program.programid AND programstage.programid = program.programid AND programstage_dataelements.programstageid = programstage.programstageid AND dataelement.dataelementid = programstage_dataelements.dataelementid ORDER BY program.name, trackedentityattribute.name,
programstage.name
, dataelement.name

On Tue, Apr 14, 2015 at 4:14 PM, Greg Rowles greg.rowles@gmail.com wrote:

Hi Joao

Create a SQLview using this:

On Tue, Apr 14, 2015 at 3:34 PM, Joao Mazuze Joao_Mazuze@chasssmt.com wrote:

Hi all,

How do I print a list of data element values in a program stage? I have configured some of them to be displayed in reports, is there ba way to display that list?

Kind regards


This message may contain privileged and confidential information intended solely for the addressee. Please do not read, disseminate or copy it unless you are the intended recipient. If this message has been received in error, we kindly ask that you notify the sender immediately by return email and delete all copies of the message from your system.


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

Health Information Systems Program - South Africa

**- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - **

Mobile : 073 246 2992

Landline: 021 554 3130

Fax: 086 733 8432

Skype: gregory_rowles

Health Information Systems Program - South Africa

**- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - **

Mobile : 073 246 2992

Landline: 021 554 3130

Fax: 086 733 8432

Skype: gregory_rowles

Hi Joao,

I was following the conversation from your request, but I still couldn’t understand what you wanted to do. Can you tell us more on your use case?

The tracked entity instance example you mentioned is generated by an app, probably you need to develop a similar one. I can guide you a bit on that.

Are you interested in only listing data element values of a program stage? Don’t you need from whom the listed values are recorded?

···

On Tue, Apr 14, 2015 at 4:39 PM, Joao Mazuze Joao_Mazuze@chasssmt.com wrote:

It is something like we can see when we list from a program on a tracked entity form search. But I am not able to get data element s from a specific program stage belonging to that program.

Best regards

From: Greg Rowles [mailto:greg.rowles@gmail.com]

Sent: 14 April 2015 16:15

To: Joao Mazuze

Cc: dhis2-users@lists.launchpad.net

Subject: Re: [Dhis2-users] Print list of data element values

sorry, using this:

SELECT program.uid as ProgUID,
program.name
as Prog, trackedentityattribute.trackedentityattributeid as ProgAttribID, trackedentityattribute.uid as ProgAttribUID, trackedentityattribute.name as ProgAttrib, programstage.uid as ProgStageUID, programstage.name as ProgStage, dataelement.dataelementid as ProgStageElementID, dataelement.uid as ProgStageElementUID, dataelement.name as ProgStageElement FROM public.program, public.program_attributes, public.trackedentityattribute, public.programstage, public.programstage_dataelements, public.dataelement WHERE program_attributes.trackedentityattributeid = trackedentityattribute.trackedentityattributeid AND program_attributes.programid = program.programid AND programstage.programid = program.programid AND programstage_dataelements.programstageid = programstage.programstageid AND dataelement.dataelementid = programstage_dataelements.dataelementid ORDER BY program.name, trackedentityattribute.name,
programstage.name
, dataelement.name

On Tue, Apr 14, 2015 at 4:14 PM, Greg Rowles greg.rowles@gmail.com wrote:

Hi Joao

Create a SQLview using this:

On Tue, Apr 14, 2015 at 3:34 PM, Joao Mazuze Joao_Mazuze@chasssmt.com wrote:

Hi all,

How do I print a list of data element values in a program stage? I have configured some of them to be displayed in reports, is there ba way to display that list?

Kind regards


This message may contain privileged and confidential information intended solely for the addressee. Please do not read, disseminate or copy it unless you are the intended recipient. If this message has been received in error, we kindly ask that you notify the sender immediately by return email and delete all copies of the message from your system.


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

Health Information Systems Program - South Africa

**- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - **

Mobile : 073 246 2992

Landline: 021 554 3130

Fax: 086 733 8432

Skype: gregory_rowles

Health Information Systems Program - South Africa

**- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - **

Mobile : 073 246 2992

Landline: 021 554 3130

Fax: 086 733 8432

Skype: gregory_rowles


This message may contain privileged and confidential information intended solely for the addressee. Please do not read, disseminate or copy it unless you are the intended recipient. If this message has been received in error, we kindly ask that you notify the sender immediately by return email and delete all copies of the message from your system.


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


Thank you,

Abyot.

Hi Abyot,

Of course I am interested in only listing data element values of a program stage. I wonder if you could help me on that.

Many thanks,

Joao

···

Hi Joao,

I was following the conversation from your request, but I still couldn’t understand what you wanted to do. Can you tell us more on your use case?

The tracked entity instance example you mentioned is generated by an app, probably you need to develop a similar one. I can guide you a bit on that.

Are you interested in only listing data element values of a program stage? Don’t you need from whom the listed values are recorded?


Thank you,

Abyot.

On Tue, Apr 14, 2015 at 4:39 PM, Joao Mazuze Joao_Mazuze@chasssmt.com wrote:

It is something like we can see when we list from a program on a tracked entity form search. But I am not able to get data element s from a specific program stage belonging to that program.

Best regards

From: Greg Rowles [mailto:greg.rowles@gmail.com]

Sent: 14 April 2015 16:15

To: Joao Mazuze

Cc: dhis2-users@lists.launchpad.net

Subject: Re: [Dhis2-users] Print list of data element values

sorry, using this:

SELECT program.uid as ProgUID, program.name as Prog, trackedentityattribute.trackedentityattributeid as ProgAttribID, trackedentityattribute.uid as ProgAttribUID, trackedentityattribute.name as ProgAttrib, programstage.uid as ProgStageUID, programstage.name as ProgStage, dataelement.dataelementid as ProgStageElementID, dataelement.uid as ProgStageElementUID, dataelement.name as ProgStageElement FROM public.program, public.program_attributes, public.trackedentityattribute, public.programstage, public.programstage_dataelements, public.dataelement WHERE program_attributes.trackedentityattributeid = trackedentityattribute.trackedentityattributeid AND program_attributes.programid = program.programid AND programstage.programid = program.programid AND programstage_dataelements.programstageid = programstage.programstageid AND dataelement.dataelementid = programstage_dataelements.dataelementid ORDER BY
program.name
, trackedentityattribute.name, programstage.name,
dataelement.name

On Tue, Apr 14, 2015 at 4:14 PM, Greg Rowles greg.rowles@gmail.com wrote:

Hi Joao

Create a SQLview using this:

On Tue, Apr 14, 2015 at 3:34 PM, Joao Mazuze Joao_Mazuze@chasssmt.com wrote:

Hi all,

How do I print a list of data element values in a program stage? I have configured some of them to be displayed in reports, is there ba way to display that list?

Kind regards


This message may contain privileged and confidential information intended solely for the addressee. Please do not read, disseminate or copy it unless you are the intended recipient. If this message has been received in error, we kindly ask that you notify the sender immediately by return email and delete all copies of the message from your system.


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

Health Information Systems Program - South Africa

**- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - **

Mobile : 073 246 2992

Landline: 021 554 3130

Fax: 086 733 8432

Skype: gregory_rowles

Health Information Systems Program - South Africa

**- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - **

Mobile : 073 246 2992

Landline: 021 554 3130

Fax: 086 733 8432

Skype: gregory_rowles


This message may contain privileged and confidential information intended solely for the addressee. Please do not read, disseminate or copy it unless you are the intended recipient. If this message has been received in error, we kindly ask that you notify the sender immediately by return email and delete all copies of the message from your system.


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

Hi Abyot and Greg,

I am interested in listing data elements of a program stage. Can you please help me on a query that do this as requested bellow? Or can you tell me which table contains data elements values just to perform that?

Bellow find the screenshot showing what we need from a sql view.

Kind regards,

Joao

···

Hi Joao,

I was following the conversation from your request, but I still couldn’t understand what you wanted to do. Can you tell us more on your use case?

The tracked entity instance example you mentioned is generated by an app, probably you need to develop a similar one. I can guide you a bit on that.

Are you interested in only listing data element values of a program stage? Don’t you need from whom the listed values are recorded?


Thank you,

Abyot.

On Tue, Apr 14, 2015 at 4:39 PM, Joao Mazuze Joao_Mazuze@chasssmt.com wrote:

It is something like we can see when we list from a program on a tracked entity form search. But I am not able to get data element s from a specific program stage belonging to that program.

Best regards

From: Greg Rowles [mailto:greg.rowles@gmail.com]

Sent: 14 April 2015 16:15

To: Joao Mazuze

Cc: dhis2-users@lists.launchpad.net

Subject: Re: [Dhis2-users] Print list of data element values

sorry, using this:

SELECT program.uid as ProgUID, program.name as Prog, trackedentityattribute.trackedentityattributeid as ProgAttribID, trackedentityattribute.uid as ProgAttribUID, trackedentityattribute.name as ProgAttrib, programstage.uid as ProgStageUID, programstage.name as ProgStage, dataelement.dataelementid as ProgStageElementID, dataelement.uid as ProgStageElementUID, dataelement.name as ProgStageElement FROM public.program, public.program_attributes, public.trackedentityattribute, public.programstage, public.programstage_dataelements, public.dataelement WHERE program_attributes.trackedentityattributeid = trackedentityattribute.trackedentityattributeid AND program_attributes.programid = program.programid AND programstage.programid = program.programid AND programstage_dataelements.programstageid = programstage.programstageid AND dataelement.dataelementid = programstage_dataelements.dataelementid ORDER BY
program.name
, trackedentityattribute.name, programstage.name,
dataelement.name

On Tue, Apr 14, 2015 at 4:14 PM, Greg Rowles greg.rowles@gmail.com wrote:

Hi Joao

Create a SQLview using this:

On Tue, Apr 14, 2015 at 3:34 PM, Joao Mazuze Joao_Mazuze@chasssmt.com wrote:

Hi all,

How do I print a list of data element values in a program stage? I have configured some of them to be displayed in reports, is there ba way to display that list?

Kind regards


This message may contain privileged and confidential information intended solely for the addressee. Please do not read, disseminate or copy it unless you are the intended recipient. If this message has been received in error, we kindly ask that you notify the sender immediately by return email and delete all copies of the message from your system.


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

Health Information Systems Program - South Africa

**- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - **

Mobile : 073 246 2992

Landline: 021 554 3130

Fax: 086 733 8432

Skype: gregory_rowles

Health Information Systems Program - South Africa

**- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - **

Mobile : 073 246 2992

Landline: 021 554 3130

Fax: 086 733 8432

Skype: gregory_rowles


This message may contain privileged and confidential information intended solely for the addressee. Please do not read, disseminate or copy it unless you are the intended recipient. If this message has been received in error, we kindly ask that you notify the sender immediately by return email and delete all copies of the message from your system.


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

Hi Joao,

I was trying to figure out a solution for your case - of course something that can also be used for others.

Below is something I have come up with. If this is something you wanted, then you need to use the latest tracker capture.

The values are kept in table trackedentitydatavalue.

···

On Wed, Apr 15, 2015 at 10:30 AM, Joao Mazuze Joao_Mazuze@chasssmt.com wrote:

Hi Abyot and Greg,

I am interested in listing data elements of a program stage. Can you please help me on a query that do this as requested bellow? Or can you tell me which table contains data elements values just to perform that?

Bellow find the screenshot showing what we need from a sql view.

Kind regards,

Joao

From: Abyot Gizaw [mailto:abyota@gmail.com]

Sent: 14 April 2015 17:05

To: Joao Mazuze

Cc: Greg Rowles; dhis2-users@lists.launchpad.net

Subject: Re: [Dhis2-users] Print list of data element values

Hi Joao,

I was following the conversation from your request, but I still couldn’t understand what you wanted to do. Can you tell us more on your use case?

The tracked entity instance example you mentioned is generated by an app, probably you need to develop a similar one. I can guide you a bit on that.

Are you interested in only listing data element values of a program stage? Don’t you need from whom the listed values are recorded?


Thank you,

Abyot.

On Tue, Apr 14, 2015 at 4:39 PM, Joao Mazuze Joao_Mazuze@chasssmt.com wrote:

It is something like we can see when we list from a program on a tracked entity form search. But I am not able to get data element s from a specific program stage belonging to that program.

Best regards

From: Greg Rowles [mailto:greg.rowles@gmail.com]

Sent: 14 April 2015 16:15

To: Joao Mazuze

Cc: dhis2-users@lists.launchpad.net

Subject: Re: [Dhis2-users] Print list of data element values

sorry, using this:

SELECT program.uid as ProgUID, program.name as Prog, trackedentityattribute.trackedentityattributeid as ProgAttribID, trackedentityattribute.uid as ProgAttribUID, trackedentityattribute.name as ProgAttrib, programstage.uid as ProgStageUID, programstage.name as ProgStage, dataelement.dataelementid as ProgStageElementID, dataelement.uid as ProgStageElementUID, dataelement.name as ProgStageElement FROM public.program, public.program_attributes, public.trackedentityattribute, public.programstage, public.programstage_dataelements, public.dataelement WHERE program_attributes.trackedentityattributeid = trackedentityattribute.trackedentityattributeid AND program_attributes.programid = program.programid AND programstage.programid = program.programid AND programstage_dataelements.programstageid = programstage.programstageid AND dataelement.dataelementid = programstage_dataelements.dataelementid ORDER BY
program.name
, trackedentityattribute.name, programstage.name,
dataelement.name

On Tue, Apr 14, 2015 at 4:14 PM, Greg Rowles greg.rowles@gmail.com wrote:

Hi Joao

Create a SQLview using this:

On Tue, Apr 14, 2015 at 3:34 PM, Joao Mazuze Joao_Mazuze@chasssmt.com wrote:

Hi all,

How do I print a list of data element values in a program stage? I have configured some of them to be displayed in reports, is there ba way to display that list?

Kind regards


This message may contain privileged and confidential information intended solely for the addressee. Please do not read, disseminate or copy it unless you are the intended recipient. If this message has been received in error, we kindly ask that you notify the sender immediately by return email and delete all copies of the message from your system.


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

Health Information Systems Program - South Africa

**- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - **

Mobile : 073 246 2992

Landline: 021 554 3130

Fax: 086 733 8432

Skype: gregory_rowles

Health Information Systems Program - South Africa

**- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - **

Mobile : 073 246 2992

Landline: 021 554 3130

Fax: 086 733 8432

Skype: gregory_rowles


This message may contain privileged and confidential information intended solely for the addressee. Please do not read, disseminate or copy it unless you are the intended recipient. If this message has been received in error, we kindly ask that you notify the sender immediately by return email and delete all copies of the message from your system.


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


This message may contain privileged and confidential information intended solely for the addressee. Please do not read, disseminate or copy it unless you are the intended recipient. If this message has been received in error, we kindly ask that you notify the sender immediately by return email and delete all copies of the message from your system.


Thank you,

Abyot.

Thank you Abyot,

But the best way for me would be adjusting the view bellow provided by Greg to produce the same list, as I need values and not metadata as result.

Bellow is the view,

SELECT program.uid as ProgUID,
program.name
as Prog, trackedentityattribute.trackedentityattributeid as ProgAttribID, trackedentityattribute.uid as ProgAttribUID, trackedentityattribute.name as ProgAttrib, programstage.uid as ProgStageUID, programstage.name as ProgStage, dataelement.dataelementid as ProgStageElementID, dataelement.uid as ProgStageElementUID, dataelement.name as ProgStageElement FROM public.program, public.program_attributes, public.trackedentityattribute, public.programstage, public.programstage_dataelements, public.dataelement WHERE program_attributes.trackedentityattributeid = trackedentityattribute.trackedentityattributeid AND program_attributes.programid = program.programid AND programstage.programid = program.programid AND programstage_dataelements.programstageid = programstage.programstageid AND dataelement.dataelementid = programstage_dataelements.dataelementid ORDER BY program.name, trackedentityattribute.name,
programstage.name
, dataelement.name

Many thanks

Joao

···

Hi Joao,

I was trying to figure out a solution for your case - of course something that can also be used for others.

Below is something I have come up with. If this is something you wanted, then you need to use the latest tracker capture.

The values are kept in table trackedentitydatavalue.


Thank you,

Abyot.

On Wed, Apr 15, 2015 at 10:30 AM, Joao Mazuze Joao_Mazuze@chasssmt.com wrote:

Hi Abyot and Greg,

I am interested in listing data elements of a program stage. Can you please help me on a query that do this as requested bellow? Or can you tell me which table contains data elements values just to perform that?

Bellow find the screenshot showing what we need from a sql view.

Kind regards,

Joao

From: Abyot Gizaw [mailto:abyota@gmail.com]

Sent: 14 April 2015 17:05

To: Joao Mazuze

Cc: Greg Rowles;
dhis2-users@lists.launchpad.net

Subject: Re: [Dhis2-users] Print list of data element values

Hi Joao,

I was following the conversation from your request, but I still couldn’t understand what you wanted to do. Can you tell us more on your use case?

The tracked entity instance example you mentioned is generated by an app, probably you need to develop a similar one. I can guide you a bit on that.

Are you interested in only listing data element values of a program stage? Don’t you need from whom the listed values are recorded?


Thank you,

Abyot.

On Tue, Apr 14, 2015 at 4:39 PM, Joao Mazuze Joao_Mazuze@chasssmt.com wrote:

It is something like we can see when we list from a program on a tracked entity form search. But I am not able to get data element s from a specific program stage belonging to that program.

Best regards

From: Greg Rowles [mailto:greg.rowles@gmail.com]

Sent: 14 April 2015 16:15

To: Joao Mazuze

Cc: dhis2-users@lists.launchpad.net

Subject: Re: [Dhis2-users] Print list of data element values

sorry, using this:

SELECT program.uid as ProgUID, program.name as Prog, trackedentityattribute.trackedentityattributeid as ProgAttribID, trackedentityattribute.uid as ProgAttribUID, trackedentityattribute.name as ProgAttrib, programstage.uid as ProgStageUID, programstage.name as ProgStage, dataelement.dataelementid as ProgStageElementID, dataelement.uid as ProgStageElementUID, dataelement.name as ProgStageElement FROM public.program, public.program_attributes, public.trackedentityattribute, public.programstage, public.programstage_dataelements, public.dataelement WHERE program_attributes.trackedentityattributeid = trackedentityattribute.trackedentityattributeid AND program_attributes.programid = program.programid AND programstage.programid = program.programid AND programstage_dataelements.programstageid = programstage.programstageid AND dataelement.dataelementid = programstage_dataelements.dataelementid ORDER BY
program.name
, trackedentityattribute.name, programstage.name,
dataelement.name

On Tue, Apr 14, 2015 at 4:14 PM, Greg Rowles greg.rowles@gmail.com wrote:

Hi Joao

Create a SQLview using this:

On Tue, Apr 14, 2015 at 3:34 PM, Joao Mazuze Joao_Mazuze@chasssmt.com wrote:

Hi all,

How do I print a list of data element values in a program stage? I have configured some of them to be displayed in reports, is there ba way to display that list?

Kind regards


This message may contain privileged and confidential information intended solely for the addressee. Please do not read, disseminate or copy it unless you are the intended recipient. If this message has been received in error, we kindly ask that you notify the sender immediately by return email and delete all copies of the message from your system.


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

Health Information Systems Program - South Africa

**- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - **

Mobile : 073 246 2992

Landline: 021 554 3130

Fax: 086 733 8432

Skype: gregory_rowles

Health Information Systems Program - South Africa

**- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - **

Mobile : 073 246 2992

Landline: 021 554 3130

Fax: 086 733 8432

Skype: gregory_rowles


This message may contain privileged and confidential information intended solely for the addressee. Please do not read, disseminate or copy it unless you are the intended recipient. If this message has been received in error, we kindly ask that you notify the sender immediately by return email and delete all copies of the message from your system.


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


This message may contain privileged and confidential information intended solely for the addressee. Please do not read, disseminate or copy it unless you are the intended recipient. If this message has been received in error, we kindly ask that you notify the sender immediately by return email and delete all copies of the message from your system.

Is there anyone who has experienced the upload of event data problem and can help?

On demo site I captured event data, impatient morbidity and mortality logged in as admin and when I log in using another user I do not see the captured data

Regards

Simon Muyambo

__________ Information from ESET NOD32 Antivirus, version of virus signature database 11477 (20150415) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com