PWV-1: Requesting timepoint data from PIM TIMC API

This commit is contained in:
Bruno Alves de Faria 2016-10-06 07:23:51 -03:00 committed by Erik Ziegler
parent 37fcf9f004
commit c84d0c21f3
5 changed files with 16 additions and 18 deletions

View File

@ -8,7 +8,13 @@ measurementTools.forEach(tool => {
MeasurementCollections[tool.id] = new Mongo.Collection(tool.id);
});
Timepoints = new Mongo.Collection('timepoints');
const Timepoints = new Mongo.Collection('timepoints');
Timepoints.find().observe({
remove() {
console.warn('REMOVED');
}
});
// Drop our collections for testing purposes
Meteor.startup(() => {

View File

@ -7,7 +7,7 @@ let configuration = {};
class MeasurementApi {
static setConfiguration(config) {
configuration = config;
_.extend(configuration, config);
}
static getConfiguration() {

View File

@ -9,7 +9,7 @@ let configuration = {};
class TimepointApi {
static setConfiguration(config) {
configuration = config;
_.extend(configuration, config);
}
static getConfiguration() {
@ -20,8 +20,6 @@ class TimepointApi {
if (currentTimepointId) {
this.currentTimepointId = currentTimepointId;
}
this.config = configuration || OHIF.measurements.MeasurementApi.getConfiguration();
}
retrieveTimepoints() {
@ -29,7 +27,7 @@ class TimepointApi {
this.timepoints.attachSchema(TimepointSchema);
this.timepoints._debugName = 'Timepoints';
const retrievalFn = this.config.dataExchange.retrieve;
const retrievalFn = configuration.dataExchange.retrieve;
if (!_.isFunction(retrievalFn)) {
return;
}
@ -49,7 +47,7 @@ class TimepointApi {
}
storeTimepoints() {
const storeFn = this.config.dataExchange.store;
const storeFn = configuration.dataExchange.store;
if (!_.isFunction(storeFn)) {
return;
}

View File

@ -20,7 +20,7 @@ Meteor.startup(() => {
})
// TODO: Make storage use update instead of clearing the entire collection and
// TODO: Make storage use update instead of clearing the entire collection and
// re-inserting everything.
Meteor.methods({
storeTimepoints(timepoints) {
@ -62,4 +62,4 @@ Meteor.methods({
return measurementData;
}
});
});

View File

@ -1,14 +1,8 @@
import { Meteor } from 'meteor/meteor';
import { OHIF } from 'meteor/ohif:core';
Meteor.publish('studyImportStatus', () => {
return OHIF.studylist.collections.StudyImportStatus.find();
});
Meteor.publish('studyImportStatus', () => OHIF.studylist.collections.StudyImportStatus.find());
Meteor.publish('servers', () => {
return Servers.find();
});
Meteor.publish('servers', () => Servers.find());
Meteor.publish('currentServer', () => {
return CurrentServer.find();
});
Meteor.publish('currentServer', () => CurrentServer.find());