Skip to content
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

Remove filtered displaySets from parameter from study protocolEngine.findMatch() #3343

Conversation

Sofien-Sellami
Copy link
Contributor

Context

This pull request removes the studyDisplaySets parameter from the protocolEngine.findMatch() call in order to access a list of all expanded displaySets in studyMatchDetails.

Changes & Results

Testing

Checklist

PR

  • [] My Pull Request title is descriptive, accurate and follows the
    semantic-release format and guidelines.

Code

  • [] My code has been well-documented (function documentation, inline comments,
    etc.)

Public Documentation Updates

  • The documentation page has been updated as necessary for any public API
    additions or removals.

Tested Environment

  • "OS:
  • "Node version:
  • "Browser:

@netlify
Copy link

netlify bot commented Apr 28, 2023

Deploy Preview for ohif-platform-docs ready!

Name Link
🔨 Latest commit 9d27066
🔍 Latest deploy log https://app.netlify.com/sites/ohif-platform-docs/deploys/649d9b5a6852930008a56404
😎 Deploy Preview https://deploy-preview-3343--ohif-platform-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@netlify
Copy link

netlify bot commented Apr 28, 2023

Deploy Preview for ohif-platform-viewer canceled.

Name Link
🔨 Latest commit bb07063
🔍 Latest deploy log https://app.netlify.com/sites/ohif-platform-viewer/deploys/6470ac5a4f35120007b6cd08

@Sofien-Sellami
Copy link
Contributor Author

Title: Question regarding the absence of updated this.studies when there are other expanded studies, unlike displaySets.

Description:
I have a question regarding the code changes in this pull request. I noticed that the displaySets list is filtered to only include the displaySets of the active studies, but there is no update to the this.studies list even when there are other expanded studies. This is unlike the displaySets list, which is filtered to only include the displaySets of the active studies.

Can you please explain why this.studies is not updated in a similar way as the displaySets list when there are other expanded studies? Is there a reason for this difference in behavior?

Thank you for your attention to this question.

@sedghi sedghi requested a review from wayfarer3130 April 28, 2023 20:16
const studyDisplaySets = this.displaySets.filter(
it => it.StudyInstanceUID === study.StudyInstanceUID
);

Copy link
Contributor

Choose a reason for hiding this comment

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

If you don't move this change, but leave it here, then you can pass both displaySets and studyDisplaySets into the findMatch. Then, custom attributes can be setup to choose either of them - and it is only custom attributes which access these.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thinking it over, probably leaving displaySets as is, but passing allDisplaySets into the findMatch function would be more consistent. The rule is testing this study right now, so it should have the display sets for this study, not all display sets, and if a particular rule wants to look at all display sets, then just having it as a another value would make that possible.

Copy link
Contributor

Choose a reason for hiding this comment

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

The problem is, at the study matching we need to access the list of registered study and display sets.
For unknown reason, this.studies is not updated when you add available studies in OHIF (for instance by opening priors panel), but displayset are correctly added.
At the study matching you need to access all studies and all display set (listing only displayset of the current study will forbid cross study matching for which study matching rule stand for).

So sofien updated his code to have :
displayset === all known displayset at the study level
displayset === studies display set at the series level

Copy link
Contributor

@wayfarer3130 wayfarer3130 left a comment

Choose a reason for hiding this comment

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

Small change required to add both attributes to the find.

@codecov
Copy link

codecov bot commented May 25, 2023

Codecov Report

Merging #3343 (53f51cf) into master (15ad8f2) will increase coverage by 0.08%.
The diff coverage is n/a.

❗ Current head 53f51cf differs from pull request most recent head 9d27066. Consider uploading reports for the commit 9d27066 to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3343      +/-   ##
==========================================
+ Coverage   38.27%   38.36%   +0.08%     
==========================================
  Files          82       82              
  Lines        1348     1345       -3     
  Branches      304      303       -1     
==========================================
  Hits          516      516              
+ Misses        665      663       -2     
+ Partials      167      166       -1     

see 26 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update aeb61f4...9d27066. Read the comment docs.

Copy link
Contributor

@wayfarer3130 wayfarer3130 left a comment

Choose a reason for hiding this comment

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

Can you add a hanging protcol example and test set that requires this change to the basic test mode?
Also, I'd like to see this as an addition to the findMatch rules as opposed to a change to what is currently passed in. There are use cases this is needed, but having the display sets for the study is used in several existing hanging protocols, which would break them when being used with multi-study display sets.

@salimkanoun
Copy link
Contributor

The change only exposes the displayset at the study matching, at series level display set are only studies display sets. Did the study matching worked some days ? What we understood is that study matching as it was not passing displays set belonging to other studies was probably unable to match any other study outside the current one. (and neither pass other known studies as this.studies in HPservice is now updated to recieve new known studies)

@Sofien-Sellami Sofien-Sellami changed the base branch from v3-stable to master June 1, 2023 14:35
@netlify
Copy link

netlify bot commented Jun 2, 2023

Deploy Preview for ohif-dev ready!

Name Link
🔨 Latest commit 9d27066
🔍 Latest deploy log https://app.netlify.com/sites/ohif-dev/deploys/649d9b5a7169d20008d00218
😎 Deploy Preview https://deploy-preview-3343--ohif-dev.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@wayfarer3130
Copy link
Contributor

Wait till the PR checks pass, then I can merge.

@salimkanoun
Copy link
Contributor

Dear @wayfarer3130 should be good this one too ?

Copy link
Contributor

@wayfarer3130 wayfarer3130 left a comment

Choose a reason for hiding this comment

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

This looks good now as both data sets are available when required.

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.

3 participants