Fixes for current case status and Lesion Tracker measurement table behaviour (LT-248)
This commit is contained in:
1 parent
d70439c12d
commit
62f102617f
17 files changed
+244
-92
No files matched your search
@@ -1,17 +1,26 @@
|
||||
<template name="lesionTableView">
|
||||
<div class="lesionTableView scrollArea">
|
||||
{{>lesionTableHeaderRow id="target" measurements=targets currentTimepointId=currentTimepointId}}
|
||||
{{>lesionTableHeaderRow id="target"
|
||||
measurements=targets
|
||||
currentTimepointId=currentTimepointId
|
||||
timepointApi=timepointApi}}
|
||||
{{#each target in targets}}
|
||||
{{>lesionTableRow (clone this rowItem=target)}}
|
||||
{{/each}}
|
||||
|
||||
{{>lesionTableHeaderRow id="nonTarget" measurements=nonTargets currentTimepointId=currentTimepointId}}
|
||||
{{>lesionTableHeaderRow id="nonTarget"
|
||||
measurements=nonTargets
|
||||
currentTimepointId=currentTimepointId
|
||||
timepointApi=timepointApi}}
|
||||
{{#each nonTarget in nonTargets}}
|
||||
{{>lesionTableRow (clone this rowItem=nonTarget)}}
|
||||
{{/each}}
|
||||
|
||||
{{#if gt this.timepoints.get.length 1}}
|
||||
{{>lesionTableHeaderRow id="newLesion" measurements=newLesions currentTimepointId=currentTimepointId}}
|
||||
{{>lesionTableHeaderRow id="newLesion"
|
||||
measurements=newLesions
|
||||
currentTimepointId=currentTimepointId
|
||||
timepointApi=timepointApi}}
|
||||
{{#each newLesion in newLesions}}
|
||||
{{>lesionTableRow (clone this rowItem=newLesion)}}
|
||||
{{/each}}
|
||||
|
||||
@@ -1,32 +1,23 @@
|
||||
import { MeasurementApi } from 'meteor/lesiontracker/client/api/measurement';
|
||||
|
||||
Template.lesionTableView.helpers({
|
||||
targets() {
|
||||
// All Targets shall be listed first followed by Non-Targets
|
||||
return Measurements.find({
|
||||
isTarget: true
|
||||
}, {
|
||||
sort: {
|
||||
lesionNumberAbsolute: 1
|
||||
}
|
||||
});
|
||||
const withPriors = true;
|
||||
return MeasurementApi.targets(withPriors);
|
||||
},
|
||||
|
||||
nonTargets() {
|
||||
return Measurements.find({
|
||||
isTarget: false
|
||||
}, {
|
||||
sort: {
|
||||
lesionNumberAbsolute: 1
|
||||
}
|
||||
});
|
||||
const withPriors = true;
|
||||
return MeasurementApi.nonTargets(withPriors);
|
||||
},
|
||||
|
||||
newLesions() {
|
||||
return Measurements.find({
|
||||
saved: false
|
||||
}, {
|
||||
sort: {
|
||||
lesionNumberAbsolute: 1
|
||||
}
|
||||
});
|
||||
return MeasurementApi.newLesions();
|
||||
},
|
||||
|
||||
isFollowup() {
|
||||
const instance = Template.instance();
|
||||
const current = instance.data.timepointApi.current();
|
||||
return (current && current.timepointType === 'followup');
|
||||
}
|
||||
});
|
||||
Reference in new issue
Block a user