Preventing saving with criteria nonconformities
This commit is contained in:
parent
f0b57d416a
commit
19e7363c77
@ -4,6 +4,10 @@ OHIF.measurements.saveMeasurements = (measurementApi, timepointId) => {
|
|||||||
const { unsavedChanges, notifications, showDialog } = OHIF.ui;
|
const { unsavedChanges, notifications, showDialog } = OHIF.ui;
|
||||||
const basePath = `viewer.studyViewer.measurements.${timepointId}`;
|
const basePath = `viewer.studyViewer.measurements.${timepointId}`;
|
||||||
|
|
||||||
|
// Stop here if there are nonconformities in the timepoints
|
||||||
|
const nonconformities = OHIF.viewer.conformanceCriteria.nonconformities.get();
|
||||||
|
if (nonconformities.length) return;
|
||||||
|
|
||||||
// Stop here if there were no changes to the timepoint
|
// Stop here if there were no changes to the timepoint
|
||||||
if (unsavedChanges.probe(basePath) === 0) return;
|
if (unsavedChanges.probe(basePath) === 0) return;
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user