# Help: Avoid counting entities multiple times using program indicators in tracker capture

Hi, everyone.

I need to track individual youth students (Attendance of training participants) over five weeks/program stages.

To track and check attendance at each event (program stage), there is a data element called attendance check with an option set attached to it.

On paper forms, the facilitator writes the student’s name, and puts a checkmark (✓) if the student confirms presence, and a cross mark (x) or if the student is absent.

If a student does not attend any of the event/program stage, he/she should be considered a “DROPOUT”.

I have difficulty building the following program indicators in the DHIS 2:

Total of students that attended all events (5 stages) – On the attendance sheet above there is one student who attended all five events

Total of students that attended only 2 events - On the attendance sheet above there are 2 students who attended two events

Total of students that attended only 3 events - On the attendance sheet above there are five student who attended three events.

Total of students that attended only 4 events - On the attendance sheet above there is one student who attended four events.

Total of students that dropped out - On the attendance sheet above there is one student who dropped out.

1 Like

Hi @dmbantu,
The events are repetitive? or each stage one event?

Hi @asacur,

The events are not repetitive, so each stage one event.

Thanks

Count Enrollment
Start and End, use Enrollment date
#{jFmuJZfR188.Week1} == 1 && #{jFmuJZfR188.Week2} == 1&& #{jFmuJZfR188.Week3} == 1
This will count only 3 events

Can you try?

Hi @asacur,

I will try it. But won’t the expression give me only three events for three consecutive weeks?

Gill Buque, for example, participated in 3 events but not in three consecutive weeks.

Thanks

Hi,
(#{jFmuJZfR188.Week1} == 1 && #{jFmuJZfR188.Week2} == 1&& #{jFmuJZfR188.Week3} == 1 && #{jFmuJZfR188.Week4} == 1 && #{jFmuJZfR188.Week4} ==1) > 1
(#{jFmuJZfR188.Week1} == 1 && #{jFmuJZfR188.Week2} == 1&& #{jFmuJZfR188.Week3} == 1 && #{jFmuJZfR188.Week4} == 1 && #{jFmuJZfR188.Week4} ==1) > 2
I think with enrollment you can you can do it. Can you try?

Hi @asacur;

I tried the first expression but it gives an error.
Aggregate type: count
Analytics: enrollment
expression: V{enrollment_count}

Filter :

I have included all five stages (wee 1, week 2, week 3, week 4 and week 5) in the filter.

To get the students that participated in all stages, the following expression works fine

#{UfWuNQZqoRL.MPDAuxH04Ya} == 1 && #{Pev5TRSufhj.MPDAuxH04Ya} == 1 && #{E2vcak6nKFo.MPDAuxH04Ya} == 1 && #{CUOrSo2taL6.MPDAuxH04Ya} == 1 && #{uktrAWzAftL.MPDAuxH04Ya} == 1; it returns 1, which is correct because only Joao Dias participated in all stages. The challenge is getting those who participated in only 2, 3 or 4 stages.

For the students who dropped out, I will use the expression above, changing 1 to 0. As 0 is the code for the option absent.

Hi Again,
You can try do this for 3 stages,

(wee1==0 && wee2==0 && wee3==1&&wee4==1 &&week5==1) || (wee1==1 && wee2==0 && wee3==0&&wee4==1 &&week5==1) || (wee1==1 && wee2==0 && wee3==1&&wee4==1 &&week5==0) || …

I think you got the ideia…
Or
Do just one case, per program indicator… and create a indicator with all case in stage 3
stage3: case1 + case2+case3…
Or share in private one credential for your test server

Hi @asacur,

By making combinations for a program with five program stages as mentioned above, it is possible to calculate the program indicators. But a problem arises when you have a lot of program stages. For example, there is an attendance track that I am building which has 11 program stages and having to build Program Indicators to count which participants attended which trainings can be a long process because there would be a lot combinations.

If we could explore other ways or if anyone could enlighten us about this situation, things would be great.

Hi @dmbantu,
I believe the easiest way to get this information is to change the data entry form.

Participated in the meeting 11 Yes or No
Participated in the meeting 10 Yes or No

And you can make rules for the questions appear under some condition.

Hi @asacur,

Your approach can be a better alternative. How about the dates each meeting took place in case I want to view them in reports? I should have something like:

Participated in the meeting 11 Yes or No
Date the meeting 11 took place

Participated in the meeting 10 Yes or No
Date the meeting 10 took place

and so on.

I did not get the point when you mention: ‘And you can make rules for the questions appear under some condition.’

thanks

Hi,
What I meant is that if only those who attended meeting 10 can go to meeting 11, you can make some program rules to show the question only to those who attended meeting 10.
If not, you are ready to go.
Thanks