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>
</div>
{{/if}}
<div class="type">
{{measurementType.name}}
</div>
<div class="type">{{measurementType.name}}</div>
<div class="max {{#if gt numberOfMeasurements maxNumMeasurements}}warning{{/if}}">
{{#if maxNumMeasurements}}
<p class="maxNumMeasurements">
Max {{maxNumMeasurements}}
</p>
<p class="maxNumMeasurements">Max {{maxNumMeasurements}}</p>
{{/if}}
</div>
<div class="numberOfMeasurements">
{{numberOfMeasurements}}
</div>
<div class="numberOfMeasurements">{{numberOfMeasurements}}</div>
</div>
</template>

View File

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