Isolating the ohif:study-list package

This commit is contained in:
Bruno Alves de Faria committed 2017-11-06 17:02:39 -02:00
1 parent c42722192b
commit ddc45df4bd
4 files changed
+2 -1

No files matched your search

@@ -1 +1,2 @@
import './getStudyMetadata.js';
import './studylistSearch.js';
@@ -0,0 +1,31 @@
import { Meteor } from 'meteor/meteor';
import { OHIF } from 'meteor/ohif:core';
Meteor.methods({
/**
* Use the specified filter to conduct a search from the DICOM server
*
* @param filter
*/
StudyListSearch(filter) {
// Get the server data. This is user-defined in the config.json files or through servers
// configuration modal
const server = OHIF.servers.getCurrentServer();
if (!server) {
throw new Meteor.Error('improper-server-config', 'No properly configured server was available over DICOMWeb or DIMSE.');
}
try {
if (server.type === 'dicomWeb') {
return OHIF.studies.services.QIDO.Studies(server, filter);
} else if (server.type === 'dimse') {
return OHIF.studies.services.DIMSE.Studies(filter);
}
} catch (error) {
OHIF.log.trace();
throw error;
}
}
});
+1
View File
@@ -19,6 +19,7 @@ Package.onUse(function(api) {
'ohif:design',
'ohif:core',
'ohif:log',
'ohif:servers',
'ohif:dicom-services',
'ohif:viewerbase',
'ohif:wadoproxy'