LT-382: Fixing image loading after time points disassociation
This commit is contained in:
parent
e43d66df14
commit
79f3c482c1
@ -1,6 +1,7 @@
|
|||||||
import { Template } from 'meteor/templating';
|
import { Template } from 'meteor/templating';
|
||||||
import { Session } from 'meteor/session';
|
import { Session } from 'meteor/session';
|
||||||
import { OHIF } from 'meteor/ohif:core';
|
import { OHIF } from 'meteor/ohif:core';
|
||||||
|
import { _ } from 'meteor/underscore';
|
||||||
|
|
||||||
Session.set('ViewerMainReady', false);
|
Session.set('ViewerMainReady', false);
|
||||||
Session.set('TimepointsReady', false);
|
Session.set('TimepointsReady', false);
|
||||||
@ -73,15 +74,18 @@ Template.viewer.onCreated(() => {
|
|||||||
|
|
||||||
const patientId = instance.data.studies[0].patientId;
|
const patientId = instance.data.studies[0].patientId;
|
||||||
|
|
||||||
|
// LT-382: Preventing HP to keep identifying studies in timepoints that might be removed
|
||||||
|
instance.data.studies.forEach(study => (delete study.timepointType));
|
||||||
|
|
||||||
// TODO: Consider combining the retrieval calls into one?
|
// TODO: Consider combining the retrieval calls into one?
|
||||||
const timepointsPromise = instance.data.timepointApi.retrieveTimepoints(patientId);
|
const timepointsPromise = instance.data.timepointApi.retrieveTimepoints(patientId);
|
||||||
timepointsPromise.then(() => {
|
timepointsPromise.then(() => {
|
||||||
const timepoints = instance.data.timepointApi.all();
|
const timepoints = instance.data.timepointApi.all();
|
||||||
|
|
||||||
// Set timepointType in studies to be used in hanging protocol engine
|
// Set timepointType in studies to be used in hanging protocol engine
|
||||||
timepoints.forEach(function(timepoint) {
|
timepoints.forEach(timepoint => {
|
||||||
timepoint.studyInstanceUids.forEach(function(studyInstanceUid) {
|
timepoint.studyInstanceUids.forEach(studyInstanceUid => {
|
||||||
const study = _.find(instance.data.studies, function (element) {
|
const study = _.find(instance.data.studies, element => {
|
||||||
return element.studyInstanceUid === studyInstanceUid;
|
return element.studyInstanceUid === studyInstanceUid;
|
||||||
});
|
});
|
||||||
if (!study) {
|
if (!study) {
|
||||||
|
|||||||
@ -636,9 +636,7 @@ HP.ProtocolEngine = class ProtocolEngine {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!currentViewportData.displaySetInstanceUid) {
|
if (!currentViewportData.displaySetInstanceUid) {
|
||||||
// TODO: REMOVE - Temporary for RSNA - LT-382
|
throw 'No matching display set found?';
|
||||||
OHIF.log.warn('No matching display set found?');
|
|
||||||
// throw 'No matching display set found?';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
viewportData.push(currentViewportData);
|
viewportData.push(currentViewportData);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user