Skip to content

Conversation

@otchet-broad
Copy link
Contributor

Addresses

https://broadworkbench.atlassian.net/browse/DT-2542

Summary


Have you read CONTRIBUTING.md lately? If not, do that first.

  • Label PR with a Jira ticket number and include a link to the ticket
  • Label PR with a security risk modifier [no, low, medium, high]
  • PR describes scope of changes
  • Get a minimum of one thumbs worth of review, preferably two if enough team members are available
  • Get PO sign-off for all non-trivial UI or workflow changes
  • Verify all tests go green
  • Test this change deployed correctly and works on dev environment after deployment

@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 5, 2025

@otchet-broad otchet-broad marked this pull request as ready for review December 5, 2025 20:52
@otchet-broad otchet-broad requested a review from a team as a code owner December 5, 2025 20:52
@otchet-broad otchet-broad requested review from fboulnois, kevinmarete and rushtong and removed request for a team December 5, 2025 20:52
consentGroup.setPoa(dataUse.getPopulationOriginsAncestry());
consentGroup.setOtherPrimary(dataUse.getOther());
consentGroup.setNmds(dataUse.getMethodsResearch());
consentGroup.setNmds(Boolean.FALSE.equals(dataUse.getMethodsResearch()) ? true : null);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We invert the incoming value from true to false so it makes sense that we would need to flip it on the way out as well.

Objects.nonNull(group.getNmds()) && Boolean.TRUE.equals(group.getNmds()) ? false : null);

Copy link
Contributor

@fboulnois fboulnois Dec 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(perhaps not in this PR) Since this has caused ongoing confusion, should we add/update/refactor this property so that we don't need to invert the values?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fboulnois - agree with your thoughts here and had similar ones while I was going through the code. I wanted to do the first implementation showing all of the places that were impacted by the original decisions to make sure I didn't miss anything and then come back and refactor this (and migrate the data in the database as well). I also wanted to catch up with @rushtong on this to see if we could better understand the history of why it was treated differently (and kept that way in his earlier refactor).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A bit of history that might help inform a future decision:

  • We originally asked researchers (we do not ask this any longer) if they would be doing methods development research. See the history on DataAccessRequestApplication.js
  • This is the inverse of the DUO term, NMDS: https://github.com/EBISPOT/DUO
  • To store those in a Data Use object, we capture these as "methodsResearch"
  • We have internal business logic (see the V4 algorithm) in ontology that matches the research purpose on this field but does NOT take the corresponding NMDS dataset value into consideration (see code reference in DataUseMatchCasesV3.java).
  • Since we don't collect this in the DAR, and it isn't evaluated on the Dataset for matching, I think this field is entirely moot.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we fix this with this PR and add a ticket to go back to product to see if we can remove this from our codebase entirely?

Copy link
Contributor

@fboulnois fboulnois left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See below:

consentGroup.setPoa(dataUse.getPopulationOriginsAncestry());
consentGroup.setOtherPrimary(dataUse.getOther());
consentGroup.setNmds(dataUse.getMethodsResearch());
consentGroup.setNmds(Boolean.FALSE.equals(dataUse.getMethodsResearch()) ? true : null);
Copy link
Contributor

@fboulnois fboulnois Dec 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(perhaps not in this PR) Since this has caused ongoing confusion, should we add/update/refactor this property so that we don't need to invert the values?

Copy link
Contributor

@rushtong rushtong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a confusing field, thanks for tracing this through 👍🏽

@otchet-broad otchet-broad merged commit 67b761d into develop Dec 8, 2025
14 checks passed
@otchet-broad otchet-broad deleted the otchet-dt-2542-NMDS-backend-fixes branch December 8, 2025 16:07
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.

5 participants