-
Notifications
You must be signed in to change notification settings - Fork 7
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
Use reviewed content only #430
Use reviewed content only #430
Conversation
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.
Newly created section(new mutation for instance) without approval has been saved using Save Gene
button.
@@ -600,9 +600,11 @@ export class FirebaseGeneService { | |||
let count = 0; | |||
for (const [hugoSymbol, gene] of Object.entries(geneLookup)) { | |||
count++; | |||
// eslint-disable-next-line no-console |
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.
Thank you.
const gene = _.cloneDeep(geneData); | ||
const gene = onlyReviewedContent ? useLastReviewedOnly(geneData, true) : _.cloneDeep(geneData); | ||
if (gene === undefined) { | ||
return true; |
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.
Why we returning boolean here?
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.
because that's what the old code did for error cases, but I'll change that.
@@ -123,6 +123,56 @@ const mockGene = createMockGene({ | |||
}), | |||
mutations_uuid: '69e454db-db99-4979-a770-482f7937314b', | |||
mutations: [ | |||
createMockMutation({ |
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 should also add a test for new cancer type and new treatment.
@@ -456,6 +459,7 @@ describe('getEvidence to submit to core', () => { | |||
prognosticSummary_uuid: 'd9c991e4-1c13-4251-bd5a-fac0344b3470', | |||
prognosticSummary: 'Prognostic Summary', | |||
prognosticSummary_review: createMockReview({ | |||
lastReviewed: 'Prognostic Summary Last Reviewed', |
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.
What's the rational for testing Last Reviewed for only prognostic?
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.
I felt like if I tried to test every case it'd get too complicate, but as far as why specifically prognostic summary? There isn't a real reason.
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.
Let's pick few relatively important ones? Could you do oncogenicity/Therapeutic Summary/Tx level
if (!isSavingGene) { | ||
delete temp.lastReviewed; | ||
} |
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 this is copied over from the legacy, but do you know what this is for?
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.
It doesn't seem like this is needed. It'll remove it. I can't remember why I put it there in the first place.
(!onlyReviewedContent && reviewObj.removed === true)) | ||
); | ||
function shouldExclude(reviewObj: Review | undefined) { | ||
return reviewObj && reviewObj.added === true && reviewObj.promotedToMutation === true && reviewObj.initialUpdate === true; |
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.
Based on the comment in firebase.model.ts, added
and promotedToMutation
can coexist. And look at firebase-gene-service, when promotedToMutation is true, added is always true. Could you take a look?
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.
Yes this appears to be the case. I also couldn't find where intialUpdate
is ever true
. Does that mean this should exclude logic will always be false
?
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.
return reviewObj && (reviewObj.added === true || reviewObj.promotedToMutation === true || reviewObj.initialUpdate === true);
based on the conversation, we should update to this.
Could you also update the comment to reflect what Calvin said?
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.
Thank you
* Use reviewed content only * Ignore if in review added state * Save Genes now checks if added * Delete parent node if added field is true * Fixed build * don't save undefined * Addressed PR comments * Addressed PR comments
* Use reviewed content only * Ignore if in review added state * Save Genes now checks if added * Delete parent node if added field is true * Fixed build * don't save undefined * Addressed PR comments * Addressed PR comments
* Added core submission logic * Added Save Gene Logic (#385) * Added name changes to review logic (#393) * Added name change to core submission logic * Added missing unit tests * Addessed PR comments * Removed unneeded uuid * added comments to collectUUIDs function * Added gene type submission (#396) * Can now delete evidences (#398) * fixed logging in * fixed build errors * updated drugs mapping * updated drugs mapping * Add releaseGene param when saving gene data to core * Update to allow save all genes * Fix excludedRCTs * Add method to undo gene release * Use reviewed content only (#430) * Use reviewed content only * Ignore if in review added state * Save Genes now checks if added * Delete parent node if added field is true * Fixed build * don't save undefined * Addressed PR comments * Addressed PR comments * Feature/fix submit to core (#439) * Handle when Instant json element is a json object The completedDate in the DB could be ISO 8601 string, or json object. I think this has to do with the recent spring boot upgrade, but I can't find the specific version of the change. I will handle both scenarios for now * Textarea in review mode should fit text content (#427) * Update pom version * Fix reject cancer type name review (#428) * Add reference to oncokb sop alteration nomenclature in add mutation modal helper (#432) * Update pom version * Avoid fetching management info repeatedly * Do not rerender the side bar when loading session The getSession is an async method which updates the loading status. * Fix drug code not selectable (#435) * Bump actions to latest version (#438) * resize text area when input changes (#440) * add sorting by firebase index (#443) * Delete mutation/tumor/treatment as last step to avoid stale index (#444) * Review no longer removes data for core submission * Added comments to useLastReviewOnly * Add children review paths * Fixed approve all * Fixed UI tests * Fixed UI tests * break in middle of word to fix collapsible title overlfow (#442) * Change searchEntities to readHandler instead of updateHandler (#445) * Fixed submit all * Fixed submission bug * Fixed data validation tool (#447) * Allow curating mutation summary (#433) * Fixed submit all * Fixed tests * Fixed gene type submissions * Removed last review check inside getevidences and gene type * Added mutation summary --------- Co-authored-by: Hongxin <[email protected]> Co-authored-by: Hongxin <[email protected]> Co-authored-by: Calvin Lu <[email protected]> Co-authored-by: oncokb-bot <[email protected]> Co-authored-by: bprize15 <[email protected]> * Added Vus submissions to core (#456) * Make core API call non-blocking (#454) * Handle when Instant json element is a json object The completedDate in the DB could be ISO 8601 string, or json object. I think this has to do with the recent spring boot upgrade, but I can't find the specific version of the change. I will handle both scenarios for now * Textarea in review mode should fit text content (#427) * Update pom version * Fix reject cancer type name review (#428) * Add reference to oncokb sop alteration nomenclature in add mutation modal helper (#432) * Update pom version * Avoid fetching management info repeatedly * Do not rerender the side bar when loading session The getSession is an async method which updates the loading status. * Fix drug code not selectable (#435) * Bump actions to latest version (#438) * resize text area when input changes (#440) * add sorting by firebase index (#443) * Delete mutation/tumor/treatment as last step to avoid stale index (#444) * break in middle of word to fix collapsible title overlfow (#442) * Change searchEntities to readHandler instead of updateHandler (#445) * Fixed data validation tool (#447) * Allow curating mutation summary (#433) * Parse protein change case insensitive (#441) * Fix adding CDx biomarker association (#450) * use firebase properties directly in backend (#451) * fix references tab (#452) * Added Heap (#448) * Added Heap * Updated CSP * Reduce width so sidebar does not go offscren (#446) * allow comma in mutation name when transcripts present (#453) * allow comma in mutation name when transcripts present * add missing colon * rename transcripts to reference genomes * Make core API call non-blocking * Add tests for stale indices check (#455) * Added loading icon when review is accepted * Update setup-java action * Update pom version * Put feature flag in app config * Now showing loading icon on accept all --------- Co-authored-by: Hongxin <[email protected]> Co-authored-by: Hongxin <[email protected]> Co-authored-by: Calvin Lu <[email protected]> Co-authored-by: oncokb-bot <[email protected]> Co-authored-by: bprize15 <[email protected]> --------- Co-authored-by: Hongxin <[email protected]> Co-authored-by: Hongxin <[email protected]> Co-authored-by: Calvin Lu <[email protected]> Co-authored-by: oncokb-bot <[email protected]> Co-authored-by: bprize15 <[email protected]>
I add a function,
useLastReviewedOnly
, to remove the unreviewed content.