feat(measurement-table) Display support for measurements from DICOM Structured Reports (#225)
This commit is contained in:
1 parent
e9832f62f7
commit
d94f0eec16
64 files changed
+1797
-78
No files matched your search
+13
@@ -0,0 +1,13 @@
|
||||
<template name="measurementEditDescription">
|
||||
{{#dialogForm (extend this
|
||||
dialogClass='modal-sm'
|
||||
api=instance.api
|
||||
)}}
|
||||
{{>inputText
|
||||
labelClass='form-group'
|
||||
key='description'
|
||||
hideSearch=true
|
||||
options=(clone placeholder='Add a description')
|
||||
}}
|
||||
{{/dialogForm}}
|
||||
</template>
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
import { Template } from 'meteor/templating';
|
||||
import { OHIF } from 'meteor/ohif:core';
|
||||
|
||||
|
||||
Template.measurementEditDescription.onRendered(() => {
|
||||
const instance = Template.instance();
|
||||
const form = instance.$('form').data('component');
|
||||
const measurementData = instance.data.measurementData;
|
||||
const collection = OHIF.viewer.measurementApi.tools[measurementData.toolType];
|
||||
const currentMeasurement = collection.findOne({ _id: measurementData._id });
|
||||
|
||||
if (currentMeasurement.description) {
|
||||
form.value({
|
||||
description: currentMeasurement.description
|
||||
});
|
||||
}
|
||||
|
||||
// Update the description after confirming the dialog data
|
||||
instance.data.promise.then(formData => {
|
||||
collection.update({
|
||||
_id: measurementData._id,
|
||||
}, {
|
||||
$set: { description: formData.description }
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user