LT-63: Applying date range filter for DicomWeb and DIMSE services on study list
This commit is contained in:
parent
8d5d1ee360
commit
ed86c14807
@ -218,13 +218,20 @@ Template.worklistResult.onRendered(() => {
|
|||||||
const instance = Template.instance();
|
const instance = Template.instance();
|
||||||
|
|
||||||
// Initialize daterangepicker
|
// Initialize daterangepicker
|
||||||
instance.$('#studyDate').daterangepicker({
|
const today = moment();
|
||||||
|
const lastWeek = moment().subtract(6, 'days');
|
||||||
|
const lastMonth = moment().subtract(29, 'days');
|
||||||
|
const datePicker = instance.$('#studyDate').daterangepicker({
|
||||||
|
maxDate: today,
|
||||||
|
autoUpdateInput: true,
|
||||||
ranges: {
|
ranges: {
|
||||||
Today: [moment(), moment()],
|
Today: [today, today],
|
||||||
'Last 7 Days': [moment().subtract(6, 'days'), moment()],
|
'Last 7 Days': [lastWeek, today],
|
||||||
'Last 30 Days': [moment().subtract(29, 'days'), moment()]
|
'Last 30 Days': [lastMonth, today]
|
||||||
}
|
}
|
||||||
});
|
}).data('daterangepicker');
|
||||||
|
datePicker.setStartDate(lastWeek);
|
||||||
|
datePicker.setEndDate(today);
|
||||||
|
|
||||||
// Retrieve all studies
|
// Retrieve all studies
|
||||||
search();
|
search();
|
||||||
@ -287,4 +294,3 @@ Template.worklistResult.events({
|
|||||||
Session.set('sortOption', sortOption);
|
Session.set('sortOption', sortOption);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -1,3 +1,5 @@
|
|||||||
|
import { moment } from 'meteor/mrt:moment';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parses resulting data from a QIDO call into a set of Study MetaData
|
* Parses resulting data from a QIDO call into a set of Study MetaData
|
||||||
*
|
*
|
||||||
@ -32,10 +34,20 @@ function resultDataToStudies(resultData) {
|
|||||||
|
|
||||||
Services.DIMSE.Studies = function(filter) {
|
Services.DIMSE.Studies = function(filter) {
|
||||||
log.info('Services.DIMSE.Studies');
|
log.info('Services.DIMSE.Studies');
|
||||||
|
|
||||||
|
let filterStudyDate = '';
|
||||||
|
if (filter.studyDateFrom && filter.studyDateTo) {
|
||||||
|
const convertDate = date => moment(date, 'MM/DD/YYYY').format('YYYYMMDD');
|
||||||
|
const dateFrom = convertDate(filter.studyDateFrom);
|
||||||
|
const dateTo = convertDate(filter.studyDateTo);
|
||||||
|
filterStudyDate = `${dateFrom}-${dateTo}`;
|
||||||
|
}
|
||||||
|
|
||||||
var parameters = {
|
var parameters = {
|
||||||
0x00100010: filter.patientName,
|
0x00100010: filter.patientName,
|
||||||
0x00100020: filter.patientId,
|
0x00100020: filter.patientId,
|
||||||
0x00080050: filter.accessionNumber,
|
0x00080050: filter.accessionNumber,
|
||||||
|
0x00080020: filterStudyDate,
|
||||||
0x00081030: filter.studyDescription,
|
0x00081030: filter.studyDescription,
|
||||||
0x00100040: '',
|
0x00100040: '',
|
||||||
0x00201208: '',
|
0x00201208: '',
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user