Losing data on same program enrollment

Yes there is. Each enrollment and associated data is unique - there is no o=
verwriting. To enroll a TEI multiple times in a program=2C you first need t=
o either complete or terminate (in your case complete) previous enrollments=
. I know we have focused only with the "Active" enrollment and haven't prov=
ided proper interface to deal with historical enrollment data.
Tell us more about your use case - what do you do with previous enrollments=
? how do you want the data to be displayed - in report? do you want to edit=
previous enrollment data?
---Thank you=2C


On Mon=2C Nov 24=2C 2014 at 1:07 PM=2C Blai Samitier <blaisami@hotmail.com>= wrote:

I would like to know if there is a way to enroll a tracked entity instance =
into the same program multiple times without losing the values of the attri=
butes on the old enrollments. Right now=2C if I enroll a tracked entity int=
o a program=2C all the attributes of older enrollments of that program get =
replaced by the new values.
Thanks! =0A=

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




Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

.hmmessage P
font-size: 12pt=3B
<body class=3D'hmmessage'><div dir=3D'ltr'>Hello=2C<div><br></div><div>Yes=
=2C as soon as you mentioned the events I understood I was wrong about the =
Attributes and I started using the data elements. The only reason I was usi=
ng Attributes was that were easier to obtain via web API.<br><br>Thanks aga=
in!<br><br><div><hr id=3D"stopSpelling">Date: Thu=2C 27 Nov 2014 09:59:33 +=
0100<br>Subject: Re: [Dhis2-users] Losing data on same program enrollment<b=

From: abyota@gmail.com<br>To: blaisami@hotmail.com<br>CC: dhis2-users@lis=

ts.launchpad.net<br><br><div dir=3D"ltr">Hello Blai=2C<div><br></div><div>S=
omeone in our team mentioned me that your question was actually about attri=
butes=2C sorry I missed that part. Unfortunately=2C attribute values are no=
t unique per enrollment. Data element values are unique as I tried to expla=
in in my previous mail. You can have the uniqueness you wanted by going the=
data elements way=2C unless there is a particular reason for using attribu=
tes.</div><div class=3D"ecxgmail_extra"><div><div class=3D"ecxgmail_signatu=
re"><div dir=3D"ltr"><div><br></div><div>---</div><div>Thank you=2C<br></di=


<br><div class=3D"ecxgmail_quote">On Wed=2C Nov 26=2C 2014 at 8:01 PM=2C Bl=
ai 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><blockqu=
ote class=3D"ecxgmail_quote" style=3D"border-left:1px #ccc solid=3Bpadding-=
<div><div dir=3D"ltr">Thank you that was really helpful!&nbsp=3B<div><br></=

<div><br><br><div><hr>Date: Tue=2C 25 Nov 2014 13:26:04 +0100<div><div =

class=3D"h5"><br>Subject: Re: [Dhis2-users] Losing data on same program enr=
ollment<br>From: <a href=3D"mailto:abyota@gmail.com" target=3D"_blank">abyo=
ta@gmail.com</a><br>To: <a href=3D"mailto:blaisami@hotmail.com" target=3D"_=
blank">blaisami@hotmail.com</a><br>CC: <a href=3D"mailto:dhis2-users@lists.=
launchpad.net" target=3D"_blank">dhis2-users@lists.launchpad.net</a><br><br=

<div dir=3D"ltr">Seems you have an interesting use case. It is nice to see=

DHIS2 being used in other areas - keep up the good work and let us know if=
there is anything to guide you.<div><br></div><div>Coming to your question=
: if you are doing things from external/custom app=2C then you have everyth=
ing you need. See the following URLs<div><br></div><div>1. api/enrollments.=
json?trackedEntityInstance=3DTEI_UID - gives you all available enrollments =
for the specified TEI (TEI_UID)</div><div><br></div><div>2. api/enrollments=
.json?trackedEntityInstance=3DTEI_UID&amp=3Bprogram=3DPR_UID - gives you al=
l available enrollments of the TEI in the specified program (PR_UID)</div><=

<br></div><div>3. api/enrollments.json?trackedEntityInstance=3DTEI_UID&=

amp=3Bprogram=3DPR_UID&amp=3Bstatus=3DACTIVE - gives you only those active =
enrollments for the selected TEI and program</div><div><br></div><div>4. ap=
i/events.json?trackedEntityInstance=3DTEI_UID&amp=3Bprogram=3Dur1Edk5Oe2n -=
gives you data for all the enrollments</div><div><br></div><div>5. api/eve=
programStatus=3DACTIVE - gives you data only for active enrollment</div><di=

<br></div><div>also take a look to the <a href=3D"https://www.dhis2.org/d=

oc/snapshot/en/developer/html/dhis2_developer_manual.html" target=3D"_blank=
">documentation </a>for more filtering and other issues regarding the web-a=
pi.</div><div><br></div><div><div><div><div dir=3D"ltr"><div>---</div><div>=
Thank you=2C<br></div><div>Abyot.</div></div></div></div>=0A=
<br><div>On Tue=2C Nov 25=2C 2014 at 12:53 PM=2C Blai Samitier <span dir=3D=
"ltr">&lt=3B<a href=3D"mailto:blaisami@hotmail.com" target=3D"_blank">blais=
ami@hotmail.com</a>&gt=3B</span> wrote:<br><blockquote style=3D"border-left=
<div><div dir=3D"ltr">Hello=2C<br><br>Thank you for the fast answer! We wan=
t to use the programs to keep track of the infrastructural state of a build=
ing. Each enrollment on the program will be a new infrastructure analysis=
=2C but we want to still be able to access older enrollments to view the pr=
ogression. We will not modify old enrollments=2C we only want to access the=
m.<br><br>We are doing this from an external APP via the web API. The idea =
was to have a "Multiple event with registration" program and=2C everytime s=
omeone make a new analysis=2C we enroll the TEI again into that program=2C =
fill the data and complete it. Then show a list with all the enrollments of=
that TEI=2C showing their information when selected.<div><br></div><div>Th=
anks!<br><div><br></div><div><div><hr>Date: Mon=2C 24 Nov 2014 13:40:07 +01=
00<br>Subject: Re: [Dhis2-users] Losing data on same program enrollment<br>=
From: <a href=3D"mailto:abyota@gmail.com" target=3D"_blank">abyota@gmail.co=
m</a><br>To: <a href=3D"mailto:blaisami@hotmail.com" target=3D"_blank">blai=
sami@hotmail.com</a><br>CC: <a href=3D"mailto:dhis2-users@lists.launchpad.n=
et" target=3D"_blank">dhis2-users@lists.launchpad.net</a></div><div><div><b=

<br><div dir=3D"ltr">Hi=2C<div><br></div><div>Yes there is. Each enrollme=

nt and associated data is unique - there is no overwriting. To enroll a TEI=
multiple times in a program=2C you first need to either complete or termin=
ate (in your case complete) previous enrollments. I know we have focused on=
ly with the "Active" enrollment and haven't provided proper interface to de=
al with historical enrollment data.</div><div><br></div><div>Tell us more a=
bout your use case - what do you do with previous enrollments? how do you w=
ant the data to be displayed - in report? do you want to edit previous enro=
llment data?</div><div><div><div><div dir=3D"ltr"><div><br></div><div>---</=

<div>Thank you=2C<br></div><div>Abyot.</div></div></div></div>=0A=

<br><div>On Mon=2C Nov 24=2C 2014 at 1:07 PM=2C Blai Samitier <span dir=3D"=
ltr">&lt=3B<a href=3D"mailto:blaisami@hotmail.com" target=3D"_blank">blaisa=
mi@hotmail.com</a>&gt=3B</span> wrote:<br><blockquote style=3D"border-left-=
<div><div dir=3D"ltr">Hello=2C<br><br><div>I would like to know if there is=
a way to enroll a tracked entity instance into the same program multiple t=
imes without losing the values of the attributes on the old enrollments. Ri=
ght now=2C if I enroll a tracked entity into a program=2C all the attribute=
s of older enrollments of that program get replaced by the new values.</div=

<div><br></div><div>Thanks!</div> </div></div>=0A=

Mailing list: <a href=3D"https://launchpad.net/~dhis2-users" target=3D"_bla=
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" target=3D"_bla=
More help&nbsp=3B &nbsp=3B: <a href=3D"https://help.launchpad.net/ListHelp"=
<br></blockquote></div><br></div></div></div></div></div></div> =
</blockquote></div><br></div></div></div></div></div></div></div> =
</blockquote></div><br></div></div></div></div> </div></body>