feat(WADO) Allow WADO / QIDO requests to originate from client (#222)

This commit is contained in:
Erik Ziegler authored and GitHub committed 2018-07-17 13:03:36 +02:00
1 parent 92408d4c86
commit ebe0a40f3e
43 files changed
+519 -571

No files matched your search

@@ -151,29 +151,12 @@ function search() {
// returned as 'undefined'
const modality = replaceUndefinedColumnValue($('input#modality').val());
Meteor.call('StudyListSearch', filter, (error, studies) => {
OHIF.studies.searchStudies(filter).then((studies) => {
OHIF.log.info('StudyListSearch');
// Hide loading text
Session.set('showLoadingText', false);
if (error) {
Session.set('serverError', true);
const errorType = error.error;
if (errorType === 'server-connection-error') {
OHIF.log.error('There was an error connecting to the DICOM server, please verify if it is up and running.');
} else if (errorType === 'server-internal-error') {
OHIF.log.error('There was an internal error with the DICOM server');
} else {
OHIF.log.error('For some reason we could not list the studies.')
}
OHIF.log.error(error.stack);
return;
}
if (!studies) {
OHIF.log.warn('No studies found');
return;
@@ -196,6 +179,20 @@ function search() {
OHIF.studylist.collections.Studies.insert(study);
}
});
}, (error) => {
Session.set('serverError', true);
const errorType = error.error;
if (errorType === 'server-connection-error') {
OHIF.log.error('There was an error connecting to the DICOM server, please verify if it is up and running.');
} else if (errorType === 'server-internal-error') {
OHIF.log.error('There was an internal error with the DICOM server');
} else {
OHIF.log.error('For some reason we could not list the studies.')
}
OHIF.log.error(error.stack);
});
}
@@ -3,8 +3,6 @@ import './exportStudies.js';
import './getSelectedStudies.js';
import './importStudies.js';
import './queryStudies.js';
import './retrieveStudiesMetadata.js';
import './retrieveStudyMetadata.js';
import './studylist.js';
import './viewSeriesDetails.js';
import './viewStudies.js';
@@ -1,12 +0,0 @@
import { OHIF } from 'meteor/ohif:core';
const note = 'OHIF.studylist.retrieveStudiesMetadata is deprecated.';
const instructions = 'Please use OHIF.studies.retrieveStudiesMetadata instead.';
/**
* @deprecated Please use OHIF.studies.retrieveStudiesMetadata instead
*/
OHIF.studylist.retrieveStudiesMetadata = function() {
OHIF.log.warn(`${note}\n${instructions}`);
OHIF.studies.retrieveStudiesMetadata.apply(this, arguments);
};
@@ -1,12 +0,0 @@
import { OHIF } from 'meteor/ohif:core';
const note = 'OHIF.studylist.retrieveStudyMetadata is deprecated.';
const instructions = 'Please use OHIF.studies.retrieveStudyMetadata instead.';
/**
* @deprecated Please use OHIF.studies.retrieveStudyMetadata instead
*/
OHIF.studylist.retrieveStudyMetadata = function() {
OHIF.log.warn(`${note}\n${instructions}`);
OHIF.studies.retrieveStudyMetadata.apply(this, arguments);
};