From 92d14eee80d26c2a19174eeb46135f9e9521a157 Mon Sep 17 00:00:00 2001 From: Enrico Date: Fri, 10 Nov 2023 11:55:33 +0100 Subject: [PATCH] chore: Rename duedate to scheduleddate in DB [TECH-1615] --- .../org/hisp/dhis/analytics/TimeField.java | 2 +- .../dhis/program/AnalyticsPeriodBoundary.java | 2 +- .../data/DefaultEventDataQueryService.java | 2 +- .../data/JdbcEnrollmentAnalyticsManager.java | 2 +- .../event/data/JdbcEventAnalyticsManager.java | 2 +- .../table/JdbcEventAnalyticsTableManager.java | 4 +-- .../JdbcTeiEventsAnalyticsTableManager.java | 2 +- .../data/EnrollmentAnalyticsManagerTest.java | 2 +- .../event/data/EventAnalyticsManagerTest.java | 8 +++--- .../event/data/TimeFieldSqlRendererTest.java | 4 +-- .../JdbcEventAnalyticsTableManagerTest.java | 2 +- .../hisp/dhis/period/PeriodDataProvider.java | 2 +- .../hisp/dhis/program/variable/vDueDate.java | 4 +-- .../dhis/program/variable/vScheduledDate.java | 4 +-- .../HibernateTrackedEntityStore.java | 6 ++--- .../dhis/program/hibernate/Enrollment.hbm.xml | 2 +- .../hisp/dhis/program/hibernate/Event.hbm.xml | 2 +- .../ProgramSqlGeneratorVariablesTest.java | 2 +- .../tracker/event/JdbcEventStore.java | 20 +++++++-------- .../context/ProgramStageInstanceSupplier.java | 4 +-- .../trackedentity/store/query/EventQuery.java | 2 +- .../dhis/tracker/export/event/EventQuery.java | 2 +- .../tracker/export/event/JdbcEventStore.java | 25 ++++++++++--------- .../HibernateTrackedEntityStore.java | 12 ++++----- .../mapper/EventRowCallbackHandler.java | 2 +- .../aggregates/query/EventQuery.java | 2 +- ...nameDueDateToScheduledDateInEventTable.sql | 11 ++++++++ .../AbstractStatementBuilder.java | 7 +++--- .../ProgramIndicatorServiceVariableTest.java | 8 +++--- .../tracker/event_and_enrollment.json | 16 ++++++------ 30 files changed, 89 insertions(+), 76 deletions(-) create mode 100644 dhis-2/dhis-support/dhis-support-db-migration/src/main/resources/org/hisp/dhis/db/migration/2.41/V2_41_35__RenameDueDateToScheduledDateInEventTable.sql diff --git a/dhis-2/dhis-api/src/main/java/org/hisp/dhis/analytics/TimeField.java b/dhis-2/dhis-api/src/main/java/org/hisp/dhis/analytics/TimeField.java index 17a5d0907602..03d3fe774034 100644 --- a/dhis-2/dhis-api/src/main/java/org/hisp/dhis/analytics/TimeField.java +++ b/dhis-2/dhis-api/src/main/java/org/hisp/dhis/analytics/TimeField.java @@ -44,7 +44,7 @@ public enum TimeField { ENROLLMENT_DATE("enrollmentdate"), INCIDENT_DATE("incidentdate"), // Not a typo, different naming convention between FE and database - SCHEDULED_DATE("duedate"), + SCHEDULED_DATE("scheduleddate"), COMPLETED_DATE("completeddate"), CREATED("created"), LAST_UPDATED("lastupdated"); diff --git a/dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/AnalyticsPeriodBoundary.java b/dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/AnalyticsPeriodBoundary.java index 7b5a8cb94758..75dd0fff3c17 100644 --- a/dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/AnalyticsPeriodBoundary.java +++ b/dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/AnalyticsPeriodBoundary.java @@ -98,7 +98,7 @@ public class AnalyticsPeriodBoundary extends BaseIdentifiableObject implements E public static final String DB_INCIDENT_DATE = "incidentdate"; - public static final String DB_SCHEDULED_DATE = "duedate"; + public static final String DB_SCHEDULED_DATE = "scheduleddate"; public static final String DB_QUOTE = "\""; diff --git a/dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/DefaultEventDataQueryService.java b/dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/DefaultEventDataQueryService.java index 27fd03bcfe69..8fda325d19c3 100644 --- a/dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/DefaultEventDataQueryService.java +++ b/dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/DefaultEventDataQueryService.java @@ -124,7 +124,7 @@ public class DefaultEventDataQueryService implements EventDataQueryService { private static final String COL_NAME_INCIDENTDATE = "incidentdate"; - private static final String COL_NAME_DUEDATE = "duedate"; + private static final String COL_NAME_DUEDATE = "scheduleddate"; private final ProgramService programService; diff --git a/dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/JdbcEnrollmentAnalyticsManager.java b/dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/JdbcEnrollmentAnalyticsManager.java index 672bfdf83ce6..267f704f6e23 100644 --- a/dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/JdbcEnrollmentAnalyticsManager.java +++ b/dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/JdbcEnrollmentAnalyticsManager.java @@ -553,7 +553,7 @@ protected String getColumn(QueryItem item, String suffix) { && !item.getRepeatableStageParams().simpleStageValueExpected()) { return "(select json_agg(t1) from (select " + colName - + ", incidentdate, duedate, executiondate " + + ", incidentdate, scheduleddate, executiondate " + " from " + eventTableName + " where " diff --git a/dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/JdbcEventAnalyticsManager.java b/dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/JdbcEventAnalyticsManager.java index 710eab35adf6..de170a7b5a4b 100644 --- a/dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/JdbcEventAnalyticsManager.java +++ b/dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/JdbcEventAnalyticsManager.java @@ -324,7 +324,7 @@ protected String getSelectClause(EventQueryParams params) { "createdbydisplayname", "lastupdatedbydisplayname", "lastupdated", - "duedate"); + "scheduleddate"); if (params.getProgram().isRegistration()) { cols.add("enrollmentdate", "incidentdate", "tei", "pi"); diff --git a/dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcEventAnalyticsTableManager.java b/dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcEventAnalyticsTableManager.java index 9afd7d577b8b..3c3b1e515992 100644 --- a/dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcEventAnalyticsTableManager.java +++ b/dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcEventAnalyticsTableManager.java @@ -142,7 +142,7 @@ public JdbcEventAnalyticsTableManager( new AnalyticsTableColumn(quote("enrollmentdate"), TIMESTAMP, "pi.enrollmentdate"), new AnalyticsTableColumn(quote("incidentdate"), TIMESTAMP, "pi.incidentdate"), new AnalyticsTableColumn(quote("executiondate"), TIMESTAMP, "psi.executiondate"), - new AnalyticsTableColumn(quote("duedate"), TIMESTAMP, "psi.duedate"), + new AnalyticsTableColumn(quote("scheduleddate"), TIMESTAMP, "psi.scheduleddate"), new AnalyticsTableColumn(quote("completeddate"), TIMESTAMP, "psi.completeddate"), /* @@ -262,7 +262,7 @@ public List getAnalyticsTables(AnalyticsTableUpdateParams params * status */ static String getDateLinkedToStatus() { - return "CASE WHEN 'SCHEDULE' = psi.status THEN psi.duedate ELSE psi.executiondate END"; + return "CASE WHEN 'SCHEDULE' = psi.status THEN psi.scheduleddate ELSE psi.executiondate END"; } /** diff --git a/dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcTeiEventsAnalyticsTableManager.java b/dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcTeiEventsAnalyticsTableManager.java index 58d36e1d063e..608cb0f1d7f5 100644 --- a/dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcTeiEventsAnalyticsTableManager.java +++ b/dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcTeiEventsAnalyticsTableManager.java @@ -137,7 +137,7 @@ public JdbcTeiEventsAnalyticsTableManager( new AnalyticsTableColumn(quote("executiondate"), TIMESTAMP, "psi.executiondate"), new AnalyticsTableColumn(quote("lastupdated"), TIMESTAMP, "psi.lastupdated"), new AnalyticsTableColumn(quote("created"), TIMESTAMP, "psi.created"), - new AnalyticsTableColumn(quote("duedate"), TIMESTAMP, "psi.duedate"), + new AnalyticsTableColumn(quote("scheduleddate"), TIMESTAMP, "psi.scheduleddate"), new AnalyticsTableColumn(quote("status"), VARCHAR_50, "psi.status"), new AnalyticsTableColumn(quote("psigeometry"), GEOMETRY, "psi.geometry") .withIndexType(GIST), diff --git a/dhis-2/dhis-services/dhis-service-analytics/src/test/java/org/hisp/dhis/analytics/event/data/EnrollmentAnalyticsManagerTest.java b/dhis-2/dhis-services/dhis-service-analytics/src/test/java/org/hisp/dhis/analytics/event/data/EnrollmentAnalyticsManagerTest.java index 7104b15d3f62..c8a2d60e945f 100644 --- a/dhis-2/dhis-services/dhis-service-analytics/src/test/java/org/hisp/dhis/analytics/event/data/EnrollmentAnalyticsManagerTest.java +++ b/dhis-2/dhis-services/dhis-service-analytics/src/test/java/org/hisp/dhis/analytics/event/data/EnrollmentAnalyticsManagerTest.java @@ -744,7 +744,7 @@ void verifyGetColumnOfTypeCoordinateAndWithProgramStagesAndParamsWithReferenceTy is( "(select json_agg(t1) from (select \"" + dataElementA.getUid() - + "\", incidentdate, duedate, executiondate from analytics_event_" + + "\", incidentdate, scheduleddate, executiondate from analytics_event_" + programB.getUid() + " where analytics_event_" + programB.getUid() diff --git a/dhis-2/dhis-services/dhis-service-analytics/src/test/java/org/hisp/dhis/analytics/event/data/EventAnalyticsManagerTest.java b/dhis-2/dhis-services/dhis-service-analytics/src/test/java/org/hisp/dhis/analytics/event/data/EventAnalyticsManagerTest.java index 0547659a422c..0e53b0b1d3c6 100644 --- a/dhis-2/dhis-services/dhis-service-analytics/src/test/java/org/hisp/dhis/analytics/event/data/EventAnalyticsManagerTest.java +++ b/dhis-2/dhis-services/dhis-service-analytics/src/test/java/org/hisp/dhis/analytics/event/data/EventAnalyticsManagerTest.java @@ -119,7 +119,7 @@ class EventAnalyticsManagerTest extends EventAnalyticsTest { + "createdbydisplayname" + "," + "lastupdatedbydisplayname" - + ",lastupdated,duedate,enrollmentdate,incidentdate,tei,pi,ST_AsGeoJSON(coalesce(ax.\"psigeometry\",ax.\"pigeometry\",ax.\"teigeometry\",ax.\"ougeometry\"), 6) as geometry,longitude,latitude,ouname,ounamehierarchy," + + ",lastupdated,scheduleddate,enrollmentdate,incidentdate,tei,pi,ST_AsGeoJSON(coalesce(ax.\"psigeometry\",ax.\"pigeometry\",ax.\"teigeometry\",ax.\"ougeometry\"), 6) as geometry,longitude,latitude,ouname,ounamehierarchy," + "oucode,pistatus,psistatus"; @BeforeEach @@ -157,7 +157,7 @@ void verifyGetEventSqlWithProgramWithNoRegistration() { + "createdbydisplayname" + "," + "lastupdatedbydisplayname" - + ",lastupdated,duedate,ST_AsGeoJSON(coalesce(ax.\"psigeometry\",ax.\"pigeometry\",ax.\"teigeometry\",ax.\"ougeometry\"), 6) as geometry," + + ",lastupdated,scheduleddate,ST_AsGeoJSON(coalesce(ax.\"psigeometry\",ax.\"pigeometry\",ax.\"teigeometry\",ax.\"ougeometry\"), 6) as geometry," + "longitude,latitude,ouname,ounamehierarchy,oucode,pistatus,psistatus,ax.\"quarterly\",ax.\"ou\" from " + getTable(programA.getUid()) + " as ax where (ax.\"quarterly\" in ('2000Q1') ) and ax.\"uidlevel1\" in ('ouabcdefghA') limit 101"; @@ -218,7 +218,7 @@ void verifyGetEventSqlWithOrgUnitTypeDataElement() { + "createdbydisplayname" + "," + "lastupdatedbydisplayname" - + ",lastupdated,duedate,enrollmentdate," + + ",lastupdated,scheduleddate,enrollmentdate," + "incidentdate,tei,pi,ST_AsGeoJSON(coalesce(ax.\"psigeometry\",ax.\"pigeometry\",ax.\"teigeometry\",ax.\"ougeometry\"), 6) as geometry,longitude,latitude,ouname,ounamehierarchy,oucode,pistatus," + "psistatus,ax.\"quarterly\",ax.\"ou\",\"" + dataElement.getUid() @@ -334,7 +334,7 @@ void verifyGetEventsWithScheduledDateTimeFieldParam() { String expected = "ps.\"quarterly\",ax.\"ou\" from " + getTable(programA.getUid()) - + " as ax left join _dateperiodstructure as ps on cast(ax.\"duedate\" as date) = ps.\"dateperiod\" " + + " as ax left join _dateperiodstructure as ps on cast(ax.\"scheduleddate\" as date) = ps.\"dateperiod\" " + "where (ps.\"quarterly\" in ('2000Q1') ) and ax.\"uidlevel1\" " + "in ('ouabcdefghA') and pistatus in ('ACTIVE','COMPLETED') limit 101"; diff --git a/dhis-2/dhis-services/dhis-service-analytics/src/test/java/org/hisp/dhis/analytics/event/data/TimeFieldSqlRendererTest.java b/dhis-2/dhis-services/dhis-service-analytics/src/test/java/org/hisp/dhis/analytics/event/data/TimeFieldSqlRendererTest.java index 0ed496d0e458..359ba86e483a 100644 --- a/dhis-2/dhis-services/dhis-service-analytics/src/test/java/org/hisp/dhis/analytics/event/data/TimeFieldSqlRendererTest.java +++ b/dhis-2/dhis-services/dhis-service-analytics/src/test/java/org/hisp/dhis/analytics/event/data/TimeFieldSqlRendererTest.java @@ -201,8 +201,8 @@ void testRenderEnrollmentTimeFieldSqlWhenNoContinuousMonthlyPeriodWithTimeFieldA params = new EventQueryParams.Builder(params).withStartEndDatesForPeriods().build(); assertEquals( - "((ax.\"duedate\" >= '2022-03-01' and ax.\"duedate\" < '2022-04-01') " - + "or (ax.\"duedate\" >= '2022-09-01' and ax.\"duedate\" < '2022-10-01')) ", + "((ax.\"scheduleddate\" >= '2022-03-01' and ax.\"scheduleddate\" < '2022-04-01') " + + "or (ax.\"scheduleddate\" >= '2022-09-01' and ax.\"scheduleddate\" < '2022-10-01')) ", timeFieldSqlRenderer.renderPeriodTimeFieldSql(params)); } diff --git a/dhis-2/dhis-services/dhis-service-analytics/src/test/java/org/hisp/dhis/analytics/table/JdbcEventAnalyticsTableManagerTest.java b/dhis-2/dhis-services/dhis-service-analytics/src/test/java/org/hisp/dhis/analytics/table/JdbcEventAnalyticsTableManagerTest.java index 078af8dd771e..aaa51c85c446 100644 --- a/dhis-2/dhis-services/dhis-service-analytics/src/test/java/org/hisp/dhis/analytics/table/JdbcEventAnalyticsTableManagerTest.java +++ b/dhis-2/dhis-services/dhis-service-analytics/src/test/java/org/hisp/dhis/analytics/table/JdbcEventAnalyticsTableManagerTest.java @@ -976,6 +976,6 @@ private String getYearQueryForCurrentYear( } private String getDateLinkedToStatus() { - return "CASE WHEN 'SCHEDULE' = psi.status THEN psi.duedate ELSE psi.executiondate END"; + return "CASE WHEN 'SCHEDULE' = psi.status THEN psi.scheduleddate ELSE psi.executiondate END"; } } diff --git a/dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/period/PeriodDataProvider.java b/dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/period/PeriodDataProvider.java index 9d87831c4a20..cfe7edd007af 100644 --- a/dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/period/PeriodDataProvider.java +++ b/dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/period/PeriodDataProvider.java @@ -118,7 +118,7 @@ void addSafetyBuffer(List years, int buffer) { */ private List fetchAvailableYears() { String dueDateOrExecutionDate = - "(case when 'SCHEDULE' = ev.status then ev.duedate else ev.executiondate end)"; + "(case when 'SCHEDULE' = ev.status then ev.scheduleddate else ev.executiondate end)"; String sql = "( select distinct (extract(year from pe.startdate)) as datayear from period pe )" diff --git a/dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/program/variable/vDueDate.java b/dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/program/variable/vDueDate.java index e46a683455a9..e2cb1b986602 100644 --- a/dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/program/variable/vDueDate.java +++ b/dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/program/variable/vDueDate.java @@ -42,14 +42,14 @@ public Object getSql(CommonExpressionVisitor visitor) { ProgramExpressionParams params = visitor.getProgParams(); if (AnalyticsType.EVENT == params.getProgramIndicator().getAnalyticsType()) { - return "duedate"; + return "scheduleddate"; } return visitor .getStatementBuilder() .getProgramIndicatorEventColumnSql( null, - "duedate", + "scheduleddate", params.getReportingStartDate(), params.getReportingEndDate(), params.getProgramIndicator()); diff --git a/dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/program/variable/vScheduledDate.java b/dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/program/variable/vScheduledDate.java index 073a0e9969c8..ad32b9ddd6db 100644 --- a/dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/program/variable/vScheduledDate.java +++ b/dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/program/variable/vScheduledDate.java @@ -47,7 +47,7 @@ public Object getSql(CommonExpressionVisitor visitor) { .getStatementBuilder() .getProgramIndicatorEventColumnSql( null, - "duedate", + "scheduleddate", params.getReportingStartDate(), params.getReportingEndDate(), params.getProgramIndicator()); @@ -55,7 +55,7 @@ public Object getSql(CommonExpressionVisitor visitor) { return maybeAppendEventStatusFilterIntoWhere(sqlStatement); } - return "duedate"; + return "scheduleddate"; } private String maybeAppendEventStatusFilterIntoWhere(String sqlStatement) { diff --git a/dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/trackedentity/hibernate/HibernateTrackedEntityStore.java b/dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/trackedentity/hibernate/HibernateTrackedEntityStore.java index ed5f6f24f49e..25c2d934d30b 100644 --- a/dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/trackedentity/hibernate/HibernateTrackedEntityStore.java +++ b/dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/trackedentity/hibernate/HibernateTrackedEntityStore.java @@ -116,7 +116,7 @@ public class HibernateTrackedEntityStore extends SoftDeleteHibernateObjectStore< private static final String EV_EXECUTIONDATE = "EV.executiondate"; - private static final String EV_DUEDATE = "EV.duedate"; + private static final String EV_DUEDATE = "EV.scheduleddate"; private static final String IS_NULL = "IS NULL"; @@ -1035,7 +1035,7 @@ private String getFromSubQueryEvent(TrackedEntityQueryParams params) { .append(SPACE) .append(IS_NULL) .append(whereHlp.whereAnd()) - .append("date(now()) <= date(EV.duedate) "); + .append("date(now()) <= date(EV.scheduleddate) "); } else if (params.isEventStatus(EventStatus.OVERDUE)) { events .append(getQueryDateConditionBetween(whereHlp, EV_DUEDATE, start, end)) @@ -1048,7 +1048,7 @@ private String getFromSubQueryEvent(TrackedEntityQueryParams params) { .append(SPACE) .append(IS_NULL) .append(whereHlp.whereAnd()) - .append("date(now()) > date(EV.duedate) "); + .append("date(now()) > date(EV.scheduleddate) "); } else if (params.isEventStatus(EventStatus.SKIPPED)) { events .append(getQueryDateConditionBetween(whereHlp, EV_DUEDATE, start, end)) diff --git a/dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/program/hibernate/Enrollment.hbm.xml b/dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/program/hibernate/Enrollment.hbm.xml index be60fd779475..010cb4d4bab6 100644 --- a/dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/program/hibernate/Enrollment.hbm.xml +++ b/dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/program/hibernate/Enrollment.hbm.xml @@ -59,7 +59,7 @@ - + diff --git a/dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/program/hibernate/Event.hbm.xml b/dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/program/hibernate/Event.hbm.xml index 67e24a8085a4..41d76601455a 100644 --- a/dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/program/hibernate/Event.hbm.xml +++ b/dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/program/hibernate/Event.hbm.xml @@ -44,7 +44,7 @@ - + diff --git a/dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramSqlGeneratorVariablesTest.java b/dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramSqlGeneratorVariablesTest.java index ef3aa361fd7d..37fe6b97aab2 100644 --- a/dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramSqlGeneratorVariablesTest.java +++ b/dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramSqlGeneratorVariablesTest.java @@ -159,7 +159,7 @@ void testCurrentDateForEvent() { @Test void testDueDate() { String sql = castString(test("V{due_date}", new DefaultLiteral(), eventIndicator)); - assertThat(sql, is("duedate")); + assertThat(sql, is("scheduleddate")); } @Test diff --git a/dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/deprecated/tracker/event/JdbcEventStore.java b/dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/deprecated/tracker/event/JdbcEventStore.java index ea762db34bf8..fe2d09c35b67 100644 --- a/dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/deprecated/tracker/event/JdbcEventStore.java +++ b/dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/deprecated/tracker/event/JdbcEventStore.java @@ -1029,7 +1029,7 @@ private String getEventSelectQuery( .append( "psi.eventid as psi_id, psi.status as psi_status, psi.executiondate as psi_executiondate, ") .append( - "psi.eventdatavalues as psi_eventdatavalues, psi.duedate as psi_duedate, psi.completedby as psi_completedby, psi.storedby as psi_storedby, ") + "psi.eventdatavalues as psi_eventdatavalues, psi.scheduleddate as psi_duedate, psi.completedby as psi_completedby, psi.storedby as psi_storedby, ") .append( "psi.created as psi_created, psi.createdbyuserinfo as psi_createdbyuserinfo, psi.lastupdated as psi_lastupdated, psi.lastupdatedbyuserinfo as psi_lastupdatedbyuserinfo, ") .append("psi.completeddate as psi_completeddate, psi.deleted as psi_deleted, ") @@ -1185,7 +1185,7 @@ private StringBuilder getFromWhereClause( fromBuilder .append(hlp.whereAnd()) - .append(" (psi.duedate is not null and psi.duedate >= :startDueDate ) "); + .append(" (psi.scheduleddate is not null and psi.scheduleddate >= :startDueDate ) "); } if (params.getDueDateEnd() != null) { @@ -1193,7 +1193,7 @@ private StringBuilder getFromWhereClause( fromBuilder .append(hlp.whereAnd()) - .append(" (psi.duedate is not null and psi.duedate <= :endDueDate ) "); + .append(" (psi.scheduleddate is not null and psi.scheduleddate <= :endDueDate ) "); } if (params.getFollowUp() != null) { @@ -1242,7 +1242,7 @@ private StringBuilder getFromWhereClause( .append(hlp.whereAnd()) .append(" (psi.executiondate >= ") .append(":startDate") - .append(" or (psi.executiondate is null and psi.duedate >= ") + .append(" or (psi.executiondate is null and psi.scheduleddate >= ") .append(":startDate") .append(" )) "); } @@ -1254,7 +1254,7 @@ private StringBuilder getFromWhereClause( .append(hlp.whereAnd()) .append(" (psi.executiondate < ") .append(":endDate") - .append(" or (psi.executiondate is null and psi.duedate < ") + .append(" or (psi.executiondate is null and psi.scheduleddate < ") .append(":endDate") .append(" )) "); } @@ -1531,7 +1531,7 @@ private String getFromWhereClause( .append(hlp.whereAnd()) .append(" (psi.executiondate >= ") .append(":startDate") - .append(" or (psi.executiondate is null and psi.duedate >= ") + .append(" or (psi.executiondate is null and psi.scheduleddate >= ") .append(":startDate") .append(" )) "); } @@ -1543,7 +1543,7 @@ private String getFromWhereClause( .append(hlp.whereAnd()) .append(" (psi.executiondate < ") .append(":endDate ") - .append(" or (psi.executiondate is null and psi.duedate < ") + .append(" or (psi.executiondate is null and psi.scheduleddate < ") .append(":endDate") .append(" )) "); } @@ -1568,7 +1568,7 @@ private String getFromWhereClause( sqlBuilder .append(hlp.whereAnd()) - .append(" psi.duedate is not null and psi.duedate >= ") + .append(" psi.scheduleddate is not null and psi.scheduleddate >= ") .append(":dueDate") .append(" "); } @@ -1578,7 +1578,7 @@ private String getFromWhereClause( sqlBuilder .append(hlp.whereAnd()) - .append(" psi.duedate is not null and psi.duedate <= ") + .append(" psi.scheduleddate is not null and psi.scheduleddate <= ") .append(":endDueDate") .append(" "); } @@ -1637,7 +1637,7 @@ private String eventStatusSql( stringBuilder .append(hlp.whereAnd()) - .append(" date(now()) > date(psi.duedate) and psi.status = ") + .append(" date(now()) > date(psi.scheduleddate) and psi.status = ") .append(":" + PSI_STATUS) .append(" "); } else { diff --git a/dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/deprecated/tracker/importer/context/ProgramStageInstanceSupplier.java b/dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/deprecated/tracker/importer/context/ProgramStageInstanceSupplier.java index fc972b0bedca..0a3590ea4eeb 100644 --- a/dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/deprecated/tracker/importer/context/ProgramStageInstanceSupplier.java +++ b/dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/deprecated/tracker/importer/context/ProgramStageInstanceSupplier.java @@ -91,7 +91,7 @@ public Map get( final String sql = "select psi.enrollmentid, psi.programstageid, psi.eventid, " - + "psi.uid, psi.status, psi.deleted, psi.eventdatavalues, psi.duedate, psi.executiondate, " + + "psi.uid, psi.status, psi.deleted, psi.eventdatavalues, psi.scheduleddate, psi.executiondate, " + "psi.completeddate, psi.attributeoptioncomboid, psi.geometry, " + "ou.organisationunitid, ou.uid, ou.code, ou.name, psi.attributeoptioncomboid, c.uid as coc_uid " + "from event psi join organisationunit ou on psi.organisationunitid = ou.organisationunitid " @@ -116,7 +116,7 @@ public Map get( psi.setDeleted(rs.getBoolean("deleted")); psi.setProgramStage(getProgramStage(importOptions, rs.getLong("programstageid"))); psi.setOrganisationUnit(getOu(rs)); - psi.setScheduledDate(rs.getTimestamp("duedate")); + psi.setScheduledDate(rs.getTimestamp("scheduleddate")); psi.setOccurredDate(rs.getTimestamp("executiondate")); psi.setCompletedDate(rs.getTimestamp("completeddate")); psi.setAttributeOptionCombo(getCatOptionCombo(rs)); diff --git a/dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/deprecated/tracker/trackedentity/store/query/EventQuery.java b/dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/deprecated/tracker/trackedentity/store/query/EventQuery.java index e7d23c56931e..69050674cd78 100644 --- a/dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/deprecated/tracker/trackedentity/store/query/EventQuery.java +++ b/dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/deprecated/tracker/trackedentity/store/query/EventQuery.java @@ -50,7 +50,7 @@ public enum COLUMNS { UID(new TableColumn("psi", "uid")), STATUS(new TableColumn("psi", "status")), EXECUTION_DATE(new TableColumn("psi", "executiondate")), - DUE_DATE(new TableColumn("psi", "duedate")), + DUE_DATE(new TableColumn("psi", "scheduleddate")), STOREDBY(new TableColumn("psi", "storedby")), COMPLETEDBY(new TableColumn("psi", "completedby")), COMPLETEDDATE(new TableColumn("psi", "completeddate")), diff --git a/dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/tracker/export/event/EventQuery.java b/dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/tracker/export/event/EventQuery.java index 3e8d6e5e7ddb..c5b14535eeda 100644 --- a/dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/tracker/export/event/EventQuery.java +++ b/dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/tracker/export/event/EventQuery.java @@ -40,7 +40,7 @@ public enum COLUMNS { UID(new TableColumn("ev", "uid")), STATUS(new TableColumn("ev", "status")), EXECUTION_DATE(new TableColumn("ev", "executiondate")), - DUE_DATE(new TableColumn("ev", "duedate")), + SCHEDULED_DATE(new TableColumn("ev", "scheduleddate")), STOREDBY(new TableColumn("ev", "storedby")), COMPLETEDBY(new TableColumn("ev", "completedby")), COMPLETEDDATE(new TableColumn("ev", "completeddate")), diff --git a/dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/tracker/export/event/JdbcEventStore.java b/dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/tracker/export/event/JdbcEventStore.java index 0650e9f9ba25..1a6c81fdc885 100644 --- a/dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/tracker/export/event/JdbcEventStore.java +++ b/dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/tracker/export/event/JdbcEventStore.java @@ -164,7 +164,7 @@ class JdbcEventStore implements EventStore { private static final String COLUMN_EVENT_EXECUTION_DATE = "ev_executiondate"; private static final String COLUMN_ENROLLMENT_FOLLOWUP = "en_followup"; private static final String COLUMN_EVENT_STATUS = "ev_status"; - private static final String COLUMN_EVENT_DUE_DATE = "ev_duedate"; + private static final String COLUMN_EVENT_SCHEDULED_DATE = "ev_scheduleddate"; private static final String COLUMN_EVENT_STORED_BY = "ev_storedby"; private static final String COLUMN_EVENT_LAST_UPDATED_BY = "ev_lastupdatedbyuserinfo"; private static final String COLUMN_EVENT_CREATED_BY = "ev_createdbyuserinfo"; @@ -201,7 +201,7 @@ class JdbcEventStore implements EventStore { entry("occurredDate", COLUMN_EVENT_EXECUTION_DATE), entry("enrollment.followUp", COLUMN_ENROLLMENT_FOLLOWUP), entry("status", COLUMN_EVENT_STATUS), - entry("scheduledDate", COLUMN_EVENT_DUE_DATE), + entry("scheduledDate", COLUMN_EVENT_SCHEDULED_DATE), entry("storedBy", COLUMN_EVENT_STORED_BY), entry("lastUpdatedBy", COLUMN_EVENT_LAST_UPDATED_BY), entry("createdBy", COLUMN_EVENT_CREATED_BY), @@ -326,7 +326,7 @@ private List fetchEvents(EventQueryParams queryParams, PageParams pagePar event.setAttributeOptionCombo(coc); event.setStoredBy(resultSet.getString(COLUMN_EVENT_STORED_BY)); - event.setScheduledDate(resultSet.getTimestamp(COLUMN_EVENT_DUE_DATE)); + event.setScheduledDate(resultSet.getTimestamp(COLUMN_EVENT_SCHEDULED_DATE)); event.setOccurredDate(resultSet.getTimestamp(COLUMN_EVENT_EXECUTION_DATE)); event.setCreated(resultSet.getTimestamp(COLUMN_EVENT_CREATED)); event.setCreatedByUserInfo( @@ -736,8 +736,8 @@ private String getEventSelectQuery( .append(", ev.executiondate as ") .append(COLUMN_EVENT_EXECUTION_DATE) .append(", ") - .append("ev.eventdatavalues as ev_eventdatavalues, ev.duedate as ") - .append(COLUMN_EVENT_DUE_DATE) + .append("ev.eventdatavalues as ev_eventdatavalues, ev.scheduleddate as ") + .append(COLUMN_EVENT_SCHEDULED_DATE) .append(", ev.completedby as ") .append(COLUMN_EVENT_COMPLETED_BY) .append(", ev.storedby as ") @@ -925,19 +925,20 @@ private StringBuilder getFromWhereClause( if (params.getScheduleAtStartDate() != null) { mapSqlParameterSource.addValue( - "startDueDate", params.getScheduleAtStartDate(), Types.TIMESTAMP); + "startScheduledDate", params.getScheduleAtStartDate(), Types.TIMESTAMP); fromBuilder .append(hlp.whereAnd()) - .append(" (ev.duedate is not null and ev.duedate >= :startDueDate ) "); + .append(" (ev.scheduleddate is not null and ev.scheduleddate >= :startScheduledDate ) "); } if (params.getScheduleAtEndDate() != null) { - mapSqlParameterSource.addValue("endDueDate", params.getScheduleAtEndDate(), Types.TIMESTAMP); + mapSqlParameterSource.addValue( + "endScheduledDate", params.getScheduleAtEndDate(), Types.TIMESTAMP); fromBuilder .append(hlp.whereAnd()) - .append(" (ev.duedate is not null and ev.duedate <= :endDueDate ) "); + .append(" (ev.scheduleddate is not null and ev.scheduleddate <= :endScheduledDate ) "); } if (params.getFollowUp() != null) { @@ -986,7 +987,7 @@ private StringBuilder getFromWhereClause( .append(hlp.whereAnd()) .append(" (ev.executiondate >= ") .append(":startDate") - .append(" or (ev.executiondate is null and ev.duedate >= ") + .append(" or (ev.executiondate is null and ev.scheduleddate >= ") .append(":startDate") .append(" )) "); } @@ -999,7 +1000,7 @@ private StringBuilder getFromWhereClause( .append(hlp.whereAnd()) .append(" (ev.executiondate < ") .append(":endDate") - .append(" or (ev.executiondate is null and ev.duedate < ") + .append(" or (ev.executiondate is null and ev.scheduleddate < ") .append(":endDate") .append(" )) "); } @@ -1377,7 +1378,7 @@ private String eventStatusSql( stringBuilder .append(hlp.whereAnd()) - .append(" date(now()) > date(ev.duedate) and ev.status = ") + .append(" date(now()) > date(ev.scheduleddate) and ev.status = ") .append(":" + COLUMN_EVENT_STATUS) .append(" "); } else { diff --git a/dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/tracker/export/trackedentity/HibernateTrackedEntityStore.java b/dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/tracker/export/trackedentity/HibernateTrackedEntityStore.java index d35b691346d2..3674f00c448c 100644 --- a/dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/tracker/export/trackedentity/HibernateTrackedEntityStore.java +++ b/dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/tracker/export/trackedentity/HibernateTrackedEntityStore.java @@ -98,7 +98,7 @@ class HibernateTrackedEntityStore extends SoftDeleteHibernateObjectStore date(EV.duedate) "); + .append("date(now()) > date(EV.scheduleddate) "); } else if (params.isEventStatus(EventStatus.SKIPPED)) { events - .append(getQueryDateConditionBetween(whereHlp, EV_DUEDATE, start, end)) + .append(getQueryDateConditionBetween(whereHlp, EV_SCHEDULEDDATE, start, end)) .append(whereHlp.whereAnd()) .append(EV_STATUS) .append(EQUALS) diff --git a/dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/tracker/export/trackedentity/aggregates/mapper/EventRowCallbackHandler.java b/dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/tracker/export/trackedentity/aggregates/mapper/EventRowCallbackHandler.java index 53d4e128a652..2e1c96decbd2 100644 --- a/dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/tracker/export/trackedentity/aggregates/mapper/EventRowCallbackHandler.java +++ b/dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/tracker/export/trackedentity/aggregates/mapper/EventRowCallbackHandler.java @@ -69,7 +69,7 @@ private Event getEvent(ResultSet rs) throws SQLException { event.setStatus(EventStatus.valueOf(rs.getString(EventQuery.getColumnName(COLUMNS.STATUS)))); event.setOccurredDate(rs.getTimestamp(EventQuery.getColumnName(COLUMNS.EXECUTION_DATE))); - event.setScheduledDate(rs.getTimestamp(EventQuery.getColumnName(COLUMNS.DUE_DATE))); + event.setScheduledDate(rs.getTimestamp(EventQuery.getColumnName(COLUMNS.SCHEDULED_DATE))); event.setStoredBy(rs.getString(EventQuery.getColumnName(COLUMNS.STOREDBY))); event.setCompletedBy(rs.getString(EventQuery.getColumnName(COLUMNS.COMPLETEDBY))); event.setCompletedDate(rs.getTimestamp(EventQuery.getColumnName(COLUMNS.COMPLETEDDATE))); diff --git a/dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/tracker/export/trackedentity/aggregates/query/EventQuery.java b/dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/tracker/export/trackedentity/aggregates/query/EventQuery.java index d1b2daf90705..0ee147c615de 100644 --- a/dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/tracker/export/trackedentity/aggregates/query/EventQuery.java +++ b/dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/tracker/export/trackedentity/aggregates/query/EventQuery.java @@ -46,7 +46,7 @@ public enum COLUMNS { UID(new TableColumn("ev", "uid")), STATUS(new TableColumn("ev", "status")), EXECUTION_DATE(new TableColumn("ev", "executiondate")), - DUE_DATE(new TableColumn("ev", "duedate")), + SCHEDULED_DATE(new TableColumn("ev", "scheduleddate")), STOREDBY(new TableColumn("ev", "storedby")), COMPLETEDBY(new TableColumn("ev", "completedby")), COMPLETEDDATE(new TableColumn("ev", "completeddate")), diff --git a/dhis-2/dhis-support/dhis-support-db-migration/src/main/resources/org/hisp/dhis/db/migration/2.41/V2_41_35__RenameDueDateToScheduledDateInEventTable.sql b/dhis-2/dhis-support/dhis-support-db-migration/src/main/resources/org/hisp/dhis/db/migration/2.41/V2_41_35__RenameDueDateToScheduledDateInEventTable.sql new file mode 100644 index 000000000000..14af6e85b71b --- /dev/null +++ b/dhis-2/dhis-support/dhis-support-db-migration/src/main/resources/org/hisp/dhis/db/migration/2.41/V2_41_35__RenameDueDateToScheduledDateInEventTable.sql @@ -0,0 +1,11 @@ +-- rename duedate in event + +do $$ +begin + if exists(select 1 + from information_schema.columns + where table_schema != 'information_schema' and table_name='event' and column_name='duedate') + then +alter table event rename column duedate to scheduleddate; +end if; +end $$; \ No newline at end of file diff --git a/dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/statementbuilder/AbstractStatementBuilder.java b/dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/statementbuilder/AbstractStatementBuilder.java index 0542f74bc987..6b201cacbc3e 100644 --- a/dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/statementbuilder/AbstractStatementBuilder.java +++ b/dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/statementbuilder/AbstractStatementBuilder.java @@ -557,9 +557,10 @@ private String getBoundaryColumn( * COMPLETED status). * *

Now, we also need to support SCHEDULE status for events. For this reason this method - * compares the status. If the column is "duedate", it means we only want SCHEDULE status, so we - * return "duedate". In all other cases we assume any other status different from SCHEDULE (which - * makes it backward compatible). In this case the logic will remain based on "executiondate". + * compares the status. If the column is "scheduleddate", it means we only want SCHEDULE status, + * so we return "scheduleddate". In all other cases we assume any other status different from + * SCHEDULE (which makes it backward compatible). In this case the logic will remain based on + * "executiondate". * * @param column * @return the backwards compatible column diff --git a/dhis-2/dhis-test-integration/src/test/java/org/hisp/dhis/program/ProgramIndicatorServiceVariableTest.java b/dhis-2/dhis-test-integration/src/test/java/org/hisp/dhis/program/ProgramIndicatorServiceVariableTest.java index 8efc0da25ada..e1b4d54040bf 100644 --- a/dhis-2/dhis-test-integration/src/test/java/org/hisp/dhis/program/ProgramIndicatorServiceVariableTest.java +++ b/dhis-2/dhis-test-integration/src/test/java/org/hisp/dhis/program/ProgramIndicatorServiceVariableTest.java @@ -138,9 +138,9 @@ void testCurrentDate() { @Test void testDueDate() { - assertEquals("duedate", getSql("V{due_date}")); + assertEquals("scheduleddate", getSql("V{due_date}")); assertEquals( - "(select duedate from analytics_event_Program000A where analytics_event_Program000A.pi = ax.pi and duedate is not null and executiondate < cast( '2020-02-01' as date ) and executiondate >= cast( '2020-01-01' as date ) order by executiondate desc limit 1 )", + "(select scheduleddate from analytics_event_Program000A where analytics_event_Program000A.pi = ax.pi and scheduleddate is not null and executiondate < cast( '2020-02-01' as date ) and executiondate >= cast( '2020-01-01' as date ) order by executiondate desc limit 1 )", getSqlEnrollment("V{due_date}")); } @@ -211,9 +211,9 @@ void testEventDate() { @Test void testScheduledDate() { - assertEquals("duedate", getSql("V{scheduled_date}")); + assertEquals("scheduleddate", getSql("V{scheduled_date}")); assertEquals( - "(select duedate from analytics_event_Program000A where analytics_event_Program000A.pi = ax.pi and duedate is not null and executiondate < cast( '2020-02-01' as date ) and executiondate >= cast( '2020-01-01' as date ) and psistatus = 'SCHEDULE' order by executiondate desc limit 1 )", + "(select scheduleddate from analytics_event_Program000A where analytics_event_Program000A.pi = ax.pi and scheduleddate is not null and executiondate < cast( '2020-02-01' as date ) and executiondate >= cast( '2020-01-01' as date ) and psistatus = 'SCHEDULE' order by executiondate desc limit 1 )", getSqlEnrollment("V{scheduled_date}")); } diff --git a/dhis-2/dhis-test-integration/src/test/resources/tracker/event_and_enrollment.json b/dhis-2/dhis-test-integration/src/test/resources/tracker/event_and_enrollment.json index 4c8d09ca4b2a..4aebaaca982d 100644 --- a/dhis-2/dhis-test-integration/src/test/resources/tracker/event_and_enrollment.json +++ b/dhis-2/dhis-test-integration/src/test/resources/tracker/event_and_enrollment.json @@ -311,7 +311,7 @@ "orgUnitName": "Mbokie CHP", "enrolledAt": "2021-02-28T12:05:00.000", "occurredAt": "2021-02-28T12:05:00.000", - "dueDate": "2021-02-28T12:05:00.000", + "scheduledAt": "2021-02-28T12:05:00.000", "followUp": false, "deleted": false, "events": [], @@ -335,7 +335,7 @@ "orgUnitName": "Mbokie CHP", "enrolledAt": "2021-03-28T12:05:00.000", "occurredAt": "2021-03-28T12:05:00.000", - "dueDate": "2021-02-28T12:05:00.000", + "scheduledAt": "2021-02-28T12:05:00.000", "followUp": false, "deleted": false, "events": [], @@ -359,7 +359,7 @@ "orgUnitName": "test-orgunit-2", "enrolledAt": "2021-02-28T12:05:00.000", "occurredAt": "2021-02-28T12:05:00.000", - "dueDate": "2021-02-28T12:05:00.000", + "scheduledAt": "2021-02-28T12:05:00.000", "followUp": false, "deleted": false, "events": [], @@ -383,7 +383,7 @@ "orgUnitName": "test-orgunit-2", "enrolledAt": "2021-02-28T12:05:00.000", "occurredAt": "2021-02-28T12:05:00.000", - "dueDate": "2021-02-28T12:05:00.000", + "scheduledAt": "2021-02-28T12:05:00.000", "followUp": false, "deleted": false, "events": [], @@ -407,7 +407,7 @@ "orgUnitName": "test-orgunit-3", "enrolledAt": "2021-02-28T12:05:00.000", "occurredAt": "2021-02-28T12:05:00.000", - "dueDate": "2021-02-28T12:05:00.000", + "scheduledAt": "2021-02-28T12:05:00.000", "followUp": false, "deleted": false, "events": [], @@ -431,7 +431,7 @@ "orgUnitName": "test-orgunit-3", "enrolledAt": "2021-02-28T12:05:00.000", "occurredAt": "2021-02-28T12:05:00.000", - "dueDate": "2021-02-28T12:05:00.000", + "scheduledAt": "2021-02-28T12:05:00.000", "followUp": false, "deleted": false, "events": [], @@ -455,7 +455,7 @@ "orgUnitName": "test-orgunit-3", "enrolledAt": "2021-02-28T12:05:00.000", "occurredAt": "2021-02-28T12:05:00.000", - "dueDate": "2021-02-28T12:05:00.000", + "scheduledAt": "2021-02-28T12:05:00.000", "followUp": false, "deleted": false, "events": [], @@ -479,7 +479,7 @@ "orgUnitName": "test-orgunit-3", "enrolledAt": "2021-02-28T12:05:00.000", "occurredAt": "2021-02-28T12:05:00.000", - "dueDate": "2021-02-28T12:05:00.000", + "scheduledAt": "2021-02-28T12:05:00.000", "followUp": false, "deleted": false, "events": [],