Urgent help need with form design

Hi Community,

I have the following case and your guidance will be highly appreciated.

I am trying to produce a training attendance form that enrolls a list of participants, registers training sessions they attended, the topics that were discussed and facilitators.

Each participant has to attend six training sessions for the same topic, that is:

Participant A has to attend six training sessions about Infant feeding

Participant A has to attend six training sessions about Maternal feeding

Participant A has to attend six training sessions about Malaria

Participant A has to attend six training sessions about Hygiene

Participant A has to attend six training sessions about SRH/FP

Participant B has to attend six training sessions about Infant feeding

Participant B has to attend six training sessions about Maternal feeding

Participant B has to attend six training sessions about Malaria

Participant B has to attend six training sessions about Hygiene

Participant B has to attend six training sessions about SRH/FP

And so on

We want to get as output for example: Total of participants who attended training sessions whose topic was malaria (disaggregated by gender, age)

My problem is how to design this form taking into account the link between each topic and the trainings while also having to register patients.

Thanks in advance