Search in sources :

Example 11 with DataElementOperand

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

the class DefaultAnalyticsService method addDataElementOperandValues.

/**
     * Adds data element operand values to the given grid.
     * 
     * @param params the {@link DataQueryParams}.
     * @param grid the grid.
     * @param totalType the operand {@link DataElementOperand.TotalType}.
     */
private void addDataElementOperandValues(DataQueryParams params, Grid grid, DataElementOperand.TotalType totalType) {
    List<DataElementOperand> operands = asTypedList(params.getDataElementOperands());
    operands = operands.stream().filter(o -> totalType.equals(o.getTotalType())).collect(Collectors.toList());
    if (operands.isEmpty()) {
        return;
    }
    List<DimensionalItemObject> dataElements = Lists.newArrayList(DimensionalObjectUtils.getDataElements(operands));
    List<DimensionalItemObject> categoryOptionCombos = Lists.newArrayList(DimensionalObjectUtils.getCategoryOptionCombos(operands));
    List<DimensionalItemObject> attributeOptionCobos = Lists.newArrayList(DimensionalObjectUtils.getAttributeOptionCombos(operands));
    //TODO check if data was dim or filter
    DataQueryParams.Builder builder = DataQueryParams.newBuilder(params).removeDimension(DATA_X_DIM_ID).addDimension(new BaseDimensionalObject(DATA_X_DIM_ID, DimensionType.DATA_X, dataElements));
    if (totalType.isCategoryOptionCombo()) {
        builder.addDimension(new BaseDimensionalObject(CATEGORYOPTIONCOMBO_DIM_ID, DimensionType.CATEGORY_OPTION_COMBO, categoryOptionCombos));
    }
    if (totalType.isAttributeOptionCombo()) {
        builder.addDimension(new BaseDimensionalObject(ATTRIBUTEOPTIONCOMBO_DIM_ID, DimensionType.ATTRIBUTE_OPTION_COMBO, attributeOptionCobos));
    }
    DataQueryParams operandParams = builder.build();
    Map<String, Object> aggregatedDataMap = getAggregatedDataValueMapObjectTyped(operandParams);
    aggregatedDataMap = AnalyticsUtils.convertDxToOperand(aggregatedDataMap, totalType);
    for (Map.Entry<String, Object> entry : aggregatedDataMap.entrySet()) {
        Object value = AnalyticsUtils.getRoundedValueObject(operandParams, entry.getValue());
        grid.addRow().addValues(entry.getKey().split(DIMENSION_SEP)).addValue(value);
        if (params.isIncludeNumDen()) {
            grid.addNullValues(3);
        }
    }
}
Also used : DataElementOperand(org.hisp.dhis.dataelement.DataElementOperand) DataQueryParams(org.hisp.dhis.analytics.DataQueryParams) DimensionalItemObject(org.hisp.dhis.common.DimensionalItemObject) BaseDimensionalObject(org.hisp.dhis.common.BaseDimensionalObject) DimensionalObject(org.hisp.dhis.common.DimensionalObject) AnalyticalObject(org.hisp.dhis.common.AnalyticalObject) DimensionalItemObject(org.hisp.dhis.common.DimensionalItemObject) BaseDimensionalObject(org.hisp.dhis.common.BaseDimensionalObject) PeriodType.getPeriodTypeFromIsoString(org.hisp.dhis.period.PeriodType.getPeriodTypeFromIsoString) Map(java.util.Map) ImmutableMap(com.google.common.collect.ImmutableMap) OrganisationUnit.getParentGraphMap(org.hisp.dhis.organisationunit.OrganisationUnit.getParentGraphMap) HashMap(java.util.HashMap) OrganisationUnit.getParentNameGraphMap(org.hisp.dhis.organisationunit.OrganisationUnit.getParentNameGraphMap)

Example 12 with DataElementOperand

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

the class DataElementGroupController method getOperands.

@RequestMapping(value = "/{uid}/operands", method = RequestMethod.GET)
public String getOperands(@PathVariable("uid") String uid, @RequestParam Map<String, String> parameters, Model model, TranslateParams translateParams, HttpServletRequest request, HttpServletResponse response) throws Exception {
    WebOptions options = new WebOptions(parameters);
    setUserContext(translateParams);
    List<DataElementGroup> dataElementGroups = getEntity(uid, NO_WEB_OPTIONS);
    if (dataElementGroups.isEmpty()) {
        throw new WebMessageException(WebMessageUtils.notFound("DataElementGroup not found for uid: " + uid));
    }
    WebMetadata metadata = new WebMetadata();
    List<DataElementOperand> dataElementOperands = Lists.newArrayList(dataElementCategoryService.getOperands(dataElementGroups.get(0).getMembers()));
    Collections.sort(dataElementOperands);
    metadata.setDataElementOperands(dataElementOperands);
    if (options.hasPaging()) {
        Pager pager = new Pager(options.getPage(), dataElementOperands.size(), options.getPageSize());
        metadata.setPager(pager);
        dataElementOperands = PagerUtils.pageCollection(dataElementOperands, pager);
    }
    metadata.setDataElementOperands(dataElementOperands);
    linkService.generateLinks(metadata, false);
    model.addAttribute("model", metadata);
    model.addAttribute("viewClass", options.getViewClass("basic"));
    return StringUtils.uncapitalize(getEntitySimpleName());
}
Also used : DataElementOperand(org.hisp.dhis.dataelement.DataElementOperand) WebMessageException(org.hisp.dhis.dxf2.webmessage.WebMessageException) Pager(org.hisp.dhis.common.Pager) DataElementGroup(org.hisp.dhis.dataelement.DataElementGroup) WebOptions(org.hisp.dhis.webapi.webdomain.WebOptions) WebMetadata(org.hisp.dhis.webapi.webdomain.WebMetadata) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 13 with DataElementOperand

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

the class DataElementOperandController method getObjectList.

@GetMapping
@SuppressWarnings("unchecked")
@ResponseBody
public RootNode getObjectList(@RequestParam Map<String, String> rpParameters, OrderParams orderParams) throws QueryParserException {
    Schema schema = schemaService.getDynamicSchema(DataElementOperand.class);
    List<String> fields = Lists.newArrayList(contextService.getParameterValues("fields"));
    List<String> filters = Lists.newArrayList(contextService.getParameterValues("filter"));
    List<Order> orders = orderParams.getOrders(schema);
    if (fields.isEmpty()) {
        fields.addAll(Preset.ALL.getFields());
    }
    WebOptions options = new WebOptions(rpParameters);
    WebMetadata metadata = new WebMetadata();
    List<DataElementOperand> dataElementOperands;
    if (options.isTrue("persisted")) {
        dataElementOperands = Lists.newArrayList(manager.getAll(DataElementOperand.class));
    } else {
        boolean totals = options.isTrue("totals");
        String deg = CollectionUtils.popStartsWith(filters, "dataElement.dataElementGroups.id:eq:");
        deg = deg != null ? deg.substring("dataElement.dataElementGroups.id:eq:".length()) : null;
        String ds = options.get("dataSet");
        if (deg != null) {
            DataElementGroup dataElementGroup = manager.get(DataElementGroup.class, deg);
            dataElementOperands = dataElementCategoryService.getOperands(dataElementGroup.getMembers(), totals);
        } else if (ds != null) {
            DataSet dataSet = manager.get(DataSet.class, ds);
            dataElementOperands = dataElementCategoryService.getOperands(dataSet, totals);
        } else {
            List<DataElement> dataElements = new ArrayList<>(manager.getAllSorted(DataElement.class));
            dataElementOperands = dataElementCategoryService.getOperands(dataElements, totals);
        }
    }
    Query query = queryService.getQueryFromUrl(DataElementOperand.class, filters, orders, options.getRootJunction());
    query.setDefaultOrder();
    query.setObjects(dataElementOperands);
    dataElementOperands = (List<DataElementOperand>) queryService.query(query);
    Pager pager = metadata.getPager();
    if (options.hasPaging() && pager == null) {
        pager = new Pager(options.getPage(), dataElementOperands.size(), options.getPageSize());
        linkService.generatePagerLinks(pager, DataElementOperand.class);
        dataElementOperands = PagerUtils.pageCollection(dataElementOperands, pager);
    }
    RootNode rootNode = NodeUtils.createMetadata();
    if (pager != null) {
        rootNode.addChild(NodeUtils.createPager(pager));
    }
    rootNode.addChild(fieldFilterService.filter(DataElementOperand.class, dataElementOperands, fields));
    return rootNode;
}
Also used : Order(org.hisp.dhis.query.Order) DataElementOperand(org.hisp.dhis.dataelement.DataElementOperand) RootNode(org.hisp.dhis.node.types.RootNode) Query(org.hisp.dhis.query.Query) DataSet(org.hisp.dhis.dataset.DataSet) Schema(org.hisp.dhis.schema.Schema) WebOptions(org.hisp.dhis.webapi.webdomain.WebOptions) WebMetadata(org.hisp.dhis.webapi.webdomain.WebMetadata) Pager(org.hisp.dhis.common.Pager) DataElementGroup(org.hisp.dhis.dataelement.DataElementGroup) ArrayList(java.util.ArrayList) List(java.util.List) GetMapping(org.springframework.web.bind.annotation.GetMapping) ResponseBody(org.springframework.web.bind.annotation.ResponseBody)

Example 14 with DataElementOperand

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

the class DefaultPreheatService method collectReferences.

@SuppressWarnings("unchecked")
private Map<PreheatIdentifier, Map<Class<? extends IdentifiableObject>, Set<String>>> collectReferences(Map<Class<?>, List<?>> objects) {
    Map<PreheatIdentifier, Map<Class<? extends IdentifiableObject>, Set<String>>> map = new HashMap<>();
    map.put(PreheatIdentifier.UID, new HashMap<>());
    map.put(PreheatIdentifier.CODE, new HashMap<>());
    Map<Class<? extends IdentifiableObject>, Set<String>> uidMap = map.get(PreheatIdentifier.UID);
    Map<Class<? extends IdentifiableObject>, Set<String>> codeMap = map.get(PreheatIdentifier.CODE);
    if (objects.isEmpty()) {
        return map;
    }
    Map<Class<?>, List<?>> targets = new HashMap<>();
    // clone objects list, we don't want to modify it
    targets.putAll(objects);
    collectScanTargets(targets);
    for (Class<?> klass : targets.keySet()) {
        Schema schema = schemaService.getDynamicSchema(klass);
        List<Property> referenceProperties = schema.getProperties().stream().filter(p -> p.isPersisted() && p.isOwner() && (PropertyType.REFERENCE == p.getPropertyType() || PropertyType.REFERENCE == p.getItemPropertyType())).collect(Collectors.toList());
        for (Object object : targets.get(klass)) {
            if (schema.isIdentifiableObject()) {
                IdentifiableObject identifiableObject = (IdentifiableObject) object;
                identifiableObject.getAttributeValues().forEach(av -> addIdentifiers(map, av.getAttribute()));
                identifiableObject.getUserGroupAccesses().forEach(uga -> addIdentifiers(map, uga.getUserGroup()));
                identifiableObject.getUserAccesses().forEach(ua -> addIdentifiers(map, ua.getUser()));
                addIdentifiers(map, identifiableObject);
            }
            referenceProperties.forEach(p -> {
                if (!p.isCollection()) {
                    Class<? extends IdentifiableObject> itemKlass = (Class<? extends IdentifiableObject>) p.getKlass();
                    if (!uidMap.containsKey(itemKlass))
                        uidMap.put(itemKlass, new HashSet<>());
                    if (!codeMap.containsKey(itemKlass))
                        codeMap.put(itemKlass, new HashSet<>());
                    Object reference = ReflectionUtils.invokeMethod(object, p.getGetterMethod());
                    if (reference != null) {
                        IdentifiableObject identifiableObject = (IdentifiableObject) reference;
                        addIdentifiers(map, identifiableObject);
                    }
                } else {
                    Collection<IdentifiableObject> reference = ReflectionUtils.invokeMethod(object, p.getGetterMethod());
                    reference.forEach(identifiableObject -> addIdentifiers(map, identifiableObject));
                    if (DataElementOperand.class.isAssignableFrom(p.getItemKlass())) {
                        CollectionUtils.nullSafeForEach(reference, identifiableObject -> {
                            DataElementOperand dataElementOperand = (DataElementOperand) identifiableObject;
                            addIdentifiers(map, dataElementOperand.getDataElement());
                            addIdentifiers(map, dataElementOperand.getCategoryOptionCombo());
                        });
                    }
                }
            });
            if (AnalyticalObject.class.isInstance(object)) {
                BaseAnalyticalObject analyticalObject = (BaseAnalyticalObject) object;
                List<DataDimensionItem> dataDimensionItems = analyticalObject.getDataDimensionItems();
                List<CategoryDimension> categoryDimensions = analyticalObject.getCategoryDimensions();
                List<TrackedEntityDataElementDimension> trackedEntityDataElementDimensions = analyticalObject.getDataElementDimensions();
                List<TrackedEntityAttributeDimension> attributeDimensions = analyticalObject.getAttributeDimensions();
                List<TrackedEntityProgramIndicatorDimension> programIndicatorDimensions = analyticalObject.getProgramIndicatorDimensions();
                CollectionUtils.nullSafeForEach(dataDimensionItems, dataDimensionItem -> {
                    addIdentifiers(map, dataDimensionItem.getDimensionalItemObject());
                    if (dataDimensionItem.getDataElementOperand() != null) {
                        addIdentifiers(map, dataDimensionItem.getDataElementOperand().getDataElement());
                        addIdentifiers(map, dataDimensionItem.getDataElementOperand().getCategoryOptionCombo());
                    }
                    if (dataDimensionItem.getReportingRate() != null) {
                        addIdentifiers(map, dataDimensionItem.getReportingRate().getDataSet());
                    }
                });
                CollectionUtils.nullSafeForEach(categoryDimensions, categoryDimension -> {
                    addIdentifiers(map, categoryDimension.getDimension());
                    categoryDimension.getItems().forEach(item -> addIdentifiers(map, item));
                });
                CollectionUtils.nullSafeForEach(trackedEntityDataElementDimensions, trackedEntityDataElementDimension -> {
                    addIdentifiers(map, trackedEntityDataElementDimension.getDataElement());
                    addIdentifiers(map, trackedEntityDataElementDimension.getLegendSet());
                });
                CollectionUtils.nullSafeForEach(attributeDimensions, trackedEntityAttributeDimension -> {
                    addIdentifiers(map, trackedEntityAttributeDimension.getAttribute());
                    addIdentifiers(map, trackedEntityAttributeDimension.getLegendSet());
                });
                CollectionUtils.nullSafeForEach(programIndicatorDimensions, programIndicatorDimension -> {
                    addIdentifiers(map, programIndicatorDimension.getProgramIndicator());
                    addIdentifiers(map, programIndicatorDimension.getLegendSet());
                });
            }
        }
    }
    cleanEmptyEntries(uidMap);
    cleanEmptyEntries(codeMap);
    return map;
}
Also used : ReflectionUtils(org.hisp.dhis.system.util.ReflectionUtils) BaseAnalyticalObject(org.hisp.dhis.common.BaseAnalyticalObject) Restrictions(org.hisp.dhis.query.Restrictions) PeriodService(org.hisp.dhis.period.PeriodService) MergeService(org.hisp.dhis.schema.MergeService) Autowired(org.springframework.beans.factory.annotation.Autowired) TrackedEntityAttributeDimension(org.hisp.dhis.trackedentity.TrackedEntityAttributeDimension) StringUtils(org.apache.commons.lang3.StringUtils) MergeParams(org.hisp.dhis.schema.MergeParams) EmbeddedObject(org.hisp.dhis.common.EmbeddedObject) CategoryDimension(org.hisp.dhis.dataelement.CategoryDimension) UserCredentials(org.hisp.dhis.user.UserCredentials) Map(java.util.Map) Period(org.hisp.dhis.period.Period) Query(org.hisp.dhis.query.Query) BaseIdentifiableObject(org.hisp.dhis.common.BaseIdentifiableObject) UserGroup(org.hisp.dhis.user.UserGroup) Collection(java.util.Collection) Set(java.util.Set) SchemaService(org.hisp.dhis.schema.SchemaService) QueryService(org.hisp.dhis.query.QueryService) Property(org.hisp.dhis.schema.Property) Collectors(java.util.stream.Collectors) DataDimensionItem(org.hisp.dhis.common.DataDimensionItem) List(java.util.List) AttributeService(org.hisp.dhis.attribute.AttributeService) Schema(org.hisp.dhis.schema.Schema) LogFactory(org.apache.commons.logging.LogFactory) AnalyticalObject(org.hisp.dhis.common.AnalyticalObject) PropertyType(org.hisp.dhis.schema.PropertyType) DataSetElement(org.hisp.dhis.dataset.DataSetElement) HashMap(java.util.HashMap) Attribute(org.hisp.dhis.attribute.Attribute) ArrayList(java.util.ArrayList) HashSet(java.util.HashSet) Lists(com.google.common.collect.Lists) IdentifiableObjectManager(org.hisp.dhis.common.IdentifiableObjectManager) User(org.hisp.dhis.user.User) IdentifiableObject(org.hisp.dhis.common.IdentifiableObject) SystemTimer(org.hisp.dhis.commons.timer.SystemTimer) DataElementOperand(org.hisp.dhis.dataelement.DataElementOperand) TrackedEntityProgramIndicatorDimension(org.hisp.dhis.trackedentity.TrackedEntityProgramIndicatorDimension) Timer(org.hisp.dhis.commons.timer.Timer) CollectionUtils(org.hisp.dhis.commons.collection.CollectionUtils) CurrentUserService(org.hisp.dhis.user.CurrentUserService) PeriodStore(org.hisp.dhis.period.PeriodStore) TrackedEntityDataElementDimension(org.hisp.dhis.trackedentity.TrackedEntityDataElementDimension) Log(org.apache.commons.logging.Log) CodeGenerator(org.hisp.dhis.common.CodeGenerator) Transactional(org.springframework.transaction.annotation.Transactional) Set(java.util.Set) HashSet(java.util.HashSet) HashMap(java.util.HashMap) Schema(org.hisp.dhis.schema.Schema) CategoryDimension(org.hisp.dhis.dataelement.CategoryDimension) TrackedEntityDataElementDimension(org.hisp.dhis.trackedentity.TrackedEntityDataElementDimension) BaseIdentifiableObject(org.hisp.dhis.common.BaseIdentifiableObject) IdentifiableObject(org.hisp.dhis.common.IdentifiableObject) BaseAnalyticalObject(org.hisp.dhis.common.BaseAnalyticalObject) List(java.util.List) ArrayList(java.util.ArrayList) DataDimensionItem(org.hisp.dhis.common.DataDimensionItem) Property(org.hisp.dhis.schema.Property) HashSet(java.util.HashSet) TrackedEntityAttributeDimension(org.hisp.dhis.trackedentity.TrackedEntityAttributeDimension) DataElementOperand(org.hisp.dhis.dataelement.DataElementOperand) TrackedEntityProgramIndicatorDimension(org.hisp.dhis.trackedentity.TrackedEntityProgramIndicatorDimension) BaseAnalyticalObject(org.hisp.dhis.common.BaseAnalyticalObject) EmbeddedObject(org.hisp.dhis.common.EmbeddedObject) BaseIdentifiableObject(org.hisp.dhis.common.BaseIdentifiableObject) AnalyticalObject(org.hisp.dhis.common.AnalyticalObject) IdentifiableObject(org.hisp.dhis.common.IdentifiableObject) Map(java.util.Map) HashMap(java.util.HashMap)

Example 15 with DataElementOperand

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

the class ObjectBundleServiceTest method testUpdateDataSetWithSectionsAndGreyedFields.

@Test
public void testUpdateDataSetWithSectionsAndGreyedFields() throws IOException {
    Map<Class<? extends IdentifiableObject>, List<IdentifiableObject>> metadata = renderService.fromMetadata(new ClassPathResource("dxf2/dataset_with_sections_gf.json").getInputStream(), RenderFormat.JSON);
    ObjectBundleParams params = new ObjectBundleParams();
    params.setObjectBundleMode(ObjectBundleMode.COMMIT);
    params.setImportStrategy(ImportStrategy.CREATE);
    params.setObjects(metadata);
    ObjectBundle bundle = objectBundleService.create(params);
    ObjectBundleValidationReport validate = objectBundleValidationService.validate(bundle);
    assertTrue(validate.getErrorReports().isEmpty());
    objectBundleService.commit(bundle);
    Section section1 = manager.get(Section.class, "JwcV2ZifEQf");
    assertNotNull(section1.getDataSet());
    assertEquals(1, section1.getCategoryCombos().size());
    assertTrue(section1.getGreyedFields().isEmpty());
    assertEquals(1, section1.getDataElements().size());
    assertNotNull(section1.getDataSet());
    Section section2 = manager.get(Section.class, "C50M0WxaI7y");
    assertNotNull(section2.getDataSet());
    assertEquals(1, section2.getCategoryCombos().size());
    assertEquals(1, section2.getGreyedFields().size());
    assertEquals(1, section2.getDataElements().size());
    assertNotNull(section2.getDataSet());
    metadata = renderService.fromMetadata(new ClassPathResource("dxf2/dataset_with_sections_gf_update.json").getInputStream(), RenderFormat.JSON);
    params = new ObjectBundleParams();
    params.setObjectBundleMode(ObjectBundleMode.COMMIT);
    params.setImportStrategy(ImportStrategy.UPDATE);
    params.setObjects(metadata);
    bundle = objectBundleService.create(params);
    validate = objectBundleValidationService.validate(bundle);
    assertTrue(validate.getErrorReports().isEmpty());
    objectBundleService.commit(bundle);
    List<DataSet> dataSets = manager.getAll(DataSet.class);
    List<Section> sections = manager.getAll(Section.class);
    List<OrganisationUnit> organisationUnits = manager.getAll(OrganisationUnit.class);
    List<DataElement> dataElements = manager.getAll(DataElement.class);
    List<UserAuthorityGroup> userRoles = manager.getAll(UserAuthorityGroup.class);
    List<User> users = manager.getAll(User.class);
    List<DataElementOperand> dataElementOperands = manager.getAll(DataElementOperand.class);
    assertFalse(organisationUnits.isEmpty());
    assertFalse(dataElements.isEmpty());
    assertFalse(users.isEmpty());
    assertFalse(userRoles.isEmpty());
    assertEquals(1, dataSets.size());
    assertEquals(2, sections.size());
    assertEquals(1, dataElementOperands.size());
    DataSet dataSet = dataSets.get(0);
    assertEquals("Updated Data Set", dataSet.getName());
    assertEquals(2, dataSet.getSections().size());
    assertNotNull(dataSet.getUser());
    section1 = manager.get(Section.class, "JwcV2ZifEQf");
    assertNotNull(section1.getDataSet());
    assertEquals(1, section1.getCategoryCombos().size());
    assertEquals(1, section1.getGreyedFields().size());
    assertEquals(1, section1.getDataElements().size());
    assertNotNull(section1.getDataSet());
    section2 = manager.get(Section.class, "C50M0WxaI7y");
    assertNotNull(section2.getDataSet());
    assertEquals(1, section2.getCategoryCombos().size());
    assertTrue(section2.getGreyedFields().isEmpty());
    assertEquals(1, section2.getDataElements().size());
    assertNotNull(section2.getDataSet());
}
Also used : OrganisationUnit(org.hisp.dhis.organisationunit.OrganisationUnit) DataElementOperand(org.hisp.dhis.dataelement.DataElementOperand) User(org.hisp.dhis.user.User) ObjectBundleValidationReport(org.hisp.dhis.dxf2.metadata.objectbundle.feedback.ObjectBundleValidationReport) DataSet(org.hisp.dhis.dataset.DataSet) Section(org.hisp.dhis.dataset.Section) ClassPathResource(org.springframework.core.io.ClassPathResource) IdentifiableObject(org.hisp.dhis.common.IdentifiableObject) DataElement(org.hisp.dhis.dataelement.DataElement) UserAuthorityGroup(org.hisp.dhis.user.UserAuthorityGroup) List(java.util.List) Test(org.junit.Test) DhisSpringTest(org.hisp.dhis.DhisSpringTest)

Aggregations

DataElementOperand (org.hisp.dhis.dataelement.DataElementOperand)28 DataElement (org.hisp.dhis.dataelement.DataElement)12 DataElementCategoryOptionCombo (org.hisp.dhis.dataelement.DataElementCategoryOptionCombo)9 DimensionalItemObject (org.hisp.dhis.common.DimensionalItemObject)6 OrganisationUnit (org.hisp.dhis.organisationunit.OrganisationUnit)6 Period (org.hisp.dhis.period.Period)6 Test (org.junit.Test)6 DataSet (org.hisp.dhis.dataset.DataSet)5 List (java.util.List)4 IdentifiableObject (org.hisp.dhis.common.IdentifiableObject)4 ArrayList (java.util.ArrayList)3 HashSet (java.util.HashSet)3 Map (java.util.Map)3 DhisSpringTest (org.hisp.dhis.DhisSpringTest)3 DataElementCategoryCombo (org.hisp.dhis.dataelement.DataElementCategoryCombo)3 Section (org.hisp.dhis.dataset.Section)3 ProgramDataElementDimensionItem (org.hisp.dhis.program.ProgramDataElementDimensionItem)3 User (org.hisp.dhis.user.User)3 Date (java.util.Date)2 HashMap (java.util.HashMap)2