ohif-viewer/Packages/ohif-study-list/server/methods/getStudyMetadata.js
Erik Ziegler ab4d4c9008 Work on refactoring measurements out of Lesion Tracker package
- Removed AssociatedStudies Collection
- Measurement API is generated from configuration files
- Data exchange methods are defined in configuration
2016-11-15 08:21:46 +01:00

24 lines
829 B
JavaScript

Meteor.methods({
/**
* Retrieves Study metadata given a Study Instance UID
* This Meteor method is available from both the client and the server
*/
GetStudyMetadata: function(studyInstanceUid) {
log.info('GetStudyMetadata(%s)', studyInstanceUid);
// Get the server data. This is user-defined in the config.json files or through servers
// configuration modal
const server = getCurrentServer();
if (!server) {
throw 'No properly configured server was available over DICOMWeb or DIMSE.';
}
if (server.type === 'dicomWeb') {
return Services.WADO.RetrieveMetadata(server, studyInstanceUid);
} else if (server.type === 'dimse') {
return Services.DIMSE.RetrieveMetadata(studyInstanceUid);
}
}
});