-
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
[DSM] PEPPER-853 sm id fix #2636
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.
We should plan to refactor this query (perhaps another ticket?), even if that means executing more than one query, since the logic of this query is lost in the complexity.
For this case (PEPPER-853), is in possible to add logic to check the query results rather than adding more logic (and complexity) to the query?
@denniscunningham I simplified the query to just check if the numbers entered for both USS and scrolls count are simultaneously 0 or NULL and not show those tissues. |
@@ -28,6 +28,7 @@ public class MercurySampleDao implements Dao<MercurySampleDto> { | |||
+ "LEFT JOIN ddp_onc_history_detail oD on (mr.medical_record_id = oD.medical_record_id AND NOT oD.deleted <=> 1) " | |||
+ "LEFT JOIN ddp_tissue t on (oD.onc_history_detail_id = t.onc_history_detail_id AND NOT t.deleted <=> 1) " | |||
+ "WHERE oD.tissue_received IS NOT NULL AND p.ddp_participant_id = ? AND ddp.instance_name = ? " | |||
+ "AND (IFNULL(t.uss_count, 0) <> 0 OR IFNULL(t.scrolls_count, 0) <> 0) " |
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.
Just avoiding the ones that are both 0 or both null should do the trick.
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.
Looks good Pegah. Thx for the changes!
Just left one comment.
@@ -40,7 +41,7 @@ public class MercurySampleDao implements Dao<MercurySampleDto> { | |||
+ "From ddp_mercury_sequencing where ddp_participant_id = ? group by (tissue_id) ) as table2 " | |||
+ "on table2.seqt = table1.tissue_id " | |||
+ "LEFT JOIN (select order_id, mercury_sequencing_id, order_status, order_date, mercury_pdo_id " | |||
+ "FROM ddp_mercury_sequencing WHERE ddp_participant_id = ?) as table3 ON(table3.mercury_sequencing_id = table2.ms_id)"; | |||
+ "FROM ddp_mercury_sequencing WHERE ddp_participant_id = ?) as table3 ON(table3.mercury_sequencing_id = table2.ms_id) "; |
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.
Is this change intentional?
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.
Yeah I like to have an extra space at the end in case we need to concat the query with some other condition
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information The version of Java (11.0.15) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17. |
Context
I added a check for zero received sm ids.
I trired using varioable assignment but it doesn't work in java
Checklist
C-*
labels.R-*
labels.L-*
labels as needed.I-*
labels as neededIf unsure or need help with any of the above items, add the
help wanted
label. For items that starts withIf applicable
, if it is not applicable, check it off and addn/a
in front.FUD Score
Overall, how are you feeling about these changes?
How do we demo these changes?
How does one observe these changes in a deployed system? Note that user visible encompasses many personas--not just patients and study staff, but also ops duty, your fellow devs, compliance, etc.
Testing
Release