-
Notifications
You must be signed in to change notification settings - Fork 2
[DT-2542] NMDS fixes. #2764
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
[DT-2542] NMDS fixes. #2764
Conversation
|
| consentGroup.setPoa(dataUse.getPopulationOriginsAncestry()); | ||
| consentGroup.setOtherPrimary(dataUse.getOther()); | ||
| consentGroup.setNmds(dataUse.getMethodsResearch()); | ||
| consentGroup.setNmds(Boolean.FALSE.equals(dataUse.getMethodsResearch()) ? true : null); |
There was a problem hiding this comment.
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.
consent/src/main/java/org/broadinstitute/consent/http/service/DatasetRegistrationService.java
Line 360 in 89d46ba
| Objects.nonNull(group.getNmds()) && Boolean.TRUE.equals(group.getNmds()) ? false : null); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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).
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
fboulnois
left a comment
There was a problem hiding this 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); |
There was a problem hiding this comment.
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?
rushtong
left a comment
There was a problem hiding this 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 👍🏽



Addresses
https://broadworkbench.atlassian.net/browse/DT-2542
Summary
Have you read CONTRIBUTING.md lately? If not, do that first.