Final split lesion adjustments
This commit is contained in:
parent
fb9d583074
commit
a9658e6a00
@ -13,6 +13,6 @@
|
||||
<p class="maxNumMeasurements">Max {{getMax toolGroup.id}}</p>
|
||||
{{/if}}
|
||||
</div>
|
||||
<div class="numberOfMeasurements">{{numberOfMeasurements}}</div>
|
||||
<div class="numberOfMeasurements">{{numberOfMeasurements toolGroup.id}}</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -3,8 +3,20 @@ import { OHIF } from 'meteor/ohif:core';
|
||||
import { Viewerbase } from 'meteor/ohif:viewerbase';
|
||||
|
||||
Template.measurementTableHeaderRow.helpers({
|
||||
numberOfMeasurements() {
|
||||
const { measurementRows } = Template.instance().data;
|
||||
numberOfMeasurements(toolGroupId) {
|
||||
const { toolGroup, measurementRows } = Template.instance().data;
|
||||
if (toolGroup.id === 'newTargets') {
|
||||
let result = 0;
|
||||
|
||||
measurementRows.forEach(measurementRow => {
|
||||
const measurementData = measurementRow.entries[0];
|
||||
if (measurementData.isSplitLesion) return;
|
||||
result++;
|
||||
});
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
return measurementRows.length ? measurementRows.length : null;
|
||||
},
|
||||
|
||||
|
||||
@ -56,7 +56,8 @@ export class MaxTargetsCriterion extends BaseCriterion {
|
||||
const newTargetNumbers = this.getNewTargetNumbers(data);
|
||||
const measurementNumbers = [];
|
||||
_.each(data.targets, target => {
|
||||
const { location, measurementNumber } = target.measurement;
|
||||
const { location, measurementNumber, isSplitLesion } = target.measurement;
|
||||
if (isSplitLesion) return;
|
||||
if (options.newTarget && !newTargetNumbers.has(measurementNumber)) return;
|
||||
if (options.locationIn && options.locationIn.indexOf(location) === -1) return;
|
||||
if (options.locationNotIn && options.locationNotIn.indexOf(location) > -1) return;
|
||||
|
||||
@ -38,7 +38,10 @@ export class MaxTargetsPerOrganCriterion extends BaseCriterion {
|
||||
const newTargetNumbers = this.getNewTargetNumbers(data);
|
||||
_.each(data.targets, target => {
|
||||
const { measurement } = target;
|
||||
const { location, measurementNumber } = measurement;
|
||||
const { location, measurementNumber, isSplitLesion } = measurement;
|
||||
|
||||
if (isSplitLesion) return;
|
||||
|
||||
if (!targetsPerOrgan[location]) {
|
||||
targetsPerOrgan[location] = new Set();
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user