Work-in-progress on study/timepoint association modal and multi-study selection (LT-60, LT-116)
This commit is contained in:
1 parent
10be1b0336
commit
41b75de814
21 files changed
+505
-58
No files matched your search
@@ -0,0 +1,19 @@
|
||||
<template name="associationModal">
|
||||
<div class="modal" id="associationModal" tabindex="-1" role="dialog" aria-labelledby="associationModalLabel">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title" id="associationModalLabel">Study Association</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
{{ >studyAssociationTable }}
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-primary" id="saveAssociations" data-dismiss="modal" data-toggle="modal" data-target="#associationModal">Save</button>
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -0,0 +1,5 @@
|
||||
Template.associationModal.events({
|
||||
'click #saveAssociations': function(e) {
|
||||
log.info("Saving associations");
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,3 @@
|
||||
#associationModal
|
||||
.modal-dialog
|
||||
width: 80%
|
||||
@@ -12,6 +12,12 @@ function closeHandler() {
|
||||
setFocusToActiveViewport();
|
||||
}
|
||||
|
||||
/**
|
||||
* Displays the confirmation dialog template and the removable backdrop element
|
||||
*
|
||||
* @param doneCallback A callback
|
||||
* @param options
|
||||
*/
|
||||
showConfirmDialog = function(doneCallback, options) {
|
||||
// Show the backdrop
|
||||
options = options || {};
|
||||
|
||||
-3
@@ -24,9 +24,6 @@ function setLesionNumberCallback(measurementData, eventData, doneCallback) {
|
||||
return;
|
||||
}
|
||||
|
||||
// TODO: Get patientId
|
||||
// TODO: add measurement data according to patientId to get correct lesion number for each patient
|
||||
|
||||
measurementData.timepointID = timepoint.timepointID;
|
||||
|
||||
// Get a lesion number for this lesion, depending on whether or not the same lesion previously
|
||||
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
<template name="studyAssociationTable">
|
||||
<div id="studyAssociationTable">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<h4>Instructions</h4>
|
||||
<p>Associate the selected studies with timepoints in the clinical trial.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="center">Include Study?</th>
|
||||
<th class="center">Study Date</th>
|
||||
<th class="center">Study Description</th>
|
||||
<th class="center">Timepoint Type</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{{ #each relevantStudies }}
|
||||
<tr>
|
||||
<td class="center">
|
||||
<input type="checkbox" class="includeStudy" checked/>
|
||||
</td>
|
||||
<td class="center">
|
||||
{{ #if autoselected}}
|
||||
<p class="studyDate autoselected"
|
||||
title="This study was automatically added to your list due to its
|
||||
similarity with your other selected studies">
|
||||
{{formatDA studyDate}}
|
||||
</p>
|
||||
{{ else }}
|
||||
<p class="studyDate">{{formatDA studyDate}}</p>
|
||||
{{ /if }}
|
||||
</td>
|
||||
<td>
|
||||
<p>{{studyDescription}}</p>
|
||||
</td>
|
||||
<td class="timepointOptions center">
|
||||
{{ #each timepointOptions }}
|
||||
<label><input type="radio" name="{{_id}}" value={{type}}> {{name}}</label>
|
||||
{{ /each }}
|
||||
</td>
|
||||
</tr>
|
||||
{{ /each }}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</template>
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
function autoSelectStudies() {
|
||||
return [];
|
||||
}
|
||||
|
||||
Template.studyAssociationTable.helpers({
|
||||
/**
|
||||
* This helpers includes the user-selected and autoselected studies
|
||||
* to be associated.
|
||||
*
|
||||
* @returns {Array.<T>}
|
||||
*/
|
||||
relevantStudies: function() {
|
||||
var userSelectedStudies = WorklistSelectedStudies.find().fetch() || [];
|
||||
var autoselected = autoSelectStudies(userSelectedStudies);
|
||||
return userSelectedStudies.concat(autoselected);
|
||||
},
|
||||
/**
|
||||
* This helper returns the list of Timepoint types the user can set for this study
|
||||
*
|
||||
* @returns {Array.<T>}
|
||||
*/
|
||||
timepointOptions: function() {
|
||||
return [
|
||||
{
|
||||
value: 'baseline',
|
||||
name: 'Baseline'
|
||||
},
|
||||
{
|
||||
value: 'followup',
|
||||
name: 'Follow-up'
|
||||
}
|
||||
];
|
||||
}
|
||||
});
|
||||
|
||||
//trial criteria!
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
#studyAssociationTable
|
||||
.header
|
||||
text-align: center
|
||||
|
||||
.center
|
||||
text-align: center
|
||||
|
||||
table
|
||||
tbody
|
||||
tr
|
||||
td.timepointOptions
|
||||
input
|
||||
margin: 0 3px
|
||||
|
||||
label
|
||||
padding: 0 5px
|
||||
Reference in new issue
Block a user