TEI relationships captured from DHIS2 android not reflecting on Web App

Greetings team, It seems DHIS2 TEI relationships are not being sent to the server after being captured on Android. They are only available on the capturing(android) device. I would like to know if there is a work around or stable version of DHIS2 Android App which allows for Tracked Entities and their relationships to be sent successfully to the Web App. The scenario is I created a tracker program which captures various groups of people, in which a group can be created and then Members can be added via TEI relationships(bi directional). It works on web based DHIS2 instance but when the user captures using android the members are created successfully and groups but as soon as data is sent or synced to server the relationships are lost.Thank You.

Hello John,

the relationships should be sent to the server, so it might be a bug. Which Android app version are you using? You mentioned the relationships are bi-directional, do they have any restriction related to Program? Which kind of relationships are they (TEI to TEI, TEI to event,…)? Is there any relationship that is successfully uploaded are do they fail all of them?

1 Like

Hi Victor, I have tested using various android versions that include version 3.1, 3.0, 2.8 and 2.82(the DHIS Web instance version is 2.40.0.1)

The relationships work well on web and I am able to create relationships on android but when I sync from android, Only the Tracked Entities and events are synced but not the relationships between the Tracked Entities. When I check on my program on web for a certain record which I know on Android had a bidirectional relationship with another I find the relationships section empty

The relationships are bi-directional TEI to TEI (none are uploading from android to web instance)

I have tested using various android versions that include version 3.1, 3.0, 2.8 and 2.82(the DHIS Web instance version is 2.40.0.1)

The relationships work well on web and I am able to create relationships on android but when I sync from android, Only the Tracked Entities and events are synced but not the relationships between the Tracked Entities. When I check on my program on web for a certain record which I know on Android had a bidirectional relationship with another I find the relationships section empty.

Could you give more details about the relationship type, in particular about the restriction of each side? There is a bug in the Android app (fixed in the next patch release) when creating bi-directional relationships that have different TET or programs on each side (check this ticket). Could it be related?

The problem is that the relationships are created correctly on android but when one sends data to the server the relationships are not sent. For Example if there is Program A for Mothers(Each mother as a tracked entity) and Program B for Children(child as tracked entity). when creating a child one is able to link the child to his mother or vice-versa on android. On the web version relationships work perfectly and one is able to see who relates to who under the relationships section. on android they also do but when one sends data to the server a captured mother’s details will be sent and will be found on the web system, the same applies to the child, the child 's details will be sent to the Child programme. But relationships for mother and child that were created on android will be lost/ not found on server. meaning one can’t tell who is the mother of a child that was recorded from the android App.Yet on the android App the relationships are still there. Only relationship data is not being synchronized to the server.

Hi @thuso.sehloho,

I still think the issue might be related to the bug I mentioned above (this bug).

Could you give more details about each side of the relationship type? For example:
Side FROM:

  • TrackedEntityType: mother
  • Program: Program A (is it restricted?)

Side TO:

  • TrackedEntityType: child
  • Program: Program B (is it restricted?)

I assume that mother and child are different TrackedEntityTypes.

And the last question, are you able to see in web any relationship created in Android? For example, the relationships created from the “mother” side are visible, but those created from the “child” side are not; or vice-versa.