Preventing saving with criteria nonconformities
This commit is contained in:
1 parent
f0b57d416a
commit
19e7363c77
1 file changed
+4
@@ -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;
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user