Allowing locations schema overriding
This commit is contained in:
parent
e743d6bc79
commit
60a001043b
@ -3,6 +3,7 @@ import { OHIF } from 'meteor/ohif:core';
|
||||
import { measurementTools } from './measurementTools';
|
||||
import { retrieveMeasurements, storeMeasurements, retrieveTimepoints, storeTimepoints, removeTimepoint, updateTimepoint, disassociateStudy } from './dataExchange';
|
||||
import { validateMeasurements } from './dataValidation';
|
||||
import { FieldLesionLocation, FieldLesionLocationResponse } from 'meteor/ohif:lesiontracker/both/schema/fields';
|
||||
|
||||
console.log('OHIF-LesionTracker: Defining Configuration for Measurements');
|
||||
|
||||
@ -20,6 +21,10 @@ OHIF.measurements.MeasurementApi.setConfiguration({
|
||||
},
|
||||
dataValidation: {
|
||||
validation: validateMeasurements
|
||||
},
|
||||
schema: {
|
||||
nonTargetLocation: FieldLesionLocation,
|
||||
nonTargetResponse: FieldLesionLocationResponse
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@ -2,7 +2,6 @@ import { Template } from 'meteor/templating';
|
||||
import { Blaze } from 'meteor/blaze';
|
||||
import { SimpleSchema } from 'meteor/aldeed:simple-schema';
|
||||
import { OHIF } from 'meteor/ohif:core';
|
||||
import { FieldLesionLocation, FieldLesionLocationResponse } from 'meteor/ohif:lesiontracker/both/schema/fields';
|
||||
|
||||
Template.dialogNonTargetMeasurement.onCreated(() => {
|
||||
const instance = Template.instance();
|
||||
@ -10,9 +9,10 @@ Template.dialogNonTargetMeasurement.onCreated(() => {
|
||||
instance.measurementTypeId = 'nonTarget';
|
||||
const timepointApi = instance.data.timepointApi;
|
||||
|
||||
const config = OHIF.measurements.MeasurementApi.getConfiguration();
|
||||
instance.schema = new SimpleSchema({
|
||||
location: FieldLesionLocation,
|
||||
response: FieldLesionLocationResponse
|
||||
location: config.schema.nonTargetLocation,
|
||||
response: config.schema.nonTargetResponse
|
||||
});
|
||||
|
||||
// Remove the measurement from the collection
|
||||
|
||||
Loading…
Reference in New Issue
Block a user