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

WIP feat: expose hanging protocol stage to default #3300

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Ouwen
Copy link
Contributor

@Ouwen Ouwen commented Apr 2, 2023

Context

This PR is meant to expose the stage index as an initial setting from the mode. The final implementation needs some discussion before it gets merged.

  • HangingProtocolService options are a bit inconsistent, rather than one options {} with named key inputs it is a mix of Object and positional args
  • Should stages have a matching engine similar to HP?
  • Modes currently force matching engine to run for a protocol even if one is explicitly provided.

Changes & Results

This PR tries to expose stage selection or stage matching to the user.

@sedghi

@netlify
Copy link

netlify bot commented Apr 2, 2023

Deploy Preview for ohif-platform-viewer ready!

Name Link
🔨 Latest commit 622e644
🔍 Latest deploy log https://app.netlify.com/sites/ohif-platform-viewer/deploys/6429e1298216360009696365
😎 Deploy Preview https://deploy-preview-3300--ohif-platform-viewer.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 settings.

@netlify
Copy link

netlify bot commented Apr 2, 2023

Deploy Preview for ohif-platform-docs canceled.

Name Link
🔨 Latest commit 622e644
🔍 Latest deploy log https://app.netlify.com/sites/ohif-platform-docs/deploys/6429e129c3a1a90007f78f60

@sedghi sedghi requested a review from wayfarer3130 April 4, 2023 12:31
public run(
{ studies, displaySets, activeStudy },
protocolId,
{ stageIndex }
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you pass all the options here rather than extracting stageIndex? There are reasons it might be desirable to pass initial display conditions to the run method.

@@ -75,7 +79,8 @@ function defaultRouteInit(
// hanging protocol in the mode configuration
hangingProtocolService.run(
{ studies, activeStudy, displaySets },
hangingProtocolId
hangingProtocolId,
{ stageIndex: hangingProtocolStageIndex || 0 }
Copy link
Contributor

Choose a reason for hiding this comment

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

This should not pass in 0 if it isn't specified in the URL. There is matching rules to decide the initial protocol stage, and specifically passing it in will disable some of those.

studyInstanceUIDs,
dataSource,
filters,
hangingProtocol: hangingProtocolIdToUse,
Copy link
Contributor

Choose a reason for hiding this comment

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

This needs to start getting passed in as a set of options to the route init, as there may well be others that we want here.

@sedghi sedghi changed the base branch from v3-stable to master June 19, 2023 13:33
@sedghi
Copy link
Member

sedghi commented Jun 19, 2023

@Ouwen Also for this one, any one free you have to work on this?

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