Skip to content
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

fix: /events?dataElementIdScheme!=UID for shared data elements DHIS2-14968 #19291

Merged
merged 2 commits into from
Nov 26, 2024

Conversation

teleivo
Copy link
Contributor

@teleivo teleivo commented Nov 26, 2024

added in #19153

The issue was that if two events like blZxytttTqq and ehxNi0D67uQ in the SL DB have dataValues for the same data element only one of the events would be exported with that dataValue/element.

Example DB eventdatavalues JSONB column for blZxytttTqq and ehxNi0D67uQ

{
  "D7m8vpzxHDJ": {
    "value": "P+"
  },
  "HmkXnHJxcD1": {
    "value": "Relapse"
  }
}
{
  "D7m8vpzxHDJ": {
    "value": "PE"
  },
  "HmkXnHJxcD1": {
    "value": "Relapse"
  }
}

I made the mistake of assuming I can aggregate event dataValues like we do notes in the ResultSetExtractor of the JdbcEventStore.

That works for notes as they are kept in the set using their note uids which are unique across events. For dataValues/Elements we obviously need a Set scoped per event as multiple events can have a value for the same data element 🤦🏻 .

@teleivo teleivo marked this pull request as ready for review November 26, 2024 13:05
@teleivo teleivo requested a review from a team as a code owner November 26, 2024 13:05
Copy link

sonarcloud bot commented Nov 26, 2024

@teleivo teleivo merged commit 7306b5b into master Nov 26, 2024
15 checks passed
@teleivo teleivo deleted the DHIS2-14968-datavalues branch November 26, 2024 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants