Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
6dbb8d6
fix: Update code
larshelge Jan 19, 2026
5e78bcf
merge: Merge from master branch
larshelge Jan 19, 2026
eef36e9
fix: Update code
larshelge Jan 21, 2026
2aeb160
fix: Update code
larshelge Jan 21, 2026
09e16f5
fix: Update code
larshelge Jan 22, 2026
22baaf0
fix: Update code
larshelge Jan 22, 2026
65e4c6a
fix: Update code
larshelge Jan 22, 2026
6733363
fix: Update code
larshelge Jan 22, 2026
f0670b2
merge: Merge from master branch
larshelge Jan 22, 2026
bcb9517
merge: Merge from master branch
larshelge Jan 22, 2026
524576b
fix: Update code
larshelge Jan 26, 2026
76803c8
fix: Update code
larshelge Jan 27, 2026
6a2afb8
fix: Update code
larshelge Jan 27, 2026
996e4ac
fix: Update code
larshelge Jan 27, 2026
e73e9cc
merge: Merge from master branch
larshelge Jan 27, 2026
adcd707
fix: Update code
larshelge Jan 27, 2026
b895778
merge: Merge from master branch
larshelge Jan 27, 2026
baed0e5
fix: Update code
larshelge Jan 27, 2026
efe180f
fix: Update code
larshelge Jan 27, 2026
733abac
fix: Update code
larshelge Jan 27, 2026
dbbc958
merge: Merge from master branch
larshelge Jan 27, 2026
947da72
fix: Update code
larshelge Jan 27, 2026
13005f5
fix: Update code
larshelge Feb 2, 2026
6adf1d1
fix: Update code
larshelge Feb 18, 2026
a2124a4
fix: Update code
larshelge Feb 18, 2026
3860d11
merge: Merge from master branch
larshelge Feb 18, 2026
1b3b4ff
fix: Update code
larshelge Feb 23, 2026
7e988a8
merge: Merge from master branch
larshelge Feb 23, 2026
72e2b9c
fix: Update code
larshelge Feb 25, 2026
b296677
fix: Update code
larshelge Feb 25, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/main/java/org/hisp/dhis/api/ApiFields.java
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,10 @@ public class ApiFields {
ID_EXT_FIELDS);

/** Program indicator fields. */
public static final String PROGRAM_INDICATOR_FIELDS = NAME_FIELDS;
public static final String PROGRAM_INDICATOR_FIELDS =
String.format(
"%1$s,program[%1$s],expression,filter,decimals,aggregationType,analyticsType",
NAME_FIELDS);

/** Program section fields. */
public static final String PROGRAM_SECTION_FIELDS =
Expand Down
33 changes: 33 additions & 0 deletions src/main/java/org/hisp/dhis/model/AnalyticsType.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
* Copyright (c) 2004-2026, University of Oslo
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* Neither the name of the HISP project nor the names of its contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.hisp.dhis.model;

public enum AnalyticsType {
EVENT,
ENROLLMENT;
}
13 changes: 13 additions & 0 deletions src/main/java/org/hisp/dhis/model/ProgramIndicator.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
*/
package org.hisp.dhis.model;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
Expand All @@ -37,6 +38,18 @@
@Setter
@NoArgsConstructor
public class ProgramIndicator extends DimensionItem {
@JsonProperty private Program program;

@JsonProperty private String expression;

@JsonProperty private String filter;

@JsonProperty private Integer decimals;

@JsonProperty private AggregationType aggregationType;

@JsonProperty private AnalyticsType analyticsType;

@Override
public DimensionItemType getDimensionItemType() {
return DimensionItemType.PROGRAM_INDICATOR;
Expand Down
58 changes: 58 additions & 0 deletions src/test/java/org/hisp/dhis/ProgramIndicatorApiTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
/*
* Copyright (c) 2004-2026, University of Oslo
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* Neither the name of the HISP project nor the names of its contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.hisp.dhis;

import static org.hisp.dhis.support.Assertions.assertNotBlank;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;

import org.hisp.dhis.model.ProgramIndicator;
import org.hisp.dhis.support.TestTags;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;

@Tag(TestTags.INTEGRATION)
class ProgramIndicatorApiTest {
@Test
void testGetProgramIndicator() {
Dhis2 dhis2 = new Dhis2(TestFixture.DEFAULT_CONFIG);

ProgramIndicator programIndicator = dhis2.getProgramIndicator("GSae40Fyppf");

assertNotNull(programIndicator);
assertNotNull("GSae40Fyppf", programIndicator.getId());
assertNotBlank(programIndicator.getName());
assertNotBlank(programIndicator.getShortName());
assertNotNull(programIndicator.getProgram());
assertEquals("uy2gU8kT1jF", programIndicator.getProgram().getId());
assertNotBlank(programIndicator.getExpression());
assertNotBlank(programIndicator.getFilter());
assertNotNull(programIndicator.getAggregationType());
assertNotNull(programIndicator.getAnalyticsType());
}
}
Loading