Move towards NPM for Cornerstone dependencies
This commit is contained in:
1 parent
6c98c6a589
commit
ddef3c4710
59 files changed
+2435
-29162
No files matched your search
@@ -5,7 +5,7 @@ import { OHIF } from 'meteor/ohif:core';
|
||||
|
||||
import { schema as TimepointSchema } from 'meteor/ohif:measurements/both/schema/timepoints';
|
||||
|
||||
let configuration = {};
|
||||
const configuration = {};
|
||||
|
||||
class TimepointApi {
|
||||
static setConfiguration(config) {
|
||||
@@ -29,19 +29,30 @@ class TimepointApi {
|
||||
retrieveTimepoints(filter) {
|
||||
const retrievalFn = configuration.dataExchange.retrieve;
|
||||
if (!_.isFunction(retrievalFn)) {
|
||||
OHIF.log.error('Timepoint retrieval function has not been configured.')
|
||||
return;
|
||||
}
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
retrievalFn(filter).then(timepointData => {
|
||||
OHIF.log.info('Timepoint data retrieval');
|
||||
OHIF.log.info(timepointData);
|
||||
|
||||
_.each(timepointData, timepoint => {
|
||||
delete timepoint._id;
|
||||
this.timepoints.insert(timepoint);
|
||||
const query = {
|
||||
timepointId: timepoint.timepointId
|
||||
};
|
||||
|
||||
this.timepoints.update(query, {
|
||||
$set: timepoint
|
||||
}, {
|
||||
upsert: true
|
||||
});
|
||||
});
|
||||
|
||||
resolve();
|
||||
}).catch(reason => {
|
||||
OHIF.log.error(`Timepoint retrieval function failed: ${reason}`);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
+1
@@ -65,6 +65,7 @@ $bodyCellHeight = 30px
|
||||
&.timepointOptions
|
||||
label
|
||||
font-weight: 200
|
||||
cursor: pointer
|
||||
|
||||
input
|
||||
margin: 0 3px
|
||||
|
||||
@@ -27,7 +27,7 @@ Template.caseProgress.onCreated(() => {
|
||||
promise.then(successHandler).catch(errorHandler);
|
||||
OHIF.ui.showDialog('dialogLoading', {
|
||||
promise,
|
||||
text: 'Saving measurements data'
|
||||
text: 'Saving measurement data'
|
||||
});
|
||||
|
||||
return promise;
|
||||
|
||||
@@ -107,6 +107,7 @@ class MeasurementHandlers {
|
||||
Collection._c2._simpleSchema.clean(measurement);
|
||||
|
||||
// Insert the new measurement into the collection
|
||||
console.log(measurement);
|
||||
Collection.update(measurementId, {
|
||||
$set: measurement
|
||||
});
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Npm.depends({
|
||||
ajv: '4.10.4',
|
||||
jspdf: '1.3.2'
|
||||
jspdf: '1.3.3'
|
||||
});
|
||||
|
||||
Package.describe({
|
||||
|
||||
Reference in new issue
Block a user