-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
fix(MergeDataSource): remove duplicated instances and fix to issue #4349 #4355
base: master
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for ohif-dev ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for ohif-platform-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@josue-venegas-almonacid have you tried using your dicomweb config with enableStudyLazyLoad true/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.
The merge does work for me, I'm not sure why its giving you errors. Can you dump the network logs?
Also, I tried your changes and it's failing to load studies using OHIF default config.
I needed 2 more things to make it work:
- const mergedData = data.map((data, i) => tagFunc(data.value, sourceNames[i]));
+ const mergedData = data.map((promiseResult, i) =>
+ promiseResult.status === 'fulfilled' ? tagFunc(promiseResult.value, sourceNames[i]) : []
+ );
export const mergeMap: MergeMap = {
'query.studies.search': {
mergeKey: 'studyInstanceUid',
tagFunc: x => x,
},
'query.series.search': {
mergeKey: 'seriesInstanceUid',
tagFunc: (series, sourceName) => {
series.forEach(series => {
series.RetrieveAETitle = sourceName;
DicomMetadataStore.updateSeriesMetadata(series);
});
return series;
},
},
+ 'retrieve.series.metadata': {
+ mergeKey: 'seriesInstanceUid',
+ tagFunc: (series, sourceName) => {
+ Object.values(series).forEach(series => {
+ series.RetrieveAETitle = sourceName;
+ DicomMetadataStore.updateSeriesMetadata(series);
+ });
+ return series;
+ },
+ },
getStudyInstanceUIDs: {
mergeKey: 'studyInstanceUid',
tagFunc: x => x,
},
}; |
Please revise this PR by tomorrow to include it in 3.9; otherwise, it will be moved to 3.10-beta. Thanks. |
Context
Problems:
When having merged two Orthanc (dicomweb) Data Sources it gets the error [Bug] promise.start() is not a function when using merged dataSources #4349, since neither remainingPromises nor requiredSeriesPromises are Promises.
Also, when a study is present in both servers, the study's UID is found twice, resulting in duplicate calls to the datasource to fetch the metadata and we get 2 display sets for each series.
Changes & Results
promise.start()
andp.start()
topromise
andp
, respectively.Testing
Upload different instances of the same study on both servers. For example, CT + RTDose in the first server and RTStruct + RTPlan in the second server. You can use this study.
Open OHIF and try to access to that study
Checklist
PR
semantic-release format and guidelines.
Code
etc.)
Public Documentation Updates
additions or removals.
Tested Environment