LT-296: Clicking on measurement data in table activates the measurement
This commit is contained in:
1 parent
42c938fb44
commit
80337f271e
19 files changed
+288
-307
No files matched your search
+1
-1
@@ -21,7 +21,7 @@
|
||||
{{#if config.newMeasurementTool}}
|
||||
{{#let measurementType=(getNewMeasurementType config.newMeasurementTool)}}
|
||||
{{#let newMeasure=(newMeasurements measurementType)}}
|
||||
{{#if newMeasure}}
|
||||
{{#if newMeasure.length}}
|
||||
{{#let collection=newMeasure}}
|
||||
{{>measurementTableHeaderRow
|
||||
measurementType=measurementType
|
||||
|
||||
+10
-7
@@ -1,7 +1,7 @@
|
||||
import { Template } from 'meteor/templating';
|
||||
import { _ } from 'meteor/underscore';
|
||||
|
||||
const getLocation = collection => {
|
||||
OHIF.measurements.getLocation = collection => {
|
||||
for (let i = 0; i < collection.length; i++) {
|
||||
if (collection[i].location) {
|
||||
return collection[i].location;
|
||||
@@ -9,6 +9,8 @@ const getLocation = collection => {
|
||||
}
|
||||
};
|
||||
|
||||
const getLocation = OHIF.measurements.getLocation;
|
||||
|
||||
Template.measurementTableView.helpers({
|
||||
getNewMeasurementType(tool) {
|
||||
// TODO: Check Conformance criteria here.
|
||||
@@ -25,13 +27,13 @@ Template.measurementTableView.helpers({
|
||||
const instance = Template.instance();
|
||||
const measurementApi = instance.data.measurementApi;
|
||||
const timepointApi = instance.data.timepointApi;
|
||||
if (!measurementApi || !timepointApi) {
|
||||
const baseline = timepointApi.baseline();
|
||||
if (!measurementApi || !timepointApi || !baseline) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Retrieve all the data for this Measurement type (e.g. 'targets')
|
||||
// which was recorded at baseline.
|
||||
const baseline = timepointApi.baseline();
|
||||
const atBaseline = measurementApi.fetch(measurementTypeId, {
|
||||
timepointId: baseline.timepointId
|
||||
});
|
||||
@@ -65,14 +67,15 @@ Template.measurementTableView.helpers({
|
||||
const instance = Template.instance();
|
||||
const measurementApi = instance.data.measurementApi;
|
||||
const timepointApi = instance.data.timepointApi;
|
||||
const measurementTypeId = measurementType.measurementTypeId;
|
||||
const current = instance.data.timepointApi.current();
|
||||
const baseline = timepointApi.baseline();
|
||||
|
||||
if (!timepointApi) {
|
||||
if (!measurementApi || !timepointApi || !current) {
|
||||
return;
|
||||
}
|
||||
|
||||
// If this is a baseline, stop here since there are no new measurements to display
|
||||
const current = instance.data.timepointApi.current();
|
||||
|
||||
if (!current || current.timepointType === 'baseline') {
|
||||
console.log('Skipping New Measurements section');
|
||||
return;
|
||||
@@ -80,7 +83,7 @@ Template.measurementTableView.helpers({
|
||||
|
||||
// Retrieve all the data for this Measurement type (e.g. 'targets')
|
||||
// which was recorded at baseline.
|
||||
const baseline = timepointApi.baseline();
|
||||
const measurementTypeId = measurementType.measurementTypeId;
|
||||
const atBaseline = measurementApi.fetch(measurementTypeId, {
|
||||
timepointId: baseline.timepointId
|
||||
});
|
||||
|
||||
+1
-2
@@ -7,9 +7,8 @@
|
||||
overflow-y: auto
|
||||
margin-left: -6px
|
||||
margin-right: -16px
|
||||
padding-bottom: 100px
|
||||
padding-bottom: 116px
|
||||
padding-left: 6px
|
||||
|
||||
-webkit-overflow-scrolling: touch
|
||||
|
||||
&::-webkit-scrollbar
|
||||
|
||||
Reference in new issue
Block a user