diff --git a/dhis-2/dhis-api/src/main/java/org/hisp/dhis/analytics/table/EnrollmentAnalyticsColumnName.java b/dhis-2/dhis-api/src/main/java/org/hisp/dhis/analytics/table/EnrollmentAnalyticsColumnName.java index df4e708abfd2..16bce0442f5c 100644 --- a/dhis-2/dhis-api/src/main/java/org/hisp/dhis/analytics/table/EnrollmentAnalyticsColumnName.java +++ b/dhis-2/dhis-api/src/main/java/org/hisp/dhis/analytics/table/EnrollmentAnalyticsColumnName.java @@ -31,7 +31,6 @@ @NoArgsConstructor(access = lombok.AccessLevel.PRIVATE) public final class EnrollmentAnalyticsColumnName { - public static final String ENROLLMENT_COLUMN_NAME = "enrollment"; public static final String TRACKED_ENTITY_COLUMN_NAME = "trackedentity"; public static final String ENROLLMENT_DATE_COLUMN_NAME = "enrollmentdate"; diff --git a/dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/EnrollmentAnalyticsColumn.java b/dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/EnrollmentAnalyticsColumn.java index 1cbca99e8be3..4b6ddfe7de85 100644 --- a/dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/EnrollmentAnalyticsColumn.java +++ b/dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/EnrollmentAnalyticsColumn.java @@ -49,6 +49,19 @@ @NoArgsConstructor(access = lombok.AccessLevel.PRIVATE) public final class EnrollmentAnalyticsColumn { + public static final AnalyticsTableColumn TRACKED_ENTITY = + AnalyticsTableColumn.builder() + .name(EnrollmentAnalyticsColumnName.TRACKED_ENTITY_COLUMN_NAME) + .dataType(CHARACTER_11) + .selectExpression("te.uid") + .build(); + public static final AnalyticsTableColumn TRACKED_ENTITY_GEOMETRY = + AnalyticsTableColumn.builder() + .name(EnrollmentAnalyticsColumnName.TRACKED_ENTITY_GEOMETRY_COLUMN_NAME) + .dataType(GEOMETRY) + .selectExpression("te.geometry") + .build(); + private static final AnalyticsTableColumn ENROLLMENT = AnalyticsTableColumn.builder() .name(EnrollmentAnalyticsColumnName.ENROLLMENT_COLUMN_NAME) @@ -56,12 +69,6 @@ public final class EnrollmentAnalyticsColumn { .nullable(NOT_NULL) .selectExpression("en.uid") .build(); - static final AnalyticsTableColumn TRACKED_ENTITY = - AnalyticsTableColumn.builder() - .name(EnrollmentAnalyticsColumnName.TRACKED_ENTITY_COLUMN_NAME) - .dataType(CHARACTER_11) - .selectExpression("te.uid") - .build(); private static final AnalyticsTableColumn ENROLLMENT_DATE = AnalyticsTableColumn.builder() .name(EnrollmentAnalyticsColumnName.ENROLLMENT_DATE_COLUMN_NAME) @@ -152,12 +159,6 @@ public final class EnrollmentAnalyticsColumn { .nullable(NOT_NULL) .selectExpression("coalesce(registrationou.uid,ou.uid)") .build(); - static final AnalyticsTableColumn TRACKED_ENTITY_GEOMETRY = - AnalyticsTableColumn.builder() - .name(EnrollmentAnalyticsColumnName.TRACKED_ENTITY_GEOMETRY_COLUMN_NAME) - .dataType(GEOMETRY) - .selectExpression("te.geometry") - .build(); private static final List COMMON_COLUMNS = List.of( diff --git a/dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/EventAnalyticsColumn.java b/dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/EventAnalyticsColumn.java index e5ad325bdf89..2b1ecfa33a79 100644 --- a/dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/EventAnalyticsColumn.java +++ b/dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/EventAnalyticsColumn.java @@ -49,6 +49,19 @@ @NoArgsConstructor(access = lombok.AccessLevel.PRIVATE) public final class EventAnalyticsColumn { + public static final AnalyticsTableColumn TRACKED_ENTITY = + AnalyticsTableColumn.builder() + .name(EventAnalyticsColumnName.TRACKED_ENTITY_COLUMN_NAME) + .dataType(CHARACTER_11) + .selectExpression("te.uid") + .build(); + public static final AnalyticsTableColumn TRACKED_ENTITY_GEOMETRY = + AnalyticsTableColumn.builder() + .name(EventAnalyticsColumnName.TRACKED_ENTITY_GEOMETRY_COLUMN_NAME) + .dataType(GEOMETRY) + .selectExpression("te.geometry") + .build(); + // Common columns that work across all databases private static final AnalyticsTableColumn EVENT = @@ -65,12 +78,6 @@ public final class EventAnalyticsColumn { .nullable(NOT_NULL) .selectExpression("en.uid") .build(); - public static final AnalyticsTableColumn TRACKED_ENTITY = - AnalyticsTableColumn.builder() - .name(EventAnalyticsColumnName.TRACKED_ENTITY_COLUMN_NAME) - .dataType(CHARACTER_11) - .selectExpression("te.uid") - .build(); private static final AnalyticsTableColumn PS = AnalyticsTableColumn.builder() .name(EventAnalyticsColumnName.PS_COLUMN_NAME) @@ -227,12 +234,6 @@ public final class EventAnalyticsColumn { .nullable(NOT_NULL) .selectExpression("coalesce(enrollmentou.uid,ou.uid)") .build(); - public static final AnalyticsTableColumn TRACKED_ENTITY_GEOMETRY = - AnalyticsTableColumn.builder() - .name(EventAnalyticsColumnName.TRACKED_ENTITY_GEOMETRY_COLUMN_NAME) - .dataType(GEOMETRY) - .selectExpression("te.geometry") - .build(); private static final List COMMON_COLUMNS = List.of(