-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add due event fetcher and attribute enrichment #167
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Tracked Entities "owns" all Tracked Entity Attribute Values (Or "attributes"). However, Tracked Entity Attributes are either connected to a Tracked Entity through its Tracked Entity Type or a Program, i.e. Tracked Entity Type Attributes and Tracked Entity Program Attributes. This means that the Tracked Entity Attributes can be located in one of two endpoints: tracker/enrollments as Tracked Entity Program Attributes, or tracker/trackedEntities as Tracked Entity Type attributes. The connector now supports both dhis configurations.
cjmamo
reviewed
Nov 23, 2023
src/main/java/org/hisp/dhis/integration/rapidpro/Application.java
Outdated
Show resolved
Hide resolved
cjmamo
reviewed
Nov 23, 2023
src/main/java/org/hisp/dhis/integration/rapidpro/route/FetchScheduledTrackerEvents.java
Outdated
Show resolved
Hide resolved
cjmamo
reviewed
Nov 23, 2023
src/main/java/org/hisp/dhis/integration/rapidpro/route/FetchScheduledTrackerEvents.java
Outdated
Show resolved
Hide resolved
cjmamo
reviewed
Nov 23, 2023
src/main/java/org/hisp/dhis/integration/rapidpro/route/FetchScheduledTrackerEvents.java
Outdated
Show resolved
Hide resolved
cjmamo
reviewed
Nov 23, 2023
src/main/java/org/hisp/dhis/integration/rapidpro/route/FetchScheduledTrackerEvents.java
Outdated
Show resolved
Hide resolved
cjmamo
reviewed
Nov 23, 2023
src/main/java/org/hisp/dhis/integration/rapidpro/route/FetchScheduledTrackerEvents.java
Outdated
Show resolved
Hide resolved
cjmamo
reviewed
Nov 23, 2023
src/main/java/org/hisp/dhis/integration/rapidpro/route/FetchScheduledTrackerEvents.java
Outdated
Show resolved
Hide resolved
cjmamo
reviewed
Nov 23, 2023
src/main/java/org/hisp/dhis/integration/rapidpro/ProgramStageToFlowMap.java
Outdated
Show resolved
Hide resolved
cjmamo
reviewed
Nov 23, 2023
src/main/java/org/hisp/dhis/integration/rapidpro/util/JsonUtils.java
Outdated
Show resolved
Hide resolved
cjmamo
reviewed
Nov 23, 2023
src/main/java/org/hisp/dhis/integration/rapidpro/route/FetchScheduledTrackerEvents.java
Outdated
Show resolved
Hide resolved
cjmamo
reviewed
Nov 23, 2023
.../org/hisp/dhis/integration/rapidpro/route/FetchScheduledTrackerEventsFunctionalTestCase.java
Outdated
Show resolved
Hide resolved
cjmamo
reviewed
Nov 27, 2023
src/main/java/org/hisp/dhis/integration/rapidpro/Application.java
Outdated
Show resolved
Hide resolved
cjmamo
reviewed
Nov 27, 2023
src/test/java/org/hisp/dhis/integration/rapidpro/ProgramStageToFlowMapTestCase.java
Show resolved
Hide resolved
cjmamo
reviewed
Nov 27, 2023
...java/org/hisp/dhis/integration/rapidpro/aggregationStrategy/AbstractAggregationStrategy.java
Outdated
Show resolved
Hide resolved
cjmamo
reviewed
Nov 27, 2023
...n/java/org/hisp/dhis/integration/rapidpro/route/FetchScheduledTrackerEventsRouteBuilder.java
Outdated
Show resolved
Hide resolved
cjmamo
reviewed
Nov 27, 2023
src/main/java/org/hisp/dhis/integration/rapidpro/processor/SetProgramStagesHeaderProcessor.java
Outdated
Show resolved
Hide resolved
cjmamo
reviewed
Nov 27, 2023
...n/java/org/hisp/dhis/integration/rapidpro/route/FetchScheduledTrackerEventsRouteBuilder.java
Outdated
Show resolved
Hide resolved
cjmamo
reviewed
Nov 27, 2023
...n/java/org/hisp/dhis/integration/rapidpro/route/FetchScheduledTrackerEventsRouteBuilder.java
Outdated
Show resolved
Hide resolved
cjmamo
reviewed
Nov 27, 2023
...n/java/org/hisp/dhis/integration/rapidpro/route/FetchScheduledTrackerEventsRouteBuilder.java
Outdated
Show resolved
Hide resolved
cjmamo
reviewed
Nov 27, 2023
src/main/java/org/hisp/dhis/integration/rapidpro/processor/FetchDueEventsQueryParamSetter.java
Outdated
Show resolved
Hide resolved
cjmamo
reviewed
Nov 27, 2023
...n/java/org/hisp/dhis/integration/rapidpro/route/FetchScheduledTrackerEventsRouteBuilder.java
Outdated
Show resolved
Hide resolved
+ some minor refactoring
cjmamo
approved these changes
Jan 10, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Added:
givenName
andcontactUrn
attributes based on configured code values.Tracked Entities
"owns" allTracked Entity Attribute Values
(Or "attributes" as described in the payload). However,Tracked Entity Attributes
are either connected to aTracked Entity
through itsTracked Entity Type
or aProgram
. Based on the DHIS2 configuration, we can therefore have eitherTracked Entity Type Attributes
orTracked Entity Program Attributes
. The importance of this separation is related to access control and limiting what information the user can see. In the test container, the attributes are configured to be represented asTracked Entity Program Attributes
, but in many real world cases, the attributes areTracked Entity Type Attributes
. The connector now supports both configurations. Not sure if an aggregation strategy is the best approach for this, as I am setting the endpoint for fetching the attributes dynamically (it can either be "tracker/enrollments" forTracked Entity Program Attributes
configuration, or "tracker/trackedEntities" forTracked Entity Type Attributes
configuration)The next step will be to add the route for RapidPro contact creation based on the
contactUrn
, after which the event payload will be transformed to a RapidPro flow and added to a flow queue to be triggered in another route. In my first draft this was all located in the same file, but I will split it into separate files for better maintainability.