LT-63 & LT-70: Study list shall have option today and study date range (from/to) to limit
This commit is contained in:
parent
37c893004c
commit
fb7024d20e
@ -50,3 +50,4 @@ anti:gagarin@=0.4.11
|
|||||||
check
|
check
|
||||||
aldeed:template-extension@4.0.0
|
aldeed:template-extension@4.0.0
|
||||||
zuuk:stale-session
|
zuuk:stale-session
|
||||||
|
gilbertwat:bootstrap3-daterangepicker
|
||||||
|
|||||||
@ -48,6 +48,7 @@ es5-shim@4.1.14
|
|||||||
fastclick@1.0.7
|
fastclick@1.0.7
|
||||||
fortawesome:fontawesome@4.5.0
|
fortawesome:fontawesome@4.5.0
|
||||||
geojson-utils@1.0.4
|
geojson-utils@1.0.4
|
||||||
|
gilbertwat:bootstrap3-daterangepicker@1.3.21_1
|
||||||
grove:less@0.1.1
|
grove:less@0.1.1
|
||||||
hangingprotocols@0.0.1
|
hangingprotocols@0.0.1
|
||||||
hot-code-push@1.0.0
|
hot-code-push@1.0.0
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
<th>
|
<th>
|
||||||
<h5>Study Date</h5>
|
<h5>Study Date</h5>
|
||||||
<input type="text" class="form-control worklist-search" id="studyDate">
|
<input type="text" class="form-control worklist-search" name="daterange" id="studyDate" style="padding: 0;">
|
||||||
</th>
|
</th>
|
||||||
|
|
||||||
{{#unless isTouchDevice}}
|
{{#unless isTouchDevice}}
|
||||||
|
|||||||
@ -18,8 +18,6 @@ search();
|
|||||||
|
|
||||||
var studyDateFrom;
|
var studyDateFrom;
|
||||||
var studyDateTo;
|
var studyDateTo;
|
||||||
var checkFrom = false;
|
|
||||||
var checkTo = false;
|
|
||||||
var filter;
|
var filter;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -66,7 +64,7 @@ function convertStringToStudyDate(dateStr) {
|
|||||||
var y = dateStr.substring(0, 4);
|
var y = dateStr.substring(0, 4);
|
||||||
var m = dateStr.substring(4, 6);
|
var m = dateStr.substring(4, 6);
|
||||||
var d = dateStr.substring(6, 8);
|
var d = dateStr.substring(6, 8);
|
||||||
var newDateStr = y + '/' + m + '/' + d;
|
var newDateStr = m + '/' + d + '/' + y;
|
||||||
return new Date(newDateStr);
|
return new Date(newDateStr);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -99,19 +97,19 @@ function search() {
|
|||||||
if (!studies) {
|
if (!studies) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Loop through all identified studies
|
// Loop through all identified studies
|
||||||
studies.forEach(function(study) {
|
studies.forEach(function(study) {
|
||||||
|
|
||||||
// Search the rest of the parameters that aren't done via the server call
|
// Search the rest of the parameters that aren't done via the server call
|
||||||
if (isIndexOf(study.modalities, modality) &&
|
if (isIndexOf(study.modalities, modality) &&
|
||||||
(new Date(studyDateFrom).setHours(0, 0, 0, 0) <= convertStringToStudyDate(study.studyDate) || !checkFrom) &&
|
(new Date(studyDateFrom).setHours(0, 0, 0, 0) <= convertStringToStudyDate(study.studyDate) || !studyDateFrom || studyDateFrom === "") &&
|
||||||
(convertStringToStudyDate(study.studyDate) <= new Date(studyDateTo).setHours(0, 0, 0, 0) || !checkTo)) {
|
(convertStringToStudyDate(study.studyDate) <= new Date(studyDateTo).setHours(0, 0, 0, 0) || !studyDateTo || studyDateTo === "")) {
|
||||||
|
|
||||||
// Insert any matching studies into the WorklistStudies Collection
|
// Insert any matching studies into the WorklistStudies Collection
|
||||||
WorklistStudies.insert(study);
|
WorklistStudies.insert(study);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -124,6 +122,17 @@ Template.worklistResult.onCreated(function() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Template.worklistResult.onRendered(function() {
|
||||||
|
// Initialize daterangepicker
|
||||||
|
$("#studyDate").daterangepicker({
|
||||||
|
ranges: {
|
||||||
|
'Today': [moment(), moment()],
|
||||||
|
'Last 7 Days': [moment().subtract(6, 'days'), moment()],
|
||||||
|
'Last 30 Days': [moment().subtract(29, 'days'), moment()],
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
Template.worklistResult.events({
|
Template.worklistResult.events({
|
||||||
'keydown input': function(e) {
|
'keydown input': function(e) {
|
||||||
if (e.which === 13) { // Enter
|
if (e.which === 13) { // Enter
|
||||||
@ -132,6 +141,17 @@ Template.worklistResult.events({
|
|||||||
},
|
},
|
||||||
'onsearch input': function() {
|
'onsearch input': function() {
|
||||||
search();
|
search();
|
||||||
|
},
|
||||||
|
|
||||||
|
'change #studyDate': function(e, template) {
|
||||||
|
var dateRange = $(e.currentTarget).val();
|
||||||
|
// Remove all space chars
|
||||||
|
dateRange = dateRange.replace(/ /g,'');
|
||||||
|
// Split dateRange into subdates
|
||||||
|
var dates = dateRange.split("-");
|
||||||
|
studyDateFrom = dates[0];
|
||||||
|
studyDateTo = dates[1];
|
||||||
|
search();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -6,10 +6,11 @@ table#tblStudyList
|
|||||||
thead
|
thead
|
||||||
background-color: black
|
background-color: black
|
||||||
white-space: nowrap
|
white-space: nowrap
|
||||||
|
|
||||||
&:hover
|
&:hover
|
||||||
color: #888888
|
color: #888888
|
||||||
|
|
||||||
|
|
||||||
// TODO: Use padding instead of hidden inputs to keep titles
|
// TODO: Use padding instead of hidden inputs to keep titles
|
||||||
// at the same height in the header.
|
// at the same height in the header.
|
||||||
#numImages.worklist-search
|
#numImages.worklist-search
|
||||||
@ -20,6 +21,12 @@ table#tblStudyList
|
|||||||
background-color: #888888
|
background-color: #888888
|
||||||
width: 100%
|
width: 100%
|
||||||
|
|
||||||
|
::-webkit-datetime-edit-year-field:not([aria-valuenow]),
|
||||||
|
::-webkit-datetime-edit-month-field:not([aria-valuenow]),
|
||||||
|
::-webkit-datetime-edit-day-field:not([aria-valuenow]) {
|
||||||
|
color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
tbody
|
tbody
|
||||||
tr
|
tr
|
||||||
height: 20px
|
height: 20px
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user