how to filter server side programStageDataElement with another programStageDataElements in same patient
Welcome to the DHIS2 Community of Practice!
Interesting question, why do you need this at the server side? What are you using the API or something else?
Normally, you would configure program indicators. I recommend following this course: