Losing data on same program enrollment

Hi=2C
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
Abyot.=0A=

···

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

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=

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

                 =0A=

                 =

--_cd552ff4-0a8a-4cef-abcf-2208a4ef2310_
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 that was really helpfu=
l!&nbsp=3B<div><br></div><div><br><br><div><hr id=3D"stopSpelling">Date: Tu=
e=2C 25 Nov 2014 13:26:04 +0100<br>Subject: Re: [Dhis2-users] Losing data o=
n same program enrollment<br>From: abyota@gmail.com<br>To: blaisami@hotmail=
.com<br>CC: dhis2-users@lists.launchpad.net<br><br><div dir=3D"ltr">Seems y=
ou have an interesting use case. It is nice to see DHIS2 being used in othe=
r areas - keep up the good work and let us know if there is anything to gui=
de you.<div><br></div><div>Coming to your question: if you are doing things=
from external/custom app=2C then you have everything you need. See the fol=
lowing URLs<div class=3D"ecxgmail_extra"><br></div><div class=3D"ecxgmail_e=
xtra">1. api/enrollments.json?trackedEntityInstance=3DTEI_UID - gives you a=
ll available enrollments for the specified TEI (TEI_UID)</div><div class=3D=
"ecxgmail_extra"><br></div><div class=3D"ecxgmail_extra">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><=
div class=3D"ecxgmail_extra"><br></div><div class=3D"ecxgmail_extra">3. api=
/enrollments.json?trackedEntityInstance=3DTEI_UID&amp=3Bprogram=3DPR_UID&am=
p=3Bstatus=3DACTIVE - gives you only those active enrollments for the selec=
ted TEI and program</div><div class=3D"ecxgmail_extra"><br></div><div class=
=3D"ecxgmail_extra">4. api/events.json?trackedEntityInstance=3DTEI_UID&amp=
=3Bprogram=3Dur1Edk5Oe2n - gives you data for all the enrollments</div><div=
class=3D"ecxgmail_extra"><br></div><div class=3D"ecxgmail_extra">5. api/ev=
ents.json?trackedEntityInstance=3DTEI_UID&amp=3Bprogram=3Dur1Edk5Oe2n&amp=
=3BprogramStatus=3DACTIVE - gives you data only for active enrollment</div>=
<div class=3D"ecxgmail_extra"><br></div><div class=3D"ecxgmail_extra">also =
take a look to the <a href=3D"https://www.dhis2.org/doc/snapshot/en/develop=
er/html/dhis2_developer_manual.html" target=3D"_blank">documentation </a>fo=
r more filtering and other issues regarding the web-api.</div><div class=3D=
"ecxgmail_extra"><br></div><div class=3D"ecxgmail_extra"><div><div class=3D=
"ecxgmail_signature"><div dir=3D"ltr"><div>---</div><div>Thank you=2C<br></=

<div>Abyot.</div></div></div></div>=0A=

<br><div class=3D"ecxgmail_quote">On Tue=2C Nov 25=2C 2014 at 12:53 PM=2C B=
lai 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><blockq=
uote class=3D"ecxgmail_quote" style=3D"border-left-width:1px=3Bborder-left-=
color:rgb(204=2C204=2C204)=3Bborder-left-style:solid=3Bpadding-left:1ex=3B"=

=0A=

=0A=
=0A=
<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 cl=
ass=3D"h5"><br><br><div dir=3D"ltr">Hi=2C<div><br></div><div>Yes there is. =
Each enrollment and associated data is unique - there is no overwriting. To=
enroll a TEI multiple times in a program=2C you first need to either compl=
ete or terminate (in your case complete) previous enrollments. I know we ha=
ve focused only with the "Active" enrollment and haven't provided proper in=
terface to deal with historical enrollment data.</div><div><br></div><div>T=
ell 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?</div><div><div><div><div dir=3D"ltr"><div><br></d=

<div>---</div><div>Thank you=2C<br></div><div>Abyot.</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-=
width:1px=3Bborder-left-color:rgb(204=2C204=2C204)=3Bborder-left-style:soli=
d=3Bpadding-left:1ex=3B">=0A=
=0A=
=0A=
<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=

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

</html>=

--_cd552ff4-0a8a-4cef-abcf-2208a4ef2310_--