LT-115: Removing the old code for calculating Measurement Numbers
This commit is contained in:
1 parent
c06043483d
commit
b776e5f411
6 files changed
+18
-142
No files matched your search
@@ -2,31 +2,6 @@ import { OHIF } from 'meteor/ohif:core';
|
||||
|
||||
class MeasurementManager {
|
||||
|
||||
/**
|
||||
* Returns new measurement number given a timepointId
|
||||
*/
|
||||
static getNewMeasurementNumber(timepointId, collection, timepointApi) {
|
||||
// Get all current lesion measurements
|
||||
const numMeasurements = collection.find().count();
|
||||
|
||||
// If no measurements exist yet, start at 1
|
||||
if (!numMeasurements) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
const timepoint = timepointApi.timepoints.findOne({
|
||||
timepointId: timepointId
|
||||
});
|
||||
|
||||
const numMeasurementsAtTimepoint = collection.find({
|
||||
studyInstanceUid: {
|
||||
$in: timepoint.studyInstanceUids
|
||||
}
|
||||
}).count();
|
||||
|
||||
return numMeasurementsAtTimepoint + 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* If the current Measurements Number already exists
|
||||
* for any other timepoint, returns lesion locationUID
|
||||
@@ -47,4 +22,4 @@ class MeasurementManager {
|
||||
|
||||
}
|
||||
|
||||
OHIF.measurements.MeasurementManager = MeasurementManager;
|
||||
OHIF.measurements.MeasurementManager = MeasurementManager;
|
||||
Reference in new issue
Block a user