-
Notifications
You must be signed in to change notification settings - Fork 5
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
Pepper 1040 unable obtain tissue fix #2928
Merged
Merged
Changes from 4 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
0adc343
PEPPER-1040 . update onc history detail.request when unableObtainTiss…
daef5b0
PEPPER-1040 . update onc history detail.request when unableObtainTiss…
c4b0ef9
PEPPER-1040 . update onc history detail.request when unableObtainTiss…
69d93a5
PEPPER-1040 . cleanup
a81e638
Merge branch 'develop' into PEPPER-1040-unableObtainTissue-fix
5294084
PEPPER-1040 . cleanup
663e1ed
PEPPER-1040 . cleanup
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,7 @@ | |
import lombok.NonNull; | ||
import org.apache.commons.lang3.StringUtils; | ||
import org.broadinstitute.dsm.db.DDPInstance; | ||
import org.broadinstitute.dsm.db.OncHistoryDetail; | ||
import org.broadinstitute.dsm.db.dao.ddp.onchistory.OncHistoryDetailDaoImpl; | ||
import org.broadinstitute.dsm.db.dao.ddp.participant.ParticipantDataDao; | ||
import org.broadinstitute.dsm.db.dao.queue.EventDao; | ||
|
@@ -26,6 +27,7 @@ | |
import org.broadinstitute.dsm.model.elastic.export.ExportFacade; | ||
import org.broadinstitute.dsm.model.elastic.export.ExportFacadePayload; | ||
import org.broadinstitute.dsm.model.elastic.export.generate.GeneratorPayload; | ||
import org.broadinstitute.dsm.model.elastic.export.generate.OncHistoryDetailSourceGenerator; | ||
import org.broadinstitute.dsm.model.participant.data.FamilyMemberConstants; | ||
import org.broadinstitute.dsm.service.EventService; | ||
import org.broadinstitute.dsm.statics.DBConstants; | ||
|
@@ -233,7 +235,7 @@ protected boolean isNameValuePairs() { | |
protected List<NameValue> setWorkflowRelatedFields(@NonNull Patch patch) { | ||
List<NameValue> nameValues = new ArrayList<>(); | ||
if (patch.getNameValue().getValue() == null) { | ||
// if the date that was sent in is null, we don't want to set the workflow fields | ||
// if the value that was sent in is null, we don't want to set the workflow fields | ||
return nameValues; | ||
} | ||
//mr request workflow | ||
|
@@ -279,17 +281,24 @@ protected List<NameValue> setWorkflowRelatedFields(@NonNull Patch patch) { | |
patch.getNameValues(), patch.getDdpParticipantId()), "sent")); | ||
} | ||
} | ||
} else if (patch.getNameValue().getName().equals("oD.unableObtainTissue") && !(boolean) patch.getNameValue().getValue()) { | ||
boolean hasReceivedDate = new OncHistoryDetailDaoImpl().hasReceivedDate(getOncHistoryDetailId(patch)); | ||
} else if (patch.getNameValue().getName().equals("oD.unableObtainTissue")) { | ||
if (!(boolean) patch.getNameValue().getValue()) { | ||
boolean hasReceivedDate = new OncHistoryDetailDaoImpl().hasReceivedDate(getOncHistoryDetailId(patch)); | ||
|
||
if (hasReceivedDate) { | ||
nameValues.add(setAdditionalValue("oD.request", | ||
new Patch(patch.getId(), PARTICIPANT_ID, patch.getParentId(), patch.getUser(), patch.getNameValue(), | ||
patch.getNameValues(), patch.getDdpParticipantId()), "received")); | ||
if (hasReceivedDate) { | ||
nameValues.add(setAdditionalValue("oD.request", | ||
new Patch(patch.getId(), PARTICIPANT_ID, patch.getParentId(), patch.getUser(), patch.getNameValue(), | ||
ssettipalli marked this conversation as resolved.
Show resolved
Hide resolved
|
||
patch.getNameValues(), patch.getDdpParticipantId()), "received")); | ||
} else { | ||
nameValues.add(setAdditionalValue("oD.request", | ||
new Patch(patch.getId(), PARTICIPANT_ID, patch.getParentId(), patch.getUser(), patch.getNameValue(), | ||
patch.getNameValues(), patch.getDdpParticipantId()), "sent")); | ||
} | ||
} else { | ||
//"unable to obtain tissue" : checked/true .. update request status | ||
nameValues.add(setAdditionalValue("oD.request", | ||
new Patch(patch.getId(), PARTICIPANT_ID, patch.getParentId(), patch.getUser(), patch.getNameValue(), | ||
patch.getNameValues(), patch.getDdpParticipantId()), "sent")); | ||
patch.getNameValues(), patch.getDdpParticipantId()), OncHistoryDetail.UNABLE_OBTAIN_TISSUE)); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. set the request : status/value when the "unable to obtain tissue" checkbox is checked/true |
||
} | ||
} | ||
return nameValues; | ||
|
Oops, something went wrong.
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.
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.
to update in elastic