Getting program stage sections and their data el=

ements from web API

···

From: pamodm@gmail.com
To: abyota@gmail.com
CC: blaisami@hotmail.com=3B dhis2-users@lists.launchpad.net

Hi Abyot=2C

Is it possible to extend this to return data elements associated with a eac=
h visit(stage) when only a trackedEntityInstanceID and programId is provide=
d.

Thank you

Pamod

On Thu=2C Dec 11=2C 2014 at 1:45 PM=2C Abyot Gizaw <abyota@gmail.com> wrote=
:
Hi=2C
For example=2C the following returns id and name for program stage=2C progr=
am stage sections=2C program stage section data elements.=20
api/programStages/XXXXX.json?fields=3Did=2Cname=2CprogramStageSections[id=
=2Cname=2CprogramStageDataElements[dataElement[id=2Cname]]]

Play around with the fields parameter to match the properties you want the =
server to return.
---Thank you=2C
Abyot.=0A=

On Fri=2C Dec 5=2C 2014 at 6:02 PM=2C Blai Samitier <blaisami@hotmail.com> = wrote:
Hello=2C
=0A=

=0A=
I am using the web API to get information from events=2C and I want to clas=
sify the data elements with the program stage sections I defined in the pro=
gram stage.
=0A=

=0A=
My problem is that I can't find the resource that gives me the program Stag=
e Section with their data elements. I can only find the name of the section=
s in /api/programStages/xxxx/programStageSections=2C but not the data eleme=
nts they contain.
=0A=

=0A=
Thanks!
=0A=
_______________________________________________
=0A=
Mailing list: DHIS 2 Users in Launchpad
=0A=
Post to : dhis2-users@lists.launchpad.net
=0A=
Unsubscribe : DHIS 2 Users in Launchpad
=0A=
More help : ListHelp - Launchpad Help
=0A=

=0A=

_______________________________________________
=0A=
Mailing list: DHIS 2 Users in Launchpad
=0A=
Post to : dhis2-users@lists.launchpad.net
=0A=
Unsubscribe : DHIS 2 Users in Launchpad
=0A=
More help : ListHelp - Launchpad Help
=0A=

--=20
Pamod

=0A=
                 =

--_17a79805-2b37-4771-91d8-ed8614b654cf_
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<html>
<head>
<style><!--
.hmmessage P
{
margin:0px=3B
padding:0px
}
body.hmmessage
{
font-size: 12pt=3B
font-family:Calibri
}
--></style></head>
<body class=3D'hmmessage'><div dir=3D'ltr'>Thank you Abyot! That works perf=
ect.<br><br><div><hr id=3D"stopSpelling">Date: Thu=2C 11 Dec 2014 19:44:29 =
+0530<br>Subject: Re: [Dhis2-users] Getting program stage sections and thei=
r data elements from web API<br>From: pamodm@gmail.com<br>To: abyota@gmail.=
com<br>CC: blaisami@hotmail.com=3B dhis2-users@lists.launchpad.net<br><br><=
div dir=3D"ltr"><div><div><div>Hi Abyot=2C<br><br></div>Is it possible to e=
xtend this to return data elements associated with a each visit(stage) when=
only a trackedEntityInstanceID and programId is provided.<br><br></div>Tha=
nk you<br><br></div>Pamod<br></div><div class=3D"ecxgmail_extra"><br><div c=
lass=3D"ecxgmail_quote">On Thu=2C Dec 11=2C 2014 at 1:45 PM=2C Abyot Gizaw =
<span dir=3D"ltr">&lt=3B<a href=3D"mailto:abyota@gmail.com" target=3D"_blan=
k">abyota@gmail.com</a>&gt=3B</span> wrote:<br><blockquote class=3D"ecxgmai=
l_quote" style=3D"border-left:1px #ccc solid=3Bpadding-left:1ex=3B"><div di=
r=3D"ltr">Hi=2C<div><br></div><div>For example=2C the following returns id =
and name for program stage=2C program stage sections=2C program stage secti=
on data elements.&nbsp=3B</div><div><br></div><div>api/programStages/XXXXX.=
json?fields=3Did=2Cname=2CprogramStageSections[id=2Cname=2CprogramStageData=
Elements[dataElement[id=2Cname]]]<br></div><div><br></div><div><div>Play ar=
ound with the&nbsp=3B<i style=3D"font-weight:bold=3B">fields&nbsp=3B</i>par=
ameter to match the properties you want the server to return.</div></div><d=
iv class=3D"ecxgmail_extra"><div><div><div dir=3D"ltr"><div><br></div><div>=
---</div><div>Thank you=2C<br></div><div>Abyot.</div></div></div></div><div=

<div class=3D"h5">=0A=

<br><div class=3D"ecxgmail_quote">On Fri=2C Dec 5=2C 2014 at 6:02 PM=2C Bla=
i Samitier <span dir=3D"ltr">&lt=3B<a href=3D"mailto:blaisami@hotmail.com" =
target=3D"_blank">blaisami@hotmail.com</a>&gt=3B</span> wrote:<br><blockquo=
te class=3D"ecxgmail_quote" style=3D"border-left:1px #ccc solid=3Bpadding-l=
eft:1ex=3B">Hello=2C<br>=0A=
<br>=0A=
I am using the web API to get information from events=2C and I want to clas=
sify the data elements with the program stage sections I defined in the pro=
gram stage.<br>=0A=
<br>=0A=
My problem is that I can't find the resource that gives me the program Stag=
e Section with their data elements. I can only find the name of the section=
s in /api/programStages/xxxx/programStageSections=2C but not the data eleme=
nts they contain.<br>=0A=
<br>=0A=
Thanks!<br>=0A=
_______________________________________________<br>=0A=
Mailing list: <a href=3D"https://launchpad.net/~dhis2-users&quot; target=3D"_bla=
nk">https://launchpad.net/~dhis2-users&lt;/a&gt;&lt;br&gt;=0A=
Post to&nbsp=3B &nbsp=3B &nbsp=3B: <a href=3D"mailto:dhis2-users@lists.laun=
chpad.net" target=3D"_blank">dhis2-users@lists.launchpad.net</a><br>=0A=
Unsubscribe : <a href=3D"https://launchpad.net/~dhis2-users&quot; target=3D"_bla=
nk">https://launchpad.net/~dhis2-users&lt;/a&gt;&lt;br&gt;=0A=
More help&nbsp=3B &nbsp=3B: <a href=3D"ListHelp - Launchpad Help"=
target=3D"_blank">https://help.launchpad.net/ListHelp&lt;/a&gt;&lt;br&gt;=0A=
</blockquote></div><br></div></div></div></div>=0A=
<br>_______________________________________________<br>=0A=
Mailing list: <a href=3D"https://launchpad.net/~dhis2-users&quot; target=3D"_bla=
nk">https://launchpad.net/~dhis2-users&lt;/a&gt;&lt;br&gt;=0A=
Post to&nbsp=3B &nbsp=3B &nbsp=3B: <a href=3D"mailto:dhis2-users@lists.laun=
chpad.net">dhis2-users@lists.launchpad.net</a><br>=0A=
Unsubscribe : <a href=3D"https://launchpad.net/~dhis2-users&quot; target=3D"_bla=
nk">https://launchpad.net/~dhis2-users&lt;/a&gt;&lt;br&gt;=0A=
More help&nbsp=3B &nbsp=3B: <a href=3D"ListHelp - Launchpad Help"=
target=3D"_blank">https://help.launchpad.net/ListHelp&lt;/a&gt;&lt;br&gt;=0A=
<br></blockquote></div><br><br clear=3D"all"><br>-- <br><div class=3D"ecxgm=
ail_signature">Pamod<br><br></div>=0A=
</div></div> </div></body>
</html>=

--_17a79805-2b37-4771-91d8-ed8614b654cf_--