LT-115: Grouping tools schemas

This commit is contained in:
Bruno Alves de Faria committed 2017-01-02 16:32:09 -02:00
1 parent 0e857d3520
commit bd748eae32
14 files changed
+134 -59

No files matched your search

@@ -134,7 +134,7 @@ class MeasurementApi {
$nin: numbers
}
};
return collection.find(filter).fetch();
}
@@ -144,7 +144,7 @@ class MeasurementApi {
const hasNoDataAtTimepoint = this.hasNoDataAtTimepoint;
const includedTools = tools.filter(tool => {
return (tool.options && tool.options.includeInCaseProgress === true);
return (tool.options && tool.options.caseProgress && tool.options.caseProgress.include);
});
let overallMeasurementNumber = 1;
@@ -227,7 +227,7 @@ class MeasurementApi {
// Next, handle New Measurements (i.e. no baseline data)
// Note that this cannot be combined with the loop above due to the incrementing of the overallMeasurementNumber
includedTools.forEach(tool => {
includedTools.forEach(tool => {
const collection = this[tool.id];
const toolType = tool.cornerstoneToolType;
const measurements = hasNoDataAtTimepoint(collection, baselineTimepointId);
@@ -66,7 +66,7 @@ Template.caseProgress.onRendered(() => {
const config = OHIF.measurements.MeasurementApi.getConfiguration();
const tools = config.measurementTools;
const toolsToInclude = tools.filter(tool => tool.options && tool.options.includeInCaseProgress);
const toolsToInclude = tools.filter(tool => tool.options && tool.options.caseProgress && tool.options.caseProgress.include);
const toolIds = toolsToInclude.map(tool => tool.id);
const api = instance.data.measurementApi;
@@ -37,7 +37,7 @@ Template.measurementTableTimepointCell.helpers({
// TODO: Figure out what is going on here?
console.warn('Something went wrong?');
}
const displayFunction = tool.options.measurementTableOptions.displayFunction;
const displayFunction = tool.options.measurementTable.displayFunction;
return displayFunction(data);
}
});
@@ -2,7 +2,7 @@
<div class="measurementTableView scrollArea">
{{#let config=measurementConfiguration}}
{{#each measurementType in config.measurementTools}}
{{#if measurementType.options.showInMeasurementTable}}
{{#if measurementType.options.measurementTable.displayFunction}}
{{#let collection=(groupByMeasurementNumber measurementType.id)}}
{{>measurementTableHeaderRow
measurementType=measurementType