← Back to team overview

dhis2-devs team mailing list archive

Re: Tracked entity instances having "strange" unenrollments with Tracker Capture

 

Ok, I have more information about the problem...

I have listed the programinstance table and  I got the following
information:

[image: Inline image 1]

As you can see we have several rows (more than 12.000!!!) with the Status
ACTIVE while the organisationunitid is null. So, here I am assuming that:

1) The Status is Active so that is the reason because all these
entityinstances are appearing in the list of entities with active
enrollments.

2) The organisationunitid is null and this is the reason of the
/api/enrollments endpoint returning null values. And in fact this is the
reason of not being able to see the program enrollment when we open an
entityinstance with Tabular TRacker (so no dataentry is possible!).

Does 1) and 2) make sense?

So it seems that we have more than 12000 entityinstances without enrollment
org. unit in the PSI database. How could this have happened? Any ideas?
Looking at the database it seems that the 99.9% of them were enrolled
between September 2015 and April 2016, and during that time we were using
2.20. Could it be due to a bug in the old Individual Record app? Since we
are in 2.22 all new enrollments always have the organisationunitid properly
filled.

Any advice on this issue is much appreaciated

Many thanks
Jose

On Thu, Aug 4, 2016 at 9:52 PM, Jose Garcia Muñoz <josemp10@xxxxxxxxx>
wrote:

>
> Dear devs,
>
> Will try to explain the following DHIS2 behaviour for tracker the best as
> I can... So, PSI has upgraded its servers from 2.20 to 2.22 like 4 months
> ago. One of the countries that is using Tracker Capture reported several
> weeks ago that sometimes they can not see the program enrollment when they
> open an entityinstance *previously stored and enrolled in 2.20*. Some of
> the entities instances are correctly displayed and the user can see the
> program enrollments, but for other entities they don't, the program just
> appears in the Report Widget (see the image below).
>
> [image: Inline image 1]
>
> Also, our team says that at least they can use the Tabular Tracker Capture
> app (developed by James, who is also ccyed in this email), as the problem
> is not happening using that app (they are right)
>
> I tried to investigate a bit further, but I couldn't find a relationship
> for this (why the problem happens with some entities and not for others).
> Also, the following API call api/enrollments?ou=NC3WdxGafv5&
> trackedEntityInstance=V1XKLzar3YQ&ouMode=DESCENDANTS
> <https://www.psi-mis.org/api/enrollments?ou=NC3WdxGafv5&trackedEntityInstance=V1XKLzar3YQ&ouMode=DESCENDANTS> (where
> the OU is a root org. unit) returns a null enrollment for the "problematic"
> entites, however they always appear in the list of entities with active
> enrollments (also, really strage)
>
> [image: Inline image 2]
>
> I doubt very much that our users had unenrolled all these entities
> instances.
>
> I have no idea about the cause/s of this issue, and I can only think of:
>
> 1) Could it be a problem related to the the api/enrollments endpoint?
>
> or
>
> 2) Could it be a problem in the database related to the upgrade from 2.20
> to 2.22 ?
>
> Please any ideas will be much appreciated.
>
> Many thanks
> Jose
>

PNG image

PNG image

PNG image


References