2017-06-16 21:36:34 +02:00
|
|
|
import { OHIF } from 'meteor/ohif:core';
|
2018-12-12 18:06:25 +01:00
|
|
|
import { Servers, CurrentServer } from '../collections';
|
2017-06-16 21:36:34 +02:00
|
|
|
|
2016-09-29 17:25:04 +02:00
|
|
|
/**
|
|
|
|
|
* Retrieves the current server configuration used to retrieve studies
|
|
|
|
|
*/
|
2017-06-16 21:36:34 +02:00
|
|
|
OHIF.servers.getCurrentServer = () => {
|
2016-09-29 17:25:04 +02:00
|
|
|
const currentServer = CurrentServer.findOne();
|
|
|
|
|
|
|
|
|
|
if (!currentServer) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const serverConfiguration = Servers.findOne({ _id: currentServer.serverId });
|
|
|
|
|
|
|
|
|
|
return serverConfiguration;
|
|
|
|
|
};
|