← Back to team overview

dhis2-devs team mailing list archive

Re: [Dhis2-users] Tracked Entity Instance assigned to multiple org units

 

Hi,

No, it is not possible to have multiple active enrollments per program at a
time. Looking at your payload, there is only one enrollment (mRU4V4B5duK).
What has happened is the same TEI has been to multiple orgunits and has got
events along the way - all this has been for the same enrollment.

For the other issue that you are not able to see a TEI, see what is coming
under

api/trackedEntityInstances/VxxTPQ1eJII.json


The orgUnit property should tell you where the TEI is registered.

---
Thank you,
Abyot.

On Thu, Feb 18, 2016 at 7:49 PM, Pamod Amarakoon <pamodm@xxxxxxxxx> wrote:

> Dear All,
>
> is it possible for a tracked entity instance to be assigned to multiple
> org units with active enrollments for a particular programme.
>
> I get the following json for the query.
>
>
> http://xxx.xxx.xxx.xxx/api/events?trackedEntityInstance=VxxTPQ1eJII&paging=false
>
> <metadata><pager><page>1</page><pageCount>1</pageCount><total>0</total><pageSize>50</pageSize></pager><events><event
> programStage="FyR0ymIDsoA" orgUnit="OvJ4fN4C4AT"
> dueDate="2016-01-01T18:30:00.000+0000" program="MmGml1Gyb7K"
> trackedEntityInstance="VxxTPQ1eJII" enrollment="mRU4V4B5duK"
> enrollmentStatus="ACTIVE" href="
> http://148.251.224.242/nss1/api/events/zHkYPz3035x"; event="zHkYPz3035x"
> status="ACTIVE" eventDate="2016-01-01T18:30:00.000+0000"
> orgUnitName="Asiri
> Uyana"><created>2016-01-02T14:04:44.289+0000</created><lastUpdated>2016-01-02T14:04:44.289+0000</lastUpdated><followup>false</followup><coordinate
> latitude="0.0" longitude="0.0"/><dataValues/><notes/></event><event
> programStage="wS2i9c9hXXz" storedBy="admin" orgUnit="mjYyQLw4Mzp"
> dueDate="2016-01-17T12:53:35.918+0000" program="MmGml1Gyb7K"
> trackedEntityInstance="VxxTPQ1eJII" enrollment="mRU4V4B5duK"
> enrollmentStatus="ACTIVE" href="
> http://148.251.224.242/nss1/api/events/Wlem0qlua11"; event="Wlem0qlua11"
> status="ACTIVE" eventDate="2016-01-30T18:30:00.000+0000"
> orgUnitName="Battaramulla"><created>2016-01-17T07:23:18.812+0000</created><lastUpdated>2016-01-17T12:53:35.918+0000</lastUpdated><followup>false</followup><dataValues><dataValue
> lastUpdated="2016-01-17T12:53:35.928+0000" storedBy="admin"
> created="2016-01-17T12:42:08.741+0000" dataElement="GDhOcklahIq" value="30"
> providedElsewhere="false"/></dataValues><notes/></event><event
> programStage="wS2i9c9hXXz" orgUnit="mjYyQLw4Mzp"
> dueDate="2016-02-28T18:30:00.000+0000" program="MmGml1Gyb7K"
> trackedEntityInstance="VxxTPQ1eJII" enrollment="mRU4V4B5duK"
> enrollmentStatus="ACTIVE" href="
> http://148.251.224.242/nss1/api/events/rZFvMF1kEOG"; event="rZFvMF1kEOG"
> status="ACTIVE" eventDate="2016-02-28T18:30:00.000+0000"
> orgUnitName="Battaramulla"><created>2016-01-17T07:23:51.591+0000</created><lastUpdated>2016-01-17T07:23:51.591+0000</lastUpdated><followup>false</followup><dataValues/><notes/></event><event
> programStage="vTWcDsFE1rf" orgUnit="OvJ4fN4C4AT"
> dueDate="2016-06-29T18:30:00.000+0000" program="MmGml1Gyb7K"
> trackedEntityInstance="VxxTPQ1eJII" enrollment="mRU4V4B5duK"
> enrollmentStatus="ACTIVE" href="
> http://148.251.224.242/nss1/api/events/Jv7yG6XuSZJ"; event="Jv7yG6XuSZJ"
> status="ACTIVE" eventDate="2016-06-29T18:30:00.000+0000"
> orgUnitName="Asiri
> Uyana"><created>2016-01-02T14:04:44.296+0000</created><lastUpdated>2016-01-02T14:04:44.296+0000</lastUpdated><followup>false</followup><dataValues/><notes/></event><event
> programStage="wS2i9c9hXXz" orgUnit="RECbE8BKyJ4"
> dueDate="2016-01-30T18:30:00.000+0000" program="MmGml1Gyb7K"
> trackedEntityInstance="VxxTPQ1eJII" enrollment="mRU4V4B5duK"
> enrollmentStatus="ACTIVE" href="
> http://148.251.224.242/nss1/api/events/gb6HSyZ6s38"; event="gb6HSyZ6s38"
> status="ACTIVE" eventDate="2016-01-30T18:30:00.000+0000"
> orgUnitName="Batapotha"><created>2016-01-17T07:20:02.005+0000</created><lastUpdated>2016-01-17T07:20:02.005+0000</lastUpdated><followup>false</followup><dataValues/><notes/></event></events></metadata>
>
> So the tracked entity instance with uid "VxxTPQ1eJII" is appearing under
> multiple org units. but i cannot view this tracked entity instance in
> tracker capture.
> --
> Regards,
> Pamod Amarakoon
>
> Confidentiality Notice: the information contained in this email and any
> attachments may be legally privileged and confidential. If you are not an
> intended recipient, you are hereby notified that any dissemination,
> distribution, or copying of this e-mail is strictly prohibited. If you have
> received this e-mail in error, please notify the sender and permanently
> delete the e-mail and any attachments immediately. You should not retain,
> copy or use this e-mail or any attachments for any purpose, nor disclose
> all or any part of the contents to any other person.
>
>
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-users
> Post to     : dhis2-users@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-users
> More help   : https://help.launchpad.net/ListHelp
>
>

Follow ups

References