How do you add a relationship to a program stage?

I can’t find any information on how (in the UI) to add a TEI as a relationship on a program stage. Anyone have an idea or experience in doing this? Version 2.37 or 2.38 are applicable in this case.

2 Likes

Hi @chase.freeman,

Do you mean program stage as in a Tracker program?`It is not possible (yet) to add a relationship between a Tracker program stage and a TEI.

As you can see here in this JIRA epic, there is work undergoing in the Capture app to add relationship functionality - including from a program stage event. Since Capture app is now in continuous release, this should be possible in the near future by downloading the latest app release for 2.38.

Hope that helps!
Karoline

1 Like

Thanks Karoline!

I want to ask you please, what about relationship between tracker program stages? I can’t find out how to create one for (from: event in program or program stage, to: event in program or program stage)

Hi Gassim! :slight_smile:

Same thing for program stage to program stage, this is not yet implemented in the UI. It might also not be the highest priority (TEI to events or TEIs to TEIs are a little more established usecases) but let us know if you have any specific use cases for events-events relationships! :slight_smile:

Thanks,
Karoline

1 Like

The confusing part is that the UI allows you to establish relationships between Program Stage and Tracked Entity Instance (as well as @Gassim’s use case)

2 Likes

Thanks Karoline! Like Chase mentioned, since the option was available in the configuration, I thought I was lagging some knowledge about how to actually use it. :smiley:

1 Like

Also - the next best solution for my use case is to use Tracker Associate Data Element Value Type. Is that still a viable data type @Karoline? Context:
https://jira.dhis2.org/browse/DHIS2-2429
https://jira.dhis2.org/browse/DHIS2-8214

What I need is a way to add X number of TEIs to a program stage (it varies from 1 to 100 or so… ). I need them to be registered TEIs because I need to be able to scan QR codes to identify them.

If tracker associate works then I will have to add 150 data elements to a program stage and fill in as many as needed (usually 10-20 TEIs…). This is not optimal. If the relationships worked, I could simply add as many relationships as needed.

Edit: Tracker Associate does not work anymore.

I created an issue in Jira
https://jira.dhis2.org/browse/DHIS2-8214

2 Likes

Definitely understandable!

The relationship model in DHIS2 is very flexible, TEIs, enrollments, and events can all be linked in the backend (Through relationship types configured in the Maintenance app, which is what you mean by “the UI allows you” right?) but we have not yet implemented all the options in our capture app UIs. So I see how this can cause some confusion. The docs include for the Capture app " Currently the Capture App only supports Event to Tracked Entity Instance relationships." (Which will also need to be updated soon :))

As you have gathered from JIRA issue 8214 (and the fact that it does not work in Tracker Capture), we have wondered if relationships meet the requirements that the Tracker Associate value type does. Tagging @Markus and @Stian as well for this particular topic. We wrote a post on the community a couple of years back to gather a bit more around the use of Tracker Associate as well: Remove tracker associate data type

Just to clarify, you would want to link many TEIs to an event in a program stage in a Tracker program, yes? Can you describe the usecase a bit? The same thing wouldn’t work if they were single events in an event program, right?

Best,
Karoline

2 Likes

Thank you for your detailed reply @Karoline. I will describe the use case:

Let’s say I am a data collector and I am at a community event where my organization is providing health services and counseling. As a data collector, I will enter information about the event in a program stage that is repeatable (maybe this event happens once per quarter). Some of the data captured will include total participants, specific activities, etc. However, I also want to be able to quickly capture who attended. In this community some participants are registered as TEIs and have ID cards with QR codes. I need to be able to QUICKLY associate them with the event (program stage) by scanning their QR code and selecting their TEI in the system. The slow version of this would be to open another program for the individual TEIs and relate them to the program stage/event one by one, or to enter the community event’s data for the individual one by one.

The data collection is done via Android Capture

Edit:
I think the next best case to try is to add a bunch of Data Elements to a program stage (more than possibly necessary) as type text and to render it as type QR Code and use a unique string to identify the individuals.

1 Like