LT-291: Displaying non-targets on measurements table

This commit is contained in:
Bruno Alves de Faria 2016-11-15 06:52:29 -02:00
parent a715804880
commit ad2c49c682
2 changed files with 18 additions and 25 deletions

View File

@ -7,18 +7,12 @@
</svg> </svg>
</div> </div>
{{/if}} {{/if}}
<div class="type"> <div class="type">{{measurementType.name}}</div>
{{measurementType.name}}
</div>
<div class="max {{#if gt numberOfMeasurements maxNumMeasurements}}warning{{/if}}"> <div class="max {{#if gt numberOfMeasurements maxNumMeasurements}}warning{{/if}}">
{{#if maxNumMeasurements}} {{#if maxNumMeasurements}}
<p class="maxNumMeasurements"> <p class="maxNumMeasurements">Max {{maxNumMeasurements}}</p>
Max {{maxNumMeasurements}}
</p>
{{/if}} {{/if}}
</div> </div>
<div class="numberOfMeasurements"> <div class="numberOfMeasurements">{{numberOfMeasurements}}</div>
{{numberOfMeasurements}}
</div>
</div> </div>
</template> </template>

View File

@ -1,5 +1,6 @@
import { Template } from 'meteor/templating'; import { Template } from 'meteor/templating';
import { _ } from 'meteor/underscore'; import { _ } from 'meteor/underscore';
import { OHIF } from 'meteor/ohif:core';
OHIF.measurements.getLocation = collection => { OHIF.measurements.getLocation = collection => {
for (let i = 0; i < collection.length; i++) { for (let i = 0; i < collection.length; i++) {
@ -9,8 +10,6 @@ OHIF.measurements.getLocation = collection => {
} }
}; };
const getLocation = OHIF.measurements.getLocation;
Template.measurementTableView.helpers({ Template.measurementTableView.helpers({
getNewMeasurementType(tool) { getNewMeasurementType(tool) {
// TODO: Check Conformance criteria here. // TODO: Check Conformance criteria here.
@ -57,7 +56,7 @@ Template.measurementTableView.helpers({
return Object.keys(groupObject).map(key => ({ return Object.keys(groupObject).map(key => ({
measurementTypeId: measurementTypeId, measurementTypeId: measurementTypeId,
measurementNumber: key, measurementNumber: key,
location: getLocation(groupObject[key]), location: OHIF.measurements.getLocation(groupObject[key]),
responseStatus: false, // TODO: Get the latest timepoint and determine the response status responseStatus: false, // TODO: Get the latest timepoint and determine the response status
entries: groupObject[key] entries: groupObject[key]
})); }));
@ -77,7 +76,7 @@ Template.measurementTableView.helpers({
// If this is a baseline, stop here since there are no new measurements to display // If this is a baseline, stop here since there are no new measurements to display
if (!current || current.timepointType === 'baseline') { if (!current || current.timepointType === 'baseline') {
console.log('Skipping New Measurements section'); OHIF.log.info('Skipping New Measurements section');
return; return;
} }
@ -108,7 +107,7 @@ Template.measurementTableView.helpers({
return { return {
measurementTypeId: measurementTypeId, measurementTypeId: measurementTypeId,
measurementNumber: key, measurementNumber: key,
location: getLocation(groupObject[key]), location: OHIF.measurements.getLocation(groupObject[key]),
responseStatus: false, // TODO: Get the latest timepoint and determine the response status responseStatus: false, // TODO: Get the latest timepoint and determine the response status
entries: groupObject[key] entries: groupObject[key]
}; };