Losing data on same program enrollment

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.
Coming to your question: if you are doing things from external/custom app=
=2C then you have everything you need. See the following URLs
1. api/enrollments.json?trackedEntityInstance=3DTEI_UID - gives you all ava=
ilable enrollments for the specified TEI (TEI_UID)
2. api/enrollments.json?trackedEntityInstance=3DTEI_UID&program=3DPR_UID - =
gives you all available enrollments of the TEI in the specified program (PR=
3. api/enrollments.json?trackedEntityInstance=3DTEI_UID&program=3DPR_UID&st=
atus=3DACTIVE - gives you only those active enrollments for the selected TE=
I and program
4. api/events.json?trackedEntityInstance=3DTEI_UID&program=3Dur1Edk5Oe2n - =
gives you data for all the enrollments
5. api/events.json?trackedEntityInstance=3DTEI_UID&program=3Dur1Edk5Oe2n&pr=
ogramStatus=3DACTIVE - gives you data only for active enrollment
also take a look to the documentation for more filtering and other issues r=
egarding the web-api.
---Thank you=2C


On Tue=2C Nov 25=2C 2014 at 12:53 PM=2C Blai Samitier <blaisami@hotmail.com= > wrote:

Thank you for the fast answer! We want to use the programs to keep track of=
the infrastructural state of a building. Each enrollment on the program wi=
ll be a new infrastructure analysis=2C but we want to still be able to acce=
ss older enrollments to view the progression. We will not modify old enroll=
ments=2C we only want to access them.

We are doing this from an external APP via the web API. The idea was to hav=
e a "Multiple event with registration" program and=2C everytime someone mak=
e a new analysis=2C we enroll the TEI again into that program=2C fill the d=
ata and complete it. Then show a list with all the enrollments of that TEI=
=2C showing their information when selected.