Search in sources :

Example 1 with ProgramStageDataElement

use of org.hisp.dhis.android.core.program.ProgramStageDataElement in project dhis2-android-sdk by dhis2.

the class MetadataCall method getOptionSetUidsForDataElements.

private void getOptionSetUidsForDataElements(Set<String> uids, List<ProgramStage> programStages) {
    int programStagesSize = programStages.size();
    for (int j = 0; j < programStagesSize; j++) {
        ProgramStage programStage = programStages.get(j);
        List<ProgramStageDataElement> programStageDataElements = programStage.programStageDataElements();
        int programStageDataElementSize = programStageDataElements.size();
        for (int k = 0; k < programStageDataElementSize; k++) {
            ProgramStageDataElement programStageDataElement = programStageDataElements.get(k);
            if (programStageDataElement.dataElement() != null && programStageDataElement.dataElement().optionSet() != null) {
                uids.add(programStageDataElement.dataElement().optionSet().uid());
            }
        }
    }
}
Also used : ProgramStageDataElement(org.hisp.dhis.android.core.program.ProgramStageDataElement) ProgramStage(org.hisp.dhis.android.core.program.ProgramStage)

Aggregations

ProgramStage (org.hisp.dhis.android.core.program.ProgramStage)1 ProgramStageDataElement (org.hisp.dhis.android.core.program.ProgramStageDataElement)1