Search in sources :

Example 41 with DataElementOperand

use of org.hisp.dhis.dataelement.DataElementOperand in project dhis2-core by dhis2.

the class PredictionDataConsolidatorTest method initTest.

// -------------------------------------------------------------------------
// Fixture
// -------------------------------------------------------------------------
@BeforeEach
void initTest() {
    dataElementA = createDataElement('A');
    dataElementB = createDataElement('B');
    dataElementX = createDataElement('X');
    dataElementA.setId(1);
    dataElementB.setId(2);
    dataElementX.setId(3);
    cocA = createCategoryOptionCombo('A');
    cocB = createCategoryOptionCombo('B');
    cocA.setId(4);
    cocB.setId(5);
    cocA.setUid("CatOptCombA");
    cocB.setUid("CatOptCombB");
    aocC = createCategoryOptionCombo('C');
    aocD = createCategoryOptionCombo('D');
    aocC.setId(6);
    aocD.setId(7);
    aocC.setUid("AttOptionCC");
    aocD.setUid("AttOptionCD");
    dataElementOperandA = new DataElementOperand(dataElementA, cocA);
    dataElementOperandB = new DataElementOperand(dataElementB, cocB);
    dataElementOperandX = new DataElementOperand(dataElementX, cocA);
    periodA = createPeriod("202201");
    periodB = createPeriod("202202");
    periodC = createPeriod("202203");
    periodA.setUid("Perio202201");
    periodB.setUid("Perio202202");
    periodC.setUid("Perio202203");
    periodA.setId(10);
    periodB.setId(11);
    periodC.setId(12);
    // OrgUnit hierarchy:
    // 
    // Level 1 - Level 2
    // -- A
    // -- B ------ E
    // -- C ------ F
    // -- D ------ G
    orgUnitA = createOrganisationUnit("A");
    orgUnitB = createOrganisationUnit("B");
    orgUnitC = createOrganisationUnit("C");
    orgUnitD = createOrganisationUnit("D");
    orgUnitE = createOrganisationUnit("E", orgUnitB);
    orgUnitF = createOrganisationUnit("F", orgUnitC);
    orgUnitG = createOrganisationUnit("G", orgUnitD);
    orgUnitA.setId(20);
    orgUnitB.setId(21);
    orgUnitC.setId(22);
    orgUnitD.setId(23);
    orgUnitE.setId(24);
    orgUnitF.setId(25);
    orgUnitG.setId(26);
    orgUnitA.setUid("orgUnitAAAA");
    orgUnitB.setUid("orgUnitBBBB");
    orgUnitC.setUid("orgUnitCCCC");
    orgUnitD.setUid("orgUnitDDDD");
    orgUnitE.setUid("orgUnitEEEE");
    orgUnitF.setUid("orgUnitFFFF");
    orgUnitG.setUid("orgUnitGGGG");
    orgUnitA.setPath("/orgUnitAAAA");
    orgUnitB.setPath("/orgUnitBBBB");
    orgUnitC.setPath("/orgUnitCCCC");
    orgUnitD.setPath("/orgUnitDDDD");
    orgUnitE.setPath("/orgUnitBBBB/orgUnitEEEE");
    orgUnitF.setPath("/orgUnitCCCC/orgUnitFFFF");
    orgUnitG.setPath("/orgUnitDDDD/orgUnitGGGG");
    currentUserOrgUnits = Sets.newHashSet(orgUnitA, orgUnitB, orgUnitC, orgUnitD);
    levelOneOrgUnits = Lists.newArrayList(orgUnitA, orgUnitB, orgUnitC, orgUnitD);
    // DataValue values:
    foundValueA = new FoundDimensionItemValue(orgUnitB, periodA, aocC, dataElementA, 25.0);
    foundValueB = new FoundDimensionItemValue(orgUnitC, periodA, aocC, dataElementB, 18.0);
    foundValueC = new FoundDimensionItemValue(orgUnitB, periodB, aocC, dataElementOperandA, 10.0);
    foundValueD = new FoundDimensionItemValue(orgUnitB, periodB, aocD, dataElementOperandX, 30.0);
    foundValueE = new FoundDimensionItemValue(orgUnitB, periodC, aocC, dataElementOperandX, 50.0);
    // Analytics values with attribute option combo:
    foundValueF = new FoundDimensionItemValue(orgUnitB, periodA, aocC, programIndicatorA, 10.0);
    foundValueG = new FoundDimensionItemValue(orgUnitB, periodB, aocC, programIndicatorB, 10.0);
    foundValueH = new FoundDimensionItemValue(orgUnitB, periodA, aocD, trackedEntityAttributeA, 10.0);
    foundValueI = new FoundDimensionItemValue(orgUnitD, periodA, aocC, programIndicatorA, 10.0);
    // Analytics values without attribute option combo:
    CategoryOptionCombo noAoc = null;
    foundValueJ = new FoundDimensionItemValue(orgUnitD, periodA, noAoc, programAttributeA, 100.0);
    foundValueK = new FoundDimensionItemValue(orgUnitD, periodA, noAoc, programAttributeB, 200.0);
    foundValueL = new FoundDimensionItemValue(orgUnitD, periodB, noAoc, programAttributeA, 300.0);
    // old predictor data values:
    dataValueX = new DataValue(dataElementX, periodA, orgUnitB, cocA, aocD, "30.0", "Z", null, null, null, false);
    dataValueY = new DataValue(dataElementX, periodC, orgUnitB, cocA, aocC, "40.0", "Z", null, null, null, true);
    programA = createProgram('A');
    programB = createProgram('B');
    programA.setUid("ProgramAAAA");
    programB.setUid("ProgramBBBB");
    programIndicatorA = createProgramIndicator('A', programA, "expressionA", "filterA");
    programIndicatorB = createProgramIndicator('B', programB, "expressionB", "filterB");
    programIndicatorA.setUid("ProgramIndA");
    programIndicatorB.setUid("ProgramIndB");
    trackedEntityAttributeA = createTrackedEntityAttribute('A');
    trackedEntityAttributeA.setUid("trackEntAtA");
    programAttributeA = new ProgramTrackedEntityAttributeDimensionItem(programA, trackedEntityAttributeA);
    programAttributeB = new ProgramTrackedEntityAttributeDimensionItem(programB, trackedEntityAttributeA);
    programAttributeA.setUid(programA.getUid() + "." + trackedEntityAttributeA.getUid());
    programAttributeA.setUid(programB.getUid() + "." + trackedEntityAttributeA.getUid());
    items = Sets.newHashSet(// DataValues (always with AOC):
    dataElementA, dataElementOperandA, dataElementOperandB, dataElementOperandX, // Analytics with AOC:
    programIndicatorA, programIndicatorB, trackedEntityAttributeA, // Analytics without AOC:
    programAttributeA, programAttributeB);
    dataValueQueryPeriods = Sets.newHashSet(periodA, periodB, periodC);
    analyticsQueryPeriods = Sets.newHashSet(periodA, periodB);
    existingOutputPeriods = Sets.newHashSet(periodC);
    outputDataElementOperand = dataElementOperandX;
    when(dataValueFetcher.setIncludeDeleted(true)).thenReturn(dataValueFetcher);
    when(dataValueFetcher.setIncludeDescendants(INCLUDE_DESCENDANTS)).thenReturn(dataValueFetcher);
    consolidator = new PredictionDataConsolidator(items, INCLUDE_DESCENDANTS, dataValueFetcher, analyticsFetcher);
    consolidator.setAnalyticsBatchFetchSize(3);
}
Also used : DataElementOperand(org.hisp.dhis.dataelement.DataElementOperand) DataValue(org.hisp.dhis.datavalue.DataValue) FoundDimensionItemValue(org.hisp.dhis.common.FoundDimensionItemValue) ProgramTrackedEntityAttributeDimensionItem(org.hisp.dhis.program.ProgramTrackedEntityAttributeDimensionItem) CategoryOptionCombo(org.hisp.dhis.category.CategoryOptionCombo) BeforeEach(org.junit.jupiter.api.BeforeEach)

Example 42 with DataElementOperand

use of org.hisp.dhis.dataelement.DataElementOperand in project dhis2-core by dhis2.

the class PredictionDataValueFetcherTest method initTest.

// -------------------------------------------------------------------------
// Fixture
// -------------------------------------------------------------------------
@BeforeEach
void initTest() {
    dataElementA = createDataElement('A');
    dataElementB = createDataElement('B');
    dataElementX = createDataElement('X');
    dataElementA.setId(1);
    dataElementB.setId(2);
    dataElementX.setId(3);
    dataElements = Sets.newHashSet(dataElementA, dataElementB);
    cocA = createCategoryOptionCombo('A');
    cocB = createCategoryOptionCombo('B');
    cocA.setId(4);
    cocB.setId(5);
    cocA.setUid("CatOptCombA");
    cocB.setUid("CatOptCombB");
    aocC = createCategoryOptionCombo('C');
    aocD = createCategoryOptionCombo('D');
    aocC.setId(6);
    aocD.setId(7);
    aocC.setUid("AttOptionCC");
    aocD.setUid("AttOptionCD");
    dataElementOperandA = new DataElementOperand(dataElementA, cocA);
    dataElementOperandB = new DataElementOperand(dataElementB, cocB);
    dataElementOperandX = new DataElementOperand(dataElementX, cocA);
    dataElementOperands = Sets.newHashSet(dataElementOperandA, dataElementOperandB, dataElementOperandX);
    periodA = createPeriod("202201");
    periodB = createPeriod("202202");
    periodC = createPeriod("202203");
    periodA.setUid("Perio202201");
    periodB.setUid("Perio202202");
    periodC.setUid("Perio202203");
    periodA.setId(10);
    periodB.setId(11);
    periodC.setId(12);
    queryPeriods = Sets.newHashSet(periodA, periodB, periodC);
    outputPeriods = Sets.newHashSet(periodC);
    // OrgUnit hierarchy:
    // 
    // Level 1 - Level 2
    // -- A
    // -- B ------ E
    // -- C ------ F
    // -- D ------ G
    orgUnitA = createOrganisationUnit("A");
    orgUnitB = createOrganisationUnit("B");
    orgUnitC = createOrganisationUnit("C");
    orgUnitD = createOrganisationUnit("D");
    orgUnitE = createOrganisationUnit("E", orgUnitB);
    orgUnitF = createOrganisationUnit("F", orgUnitC);
    orgUnitG = createOrganisationUnit("G", orgUnitD);
    orgUnitA.setId(20);
    orgUnitB.setId(21);
    orgUnitC.setId(22);
    orgUnitD.setId(23);
    orgUnitE.setId(24);
    orgUnitF.setId(25);
    orgUnitG.setId(26);
    orgUnitA.setUid("orgUnitAAAA");
    orgUnitB.setUid("orgUnitBBBB");
    orgUnitC.setUid("orgUnitCCCC");
    orgUnitD.setUid("orgUnitDDDD");
    orgUnitE.setUid("orgUnitEEEE");
    orgUnitF.setUid("orgUnitFFFF");
    orgUnitG.setUid("orgUnitGGGG");
    orgUnitA.setPath("/orgUnitAAAA");
    orgUnitB.setPath("/orgUnitBBBB");
    orgUnitC.setPath("/orgUnitCCCC");
    orgUnitD.setPath("/orgUnitDDDD");
    orgUnitE.setPath("/orgUnitBBBB/orgUnitEEEE");
    orgUnitF.setPath("/orgUnitCCCC/orgUnitFFFF");
    orgUnitG.setPath("/orgUnitDDDD/orgUnitGGGG");
    currentUserOrgUnits = Sets.newHashSet(orgUnitA, orgUnitB, orgUnitC, orgUnitD);
    levelOneOrgUnits = Lists.newArrayList(orgUnitA, orgUnitB, orgUnitC, orgUnitD);
    dataValueA = new DataValue(dataElementA, periodA, orgUnitB, cocA, aocC, "10.0", "Y", null, null, null, false);
    dataValueB = new DataValue(dataElementA, periodA, orgUnitB, cocB, aocC, "15.0", "Y", null, null, null, false);
    dataValueX = new DataValue(dataElementX, periodA, orgUnitB, cocA, aocD, "30.0", "Z", null, null, null, false);
    dataValueY = new DataValue(dataElementX, periodC, orgUnitB, cocA, aocC, "40.0", "Z", null, null, null, true);
    dataValueZ = new DataValue(dataElementX, periodC, orgUnitE, cocA, aocC, "50.0", "Z", null, null, null, false);
    dataValueC = new DataValue(dataElementB, periodB, orgUnitC, cocA, aocC, "18.0", "Y", null, null, null, false);
    dataValueD = new DataValue(dataElementB, periodB, orgUnitC, cocB, aocC, "20.0", "Y", null, null, null, true);
    deflatedDataValueA = new DeflatedDataValue(dataValueA);
    deflatedDataValueB = new DeflatedDataValue(dataValueB);
    deflatedDataValueX = new DeflatedDataValue(dataValueX);
    deflatedDataValueY = new DeflatedDataValue(dataValueY);
    deflatedDataValueZ = new DeflatedDataValue(dataValueZ);
    deflatedDataValueC = new DeflatedDataValue(dataValueC);
    deflatedDataValueD = new DeflatedDataValue(dataValueD);
    foundValueA = new FoundDimensionItemValue(orgUnitB, periodA, aocC, dataElementA, 25.0);
    foundValueB = new FoundDimensionItemValue(orgUnitC, periodB, aocC, dataElementB, 18.0);
    foundValueC = new FoundDimensionItemValue(orgUnitB, periodA, aocC, dataElementOperandA, 10.0);
    foundValueD = new FoundDimensionItemValue(orgUnitB, periodA, aocD, dataElementOperandX, 30.0);
    foundValueE = new FoundDimensionItemValue(orgUnitB, periodC, aocC, dataElementOperandX, 50.0);
    fetcher = new PredictionDataValueFetcher(dataValueService, categoryService);
}
Also used : DataElementOperand(org.hisp.dhis.dataelement.DataElementOperand) DeflatedDataValue(org.hisp.dhis.datavalue.DeflatedDataValue) DeflatedDataValue(org.hisp.dhis.datavalue.DeflatedDataValue) DataValue(org.hisp.dhis.datavalue.DataValue) FoundDimensionItemValue(org.hisp.dhis.common.FoundDimensionItemValue) BeforeEach(org.junit.jupiter.api.BeforeEach)

Example 43 with DataElementOperand

use of org.hisp.dhis.dataelement.DataElementOperand in project dhis2-core by dhis2.

the class HibernateDataValueStore method getDataElementOperandValues.

@Override
public MapMapMap<Period, String, DimensionalItemObject, Double> getDataElementOperandValues(Collection<DataElementOperand> dataElementOperands, Collection<Period> periods, OrganisationUnit orgUnit) {
    MapMapMap<Period, String, DimensionalItemObject, Double> result = new MapMapMap<>();
    Collection<Integer> periodIdList = IdentifiableObjectUtils.getIdentifiers(periods);
    SetMap<DataElement, DataElementOperand> deosByDataElement = getDeosByDataElement(dataElementOperands);
    if (periods.size() == 0 || dataElementOperands.size() == 0) {
        return result;
    }
    String sql = "select dv.dataelementid, coc.uid, dv.attributeoptioncomboid, dv.periodid, " + "sum( cast( dv.value as " + statementBuilder.getDoubleColumnType() + " ) ) as value " + "from datavalue dv " + "join organisationunit o on o.organisationunitid = dv.sourceid " + "join categoryoptioncombo coc on coc.categoryoptioncomboid = dv.categoryoptioncomboid " + "where o.path like '" + orgUnit.getPath() + "%' " + "and dv.periodid in (" + TextUtils.getCommaDelimitedString(periodIdList) + ") " + "and dv.value is not null " + "and dv.deleted is false " + "and ( ";
    String snippit = "";
    for (DataElement dataElement : deosByDataElement.keySet()) {
        sql += snippit + "( dv.dataelementid = " + dataElement.getId() + getDisaggRestriction(deosByDataElement.get(dataElement)) + " ) ";
        snippit = "or ";
    }
    sql += ") group by dv.dataelementid, coc.uid, dv.attributeoptioncomboid, dv.periodid";
    SqlRowSet rowSet = jdbcTemplate.queryForRowSet(sql);
    Map<Integer, DataElement> dataElementsById = IdentifiableObjectUtils.getIdentifierMap(deosByDataElement.keySet());
    Map<Integer, Period> periodsById = IdentifiableObjectUtils.getIdentifierMap(periods);
    while (rowSet.next()) {
        Integer dataElementId = rowSet.getInt(1);
        String categoryOptionComboUid = rowSet.getString(2);
        Integer periodId = rowSet.getInt(4);
        Double value = rowSet.getDouble(5);
        DataElement dataElement = dataElementsById.get(dataElementId);
        Period period = periodsById.get(periodId);
        Set<DataElementOperand> deos = deosByDataElement.get(dataElement);
        for (DataElementOperand deo : deos) {
            if (deo.getCategoryOptionCombo() == null || deo.getCategoryOptionCombo().getUid() == categoryOptionComboUid) {
                Double existingValue = result.getValue(period, categoryOptionComboUid, deo);
                if (existingValue != null) {
                    value += existingValue;
                }
                result.putEntry(period, categoryOptionComboUid, deo, value);
            }
        }
    }
    return result;
}
Also used : SqlRowSet(org.springframework.jdbc.support.rowset.SqlRowSet) DataElementOperand(org.hisp.dhis.dataelement.DataElementOperand) Period(org.hisp.dhis.period.Period) MapMapMap(org.hisp.dhis.common.MapMapMap) DataElement(org.hisp.dhis.dataelement.DataElement) DimensionalItemObject(org.hisp.dhis.common.DimensionalItemObject)

Example 44 with DataElementOperand

use of org.hisp.dhis.dataelement.DataElementOperand in project dhis2-core by dhis2.

the class HibernateDataValueStore method getDataValueMapByAttributeCombo.

@Override
public MapMap<String, DimensionalItemObject, Double> getDataValueMapByAttributeCombo(SetMap<String, DataElementOperand> dataElementOperandsToGet, Date date, OrganisationUnit source, Collection<PeriodType> periodTypes, DataElementCategoryOptionCombo attributeCombo, Set<CategoryOptionGroup> cogDimensionConstraints, Set<DataElementCategoryOption> coDimensionConstraints, MapMap<String, DataElementOperand, Date> lastUpdatedMap) {
    MapMap<String, DimensionalItemObject, Double> map = new MapMap<>();
    if (dataElementOperandsToGet.isEmpty() || periodTypes.isEmpty() || (cogDimensionConstraints != null && cogDimensionConstraints.isEmpty()) || (coDimensionConstraints != null && coDimensionConstraints.isEmpty())) {
        return map;
    }
    String joinCo = coDimensionConstraints == null && cogDimensionConstraints == null ? StringUtils.EMPTY : "join categoryoptioncombos_categoryoptions c_c on dv.attributeoptioncomboid = c_c.categoryoptioncomboid ";
    String joinCog = cogDimensionConstraints == null ? StringUtils.EMPTY : "join categoryoptiongroupmembers cogm on c_c.categoryoptionid = cogm.categoryoptionid ";
    String whereCo = coDimensionConstraints == null ? StringUtils.EMPTY : "and c_c.categoryoptionid in (" + TextUtils.getCommaDelimitedString(getIdentifiers(coDimensionConstraints)) + ") ";
    String whereCog = cogDimensionConstraints == null ? StringUtils.EMPTY : "and cogm.categoryoptiongroupid in (" + TextUtils.getCommaDelimitedString(getIdentifiers(cogDimensionConstraints)) + ") ";
    String whereCombo = attributeCombo == null ? StringUtils.EMPTY : "and dv.attributeoptioncomboid = " + attributeCombo.getId() + " ";
    String sql = "select de.uid, coc.uid, aoc.uid, dv.value, dv.lastupdated, p.startdate, p.enddate " + "from datavalue dv " + "inner join dataelement de on dv.dataelementid = de.dataelementid " + "inner join categoryoptioncombo coc on dv.categoryoptioncomboid = coc.categoryoptioncomboid " + "inner join categoryoptioncombo aoc on dv.attributeoptioncomboid = aoc.categoryoptioncomboid " + "inner join period p on p.periodid = dv.periodid " + joinCo + joinCog + "where de.uid in (" + TextUtils.getQuotedCommaDelimitedString(dataElementOperandsToGet.keySet()) + ") " + "and dv.sourceid = " + source.getId() + " " + "and p.startdate <= '" + DateUtils.getMediumDateString(date) + "' " + "and p.enddate >= '" + DateUtils.getMediumDateString(date) + "' " + "and p.periodtypeid in (" + TextUtils.getCommaDelimitedString(getIds(periodTypes)) + ") " + "and dv.deleted is false " + whereCo + whereCog + whereCombo;
    SqlRowSet rowSet = jdbcTemplate.queryForRowSet(sql);
    MapMap<String, DataElementOperand, Long> checkForDuplicates = new MapMap<>();
    int rowCount = 0;
    while (rowSet.next()) {
        rowCount++;
        String dataElement = rowSet.getString(1);
        String categoryOptionCombo = rowSet.getString(2);
        String attributeOptionCombo = rowSet.getString(3);
        Double value = MathUtils.parseDouble(rowSet.getString(4));
        Date lastUpdated = rowSet.getDate(5);
        Date periodStartDate = rowSet.getDate(6);
        Date periodEndDate = rowSet.getDate(7);
        long periodInterval = periodEndDate.getTime() - periodStartDate.getTime();
        if (value != null) {
            Set<DataElementOperand> deos = dataElementOperandsToGet.get(dataElement);
            for (DataElementOperand deo : deos) {
                if (deo.getCategoryOptionCombo() == null || deo.getCategoryOptionCombo().getUid().equals(categoryOptionCombo)) {
                    Double existingValue = map.getValue(attributeOptionCombo, deo);
                    Long existingPeriodInterval = checkForDuplicates.getValue(attributeOptionCombo, deo);
                    if (existingPeriodInterval != null) {
                        if (existingPeriodInterval < periodInterval) {
                            // Do not overwrite the previous value if for a shorter interval
                            continue;
                        } else if (existingPeriodInterval > periodInterval) {
                            // Overwrite previous value if for a longer interval
                            existingValue = null;
                            if (lastUpdatedMap != null) {
                                lastUpdatedMap.putEntry(attributeOptionCombo, deo, lastUpdated);
                            }
                        }
                    }
                    if (existingValue != null) {
                        value += existingValue;
                    }
                    map.putEntry(attributeOptionCombo, deo, value);
                    if (lastUpdatedMap != null && lastUpdated != null) {
                        Date existingLastUpdated = lastUpdatedMap.getValue(attributeOptionCombo, deo);
                        if (existingLastUpdated == null || lastUpdated.after(existingLastUpdated)) {
                            lastUpdatedMap.putEntry(attributeOptionCombo, deo, lastUpdated);
                        }
                    }
                    checkForDuplicates.putEntry(attributeOptionCombo, deo, periodInterval);
                }
            }
        }
    }
    log.trace("getDataValueMapByAttributeCombo: " + rowCount + " rows into " + map.size() + " map entries from \"" + sql + "\"");
    return map;
}
Also used : SqlRowSet(org.springframework.jdbc.support.rowset.SqlRowSet) DataElementOperand(org.hisp.dhis.dataelement.DataElementOperand) Date(java.util.Date) MapMapMap(org.hisp.dhis.common.MapMapMap) MapMap(org.hisp.dhis.common.MapMap) DimensionalItemObject(org.hisp.dhis.common.DimensionalItemObject)

Example 45 with DataElementOperand

use of org.hisp.dhis.dataelement.DataElementOperand in project dhis2-core by dhis2.

the class LoadFormAction method getSectionForm.

// -------------------------------------------------------------------------
// Supportive methods
// -------------------------------------------------------------------------
private void getSectionForm(Collection<DataElement> dataElements, DataSet dataSet) {
    sections = new ArrayList<>(dataSet.getSections());
    Collections.sort(sections, new SectionOrderComparator());
    for (Section section : sections) {
        Set<Integer> categoryComboIds = new HashSet<>();
        for (DataElementCategoryCombo categoryCombo : section.getCategoryCombos()) {
            categoryComboIds.add(categoryCombo.getId());
            sectionCategoryComboDataElements.put(section.getId() + "-" + categoryCombo.getId(), section.getDataElementsByCategoryCombo(categoryCombo));
        }
        if (!categoryComboIds.isEmpty()) {
            sectionCombos.put(section.getId(), categoryComboIds);
        }
        for (DataElementOperand operand : section.getGreyedFields()) {
            if (operand != null && operand.getDataElement() != null && operand.getCategoryOptionCombo() != null) {
                greyedFields.put(operand.getDataElement().getUid() + ":" + operand.getCategoryOptionCombo().getUid(), true);
            }
        }
    }
}
Also used : DataElementOperand(org.hisp.dhis.dataelement.DataElementOperand) DataElementCategoryCombo(org.hisp.dhis.dataelement.DataElementCategoryCombo) SectionOrderComparator(org.hisp.dhis.dataset.comparator.SectionOrderComparator) Section(org.hisp.dhis.dataset.Section) HashSet(java.util.HashSet)

Aggregations

DataElementOperand (org.hisp.dhis.dataelement.DataElementOperand)75 DataElement (org.hisp.dhis.dataelement.DataElement)36 Test (org.junit.jupiter.api.Test)30 CategoryOptionCombo (org.hisp.dhis.category.CategoryOptionCombo)25 Period (org.hisp.dhis.period.Period)24 OrganisationUnit (org.hisp.dhis.organisationunit.OrganisationUnit)23 DimensionalItemObject (org.hisp.dhis.common.DimensionalItemObject)19 DataQueryParams (org.hisp.dhis.analytics.DataQueryParams)17 Matchers.emptyOrNullString (org.hamcrest.Matchers.emptyOrNullString)14 PeriodType.getPeriodFromIsoString (org.hisp.dhis.period.PeriodType.getPeriodFromIsoString)14 ProgramIndicator (org.hisp.dhis.program.ProgramIndicator)13 Indicator (org.hisp.dhis.indicator.Indicator)11 HashMap (java.util.HashMap)10 DhisSpringTest (org.hisp.dhis.DhisSpringTest)10 IndicatorType (org.hisp.dhis.indicator.IndicatorType)10 DimensionalItemId (org.hisp.dhis.common.DimensionalItemId)9 DataSet (org.hisp.dhis.dataset.DataSet)9 ArrayList (java.util.ArrayList)8 DataValue (org.hisp.dhis.datavalue.DataValue)8 List (java.util.List)7