LT-334: Prevent Lesion Tracker dropping measurements when storing a new case. Removed test PET SUV application since it's unnecessary
This commit is contained in:
1 parent
d6a3172bb3
commit
3d29a7e299
41 files changed
+22
-1598
No files matched your search
@@ -58,7 +58,7 @@ class MeasurementApi {
|
||||
});
|
||||
}
|
||||
|
||||
storeMeasurements(timepointId) {
|
||||
storeMeasurements(timepoints) {
|
||||
const storeFn = configuration.dataExchange.store;
|
||||
if (!_.isFunction(storeFn)) {
|
||||
return;
|
||||
@@ -70,7 +70,16 @@ class MeasurementApi {
|
||||
measurementData[measurementTypeId] = this[measurementTypeId].find().fetch();
|
||||
});
|
||||
|
||||
storeFn(measurementData).then(() => {
|
||||
const timepointIds = timepoints.map(t => t.timepointId);
|
||||
const patientId = timepoints[0].patientId;
|
||||
const filter = {
|
||||
patientId,
|
||||
timepointId: {
|
||||
$in: timepointIds
|
||||
}
|
||||
};
|
||||
|
||||
storeFn(measurementData, filter).then(() => {
|
||||
OHIF.log.info('Measurement storage completed');
|
||||
});
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ Template.caseProgress.helpers({
|
||||
});
|
||||
|
||||
Template.caseProgress.events({
|
||||
'click .js-finish-case'(event) {
|
||||
'click .js-finish-case'(event, instance) {
|
||||
const $this = $(event.currentTarget);
|
||||
|
||||
// Stop here if the tool is disabled
|
||||
@@ -132,8 +132,12 @@ Template.caseProgress.events({
|
||||
return;
|
||||
}
|
||||
|
||||
const instance = Template.instance();
|
||||
switchToTab('studylistTab');
|
||||
instance.data.measurementApi.storeMeasurements();
|
||||
|
||||
const timepointApi = instance.data.timepointApi;
|
||||
const timepoints = timepointApi.all();
|
||||
OHIF.log.info('Saving Measurements for timepoints:')
|
||||
OHIF.log.info(timepoints);
|
||||
instance.data.measurementApi.storeMeasurements(timepoints);
|
||||
}
|
||||
});
|
||||
Reference in new issue
Block a user